Notifications
Clear all

ESP32 Cam solar bank

13 Posts
3 Users
0 Likes
486 Views
(@drew474)
Member
Joined: 1 year ago
Posts: 9
Topic starter  

I apoligize for the seemingly simple question, but I am just starting out still.  

 

So I found some 6V 150mA solar panels, as well I have an esp32 cam with the board to plug it into for programing via usb. I would like to keep this outdoors (Ontario, Canada) and run 24/7 as a wild life cam. I am not sure where to start to get that set up. 

Would 18650 batteries be ok? I have some TP4056 boards as well (non protected ones). Is one battery enough to cover for overnight and low light? I dont think that board works with more than one cell. I do have an antenna to attach to the esp32 which should provide enough range I can connect to it from inside.

I was going to use the sketch for the server, so I can just connect and watch whenever, it doesn't need to record.

I have some old Wyze cams (v2) as well I would like to try, but I feel like that would require way more battery and solar power to maintain. Thanks in advance.


   
Quote
(@davee)
Member
Joined: 3 years ago
Posts: 1641
 

Hi @drew474,

   Others may be able to give some first hand experience of this particular task, but as a backup:

Assuming you want your system to be self-sustaining ... ie not needing battery charging from other sources, then as with most systems (like your bank balance), you need to determine the overall power and energy balances, and build in sufficient reserves to cover the periods when demand exceeds supply.

--------

The general approach to such a question would start by measuring the power consumption of the equipment you wish to power when it is performing the task. If the power consumption varies with conditions (e.g. daylight and night time, will it be active for the whole 24 hours?, or some kind of activation on detecting movement), then this also needs to be determined, so you can estimate a 'maximum demand' case.

This will give you an indication of (a) the amount of energy needed to power over a cyclic period, possibly 24 hours.

----------------

Note you need to determine both the maximum power (measured in Watts) and the energy for a period (measured in Watt-hours). This applies to both demand and generation. Any power system with a limited storage system, like a battery, must be able to meet both the maximum instantaneous power demand and the energy demand over a cyclic period.

--------

Similarly, you need to determine how much energy your solar panels will actually deliver, again over a similar period of say 24 hours ... simple specifications like 6V 150mA only indicate a probable maximum .. you need to allow for number of hours of daylight, incidence angle of the sunlight, effect of cloud, etc.

------------------

Then, use the power consumption and energy generation data to estimate how much energy will be required to sustain the task during the period that power generation is less than power demand (night time, cloudy weather, etc.). This will provide an estimate of the battery capacity.

----

Note, you can usually make accurate measurements of power generation and consumption at any one moment. However, you will need to use your judgement to convert this limited data into estimate of what will happen over a longer term, say a day or a month.

----

Some of this data, particularly power generation, will be very variable and it is likely your estimates will need a considerable allowance for the uncertainity, so I suggest you start by making some 'quick and dirty' measurements and estimates, then construct a prototype system, whose power and energy balance can be monitored, based on this preliminary data to get some 'real world data', to refine your overall energy balance, with the expectation that the prototype system will need changing (probably upgrading) to achieve the optimal result.

Good luck with your project.

Best wishes, Dave


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6856
 

@drew474 Hi Drew. It's really hard to know where to start, but let's debunk one thing at a time. First, the 'I can power it from solar' concept. Determine how many watts of solar panels you will deploy in an area with no trees or any other kind of shade and at the optimum NS angle for that latitude and date. Yes, it changes every day, but there are 2 strategies, either manually every week or two manually adjust them, or use yet another battery to move them automatically (see the problem?) For the daily EW adjustments, then either do nothing and reduce solar capture by a large amount (what I do) or use another electric motor again to move them, or move them manually a few times per day. Me and most RVers' approach is to lay them flattish and add one panel over what you planned to compensate for losses. (actually, add 2)

Use the website LINK  to calculate your solar capture for your location. Do it for each solstice and one equinox. Either use some sort of average or a worst case, or a method of your choosing, remembering that on Dec 21, you will very likely need a battery big enough for a couple of weeks at least.

I would use a spreadsheet as your input numbers will be very small, 6x150mA or 0.9 watts per panel, and the calculator wants Kilo Watts as input, so you need to scale your panels by 1,000. Then when you get results in Kilo's, just read them as watts. This is the easiest way. I did that for 4 of your panels located at Sudbury, and the daily watts is 17. That isn't bad, but the rule of thumb is to expect 1 day of sun and 2 or 3 days of cloud. Some folks forget that now you need a battery 3 to 4 times as big as what you need for one day to store all that power you get for 4 days in one day. As I said, use a spreadsheet and be VERY careful of your units.

We haven't even discussed battery chemistry and how that affects lifetime cost, temperature performance, rechargeability, and safety, and I might be missing something.

