Live data from Hacker News

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

matthew.science

181–190 of 221 posts

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

#181
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…

If it uses Bluetooth you're theoretically on the hook for thousands of dollars if you want to sell your ESP32 project as a product. (IANAL; it may take a lawyer to truly understand if you have to pay or not.)

ESP32 modules (read: not just the packaged ICs) are pre-certified in most markets. This is the main advantage of shelling out for these more expensive modules instead of just integrating it all yourself. It's also why many of the IOT products which use ESP32s use modules and waste a lot of area rather than the much smaller ICs: certification is a nightmare for small scale products!

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

#182
post #66
post #60

Earlier quoted context omitted.

You shouldn't productise anything with ESP32, its just an overprized bloated hobby pcb. See my comment below on how to productize this: use a 4 cent off the shelf microcontroller on a 10 cent pcb or much better: make a custom chip with all the sensors on board but with $25K minimum Capex but tiny Opex

As others point out: you could hire someone to do it. Based on my custom 1 cent ASIC (custom chip) I would design, test and build your (moisture or other) sensor for €3000 excluding tax and price of all the needed tools. Usually more like $6000 because they want to outsource all the problems (like mass production and sales) to me morphle@ziggo.nl if you want me to design it

You're selling yourself drastically short asking for just 3k unless your plan is to wrap the entire project in a week. I don't think I've ever managed to even setup a new tech library in under a week, let alone design and verify anything.

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

#183
I have a couple of home automation projects that use Raspberry Pi boards and rely on BLE. One thing I’ve found is the onboard Bluetooth is pretty awful on the Pi 3 and not very good on the Pi 4. Switching to use a Bluetooth dongle made a huge difference with stability and reliability. I no longer had to continually run scripts to try to reset kernel drivers or the entire Bluetooth stack when things got cranky (which seemed to happen many times a day). As a bonus I got a Class 1 adapter that would let me tweak the power output.

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

#184

Earlier quoted context omitted.

> I don’t think it’s a power issue as it’s getting 5V1A from a power outlet directly to USB-C into the device. It's not the total voltage/wattage the PSU can provide, but the voltage at the processor. The ESP's varying current draw notoriously causes too much noise and a lot of boards don't have large enough decoupling capacitors so the voltage drops too much and it glitches out. Also a warning that USB PSU's can ver…

This is correct, I thought it wasn't and was going crazy trying to debug my Pi 3 resetting my 3D printer every time, with any of ten power supplies I tried, including a configurable bench PSU. I switched to the official Pi PSU after someone said "trust me on this" online, and yep, zero issues in all the years since.

It's voltage for Pi 3. They forgot to account for voltage drop due to protection or something. Official as well as third-party Pi 3 specific adapters are rated at 5.1V to mitigate that problem.

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

#185

This is an excellent write up! > Seeed Studio XIAO ESP32S3/C3, WaveShare ESP32S3 Zero, Unbranded ESP32-WROOM with OLED, Orange Pi Zero W (untouched), Raspberry Pi Zero W (L->R, T->D) After testing all of these, the only one reliable to work for long periods of time (one month currently) was the XIAO ESP32C3/S3. I suspect they may be having power issues? For the ESP32's specifically I highly recommend adding a beefy c…

It’s definitely not a reliability issue, with the platform - ESP32 in general is very popular so it’s surely an issue with my usage. I’m fairly certain it’s just a cheap manufacturer issue I ran into. I bought essentially a no-name ESP32 at first and that’s the one that refused to last. Proper manufacturer solved that issue for me and now ESP32 works just fine. The raspberry pi actually never worked, largely because…

Just put a huge low-ESR cap on the 3V3 rail. Newer WiSoCs like ESP32 draws too much for too short that regulators can't catch up. I've once had brownouts with an Uno R3 style ESP32 board, and it didn't stop until I added a 0.22F EDLC from my junk bin, which is absurd and not a recommended usage of EDLC, but I think even 330uF electrolytic from same bin didn't cut it.

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

#186
post #60
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 shouldn't productise anything with ESP32, its just an overprized bloated hobby pcb. See my comment below on how to productize this: use a 4 cent off the shelf microcontroller on a 10 cent pcb or much better: make a custom chip with all the sensors on board but with $25K minimum Capex but tiny Opex

I'm certain that an ASIC wouldn't be cost effective for all but very large operations. Even if you could get it at the same price, it would massively increase time to market, and if you need to scale production fast you're shit out of luck. Not to mention you'll probably need multiple iterations, especially if you're sticking a Bluetooth modem and a bunch of sensors in it.

Using an off the shelf MCU and off the shelf sensors saves you all those headaches.

Also, ESP32 is not a "pcb".

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

#187
I'm one of those annoying people that keep BT, data and location services off to save power. WiFi I mostly keep on, so in theory you could collect data this way too.

Regarding the ESP32's reliability, it's likely power supply related. I've seen exactly this before. I run ESP32 devices with a 1A 3v3 linear regulator with a little smoothing, and zero issues.

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

#188
post #174
post #119

Outstanding write-up! We actually built a business based on this technology (occuspace.io) and have had to address almost all the questions that you brought up. To answer some of them here: Q: How accurate is BLE beacon count, as a proxy for occupancy? A: It's very highly correlated but different dining locations, classrooms and library floors have very different correlation factors. Consider using other, perhaps mor…

Can you do fall detection for the elderly?

Seeed Studio (maker of the Xiao) have mmwave sensors that can do fall detection.

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

#190

This is an excellent write up! > Seeed Studio XIAO ESP32S3/C3, WaveShare ESP32S3 Zero, Unbranded ESP32-WROOM with OLED, Orange Pi Zero W (untouched), Raspberry Pi Zero W (L->R, T->D) After testing all of these, the only one reliable to work for long periods of time (one month currently) was the XIAO ESP32C3/S3. I suspect they may be having power issues? For the ESP32's specifically I highly recommend adding a beefy c…

I have a bunch of ESP32s performing critical-infrastructure tasks in my Home Automation; they've been running flawlessly for about a year now; I update them occasionally (ESPHome) but haven't had any issues. Some of them perform multiple tasks, e.g. one of them is Bluetooth proxy in my home office, but it also runs the light strip along my Skadis wall boards. I'm using some random brand ones from a company called "AZ…

I have a number of similar devices but I use dirt cheap Wemos D1 Mini boards from Aliexpress, they usually cost around a buck each (and they come in ESP8266 and ESP32 variants).
Post reply on HN