3 ms·
Nice project! Needs to be battery operated and last for at least two weeks (14 days): UNOs are notoriously power-hungry. It's highly unlikely that 4 AA batteri
by dirktheman 8y ago
Nice project!
Needs to be battery operated and last for at least two weeks (14 days): UNOs are notoriously power-hungry. It's highly unlikely that 4 AA batteries can power an Arduino UNO full-time AND open/close the coop door. Maybe with some advanced deep-sleep-cycle, but I'd love to know more about this.
I also fail to see why he didn't use a cheap ESP-board. They're usually cheaper than Arduinos (as in: below 5 bucks), have an onboard WiFi chip and they run Arduino code just fine. You get a couple of pinouts less, but since he's only using a sensor and a stepper motor this won't be a problem.
If I were to make this, I'd go with a nodeMCU and a cheap solar charging setup. Probably would fit in the budget, too.
- LeifCarrotson 8y ago> UNOs are notoriously power-hungry... Maybe with some advanced deep-sleep-cycle, but I'd love to know more about this. The naive Arduino code has two basic functions setup() and loop(). Putting your main code in loop results in a busy wait that spins up 100% of the CPU all the time. It's also running all the peripherals all the time. You want to use "avr/sleep.h" and "avr/power.h" to put the processor to sleep with peripherals off (except the one which will wake up the processor). See http://www.gammon.com.au/power http://www.gammon.com.au/power for a nice tutorial. Opening these headers and their source in the avr-gcc libraries and comparing to the documentation on the processor is a good exercise in getting right down to the metal of how the processor manages power. You also want to get rid of the ancient 7805 regulator; many clones use a better LDO voltage regulator to alleviate the problems with high standby current.
- opencl 8y agoHe also seemed very concerned about the cost of an RTC module at ~$15 but they're readily available for less than $1.