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

431 posts

Ultimate Geek


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

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
312 posts

Ultimate Geek


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

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

chimera

431 posts

Ultimate Geek


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

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
23683 posts

Uber Geek

Trusted
Subscriber

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

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

431 posts

Ultimate Geek


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

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
23683 posts

Uber Geek

Trusted
Subscriber

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

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

431 posts

Ultimate Geek


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

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
312 posts

Ultimate Geek


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

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
2327 posts

Uber Geek


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

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.




Electrician.

 

Location: Dunedin

 

 


chimera

431 posts

Ultimate Geek


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

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
312 posts

Ultimate Geek


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

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

431 posts

Ultimate Geek


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

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
312 posts

Ultimate Geek


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

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

431 posts

Ultimate Geek


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

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
312 posts

Ultimate Geek


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

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

431 posts

Ultimate Geek


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

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 »

Huawei launches IdeaHub Pro in New Zealand
Posted 27-Oct-2020 16:41


Southland-based IT specialist providing virtual services worldwide
Posted 27-Oct-2020 15:55


NASA discovers water on sunlit surface of Moon
Posted 27-Oct-2020 08:30


Huawei introduces new features to Petal Search, Maps and Docs
Posted 26-Oct-2020 18:05


Nokia selected by NASA to build first ever cellular network on the Moon
Posted 21-Oct-2020 08:34


Nanoleaf enhances lighting line with launch of Triangles and Mini Triangles
Posted 17-Oct-2020 20:18


Synology unveils DS16211+
Posted 17-Oct-2020 20:12


Ingram Micro introduces FootfallCam to New Zealand channel
Posted 17-Oct-2020 20:06


Dropbox adopts Virtual First working policy
Posted 17-Oct-2020 19:47


OPPO announces Reno4 Series 5G line-up in NZ
Posted 16-Oct-2020 08:52


Microsoft Highway to a Hundred expands to Asia Pacific
Posted 14-Oct-2020 09:34


Spark turns on 5G in Auckland
Posted 14-Oct-2020 09:29


AMD Launches AMD Ryzen 5000 Series Desktop Processors
Posted 9-Oct-2020 10:13


Teletrac Navman launches integrated multi-camera solution for transport and logistics industry
Posted 8-Oct-2020 10:57


Farmside hits 10,000 RBI customers
Posted 7-Oct-2020 15:32









Geekzone Live »

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


Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



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.

Alternatively, you can receive a daily email with Geekzone updates.