Solar Power Supply for ESP ??

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Solar Power Supply for ESP ??

#1 Post by vincen » 12 Oct 2017, 12:18

Hi

I'm planning to use an ESP module outside for environment measures (temperature, humidity, spped wind..) and so would like to power it in Solar mode. I have a solar panel giving 6V/3W at best. I have a little TP4056 module to charge 18650 battery with solar panel. Question is: Can I wire in parallel with the output of the charger module on the battery a voltage regulator to power my ESP ?

Thanks

Vincèn

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Solar Power Supply for ESP ??

#2 Post by rayE » 12 Oct 2017, 14:50

Hi Vincen,
I solar power some of my projects, this is what i do.
1. solar panel.
2. 18650 battery
3. TP4056 charger module.

The solar panel is wired to the 4056 module Vin pads.

The battery is wired to the B+ and B- pads.

The +V pad is connected to a 3.3V, very low voltage dropout voltage regulator, i use an MCP1700, the output of this powers my system. The -V pad is connected to ground.

I have used this method in a load of projects and it works well.

Regards
Ray

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Solar Power Supply for ESP ??

#3 Post by vincen » 13 Oct 2017, 09:02

rayE wrote: 12 Oct 2017, 14:50I solar power some of my projects, this is what i do.
1. solar panel.
2. 18650 battery
3. TP4056 charger module.
The solar panel is wired to the 4056 module Vin pads.
The battery is wired to the B+ and B- pads.
The +V pad is connected to a 3.3V, very low voltage dropout voltage regulator, i use an MCP1700, the output of this powers my system. The -V pad is connected to ground.
I have used this method in a load of projects and it works well.
Thanks a lot Ray, it's exactly what I'm looking to do but I'm confused about wiring on TP4056. Mine are like below and I don't see a V+/V- pad to power the ESP !
Image

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Solar Power Supply for ESP ??

#4 Post by papperone » 13 Oct 2017, 10:01

vincen wrote: 13 Oct 2017, 09:02
rayE wrote: 12 Oct 2017, 14:50I solar power some of my projects, this is what i do.
1. solar panel.
2. 18650 battery
3. TP4056 charger module.
The solar panel is wired to the 4056 module Vin pads.
The battery is wired to the B+ and B- pads.
The +V pad is connected to a 3.3V, very low voltage dropout voltage regulator, i use an MCP1700, the output of this powers my system. The -V pad is connected to ground.
I have used this method in a load of projects and it works well.
Thanks a lot Ray, it's exactly what I'm looking to do but I'm confused about wiring on TP4056. Mine are like below and I don't see a V+/V- pad to power the ESP !
You have a module without protection which is not advised to be used in such project.
You need to have the version with the protection circuit as the one below:
Image
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Solar Power Supply for ESP ??

#5 Post by vincen » 13 Oct 2017, 10:09

papperone wrote: 13 Oct 2017, 10:01You have a module without protection which is not advised to be used in such project.
You need to have the version with the protection circuit as the one below:
Image
Thanks for confirmation, ordered that version on Alibaba to implement my project and thanks for all infos ;)

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Solar Power Supply for ESP ??

#6 Post by rayE » 13 Oct 2017, 10:59

I wrote a more detailed post but it seems to have vanished into the ether. A couple of other things i do with the TP board.
1. Remove the LED's as they are a total waste of power.
2. Change the current limit resistor to match the maximum output of your solar panel (see the TP4056 chip data sheet for details)
3. Wire the charge status to a spare digital input so you can monitor when the module is charging.
4. Wire the battery output through a potential divider then connect this to an ADC input so you can monitor the battery voltage.

Ray

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Solar Power Supply for ESP ??

#7 Post by vincen » 16 Oct 2017, 16:15

rayE wrote: 13 Oct 2017, 10:59I wrote a more detailed post but it seems to have vanished into the ether. A couple of other things i do with the TP board.
1. Remove the LED's as they are a total waste of power.
2. Change the current limit resistor to match the maximum output of your solar panel (see the TP4056 chip data sheet for details)
3. Wire the charge status to a spare digital input so you can monitor when the module is charging.
4. Wire the battery output through a potential divider then connect this to an ADC input so you can monitor the battery voltage.
Unless yourt detailed looks to be lost thanks for listing the main steps ;) For charge status I can directly wire the connection of the original charging led to an input of ESP no ?

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Solar Power Supply for ESP ??

#8 Post by rayE » 17 Oct 2017, 01:31

Yes, for the charge status, remove LED and wire from the Anode side of LED to a D/I on ESP. I soldered a 5 pin SIL header to the PCB, bent the middle pin 90 degrees and soldered the wire link to the LED from this pin. This way to can unplug the PCB from your main PCB.

