Live data from Hacker News

Building an occupancy sensor with a $5 ESP32 and a serverless DB

matthew.science

101–110 of 221 posts

Re: Building an occupancy sensor with a $5 ESP32 and a serverless DB

#101
post #96

Earlier quoted context omitted.

The esp is a cheap microcontroller. You shouldn't productionize an esp32 dev kit but you should absolutely productionize an esp32 on a board you've designed that has the specif features to do your thing (whatever that is).

no, the ESP32 is a SoC, a bunch of chips in a package on a PCB. not a bare microcontroller chip. It is already a product with several resellers: ip, fab, packaging, exporter, distributor, retailer and a very high profit overhead of at least 2.7 times the costprice

You're absolutely wrong on a number of points. A SoC stands for "system on a chip", it refers to a single die (if you want to get pedantic, there are multi-die packages but this does not apply here) package, a "bare chip" if you will.

https://www.espressif.com/en/products/socs/esp32

The ESP32 is a SoC. It's available in QFN packaging (Quad Flat Pak No Lead).

The ESP32 is available included with a number of "modules" (and of course devkits). These modules are designed for production use and it can be economical to do so. You clearly don't have the foggiest idea about these product lines so don't seem to be in a good position to comment on the economics.

https://en.wikipedia.org/wiki/ESP32

Re: Building an occupancy sensor with a $5 ESP32 and a serverless DB

#102
post #101
post #96

Earlier quoted context omitted.

no, the ESP32 is a SoC, a bunch of chips in a package on a PCB. not a bare microcontroller chip. It is already a product with several resellers: ip, fab, packaging, exporter, distributor, retailer and a very high profit overhead of at least 2.7 times the costprice

You're absolutely wrong on a number of points. A SoC stands for "system on a chip", it refers to a single die (if you want to get pedantic, there are multi-die packages but this does not apply here) package, a "bare chip" if you will. https://www.espressif.com/en/products/socs/esp32 The ESP32 is a SoC. It's available in QFN packaging (Quad Flat Pak No Lead). The ESP32 is available included with a number of "modules"…

You should call the company, order a few million units, negotiate and sign their NDA and then they will tell you it is not a single bare die

Re: Building an occupancy sensor with a $5 ESP32 and a serverless DB

#103

There are some very good frameworks out there for doing things like these: - ESPHome - Home Assistant You can a build a device like this, often without writing one line of code, with ESP32 firmware updates over the air from a web UI. I wish those ESP chips/mini boards had Zigbee. You can get much better connectivity on a Zigbee network than on wifi in a typical deployment, where every mains powered Zigbee device also…

I have to say, my manual solution was a lot more fun and hands-on and let me learn a lot more skills (C++, Grafana, serverless) than a one-click solution. Though I will be prioritizing maintainability if I decide to go further with it!

Re: Building an occupancy sensor with a $5 ESP32 and a serverless DB

#104

I've heard talks of the toll tag companies wanting to be able to detect occupants in a car so they can properly charge the correct amount of fees when the occupancy changes the amount. I never looked into how that might happen, but I'm guessing Bluetooth would not be a solve here as it's too easy to circumvent if passengers disable bluetooth

Cameras work well for front occupants. They're already being used to check if commercial drivers are wearing seat belts.

if a toll tag required me to power it and allow it to record video of the interior of my car at all times, then FUCK THAT NONSENSE!!!! even if they had it setup so that the camera was only turned on briefly by a signal as you approached and then turned off again as you passed the gates, that's still a hard no from me.

Re: Building an occupancy sensor with a $5 ESP32 and a serverless DB

#105
post #43

How do people "productize" their ESP32 projects? (Edit: not talking about mass-producing something, I just want a self-contained unit rather than a board with a bunch of wires sticking out) I see a lot of pages where they show some bare-looking board, but in the real world you want to package that up. If you're a software guy like me, you would likely prefer to pay a bit extra to just have that tidied up for you rath…

