The size and price of the ESP wifi modules have quickly made them into one of the preferred building blocks for IoT devices. Unfortunately they are not particularly well suited for very low power applications. [LittlePetieWheat] wanted to add MQTT to a cheap PIR solar light, so he paired an ESP with an Attiny85 to hold it to a strict power budget.
Most of these lights contain some sort of no-name microcontroller that monitors the analog PIR sensor, and turns on the LEDs as required. [LittlePetieWheat] replaced the PIR sensor with one that gives a digital output for simpler interfacing. The Attiny serves as the low power brains of the project. Its tasks include reading the solar panel and battery voltages, and PIR output. When movement is detected by the sensor, it activates a clever little latching power circuit to power on the ESP01 just long enough to send a MQTT message. The LEDs are only turned on if there is no power coming from the solar panel. The solar power is stored in a 18650 battery.
The Attiny85 might not be a powerhouse, but it is perfect for simple, low power applications like this. We’ve also seen it pushed to its limits by running tiny machine learning models, or receiving software updates over I2C.
Solar heat and flags of plastic sticky tape. What could go wrong? Fourth of July flag waving with fireworks! At least a sticky black mess if ever opened again.
Very cool – I wonder what the power consumption is like – how many events per day can the battery (usually a 18650) support.
Wouldn’t it make more sense to use something such as RF and send the info to a esp so then the esp can talk to the MQTT service?
One would think an esp8266 is capable enough to do this without an attiny85. It runs circles around the 85 in terms of processing power
The point is to save power. The attiny runs all the time but drawing very little current. When it detects motion it powers on the esp to do the networking stuff then shuts it down again. The attiny draws far less current than the esp would do if it was monitoring the pir
I understand the point is to save power but i would think the PIR is able to wake up the ESP
It is, and with a MOSFET and some resistors a simple latch can be make that keeps the ESP on until it shuts itself off again.
Entirely correct
This interesting application may be covered by patents owned by my company. Sensible licensing terms can be agreed to aid commercialisation.
Good for you buddy, have your lawyers talk to theirs.
And at least give patent numbers, cause you’re genuinely, truly full of yourself.