Regarding the potential divider for the ADC I/P. I cannot find any specifications on the input impedance of the ESP ADC so lets assume it is ~50K. We need to keep the ADC input voltage below say 3.2 volts for a fully charged battery (4.2 volts). Here is a link to a calculator.

http://www.ti.com/download/kbase/volt/volt_div3.htm
Keep R1 resistor value <3K. Once this is done measure the battery full V at the ADC input, note it, do the same for the battery min V then use these values to scale the reading the ESP spits out.

Ray

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Solar Power Supply for ESP ??

#9 Post by rayE » 17 Oct 2017, 01:43

CAUTION..............because i have NEVER used the ESP ADC i assumed it's Vin range is 0 to 3.3V, according to this link it is 0 to 1V. Tripple check what it is before working out your potential divider.
http://www.esp8266.com/viewtopic.php?f= ... 9c6f2a430c

If i get some time today ill check it out on my ESP as i will be using it in the future.

Ray

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Solar Power Supply for ESP ??

#10 Post by papperone » 17 Oct 2017, 07:12

ESP8266 ADC pin range is indeed 0-1VDC !! watch carefully!!

If you are using a dev board (NodeMCU, Wemos, etc) most probaly they have a voltage divider on board (tipically 100k/220k) to have the AD0 (not ADC!) pin accepting 0-3.3VDC
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Solar Power Supply for ESP ??

#11 Post by rayE » 17 Oct 2017, 11:00

The input impedance of the ADC WILL vary during use therefore the potential divider network should be kept to sub 10K levels otherwise the input signal will vary a small amount and not give accurate results.

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Solar Power Supply for ESP ??

#12 Post by rayE » 17 Oct 2017, 11:31

This is how i do ADC signal conditioning (for a battery) on a PIC, works a treat and very stable.
Attachments
ADC input.png
ADC input.png (4.31 KiB) Viewed 25794 times

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Solar Power Supply for ESP ??

#13 Post by vincen » 18 Oct 2017, 08:17

rayE wrote: 17 Oct 2017, 11:31 This is how i do ADC signal conditioning (for a battery) on a PIC, works a treat and very stable.
What value of R1 and R2 do you use for correct measure of 18650 battery then ?

Thanks

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Solar Power Supply for ESP ??

#14 Post by rayE » 18 Oct 2017, 12:32

so take a standard value of 10k for R1, use the calculator and R2 is ~3k,
http://www.ti.com/download/kbase/volt/volt_div3.htm

so double the values to use less current. DO NOT GO OVER 20K for R1, otherwise you will get inaccuracy s on the ADC readings. Also bear in mind that the ADC input impedance will have an impact to the potential divider "real" output voltage. If the I/P impedance is 50K then you are effectively putting 50K across R2 (parallel), so the measured real value on the ADC will be less. Use the 2 point calibration on the ADC device to NULL out this.

Ray

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Solar Power Supply for ESP ??

#15 Post by rayE » 18 Oct 2017, 13:01

On the calc i used Vin max to be 4.3V and Vout to be 1V

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Solar Power Supply for ESP ??

#16 Post by vincen » 18 Oct 2017, 16:22

rayE wrote: 18 Oct 2017, 12:32so take a standard value of 10k for R1, use the calculator and R2 is ~3k,
http://www.ti.com/download/kbase/volt/volt_div3.htm
so double the values to use less current. DO NOT GO OVER 20K for R1, otherwise you will get inaccuracy s on the ADC readings. Also bear in mind that the ADC input impedance will have an impact to the potential divider "real" output voltage. If the I/P impedance is 50K then you are effectively putting 50K across R2 (parallel), so the measured real value on the ADC will be less. Use the 2 point calibration on the ADC device to NULL out this.
Thans a lot for help so looks like I can go with 20k for R1 and 6K for R2 and I should be pretty good no ??

What is 2 point calibration on the ADC input ?

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Solar Power Supply for ESP ??

#17 Post by rayE » 20 Oct 2017, 02:14

Hi,
Here is a better calculator that lets you enter one of the resistor values.
http://www.ohmslawcalculator.com/voltag ... calculator

Vin = 4.3V
Vout = 1.0V
R1=18K (standard value)
R2 =5454R

For the calibration take a look at the ADC device, Im not sure how the 2 point cal works as iv not tried it. Normally you will enter the upper V in = 4.3V-ADC count=1023 and the lowest Vin=0V-ADC count=0, the calibration then uses these points to scale the displayed Voltage.

Ray

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Solar Power Supply for ESP ??

#18 Post by rayE » 22 Oct 2017, 22:37

Hi,
I went through the ESP8266 data sheet but cannot find any reference to the ADC input impedance? Looking through some posts on various forums it seems like the impedance is between 10 to 20 megs. So make R1 value high, 220K, it will waste less power from the battery :-)

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Solar Power Supply for ESP ??