There are a lot of companies that make electronics enclosures. Some of them are waterproof. Usually they have a couple pre-drilled mounting flanges to screw in the board as well, and then you'd drill your own external holes for input/output as necessary. Here's a couple manufacturers, and you can usually find stuff on e.g. adafruit and digikey as well to save on shipping if you're buying dev boards or other parts from them already.

https://www.hammfg.com/ https://www.budind.com/ http://takachi-enclosure.com/ https://www.adafruit.com/product/903

Re: Building an occupancy sensor with a $5 ESP32 and a serverless DB

#106
post #43

How do people "productize" their ESP32 projects? (Edit: not talking about mass-producing something, I just want a self-contained unit rather than a board with a bunch of wires sticking out) I see a lot of pages where they show some bare-looking board, but in the real world you want to package that up. If you're a software guy like me, you would likely prefer to pay a bit extra to just have that tidied up for you rath…

I am a huge fan of M5Stack. Take a look at the Tough or Core units. You get an ESP32 with couple of peripherals (speaker, buzzer, real-time clock) and a TFT touchscreen all in a case. Water-resistant in the case of the M5Stack Tough.

I've shipped a couple of consulting products based on them and it really cuts down on the work I need to do in order to build product.

Re: Building an occupancy sensor with a $5 ESP32 and a serverless DB

#108
post #43

How do people "productize" their ESP32 projects? (Edit: not talking about mass-producing something, I just want a self-contained unit rather than a board with a bunch of wires sticking out) I see a lot of pages where they show some bare-looking board, but in the real world you want to package that up. If you're a software guy like me, you would likely prefer to pay a bit extra to just have that tidied up for you rath…

You can design both a circuit board and a case with Fusion360, which is free for personal use. Use JLCPCB to assemble the board for you. You can 3D print the case yourself.

It took me about 20hr to learn how to use Fusion360 and make a simple circuit and case this way.

Re: Building an occupancy sensor with a $5 ESP32 and a serverless DB

#109
post #101

Earlier quoted context omitted.

You're absolutely wrong on a number of points. A SoC stands for "system on a chip", it refers to a single die (if you want to get pedantic, there are multi-die packages but this does not apply here) package, a "bare chip" if you will. https://www.espressif.com/en/products/socs/esp32 The ESP32 is a SoC. It's available in QFN packaging (Quad Flat Pak No Lead). The ESP32 is available included with a number of "modules"…

You should call the company, order a few million units, negotiate and sign their NDA and then they will tell you it is not a single bare die

Why would you need to sign an NDA? There are decaps readily available. Most ESP32 models have a separate die for the flash memory, but everything but the flash (that is uC, WiFi, BLE, and peripherals) is on a single die, which sounds like a SoC to me (The definition of SoC devices have always included devices with off-die RAM and Flash). These aren't "a bunch of components on printed circuit boards" as you initially claimed.

https://electronupdate.blogspot.com/2018/08/espressif-esp32-...

Re: Building an occupancy sensor with a $5 ESP32 and a serverless DB

#110
post #52
post #49

Earlier quoted context omitted.

There are lots of options. Most of what you see they don't: this is a one off project for the hacker and if others find it useful great, but not the goal. As such packaging isn't needed, sometimes you shove it in a box. If you want something nice, that can be done, now you need to pay someone (could be yourself!) to design a package. ESP32 is designed to be easy to put into your own products, this means design a circ…

I'm not really talking about producing something at scale, just the bare minimum of not having a board with wires coming out of it. Say I want to do some one-off project and put it outside somewhere, out of the weather, with some batteries to power it. Or an indoor thing with an AC hookup of some kind. Doesn't have to be perfect or beautiful or as tiny as possible; just sort of a complete package.

You can buy project boxes. Some of them come with breadboards/perfboard that properly fit with screws (e.g. https://discountbloc.ru/archive/products/xwzz1130z33x.html). Alternative is to 3D print a box.

Altoids box is a classic. Food plastic boxes also works depending how hot the components run.

Post reply on HN