I have a small project on a NodeMCU running with a BME280 temperature sensor and a light sensor. It sends its measures every 5m to Thingspeak.
Since it is powered by USB, I currently have no way to get the cables to the balcony. There are doors in-between and I would have to drill some holes, etc.
My question is, what is the best way to run this project on a battery for a good while? I believe some power banks in the 10.000 mah/ 20.000 mah range could power a project like this for more than a week. Is that what most people do in this circumstance?
From what I've read, the Wifi use is the most taxing part of the project. But the only alternative I can think of, using an SD card, can also be very taxing. Any alternatives?
I use a very basic 328P bare bones board powered straight off a couple of AA batteries that reads temperature from a DS18B20 roughly every hour (it uses the watchdog timer for sleeping) and transmits the temperature reading using an RFM69 433MHz radio module.
The setup has been running on around 3 or 4 nodes now since October last year and i'm still on the same pair of AA batteries on each node.
markd833:
I use a very basic 328P bare bones board powered straight off a couple of AA batteries that reads temperature from a DS18B20 roughly every hour (it uses the watchdog timer for sleeping) and transmits the temperature reading using an RFM69 433MHz radio module.
The setup has been running on around 3 or 4 nodes now since October last year and i'm still on the same pair of AA batteries on each node.
Interesting. What's the setup for receiving and logging? Do you need a computer to be always on?
The receiving "station" or "gateway" is just another node (same PCB etc) that has a USB to serial module plugged into it. It's powered via the USB lead that comes from a re-purposed 10ZIG Thin Client (58xxq variant) running Linux Lite.
I'm not a Linux guru and have no idea what MQTT is about so I just rolled my own code. There's a Python script running in a terminal window that sits there listening for packets from the receiver. When it gets one, it appends date & time to it (from the Linux time) and writes it to a CSV file. Each day a new file is created.
There's an Apache web server running on the same thin client with a small PHP script that converts the CSV file into an HTML table on demand. There's an additional PHP script that, on demand, merges all the CSV files into one big file and makes it available to download.
That's it really.
The 10Zig thin client is pretty low power anyway so it's just left on all the time.
EDIT: With a bit more fiddling I suppose I could add an RTC module and an SD card module and make it self contained. But then there's the faf of getting the data out of it without turning it off!
Can You make a test where You use a very low capacity power bank and watch how long those mAh last? To speed up the test, send data 10 times faster.
Then You can calculate the size of the needed power block.
My current weather station is built around a wemos mini pro powered by a 2,400mA 3.7V li-ion battery and lasts around 2~3 months on a charge. It only reports every 15 minutes.
I'm not familliar with the performance of NODEMCU on battery power, but I suspect the design is inferior to wemos mini in this respect as it is in most ways. But it might not be so bad.
If your circuit only lasts a week on a 10,000mAh battery, I guess you are not using deep sleep mode between readings?
A powerbank will have the problem that it requires a minimum current to stay on. So if your processor goes to sleep, the powerbank will shut down. Better to use just plain batteries which you could switch out once a week or whatever.
PaulRB:
My current weather station is built around a wemos mini pro powered by a 2,400mA 3.7V li-ion battery and lasts around 2~3 months on a charge. It only reports every 15 minutes.
I'm not familliar with the performance of NODEMCU on battery power, but I suspect the design is inferior to wemos mini in this respect as it is in most ways. But it might not be so bad.
If your circuit only lasts a week on a 10,000mAh battery, I guess you are not using deep sleep mode between readings?
I wasn't talking about my circuit, since I haven't tested it yet, but about similar projects I find online.
I didn't know about the wemos mini! Thank you for the tip.
I would think about one battery powered unit (i.e. a Pro mini) at the station that sleeps most of the time. Wakes up, samples data, sends data to plugged in base with an Rf24L01. Base could be a Wemos to send on to internet or whatever. I have several sensors running like that. Cut energy consumption at station to absolute minimum, let base do the rest.
Because my solar cells do not get direct sunlight, I use 30W 12V, loaded, cells. I found a 10W did not give a full recharge with WiFi on. I added a 20W and kept the 10W for 30W total. Typically charging starts a bit before 7AM and the battery is charge by 10AM.
I run the solar cells to a PWM Charge Controller.
The Charge Controller charges a 12V 16Ah LiFePo4 battery.
The battery supplies to a 5V 3A regulator, which feeds the projects electronics.
The ESP32 is on 24/7 sending data every 11 seconds to a MQTT Broker.
Because my solar cells do not get direct sunlight, I use 30W 12V, loaded, cells. I found a 10W did not give a full recharge with WiFi on. I added a 20W and kept the 10W for 30W total. Typically charging starts a bit before 7AM and the battery is charge by 10AM.
I run the solar cells to a PWM Charge Controller.
The Charge Controller charges a 12V 16Ah LiFePo4 battery.
The battery supplies to a 5V 3A regulator, which feeds the projects electronics.
The ESP32 is on 24/7 sending data every 11 seconds to a MQTT Broker.
Idahowalker:
I run my weather station on solar.
Because my solar cells do not get direct sunlight, I use 30W 12V, loaded, cells. I found a 10W did not give a full recharge with WiFi on. I added a 20W and kept the 10W for 30W total. Typically charging starts a bit before 7AM and the battery is charge by 10AM.
I run the solar cells to a PWM Charge Controller.
The Charge Controller charges a 12V 16Ah LiFePo4 battery.
The battery supplies to a 5V 3A regulator, which feeds the projects electronics.
The ESP32 is on 24/7 sending data every 11 seconds to a MQTT Broker.
That's really cool. Solar would be very appropriate given the amount of sun I get all year round. How many days of low light can your batteries take? Also, how long has it been running?
I have a remote sensor array feeding data to my weather station every minute. The array includes two DS18B20 temperature sensors, an analog cup anemometer, and a TSL2591 lux sensor. These feed into a Nano Every which transmits to the base station via an nRF24L01 telemetry link. The entire assembly is powered by a 12v sealed lead acid cell which is kept charged by a 10W solar panel and charge controller. Since I just got this finished about a month ago, I don't have long term experience but so far it looks great. On a sunny day the battery is back at float level by mid-morning. I do have the advantage of the array being located in full sun.
east1999:
That's really cool. Solar would be very appropriate given the amount of sun I get all year round. How many days of low light can your batteries take? Also, how long has it been running?
When the sun is up, the solar cells are outside, so they get light everyday there is light. The solar cells are connected to the PWM Charge controller, which gets solar power. With the PWM charge controller getting solar power, when the solar cells output power, the batteries take solar power everyday there is an output by the solar cells
The station has been running for one year. I first tried the LiPo/TP4056 thingy for several months. So 8 months or so using the PWM charge controller / LiFePo4.