FYI, I am also working on this kind of camera as a game camera, not for taking nice pictures. To do that requires something other than an esp32CAM, maybe an Arducam, Raspberry Pi, or PICOW, and they need MUCH larger batteries and addon UPS boards (I have one on order) and are very costly. The latest Raspberry Pi camera is 12MP, and there is also an 8 and a 5; plus, you can get HQ lenses now, but the cost will easily exceed a store-bought game camera, although it might be the better quality. I have not checked in a few years, so don't know. I am not cheap. My DSLR camera for fieldwork costs many thousands, as does the tripod, remote-controlled pan, tilt head, and remote camera operations. That setup is my pretty picture setup, and the DIY camera tells me that game was in a certain area so I can set up my remote-controlled camera 100ft away from where I am hiding.

I think that is enough for now, I hope I haven't discouraged you, but I do think it is important to understand the reality of some things. I am attaching my esp32 cam working and the current being measured also an Amazon Canada link to the esp32 cam MB boards I use HERE

p.s. What general area are you located?

IMG 7482

 d

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@drew474)
Member
Joined: 1 year ago
Posts: 9
Topic starter  

@zander  @davee

 

Thanks for the words of wisdom. I figured that I would need a large bank, especially for 24hr video. I am sure I can try to figure out coding to put it to sleep for night and wake it during the day. 

I also realize that say, the 18650 batteries may not be the best choices, at least for winter.

I live in eastern Ontario, near Kingston. The cam would be in my backyard. There is not much for obstructions, so if the weather is good there should be lots of power. I was going to start by 3d printing a bird feeder that can incorporate the cam, as well as enough panels and the appropriate battery pack.

If I needed 5V, 400mA, 2W, for a generous estimation, for 16 hours and then have the esp32 go to sleep for the remainder (mainly dark time). This would mean 90Wh? (plus sleep period). So (roughly) 27000Ah battery pack.

This seems doable, but for the solar component, how should I go about testing my averages for the panels? I can take the multimeter out several times a day and check voltages at different times, or during different conditions. I will attach my info from the website you provided.

Screenshot 20230422 193036

 Also, I am not sure what I will require (boardwise) for safe and consistent charging from the panels, that will also allow me to power the cam at the same time. Thank you so much for taking the time to help. 

 

-Drew


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6856
 

@drew474 I am just on my way out for a bit, but some quick answers. Ask @davee for his excellent wake up solution, this uses 0 ZERO while 'asleep'. I showed you the camera in video mode uses 250ma, did you not see the picture? a single 18650 under STD conditions is good for 10 hours. Not sure how you came up with 90wH, I see  32wH. Why would you want a 27,000 AH battery? that would be 270 batteries like I have at about $1,000 each. I think $270,000 is a bit much. Why do you need to take out your VOM, the chart you printed out is the solar available to you. Based on what I can see, you have (assuming you did the x1000 trick) roughly 10wH per day but need 32. Maybe I need to re-run your chart?

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@drew474)
Member
Joined: 1 year ago
Posts: 9
Topic starter  

@zander  lol just re read my post. That should read 27000mAh. The 90Wh was for my Wyze cam, apologies, I came off my night shift and I'm only running on a couple hours sleep.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6856
 

@drew474 Let me know when you can tell me how many solar panels you have so I can calculate your solar budget.

Explain where you live again, which has 16 hours of sunlight in winter.

I told you the ROT for solar is 4 hours a day at the peak for that location/date. It's a rough way to measure the area under the curve.

Become familiar with this website LINK. It will teach you how the sun moves and changes every day for every place on the earth.

As I showed you in the picture, the camera, when on in video mode and the WiFi radio is on, draws 250mA, so a pair in series of 2,500mAh 18650 would supply power for about 10 hours. You need a solar charge controller that will put out 8.4 V to charge it. The number of batteries you need is as follows. Since you are using 1 pair of batteries, there is not enough room to put the current in at the start of the day, so add a second pair of batteries to allow for simultaneous use and charge. Also, as we know, the sun does not shine every day, so find out from your local weather people what the 'normal' 'avg' days without sun is. All the experts I have spoken to use the ROT of 3 days so add another 12 batteries. However, now you need a LOT more solar panels.

I think I have explained all the gotchas, time for you to open up that spreadsheet and do some calculations so you learn firsthand. Yes, there are special charger circuits that allow for charge and discharge at the same time, but I would keep it simple for now.

It might help to think in terms of buckets of water. That's how most of us electrical types were taught. If you use 1 bucket a day, then 4 buckets in 4 days due to no rain, then to catch up on the 5th day, you must collect it at 4 times the daily rate. It's a little thought experiment. Once you have the concepts ingrained, it's simple to convert to batteries and amperage.

