Thanks to all the input on a different project I was working on, I was turned on to the esp8266. I didnt incorp it into that project, but it gave me an idea for a different project. Been doing a bunch of research on parts needed and think I found everything but would like some advice on different options or if I am missing anything.
The goal project is a battery operated temperature sensor that will send email/txt alerts if the temp exceeds a certain set point for a certain length of time. If it works I will build around 20 of them. Obviously power consumption is a significant issue since it is battery operated, so here's my ideas...please let me know your thoughts or any ideas you may have...
Power source: A single 18650 3.7v 5000mAh battery with over/undercharge protection
Processor: Adafruit 2821 Feather Huzzah with ESP8266 Wi-Fi
Sensor: DS18B20 probe w/ 1 meter wire using parasitic power
As of now I have no plans to have any LEDs or any other power consuming stuff in the project.
Im not asking for any code because I should try it and do research for myself before asking for help with that right?...
With it being battery powered, the biggest draw I believe is the wifi communication, so that needs to be extremely limited. Here are my ideal scenarios and Im wondering if it is doable:
Take temp every 20 minutes
Go into deep sleep in between temp taking
If temp exceeds (X) for 6 cycles consecutively then send email/text alert (hopefully can limit the alerts to no more than once every 6 hours until the power to the unit has been switched off).
Once per day send the current temp to a web server (I read something awhile ago about how to write the code and build your own web page for that...not the once per day part but the sending to a server part...will have to go back and find it).
Added bonus would be...
Low battery email (code based by measuring voltage?..possible maybe?) Without prototyping I wont really be able to tell what the expected battery life will be.
I have a few UNO's and NANOs laying around, but I figured the Adafruit board was an all in one solution that allowed a 3.7-4.2v JST connection. If my understanding is correct, I would need some sort of voltage regulator if using the 18650 battery with UNO or NANO?
So there it is. I'm hoping I can get at least a few months of battery life. Any ideas friends?
@Nick_Pyner - I figured with a max 1.5mA draw it wouldn't be a problem, but I remember some other posts that said that could be problematic sometimes, so for safety sake I guess I could wire it to the battery. Using 3.7v, would the value of the resistor change? I used 4.7k for my other project using 5v.
@SteveMann - I did see those chips, and yes there are much cheaper. The only uncertainty I had was using the 3.7v (4.2v) battery with it. The Adafruit board has the 3.7-4.2v JST connector built in which I though was handy, not to mention you could charge the battery as well via usb. Could you please recommend the correct way to wire the battery to the D1 Mini?
I don't think the data sheet relates the pullup res to the supply voltage. I don't think the resistor is so critical anyway. You are probably already aware that a lower value, say 2.2k, is used with longer cables. Parasitic power seems to be more trouble than it is worth, and best avoided. There is bound to be somebody who uses it all the time, but that does not mean that it is not best avoided.
So apparently my idea of a 3.7v 5000mAh 18650 is a pipe dream. Been doing more research and these seem to be chinese knockoffs that dont even come close to 5000mAh. Closest would be a 21700, but after all costs associated, it seems it would be less expensive to just go with a LiPo pack.
Beyond that change, still unsure as to the least power hungry method. Was hoping to get multiple months of usage before having to recharge.
Been searching trying to see if a float will stay in memory (sorry if I am not stating this correctly, still a noob to the 10th degree) so I can write if then else code that references previous readings as well as the current one.
Also, with a LiPo pack I would need a battery shield if Im not mistaken. The power cost of that prior to going into the D1 Mini not sure about either.
Ugh..seems like the more I read the more conflicting info I get and the more complex the project becomes. Suggestions or pointers to factual articles would be most appreciated. Not asking to be spoonfed, but being a noob not quite sure where to start.
Thanks again for any and all advice, even if its a rickroll or a lmgtfy...
I am using a ESP32 as a weather station. The project is solar/battery. The battery, currently, is a 3300mAh LiPo.
I had a 2600mAh battery. I did an experiment to see how long the 2600mAh battery would power the project. The ESP32 was put into deep sleep, awaking once every 5 minutes to take measurements and send the measurements to a MQTT Broker. The sensor being ran is a BME680, the sensor is powered 100% of the time. The battery ran for 4 nights and 4 days before I recharged it.
As far as power supply, I have had some decent luck hacking these:
inside is that #18650 battery that is continuously charged by the solar panel and there is a "charge controller" inside, Too.
So even if you run the battery down, the charger will bring it back up the next sunny day. Basically, you just open it up, attach to the battery and put it in a sunny place. Bonus, you can cut out the LED panel to save that electricity.
Idahowalker:
I am using a ESP32 as a weather station. The project is solar/battery. The battery, currently, is a 3300mAh LiPo.
I had a 2600mAh battery. I did an experiment to see how long the 2600mAh battery would power the project. The ESP32 was put into deep sleep, awaking once every 5 minutes to take measurements and send the measurements to a MQTT Broker. The sensor being ran is a BME680, the sensor is powered 100% of the time. The battery ran for 4 nights and 4 days before I recharged it.
You will wonder (under 50° latitude maritime) how powerful the solar panel must be to pass a cloudy winter.
I would bet on a 20W panel at least. On a completely cloudy day, it will not last more than 50mA-100mA for 6 hours, say ~ 400mAh a day
That should be just enough to power the device, and recharge the battery for the next 18hours.
If you have more than 6 really consecutive bad days, game over...
RIN67630:
You will wonder (under 50° latitude maritime) how powerful the solar panel must be to pass a cloudy winter.
I would bet on a 20W panel at least.
Without WiFi a 10 watt solar panel worked well. With WiFi using a 10W, The battery would slowly drain over a week. I, in fact, am using a 20W solar panel for operations.
For this specific project there is no access to sunlight. I am attempting to make walk-in cooler temperature monitors for multiple locations. In most of them there is no access to an electrical outlet, which is why I'm trying to barebones it as much as possible. I know I will have to charge them, but having to do it once every few days is out.
cjizzle:
having to do it once every few days is out.
I'm really not sure what the real problem is here. It appears that the only stated problems are the lack of sunlight and absence of power outlets. I haven't heard of any seriously restrictive criteria, like weight, volume, or portability, so a large, heavy 6v deep-cycle battery really ought to fill the bill and enable you to talk in terms of AH instead of poofing about with mAh. Plan that properly, and you can take a well-deserved holiday in Cuba with confidence.
Nick_Pyner:
I'm really not sure what the real problem is here.
Agreed. I did not state the exact purpose of this project and the restrictive criteria involved. Hopefully the below will help explain...
I am an Operations Director for an eleven store franchise QSR chain in a rural part of the U.S. All eleven of my locations are very far apart, I'm talking a 4 hour drive from corner to corner. As such I am unable to be at every location on a frequent basis. Anyways, last week and the week before, the high pressure cutoff switch on the walk in coolers tripped at two different locations in the middle of the night. When the crew went in the next day the temps were beyond the safety range, so we threw out hundredss of dollars in product. Another location the breaker tripped during the day and no one noticed before it was too late, so again we lost a lot of money on thrown out product. Despite the requirement of temp taking 3x a day, there is still the possibility of human error or midnight madness. I would much rather get some sort of alert when something is potentially wrong vs waiting on the aftermath.
The coolers ranges are 33-39F, and I rarely if ever have seen one go below that range, if malfunctioning they have always gone above. There are no 110v outlets in these coolers, so the idea was to have a low powered device in each cooler that would only trigger an email/txt alert if the temp reported was above (x) degrees for more than an hour (allowing for delivery variances where the door would be open for an extended period of time).
So whatever I put in there has to be low powered and food safe. The local health dept may frown on a lead acid deep cycle battery hanging from the ceiling or sitting in a corner.
And yes I am well aware there are many professional services that do this sort of thing..the problem is in the cost. With this pandemic going on we can't afford to put thousand dollar monitors in each location and pay the monthly fee for monitoring. Thats why I am taking my novice electronics skills here and asking questions and doing a ton of research.
If battery options arent available Ive also thought about tying them in to the 110v light fixtures..that could be a possibility as well.
Anyways, thanks for the advice and the bluntness, they are both most appreciated.
It just occurred to me that if you don't want to penetrate the cooler wall with a sensor, then why not tape a ds18b20 to the coolant line going into the cooler. If the compressor stops compressing, you will see the temperature of the coolant line go up long before the inside of the cooler goes up. You could probably be there before anyone in the store knows there is a problem.