diy solar

diy solar

Solar powered USB port in vehicle

grdnman

New Member
Joined
Sep 18, 2023
Messages
9
Location
Virginia
I have a Arduino device (esp8266) that I'm using in a vehicle. My issue is powering it. Right now I'm using a power bank (24000mah) with a USB port. I have to bring the power bank in every 2 to 3 days to charge it, which can take 6 hours.

I want a solar powered USB port that runs 24/7. My plan: Solar Panel -> Charge Controller -> 12v Battery -> 12v to 5v USB adapter -> Arduino device

If needed, I can occasionally bring the battery in and charge it. The goal is to rarely have to do that. The battery I've chosen has a built in BMS with high/low temperature protections.

I have no experience with the solar / power side of this. I'm basing some of this info on this post: https://forum.arduino.cc/t/most-efficient-way-to-power-an-arduino-from-a-12v-battery-array/682744/7

Parts list:

- Solar Panels + Charge Controller
$34.99 Apowery Solar Panel Kit 12V Monocrystalline,Battery Maintainer +10A Solar Charge Controller

- Battery
$35.99 SEFEPODER 12V 8Ah LiFePO4 Lithium Deep Cycle Battery, 2000+ Cycles Rechargeable

- 12vDC to USB adapter
$15.99 DC 12V 24V to 5V USB Step Down Converter

Extras:

Battery Charger
$27.99 LTRAPOWER 4-Amp 14.6 Volt LiFePO4 Battery Charger
Comment: I can easily take 5 hours each month to charge it.

I would prefer to keep it at $150-ish if possible. Is this solar panel kit enough? Mostly the Arduino device will be used and not much of anything else. Any thoughts? See any mistakes? Suggestions?
 
I have one of those, but there's several issues.

#1. It cannot power my device all night long without running the vehicle battery down.
#2. The vehicle is rarely used/moved, therefore the battery would go dead very shortly unless cranked.

The Arduino device needs to run 24/7.

In addition, I need a stand-alone package/kit that I can move from 1 vehicle to another at a later point also.
 
I have one of those, but there's several issues.

#1. It cannot power my device all night long without running the vehicle battery down.
#2. The vehicle is rarely used/moved, therefore the battery would go dead very shortly unless cranked.

The Arduino device needs to run 24/7.

In addition, I need a stand-alone package/kit that I can move from 1 vehicle to another at a later point also.
Ahh .... didn't know you were talking about a stationary vehicle.
 
You can get a USB battery bank that charges while discharging and a solar usb charger so could just use that.

Also look at power consumption of the arduino there's ways to lower consumption depending on what it does
 
Thanks everyone for the answers so far.

The USB battery bank is a good idea, I've thought of it myself, but there are issues. I'm no expert on batteries as I mentioned above, but it seems like most USB battery banks wouldn't be able to withstand the temperatures in a vehicle. My current one (which has small solar panels) stops charging all the time in the heat. I've seen 120F+ recently inside of the vehicle. During winter, I'd have to unplug the solar and bring the USB battery bank in, warm it, and charge it, which is one of the things I'm trying to avoid here.

The battery I picked above does have high/low temp protections built in. Google tells me that 12v 8am is equal to 8000mah. That's smaller than my current 24000mah USB battery bank, but with solar, it would be charged every day.

I really do want the: Solar Panel -> Charge Controller -> 12v Battery -> 12v to 5v USB adapter -> Arduino device. I'm hoping it will (easily) work year round, can handle the temperatures for the vehicle, and can handle updates to my Arduino project which will be changing in the coming months. The Arduino device is an ESP8266. I've looked thoroughly into power management with it and it's pretty well optimized.

I think I'm happy with the Battery I've chosen. I just need to know if the "Solar Panel Kit" I picked is enough to keep the battery charged. I can't tell you how much power the ESP8266 device uses and I wouldn't know how to measure that. The Solar Kit says it's a "Maintainer" which worries me. Should I pick another kit? Any ideas or suggestions on one?
 
If 24000mah lasts 2-3 days then you're using about 10,000mah a day or 10ah at 5v per day or 4ah at 12v. That seems very high but completely depends on what you're using it for. We have devices that use under 10% of that.

20w solar is 100w per day at 12v so 10ah which should cover it. Get a battery to last 3-5 days and you should be all set
 
Thanks, that's good info about the amp hours and usage. And the solar panels.

With upcoming updates for my project, I will need more power. Right now, the main loop is 3 lines of code. It checks an analog sensor, sends the data to another ESP, sleeps for 1 second, and repeats. Unfortunately, I've read that ESPs are power hungry, particularly when connected. Additional sensors will be added. The current analog sensor will be replaced by a digital one. I'll also eventually switch to ESP32.

My 24000 mah (oops its 25000) battery is several years old. That 25000 was never verified. There's a lot of fake numbers thrown around on these USB battery packs. It's no longer sold, but was titled: IXNINE Solar Charger Power Bank 25000mAh. There are newer versions.

The 36 Ah battery is $117 which is a bit out of my budget. I could get it if needed, but I'd have to split it up into several months of buying parts. 20Ah is $69. I know there's other batteries, I just need to have good BMS with high/low temperature protections. I do understand your reasoning behind 3+ days worth.

So now I have some tough decisions. I really need a bigger/better battery, which costs more than I wanted this project to be.
 
Is size a concern? Just thinking about the temperature swings that a lead acid might be a better option. Keeping the controller cool though might require a fan or moving the electronics somewhere that isn't encased in glass (bed box maybe?) since wires can really go anywhere.

Also, if you want to keep this running year round, consider the winter weather and oversize your panel. 20w isn't squat in winter.

That battery you linked has high temp protection but not Low temp.

Used equipment from Craigslist might be a good option to look into if you're trying to stay cheap. Refurbished batteries, used panels, Buy & Sell forum on here are all things you can do to build up a system on the cheap.

OR

Super simple idea would be to get a cheap solar generator and a cheap 100w solar panel and just use that. Pretty much anything out there is going to be more than the 96Wh that 8Ah battery you linked and provide the USB you want.

OR

There's also the option of DIY'ing yourself a battery, mounting it and a simple BMS and a small SCC into a battery box, and mounting your own sockets as desired. About $170 with USB, 10a MPPT, and 25Ah of battery capacity. A little over budget but 3x the capacity.

So a few different ways to do it. Because of the temperature swings I'd actually go for a 20+Ah lead acid AGM if you can find it cheap.
 
Last edited:
If you set this to 5 seconds or something the battery will last a LOT longer. I think a SLA battery would be better, this is standard in every alarm system, fire system, UPS and even auto trailer brakes. Very cheap and will work fine in most situations then not need any protections. Also you can just wire it up from solar to battery to 5v to arduino.

I have something like this laying around and it outputs 5v USB.
 
I live in Virginia. Outside temperatures average from 20F to 85F. I've seen below 0F and above 100F a few times.

I have changed the data sending on the ESP to once every 3 seconds. While I could directly wire the ESP (I think it supports a max of 3.3v, although some say they are 5v tolerable) I'd prefer to stick with the USB output. It's easy for me to remove the device, update it, and use the USB port for other ideas later on. I looked up SLA batteries. A 35 ah SLA battery is about $75.

Battery size isn't a concern. I was hoping the solar panel would fit into a window (18"x48" is max). I didn't realize that cheap solar generators exist. I will look into them.

I now realize that the 8ah battery is inadequate for my needs. I originally chose it because of the first link that I posted above, where a guy was using an 8ah for an Arduino project.

I just remembered today that I have this other battery. The person who sold me the vehicle wanted his battery back, so I bought a new one, and held this one for him. I tried to return it, he never replied. It's been 2 years. Maybe it could be used?
batt.jpg

So I'm considering multiple options now.

#1. Get another USB power bank. It's cheap, and I can rotate it with the one that I currently have. Charge one while using the other. I'll still have to make multiple trips to the vehicle to change the power banks every few days.

#2. Choose one of the battery options the both of you have given me (or use the one above) and a good solar panel to go with it. Hopefully I can get a panel that fits within my window (18" x 48" max).

#3. A solar generator. I need to look more into these. A quick look and I seen several for around $55-ish, which is good.

I really appreciate the replies, help, and ideas.

Any thoughts on the battery that I already have?
 
Use the battery you have. It's a starter battery and not deep cell battery so designed for large loads and not really small ones but much better than any battery bank. Normal lead acid does emit gasses so not good to be inside a non vented area. If that isn't a concern then any deep cell/marine battery is ideal. Massive and lasts forever. Just find one on sale or clearance. You can get SLA little batteries pretty cheap like $30 in certain places
 
The charge controller in that kit has usb ports built-in. You should be able to use those directly without a battery, at least in the daytime.
 
#2. Choose one of the battery options the both of you have given me (or use the one above) and a good solar panel to go with it. Hopefully I can get a panel that fits within my window (18" x 48" max).
The issue with a panel in a window is that windows are normally treated with a UV blocker that really nerfs how much power a panel can generate. I got a 50w flexible panel and glued it to the roof of my truck and ran wires inside in an attempt to not have to re-program radio stations from both sides of the state every time I shipped out and came back. It didn't work but I blame that on the lack of sunshine that house had every year.

The charge controller in that kit has usb ports built-in. You should be able to use those directly without a battery, at least in the daytime.
And as long as it has battery power it'll still power the USB ports at night.

As for the battery, well Free > Cheap > Nice so go for it!
 
Thanks for the replies. I'm going to try using the battery that I have (for now). It's basically new. I will keep in mind that it's not a deep cycle and will find something better later.

I didn't realize that the first kit has USB ports on it. I will look for that from now on. It's good to know that the USB ports will work from the battery.

I do understand the panel would work better outside. I do hope to buy a larger system later on and mount it, I'm just not ready for that. I realize I won't be getting 100% of what the panel can do if it's in a window.

I found a 100w panel on ebay that will fit my window. It's 36x16. My window is 48x18. They have several different charge controllers. I'm not sure which one to get. All seem to have a USB port. I'll have to try to find a way to keep it cool. I'm hoping to not drill holes in the vehicle for this setup.

The Battery terminals, 8 gauge wire, and connectors is to go from the charge controller to the battery.

New list:
$00 - Battery
---
$60 - Panel - https://www.ebay.com/itm/385480657513
$16 - Charge Controller - https://www.ebay.com/itm/385684673764
---
$05 - Battery terminals - https://www.ebay.com/itm/274368046985
$07 - Wire Terminals (5/16 to 8 gauge) - https://www.ebay.com/itm/374731406895
$22 - (2x) 10ft of 8 gauge wire - https://www.ebay.com/itm/133270181543

I spent 5 hours today looking all of this up.

Does the panel look OK?
Which charge controller should I get?
Anything else that I need?
 
You can get a USB battery bank that charges while discharging and a solar usb charger so could just use that.

Also look at power consumption of the arduino there's ways to lower consumption depending on what it does
Very good point. Why don't you just use an atttiny(arduino compatible) series chip, which consumes a few milliamps. Your battery would last for months and no solar needed.
 
Why don't you just use an atttiny
Because (I'll assume) it doesn't have an onboard way of connecting to another Arduino device, for one. That would have to be added through another chip such as a ESP-01. I have a few of those but have never used them. That adds another layer of complication that isn't necessary. The esp8266 (NodeMCU) has all of that on-board.

Once I add the ESP-01 and all of the sensors that I need it wouldn't be a tiny amount of power any longer. An older version of the project had 4 sensors with it, all consuming their own power. 3 of those sensors had onboard always-on LEDs, which is ridiculous. I hope to remove those for future versions. I hope to add more sensors if possible with future versions. I'm no expert with any of this, I'm learning as I go. I'm sure there are better ways of doing what I want.

I also wanted to have a "starter" solar system in the vehicle, and always-on powered USB ports simply make sense. I do plan on adding a larger system later on. This is a good starter project for me. I might expand upon this one, or start all over later on.

Updates:
- I decided to order a different wire (pure copper / welding wire) rather than CCA. I ordered different connectors too. I got them in and have created the battery wires. They are thick and look great.
1.jpg 2.jpg

- I got the panel in, it looks good.

- I got the MPPT 100a charge controller in. I hope it's what I need, I asked above. It looks cheap and I've read that they are fakes (meaning it might be PWM and not MPPT.) But I assume it will still work. Maybe I'll use it for now and get something better later.

The one thing that I didn't know to get was the cable that goes from the panel to the charge controller (MC4 to bare wire). I expected it to be included with either the panel or the charge controller. It wasn't, so I ordered it last night. Another week of waiting before I can test things out.
 
I can't tell you how much power the ESP8266 device uses and I wouldn't know how to measure that.
These work awesome.
https://www.amazon.com/gp/product/B07X3HST7V/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&th=1

I skimmed your thread. Like you said those 25,000 mah battery packs are lies. If you look at the specs they will give a charge rate and charge time. That spec is a little closer to usable capacity.

Can you build yourself a little portable solar kit and put the panel on the vehicle roof?
 
Thanks, that's a great idea. I looked around and found a different one, I hope it works the same way. I hope it measures the usage of the device, rather than measuring the output from the USB port.
https://www.ebay.com/itm/123946852024 (Item E)
I haven't ordered it yet. I'll try to order it in the next day or two.

The USB solar / power bank that I have has the model number HI-S025 on the bottom of it. It's several years old. It also says:
Capacity: 25000mAh/92.5Wh
Solar Panel: 5V/6.0W
Input (Max): 5V/2.0A
Output (Max): 5V/2.1A
It's a solid black model. Most of the newer models are orange I believe.

Can you build yourself a little portable solar kit and put the panel on the vehicle roof?
I'm trying not to put holes in the vehicle... yet. I plan on doing that later. This suppose to be a small test system but appears to be turning into something more than that. I might get a better battery, maybe a 50AH SLA for about $110. I'm still thinking it over, and need to test what I have first, once it all gets here.

Updates:
- Still waiting on the cable (MC4 to bare wire) that I ordered.
- Still waiting on the power switch from another seller too. The shipper had an issue. This switch isn't necessary and can wait.
 
I think you said it takes 6 hours to charge the power bank. Pretend its a 2a. Would make it about 12000mah of usable power.

You cant strap a panel to the roof. Run the wires under the engine to the battery. Plug your Adruino device into the cigarette lighter?
Not sure how often the vehicle moves. Those portable jump starters sure come in handy.
Instead of buying a $110 battery you could buy a jump starter and use and abuse the existing battery. Jump it when the car needs to move.
(assuming its an older vehicle that can run from the alternator alone)
 
Back
Top