#19 Post by vincen » 03 Nov 2017, 09:16

So after listening at all your very good advices, I went through that design. Does it sound correct and working ? My goal here is to charge battery and power the ESP from the solar panel and be able to measure power and voltage used by ESP ;)

I wanted also to add one more INA to measure power and intensitey of solar panel but not sure ground is common between solar connection and outputs of TP4056......
Image

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Solar Power Supply for ESP ??

#20 Post by rayE » 03 Nov 2017, 11:35

what is the I2C module?

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Solar Power Supply for ESP ??

#21 Post by rayE » 03 Nov 2017, 12:12

DANGER!!!!!!!!!!!!!!!! Where is the voltage regulator? 4.2 volts (a fully charged LiOn) WILL KILL a bare esp module (been there and done that :) unless your using a PCB with a vreg? Lots of detail missing out of your drawing?

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Solar Power Supply for ESP ??

#22 Post by vincen » 03 Nov 2017, 13:02

rayE wrote: 03 Nov 2017, 11:35 what is the I2C module?
Which I2C module ??? I have only done I2C link between ESP module and INA board to retrieve power and current values returned by it ;)

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Solar Power Supply for ESP ??

#23 Post by vincen » 03 Nov 2017, 13:04

rayE wrote: 03 Nov 2017, 12:12 DANGER!!!!!!!!!!!!!!!! Where is the voltage regulator? 4.2 volts (a fully charged LiOn) WILL KILL a bare esp module (been there and done that :) unless your using a PCB with a vreg? Lots of detail missing out of your drawing?
sorry bud did you really check my schema ? The TP4056 board is connected to ESP through its regulated output (as for sure battery directly to ESP would kill the ESP very quickly !!)

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Solar Power Supply for ESP ??

#24 Post by rayE » 03 Nov 2017, 13:10

Yes i checked your drawing, the TP board has NO VOLTAGE regulation, your drawing will WRECK a bare ESP module when the battery is fully charged. as for an INA board, iv never heard of it and NO IDEA what it is?

Maybe do a little more homework before letting the smoke out of the ESP module :-)

http://artofcircuits.com/product/tp4056 ... protection

And if the provided specs seem unclear THEN build the charger circuit with a battery and solar connected, UNCONNECTED to the ESP and get your DVM out.......................that's what i did :-)

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Solar Power Supply for ESP ??

#25 Post by vincen » 03 Nov 2017, 13:50

rayE wrote: 03 Nov 2017, 13:10Yes i checked your drawing, the TP board has NO VOLTAGE regulation, your drawing will WRECK a bare ESP module when the battery is fully charged. as for an INA board, iv never heard of it and NO IDEA what it is?
I checked by putting usb power on board and in fact it gives me nearly always around 4V which is above ESP specs but I intended to plug that power to the USB port of ESP so it should be ok no ? Module I use is exactly the one you indicate !!

What do you mean about DVM out ??

For the INA board it's this one: https://www.adafruit.com/product/904

Thanks

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Solar Power Supply for ESP ??

#26 Post by rayE » 03 Nov 2017, 13:58

DVM = digital volt meter

If you think 4 volts is OK for the ESP then go ahead, BUT make sure you have lots of spare of ESP modules :-)

When the spec on a module specifies a MAXIMUM voltage then do NOT put more than that into it, otherwise the smoke will come out, simple design guidelines, no rocket science involved :-)

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Solar Power Supply for ESP ??

#27 Post by vincen » 03 Nov 2017, 15:04

rayE wrote: 03 Nov 2017, 13:58DVM = digital volt meter
thanks :)
rayE wrote: 03 Nov 2017, 13:58If you think 4 volts is OK for the ESP then go ahead, BUT make sure you have lots of spare of ESP modules :-)
When the spec on a module specifies a MAXIMUM voltage then do NOT put more than that into it, otherwise the smoke will come out, simple design guidelines, no rocket science involved :-)
Perhaps I misexplained myself but I'm not going to wire TP4056 module directly to ESP but to the USB port of my ESP board so in this case the USB regulator of the ESP board will take care of 4V coming from TP4056 without risk for ESP no ?

Drum
Normal user
Posts: 300
Joined: 07 Feb 2016, 11:56

Re: Solar Power Supply for ESP ??

#28 Post by Drum » 03 Nov 2017, 18:35

vincen wrote: 03 Nov 2017, 13:50 I checked by putting usb power on board and in fact it gives me nearly always around 4V which is above ESP specs but I intended to plug that power to the USB port of ESP so it should be ok no ? Module I use is exactly the one you indicate !!