Sorry to ramble on, but I know this stuff like the back of my hand, but I have difficulty explaining it to new people.

BTW, your solar chart is dead wrong. You can't enter fractional inputs. You have to scale it up, I suggest, by 1,000, then when you read the chart, read the kWh as Wh.

Example 1 of your panels is 150mA by 6V, which is 0.9W. Multiply that by the number of panels you intend to deploy. I will assume it is 4, so the number is now 3.6W. Enter that as 3.6 since it is in kW. That yields monthly numbers of 300 to 500 or 10 to 17 per day, which at 8.4V is 2 amps, not quite enough to recharge the 2,500mAh 18650.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@drew474)
Member
Joined: 1 year ago
Posts: 9
Topic starter  

@zander Would a higher voltage panel, say 12V be more efficient? I would have to step it down, which would lose a little power, but it would ultimately increase current to charge more quickly. If that was the case I assume I would need another battery type, as the 18650s would probably catch fire.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6856
 

@drew474 The solar panels are connected to a solar charger where higher voltage and lower current are converted to lower voltage and higher current. Take mine as an example. The output of my 3 19V series panels is 57 V at 10 A, and another set of 3 in parallel gives me 57V x 20A or 1,140 Watts. The charge controller changes that to roughly 14.45V at 80A. The reason for this is that the wires from the panels are a long DC run, and ohms law tells us to keep the current low to reduce losses, also, since copper is so expensive now, we want the thinnest wires possible. In my case,, I have about 40 ft of 10AWG.

I am a former industrial electrician, computer expert and all-around DIY guy, and I spent a couple of years researching and studying this stuff. You might want to take at least a few months. Your assumption of needing another battery type does not follow. Your assumption that the 18650s would catch fire is poorly founded.

Here is your first lesson related to ohms law, current is pulled or drawn, NOT pushed, so it is irrelevant the size of the power supply to the battery. It will take what it wants. HOWEVER, LiFePO4 chemistry is VERY hungry, and the reason fools blow up alternators if they don't use a controller to limit the current. This is one of its benefits, you can charge it in a straight line unlike lead which takes many hours to go from 80% to 100%

Please do not experiment with these batteries in your house until you are 100% sure you know what you are doing. Lithium is a very nasty chemical. I could care less what you do to yourself, as you have been warned, but think of your wife and kids if you have any. I have 2 fire bags, one inside the other, and a pizza stone to sit that on. My charger is state of the art, and I am 99.9% sure it is safe, but ANYTHING less than 100% is too risky when human life is involved.

I don't know what you do for a living, but do you think I could master it in a day or two?

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1641
 

Hi @drew474,

Ask @davee for his excellent wake up solution, this uses 0 ZERO while 'asleep'. 

I make no claims about quality or quantity .. it was just a short 'feasibility' study for another forum member, which describes a simple and cheap circuit for a programmable timer that will power up a microcontroller board at a preprogrammed time ... then, when the microcontroller board has completed its tasks for that 'power up' session, the microcontroller can set the timer for the next 'power up' and perform a power down. The example used a Pico, but will probably work for any small microcontroller board with a battery power source of up to 5.5V, and an I2C interface used to control the alarm. (The 5.5V limit is set by the timer device.) 

The write up is on this forum at

https://forum.dronebotworkshop.com/technology/power-off-sleep-circuit-based-on-real-time-clock-ds3231/

I foresee your situation may involve a higher voltage at the battery interface, so that some extra complexity may be involved, but perhaps it will be a useful starting point that you can further develop for your requirements.

Best wishes, Dave


   
ReplyQuote
(@drew474)
Member
Joined: 1 year ago
Posts: 9
Topic starter  

@davee Thank you very much, I will give it a read.


   
ReplyQuote
(@drew474)
Member
Joined: 1 year ago
Posts: 9
Topic starter  

@zander Hey, thank you again for the help. I will do some more reading.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6856
 

@drew474 LOT'S of reading.

I think you should start with getting your esp32-CAM working and see if the picture quality is what you expect. It's a 2MP camera IIRC, which is good for knowing a bird is there, not for producing a cropped finished product to be framed and hung with pride.

As I mentioned, I am interested in an MCU or MPU-based camera to determine where the animals are. Then I come back with over 50 lbs of gear to set up a WiFi-controlled camera and pan-tilt head hanging on for dear life to over $8,000 worth of gear. Once you decide on what MCU/MPU, camera, lens and maybe even lighting you are going to use, probably with a Pluto Trigger, then you can buy the solar panels plus support gear you need and a 50AH LiFePO4 battery in a heated enclosure since your location gets cold enough to destroy Lithium batteries then you can take pretty pictures. In my situation, I have no plans to stay overnight. Yes, I will need to be on-site before the golden hour, but it starts warming up afterward.

Start small and learn.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote