Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


chimera

448 posts

Ultimate Geek


#275750 7-Sep-2020 17:26
Send private message

I put a 5,700 litre water tank in at home, ironically just before water shortages were announced for Auckland around 6 months ago.  Using it to water the garden in summer / backup as emergency drinking water. 

 

For home automation I also run OpenHAB, so am building a small ESP project to report the percentage water level back to OpenHAB via MQTT.  It's a pretty straight forward and whilst lab'd up on my desk, it works well.  However, as it's outside and away from the house I will need to run it on batteries.  

 

The devices needing power are:

 

- Wemos D1 mini (takes either 5V or 3.3V feed)

 

- Control board for the ultrasonic sensor (takes 5V feed)

 

I have 2 x 18650 batteries (3.7V 3600mA each) powering the project.  Currently, these are 2S (so ~8.4V 3600mA of power)

 

Basically how it works is when the Wemos powers on it connects up to WiFi, takes 2 x measurements one second apart, checks the two readings (to ensure no anomalies) and if ok, sends that % water level back to OpenHAB which the publishes that measurement in the UI (along with a rule that simply publishes the 'last updated' date/time)

 

I've measured current draw on the Wemos + Sensor board and it's about ~80mA give or take for about 10 seconds.  The ESP then disconnects from WiFi and puts itself into deep sleep mode for approx 1 hour.  So basically every 1 hour, it comes out of sleep mode takes a measurement sends it off to OpenHAB then goes back to sleep (I also added a MOSFET in as well to logically switch the power on/off to the ultrasonic sensor board once the Wemos powers up / goes to sleep, as I found the board leaked a bit of power when sitting idle so this helps reduce overall power usage)

 

I have a solar panel for this which I'll run to charge the batteries.  Its an 18V 10W PV panel. I also have a small MPPT solar charger that will suit my requirements too (output voltage and powerpoint for this are adjustable)  From my calculations, it should easily be able to keep the batteries charged based on mA usage vs average sun etc for my area.

 

 

 

Now for the questions...

 

1. Am I best to run 2 x 18650's in series (so ~8.4V 3600mA) and then run a voltage regulator to drop voltage down to the 5V required to power both Wemos and ultrasonic sensor board?  My concern is the feed to the voltage regulator may take up excess power wasted as heat??  

 

OR 

 

2. Am I best to run 2 x 18650's in parallel (so ~4.2V 7200mA) and then run a DC-DC step up boost converter to 5V to power both Wemos and ultrasonic sensor board?

 

 

 

Or does it really not matter?  I also read charging more than one 18650 is preferably done in parallel than series, especially if the batteries are unbalanced.  I can run a BMS to assist with series charging if needed, as I have one available to use so not really an issue there.

 

 

 

Thoughts?  Or any other tips or ideas that would help with this?

 

 





 

 


View this topic in a long page with up to 500 replies per page Create new topic
 1 | 2
Nate001
614 posts

Ultimate Geek


  #2559815 7-Sep-2020 18:54
Send private message

You sound to be on the right track. I don't know how much sunshine you're getting but the panel is over kill for 2 cells! But it will work fine if your gear can handle the voltages.

 

My few cents:

 

  • Avoid stepping voltages as much as possible, as these are losses. But if your panel is so big you don't need to worry about losses.
  • As you said, if you put cells in Series you NEED a BMS. You do not want to overcharge a cell (4.2V) or else it will highly likely cause a fire. This is also advisable for basic cell protection, especially low voltage.
  • If you need to step down voltage use a Buck Converter - This avoids the heat problem you get with a linear regulators.
  • Don't forget a fully charged cell is 4.2V so set your charge voltage for that, not 3.7.

I have a Wemos D1 Mini running 24/7 on wifi with various sensors. Its been running since March without problems, it can fully recharge over 2-3 sunny winter days, and charge 100mA on a cloudy day. It gets sun from morning till 2ish. Set up is:

 

  • 4x18650 in Parallel 2600mAh/cell with 1x BMS for basic protection, low cut off, over charge, short circuit
  • 1x 6W/6V PV
  • 1x MCP73871 (knock off Adafruit Board from AliExpress) with added resistor to enable 1A charge rate.
  • 1x DC DC Boost Converter set to 5.2V

 
 
 

Shop Mighty Ape for electronics, games, computers books and more (affiliate link).
chimera

448 posts

Ultimate Geek


  #2559836 7-Sep-2020 19:21
Send private message

Thanks for the response.

Yeah aware the PV panel is well over kill, but part of the reason is because the location of the tank is shaded by the house and doesn’t receive sun til around 1pm. The PV specs are also “aliexpress” maximums when under best conditions and I’ve found cheaper panels like these never really output these levels. I’m just playing it safe because - well, I had this panel sitting around anyway and the next best panels I had are little toys at 12V 1.5W so not quite enough. Guess I could hook a few smaller panels up in series though?




 

 


richms
26750 posts

Uber Geek

Trusted
Subscriber

  #2559848 7-Sep-2020 19:55
Send private message

Parallel and then an LDO to run the wemos would be best. Boost to 5v will have massive ongoing usage. Not sure how good the onboard regulators are for dropout voltage needs to just put the liion cell straght into the vin pins.

 

Another option is to get a solar light with a LiFe cell in it and just put the ESP across the cell directly, and then cut the LED from it so that it has nothing running it flat at night. May not be too good on the ESP but they are quite hardy boards and seem to be ok, but at low voltage I have had some corrupt up.





Richard rich.ms



chimera

448 posts

Ultimate Geek


  #2559907 7-Sep-2020 20:28
Send private message

richms:

 

Parallel and then an LDO to run the wemos would be best. Boost to 5v will have massive ongoing usage. Not sure how good the onboard regulators are for dropout voltage needs to just put the liion cell straght into the vin pins.

 

 

Cheers Rich, but issue is the sensor board needs 5V, so would need to boost some way or other if running in parallel.

 

If ultrasonic sensor board took a 3.3V feed, running parallel would be an easy choice, as voltage drop wouldn't be that much but unfortunately it needs 5V.  In series 8.4V at full charge dropping to 5V is quite a lot and doesn't seem the smartest way of powering this project?

 

 





 

 


richms
26750 posts

Uber Geek

Trusted
Subscriber

  #2559918 7-Sep-2020 20:48
Send private message

Put a boost converter with an enable pin driven by the ESP to get the 5v then? Some of them have almost no draw when disabled so would solve your draining problems.





Richard rich.ms

chimera

448 posts

Ultimate Geek


  #2559921 7-Sep-2020 20:52
Send private message

So basically...

 

2 x 18650 in parallel, feeds 3.3V LDO voltage regulator to power Wemos, 5V DC boost converter with power controlled via MOSFET from GPIO pin on Wemos.  Solar PV to MPPT solar charge controller direct to batteries (no BMS needed?? charge controller has over/under charge protection) 

 

 





 

 


Nate001
614 posts

Ultimate Geek


  #2559966 7-Sep-2020 22:13
Send private message

Would also recommend a voltage supervisor for solar projects, something like a KA75330 that hooks up to the enable pin so the micro can recover from a low voltage situation without you having to manually reset it.




andrewNZ
2487 posts

Uber Geek
Inactive user


  #2559997 8-Sep-2020 00:04
Send private message

I'm not sure why you're worried about paracitic draw. Ignoring that paracitic draw for a second, that rig would go for 2 days on those batteries without the deep sleep. With sleep, you'll get 2 years.


At 80mA for 10 seconds every hour, you're using 0.2mA/h from a 3600 mAh battery.
If your panel sees half an hour of indirect daylight, I'd wager your batteries will be full.

chimera

448 posts

Ultimate Geek


  #2560034 8-Sep-2020 07:55
Send private message

Hmmm, seems my solar calcs missed a zero or two somewhere then... in hindsight, I think it was my mistake between W of panel to mW usage.

 

So if I do run a single 12V 1.5W solar panel I get 125mAhr at full sunlight, but then with overheads and drops don't you usually knock off 25% or so? So say absolute worst case 50% loss is still ~60mAhr in full sun for 4 hours is 240mA of charge per day.  Consumption at 0.2mAhr to survive a day needs 4.8mA which would mean that smaller PV panel would easily work. 

 

Is that correct?

 

 





 

 


Nate001
614 posts

Ultimate Geek


  #2560037 8-Sep-2020 08:10
Send private message

Don't get confused with mA/hr and voltage. Its best to work in mW and mWh as this avoids any confusion.

 

So in your case you're getting 1500mW (125mA @ 12V) ideal. At 4.2V this is 375mA MAX. If you assume worse case of only 60% making it to your batt (PV ratings, charge losses, voltage drops) only 900mW (215mA @ 4.2V). Don't forget this is also at peak sunlight. Depending on how much light you're getting and angles you set up PV you may find it could struggle to input decent charge. 


