Live data from Hacker News

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

matthew.science

51–60 of 221 posts

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

#51
post #47

Earlier quoted context omitted.

3d printed enclosure?

That sounds like one of those "I have a problem... now I have two problems" jokes. I wanted something simple and cheap and now I need to go deal with this whole other thing I don't know much about and either rent or buy into it?

You can also pay someone to do it.

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

#52
post #49
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 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.

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

#53
post #47

Earlier quoted context omitted.

3d printed enclosure?

That sounds like one of those "I have a problem... now I have two problems" jokes. I wanted something simple and cheap and now I need to go deal with this whole other thing I don't know much about and either rent or buy into it?

As somebody else mentioned, you can hire it out.

There's a lot of files running around with existing models for common projects, so you probably don't need to design your own enclosures a lot of the time unless you want to.

And printers have gotten cheap, like $99 gets you a jumping off point into the hobby.

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

#54
post #29
post #25

Earlier quoted context omitted.

If it is only 20 trees, you could use off the shelf sensors. Its much better and cheaper to design from scatch, use an $0.04 ultra-low power Arm microcontroller with ADC or a Padauk, add a single layer pcb with two well proportioned pcb traces in a plastic bag as a capacitive moisture censor (better than resistive sensor) and a $0.12 solar cell or rechargable battery. Single sensor cost around $0.41 excluding labor,…

That's a great point. I have experience w/ Arduino and have made a carrier board one time [1], but am not familiar with full custom PCB + MCU designs. Do you have any suggestions on where to get started for someone with my medium level of experience here? And also, how difficult would you anticipate a custom MCU to be? [1] -- https://zachbellay.com/projects/odaf/#iteration-3-phase-2-wi...

A custom MCU+pcb is at least 3 months work: downloading an design for an FPGA, testing it, using openlane to make an custom chip, taping it out, writting boot code and the main loop ( I would do that in assembly, much simpler than using C and some vendors library). The big issue is taping it out to a chip FAB, around $25K, see my comment below.

I would get started with an off the shelf MCU with good documentation, writing the software on a good development platform with the same assembly as the final microcontroller. For the $0,04 ARM microcontroller I mentioned above as final target with analog to digital controller (ADC) I would first write the program (the main loop) on a Mac on a high level language like Squeak or Python and use the $4 raspberry pi pico as ADC. I would then rewrite the working software in ARM assembly and test it directly on the pi pico. Then I would flash it on the $0.04 arm microcontroller wired on a breadboard to the moisture sensor. Then I would debug it again, with simple flashing leds to see where your software goes wrong. morphle at ziggo dot nl for more questions like how to find a 4 cent arm chip. I would start at lcsc.com , use their sister company and eda tool to design the pcb only with lcsc.com parts and order it fully assembled. Then I would open source it so others can directly order assembled boards

I would avoid Arduino like the plaque, in essence its just a precanned overpriced bloated C library on an overpriced microcontroller. You always get better results writing from scratch. See 'is it complex or did we make it complicated', a lecture by Alan Kay at Quallcom on Vimeo or Youtube, on designing systems from scratch or buy vendor stuff: https://vimeo.com/82301919

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

#55
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.

[deleted]

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

#56
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.

I just buy new small breadboards and jumper wires and make it so that it looks nice. Jumper wires of the proper length, not jumper cables.

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

#57
post #47

Earlier quoted context omitted.

That sounds like one of those "I have a problem... now I have two problems" jokes. I wanted something simple and cheap and now I need to go deal with this whole other thing I don't know much about and either rent or buy into it?

As somebody else mentioned, you can hire it out. There's a lot of files running around with existing models for common projects, so you probably don't need to design your own enclosures a lot of the time unless you want to. And printers have gotten cheap, like $99 gets you a jumping off point into the hobby.

Do people not just sell like "complete package" things?

The board in the article is $13.49 ( https://www.amazon.com/dp/B072HBW53G ). If you could get an enclosed, complete thing for $20, including the board and whatever you need for it to run, that'd be much less of a PITA than "brand new hobby" or "find someone to 3D print stuff for me locally and deal with that whole hassle".

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

#58
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 look if if I can find some already assembled things and try to build an project around it. For example I used an pictureframe to build a nice neopixel thing, I also documented it on my website, https://mikub.me/post/(1)/

So what I do is I usually look around what everyday objects could become nice enclosures for microcontrollers and such things.

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

#59
post #47

Earlier quoted context omitted.

3d printed enclosure?

That sounds like one of those "I have a problem... now I have two problems" jokes. I wanted something simple and cheap and now I need to go deal with this whole other thing I don't know much about and either rent or buy into it?

That is why so many amateur projects look ugly: making a pretty package is a whole new skill set. 3d printing is the easiest acceptable solution, but it isn't the best. Best would be a custom designed injection molded housing, but that is even more work to design.

Nothing about making a nice presentation is beyond what amateurs can do. However it is a lot more effort and so most decide it isn't worth it.

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

#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

Post reply on HN