So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By r84shi37
#72703 So I'm working on creating a temperature sensor for my chicken coop outside so that we can ensure that it stays warm for them. I'm trying to decide between the TMP36 sensor and the DHT11 temp and humidity sensor. Both should work with the ESP-01 since both can draw the 3.3v and then send their readings to GPIO pins.

My first concern is powering the ESP-01. At first I was considering using [https://www.amazon.com/gp/product/B019XT18IQ/ref=ox_sc_act_title_5?smid=A35P912AEQH25B&psc=1]This four AA battery pack[/url] to provide 6V to [https://www.amazon.com/gp/product/B00898NGL0/ref=ox_sc_act_title_7?smid=A2JO7YP9I9Y3D6&psc=1]this voltage regulator[/url] and then to the esp-01, but now I'm thinking about just using [https://www.aliexpress.com/item/1pcs-Free-shipping-AMS1117-4-5-7V-turn-3-3V-DC-DC-Step-down-Power-Supply/32624897736.html?aff_platform=link-c-tool&cpt=1514242379575&sk=eeI6YBA&aff_trace_key=d69fbb8816d24080bfd8b141340cffa9-1514242379575-00815-eeI6YBA&terminal_id=817fe5afab84440292e7c90289342cd9]this voltage regulator instead.[/url] I will look into the deep sleep mode on this thing so that it just does occasional temperature checks, but I bet that it would still only last a few months at most. I haven't done all the math on how fast the temperature pings would drain the approximate 6000mah that the four AAs would provide though...

We do have a wall outlet inside of the chicken coop, so I'm considering just using a usb phone charger and soldering the 5v and ground wires to the step down power supply from aliexpress.

What has been your guys' experience with battery vs hard wired power for the esp-01? I could try to keep a li-on battery charged via a small solar cell, but it gets cloudy here for months, and I don't think that it would work in the long run.
User avatar
By Oldbod
#72743 Esp is quite power hungry for this sort of thing. If you're using the WiFi to report back, the experiments people have done mean you'll be replacing batteries at best every month or so. (I've been looking at this off and on since esp first launched).

Battery sensors tend to use very simple protocols, usually one way, so transmitting only for short periods usually at low power. And though overcoming the difficulties is part of the challenge, it does mean you tend to use strategies like less frequent readings or bunching up readings and sending less frequently.. OTOH if things inside the coop change slowl y or you're only profiling then that might be fine...
Mains has its drawbacks, mainly safety and availability. But you have it available and using a standard 5v power supply means your project is as safe as the supply, so a big plus. Swapping to a nodemcu would let you just plug just plug a USB supply in and makes programming easy. Handy if only monitoring from mains. If you're aiming to control heating rather than just monitor, consider perhaps a sonoff th16? This draws power from mains, has a 16a mains relay, and you can plug in either type of the sensors you mention. Downside it stops logging if you have a outage Also relay contacts fed from its mains supply, so not volt free. But ideal for wiring inline to a small heater.

Its supplied as a ready to use iot unit, but you can connect to the esp and reprogram it quite easily as a project. It isn't waterproof, and doesnt have cable clamps (designed for fixed installation I expect they'd say) but the temp sensor is waterproof. CE approved, though personally I'd want to add mechanical protection if in a public place.

Good luck, all good fun!