chimera

448 posts

Ultimate Geek


  #2560056 8-Sep-2020 08:49
Send private message

Thanks, so what about 2 x 12V 1.5W PV's?  Would this help and would they be better run in series or parallel?

 

 





 

 


Nate001
614 posts

Ultimate Geek


  #2560065 8-Sep-2020 08:57
Send private message

Yes more panels in parallel would help. Ideally while setting it up you are able to monitor voltages/currents to have an idea of what is really happening.

 

I use the A0 pin on my D1 for monitoring batt voltage. The D1 is a little different from normal arduinos as A0 can only handle 1.0V input MAX,  it has a built in voltage divider (100/220k) to handle inputs up to 3.3V. I added a 150k resistor from A0 -> batt so can measure up to 4.7V.


chimera

448 posts

Ultimate Geek


  #2560066 8-Sep-2020 09:00
Send private message

I have an INA219 and was considering wiring that up to monitor power, are you saying the D1 mini can do this without an additional board?

 

Ah like this... cool. https://www.arduino.cc/en/Tutorial/ReadAnalogVoltage





 

 


Nate001
614 posts

Ultimate Geek


  #2560097 8-Sep-2020 09:55
Send private message

Yes you use analogRead as above, but you need to adjust so it would be voltage = (4.7/1023.0)*sensorValue. The 4.7 would depend on what resistor you have chosen for the voltage divider, in this case 150k.

 

If you have a INA219 then that would be very handy. Depending on where you place it you could:

 

     

  1. Place between PV and charge controller to measure raw PV voltage and current, or
  2. Place between battery and charge controller to measure voltage and current of battery.

 

If you had 2 INA219s, you could do both and you could calculate actual efficiency. Remember to connect all your ground wires together or else you'll get funky numbers, especially if you're testing with a computer first.


chimera

448 posts

Ultimate Geek


  #2560346 8-Sep-2020 15:04
Send private message

Perfect thanks Nathan having voltage readings will certainly help monitor this.

 

...but you mean 4.2V though - coz that's max voltage of batteries in 2P, not 4.7.

 

So the quick and easy way to calculate is (with the internal voltage divider of 100k / 220k) is simply add these and whatever is left add a resistor in K ohms to make up to whatever voltage is being read.  Eg: If 4.2V needed, add internal 100 + 220 = 320 + 100K external resistor = 420K. If 5.0V needed, add internal 100 + 220 = 320 + 180K external resistor = 500K.

 

So just gotta change my wiring of batteries from 2S to 2P and redo this.

 

I assume an alternative to 2 x INA219 would be to put 1 in and use transistors to switch inputs between measuring battery or solar voltage

 

 





 

 


 1 | 2
View this topic in a long page with up to 500 replies per page Create new topic





News and reviews »

One New Zealand Extends 3G Switch-off Date
Posted 11-Apr-2024 08:56


Amazon Echo Hub Review
Posted 10-Apr-2024 18:57


Epson Launches New Versatile A4 Desktop Scanners
Posted 10-Apr-2024 15:31


Motorola Mobility Launches New Android Phones in New Zealand
Posted 10-Apr-2024 14:59


Logitech G Unveils the PRO X 60 Gaming Keyboard
Posted 9-Apr-2024 19:01


Logitech Unveils Signature Slim Keyboard and Combo
Posted 9-Apr-2024 13:33


ExpressVPN Launches Aircove Go Portable Router With Built-in VPN
Posted 26-Mar-2024 21:25


Shure MoveMic Review
Posted 25-Mar-2024 12:47


reMarkable 2 Launches at JB Hi-Fi New Zealand
Posted 20-Mar-2024 08:36


Samsung Galaxy S24 Ultra review
Posted 19-Mar-2024 11:37


Google Nest Wifi Pro Review
Posted 16-Mar-2024 11:28


Samsung Galaxy A55 5G and Galaxy A35 5G
Posted 12-Mar-2024 12:41


Cricut EasyPress Mini Zen Blue launches at Spotlight New Zealand
Posted 12-Mar-2024 12:32


Logitech Introduces MX Brio Webcam
Posted 12-Mar-2024 12:24


HP Unveils Broadest Consumer Portfolio of AI-Enhanced Laptops
Posted 3-Mar-2024 18:09









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.







Backblaze unlimited backup