Thanks
The USB port of ESP8266? This would be a ESP8266 Development module? Which one are you using?
Most modules have a voltage regulator to take 5v down to 3.3. You should check the specs on the voltage regulator (and diode if in the circuit). Generally they use something like a AMS1117, which has a significant voltage drop. These modules are not really ideal for battery operation, with the exception of the Adafruit Feather Huzzah (which has a built in Lipo charging circuit and appropriate voltage regulator) and maybe the Wemos with battery shield (I don't have so can't say for sure).

If I remember correctly most Lipo chargers cut off when the battery reaches 4.2V which will never happen unless the charge voltage is more than that. The TP4056 I have runs at 4.12V with no battery, and the 03962A is 2.14v but this may be different with a battery attached.

I think you would do better with a bare ESP12F on one of the white adapter boards, with a good voltage regulator and capacitors. It would probably be less expensive as well.

If you are looking to do wind speed or rainfall, I think you are looking at something with more power and no deep sleep, maybe just running off 5V.

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Solar Power Supply for ESP ??

#29 Post by rayE » 04 Nov 2017, 01:45

This is how i wire a bare ESP12-E module using solar and TP4056 PCB.
ESP Battery Mon.png
ESP Battery Mon.png (28.13 KiB) Viewed 26079 times

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Solar Power Supply for ESP ??

#30 Post by vincen » 05 Nov 2017, 11:00

rayE wrote: 04 Nov 2017, 01:45This is how i wire a bare ESP12-E module using solar and TP4056 PCB.
Thanks a lot for the share so will use your schema to build my one ;) Is it well 0.1uF or 0.1nF capacitor ?

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: Solar Power Supply for ESP ??

#31 Post by rayE » 05 Nov 2017, 11:16

0.1uF (or 100nF) both are the same value.

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Solar Power Supply for ESP ??

#32 Post by vincen » 05 Nov 2017, 11:41

rayE wrote: 05 Nov 2017, 11:16 0.1uF (or 100nF) both are the same value.
Thanks for confirmation ;)

nightshark
Normal user
Posts: 25
Joined: 29 Apr 2016, 06:54

Re: Solar Power Supply for ESP ??

#33 Post by nightshark » 20 Nov 2017, 04:05

rayE wrote: 12 Oct 2017, 14:50 Hi Vincen,
I solar power some of my projects, this is what i do.
1. solar panel.
2. 18650 battery
3. TP4056 charger module.

The solar panel is wired to the 4056 module Vin pads.

The battery is wired to the B+ and B- pads.

The +V pad is connected to a 3.3V, very low voltage dropout voltage regulator, i use an MCP1700, the output of this powers my system. The -V pad is connected to ground.

I have used this method in a load of projects and it works well.

Regards
Ray
Ray -
Are you powering nodemcu modules or single esp8266 chips? Do you have issues with the panels output being over 6v and frying the MCP1700 ?
Thanks!

knimpf
New user
Posts: 1
Joined: 24 Nov 2017, 20:18

Re: Solar Power Supply for ESP ??

#34 Post by knimpf » 24 Nov 2017, 20:47

Is there anyone knowing the max17043 / max17044?
If not, it is a fuel-gauge chip for lithium-ion batteries and it looks like it's absolutely suitable for solar powered projects. I guess it could determine the lipo's fuel very precise and seems to have a very small active current (50uA) and a sleep current with 1uA. Looks for me like it is perfect.
But I'm wondering that I can't find harly battery driven projects using it.
Are there reasons for that? Is it not good enouth? Anybody experience with it?
http://playground.arduino.cc/Main/MAX17043
https://datasheets.maximintegrated.com/ ... X17044.pdf

Drum
Normal user
Posts: 300
Joined: 07 Feb 2016, 11:56

Re: Solar Power Supply for ESP ??

#35 Post by Drum » 27 Nov 2017, 01:55

It looks really interesting. I have never seen it. Most of the solar circuits I have seen are as low cost (and low piwer) as possible. It would require a plugin for the battery level feature.

For me it is not great because I would have to use a breakout. The chip package looks like it would need an oven to solder and I am not there yet. There is another chip (also for solar MCP73871) I think would improve efficiency, but it is a qfn package and so far I have not needed it. With a small 6v solar panel, 18650 battery and simple charging circuit I have been able to keep an esp going on 10 minute deep sleep for several months. I may have to re-evalvuate after the winter, but no problems (except for sensor issues) so far.

Higher efficency is great, but it is probably far cheaper to increase the solal panel size if needed.

vincen
Normal user
Posts: 92
Joined: 26 Jun 2017, 07:15

Re: Solar Power Supply for ESP ??

#36 Post by vincen » 24 Mar 2019, 18:39

rayE wrote: 04 Nov 2017, 01:45 This is how i wire a bare ESP12-E module using solar and TP4056 PCB.
ESP Battery Mon.png
Would you mind to share rules you used to get correct value of battery through resistors once wired to ADC input of ESP ?

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests