Black Lives Matter - Action and Equality. ... Adafruit is part of the Stop Hate for Profit campaign. Adafruit is open and shipping.
0

Powering a HUZZAH ESP8266 breakout with batteries
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Powering a HUZZAH ESP8266 breakout with batteries

by erikhb on Tue May 16, 2017 6:32 am

I currently have a handful of these awesome breakouts, most of which are powered by batteries.
So far I have been powering them with 4xAAA batteries for a total of 4.8V (NiMH) or 6.0V (alkaline). Alkalines are a bit too high for my tastes, as a pack of fresh batteries gets above the maximum rating of the voltage regulator on the ESP breakout, so I usually go for NiMH.

However, when I am thinking a bit about it, assuming alkaline batteries, would the 4th battery essentially be wasted due to the losses resulting from the voltage regulator bringing the voltage down to 3.3V, and using 3 batteries instead would be more efficient?

If so, I'll move to a 3X battery pack on new builds. That would also give me more freedom to use NiMH or alkaline batteries depending on what I have available, and I might also be able to fit AA batteries within my device form factor.

erikhb
 
Posts: 35
Joined: Sat Jan 02, 2016 8:01 am

Re: Powering a HUZZAH ESP8266 breakout with batteries

by adafruit_support_mike on Wed May 17, 2017 12:42 am

Yeah, a 3-AA pack would be a decent substitute for a 3.7v LiPo.

The best place to connect would be the USB pin.. you don't want to connect non-LiPo cells to the LiPo charger. Just make sure to disconnect the battery before you connect a USB cable, or for extra protection put a diode between the battery pack and the BAT pin to prevent back-current.

adafruit_support_mike
 
Posts: 61121
Joined: Thu Feb 11, 2010 2:51 pm

Re: Powering a HUZZAH ESP8266 breakout with batteries

by erikhb on Wed May 17, 2017 1:16 am

This is the Huzzah breakout board, product 2471, not the Feather version, so luckily I don't have to worry about the charging circuit. A brilliant little board, that one is...
https://www.adafruit.com/product/2471

My question is really more about whether in a 4-way battery pack, the 4th AA (or AAA) battery would be wasted, given the energy lost due to the voltage regulator, which needs to bleed off energy to reduce the voltage to 3.3V, and I would thus be better off going with a 3-way pack instead.

20170517_151730.jpg
20170517_151730.jpg (132.24 KiB) Viewed 1026 times

Edit: Added a picture of a typical setup.

erikhb
 
Posts: 35
Joined: Sat Jan 02, 2016 8:01 am

Re: Powering a HUZZAH ESP8266 breakout with batteries

by adafruit_support_mike on Wed May 17, 2017 2:10 am

Yes, you're better off removing the fourth cell.

Energy from a fourth cell would be burned off as heat in the voltage regulator until the average cell voltage dropped to about 1.1v. For AAs, that's about the 80% discharge point, so 80% of the energy from the fourth cell would be pure waste. A fourth cell would keep things running until all the cells dropped to the standard 95% discharge voltage of 0.9v, but that only gets you 15% more energy from the other three cells. The waste is still almost double the improvement.

You could do it both ways if you want: start your cells in a 3-AA pack and run them down to 1.1v, then move them to a 4-AA pack and run them down to 0.9v.

adafruit_support_mike
 
Posts: 61121
Joined: Thu Feb 11, 2010 2:51 pm

Re: Powering a HUZZAH ESP8266 breakout with batteries

by erikhb on Wed May 17, 2017 2:19 am

Thanks for that confirmation, Mike.

I'll move over to a 3xAA for my next build, then, and rework the others as i service them. Upsizing to AA will give better battery capacity as well.

erikhb
 
Posts: 35
Joined: Sat Jan 02, 2016 8:01 am

Re: Powering a HUZZAH ESP8266 breakout with batteries

by johhan on Sat Jun 30, 2018 7:41 am

Hi erikhb,

I'm trying to do the same project as you have done with a Feather Huzzah.

Sorry for the stupid question, I'm a noobs in electronics, but what is the role of the condenser (470uf) between VCC+ and GND from the battery pack ?

Adafruit support : quoting you "Just make sure to disconnect the battery before you connect a USB cable, or for extra protection put a diode between the battery pack and the BAT pin to prevent back-current."

What value for the diode ? What would be the circuit ?

Thanks !

Johan

johhan
 
Posts: 16
Joined: Sun Sep 11, 2016 12:19 pm

Re: Powering a HUZZAH ESP8266 breakout with batteries

by adafruit_support_mike on Mon Jul 02, 2018 12:29 am

johhan wrote:what is the role of the condenser (470uf) between VCC+ and GND from the battery pack ?

The capacitor keeps the supply voltage reasonably constant.

The voltage between the plates of a capacitor is proportional to the amount of charge on the plates.. electrons on one side, atoms missing electrons on the other side. To make the voltage change, you have to send more charge into the capacitor or pull some charge out. Either way, the electrons have to move from one place to another.

That means a capacitor's voltage can't change instantly. The voltage can only change in proportion to the amount of current flowing into or out of it over some amount of time. The bigger the capacitor is, the more current it takes to make the voltage change.

That makes capacitors good at absorbing voltage spikes and dips, like the ones caused by digital circuits switching high and low.

johhan wrote:What value for the diode ? What would be the circuit ?

A diode is basically a one-way valve for electrons. Current can flow through it one direction, but not the other.

All you need is a diode that can handle enough current to keep the ESP8266 running, which isn't hard. A 1n4148 or 1n4001 diode will be plenty.

Connect the diode so its cathode (negative end) goes to the HUZZAH breakout's USB pin, and its anode (positive end) goes to the external 5V power supply.

When the external supply is 5V and the HUZZAH doesn't have any other source of power, current will flow through the diode and power the board. Along the way, the voltage will drop about 0.75V because that's what it takes to make enough current flow through the diode.

If you connect a USB cable at the same time, the HUZZAH's USB pin will rise to 5V, which is about the same as the external supply voltage. With 0V across the diode, no current can flow through the diode. That keeps the external 5V supply and the USB cable from fighting with each other.

adafruit_support_mike
 
Posts: 61121
Joined: Thu Feb 11, 2010 2:51 pm

Re: Powering a HUZZAH ESP8266 breakout with batteries

by johhan on Tue Jul 03, 2018 7:37 pm

Hi Mike,

Thank you so much for the explanation.

So now, if I understood correctly how I should connect everything together :

Screen Shot 2018-07-03 at 7.33.06 PM.png
Screen Shot 2018-07-03 at 7.33.06 PM.png (16.33 KiB) Viewed 667 times


So in that way, there is no power that could go back to the battery pack, even from the capacitor.
(I've notice if I turn off the battery pack, with the capacitor, the power slowly decays).

Thanks again for your help, this is very much appreciated !

Johan

johhan
 
Posts: 16
Joined: Sun Sep 11, 2016 12:19 pm

Re: Powering a HUZZAH ESP8266 breakout with batteries

by adafruit_support_mike on Wed Jul 04, 2018 12:02 am

Yep, that's correct.

The capacitor does contain enough energy to keep the Feather running for a little while after you disconnect any other power source. That's nothing to worry about.

adafruit_support_mike
 
Posts: 61121
Joined: Thu Feb 11, 2010 2:51 pm

Re: Powering a HUZZAH ESP8266 breakout with batteries

by minitux on Sun Dec 30, 2018 8:35 pm

@erikhb,

I have a similar setup to your and also using the DTH22 sensor. I've been powering with 3x Duracell AA batteries directly on the USB and haven not installed a condensor as I hadn't considered that AA batteries would spike on voltage. Seems like I should though. I'm interested in improving my setup and so I think I will install the condensor and the diode. Is this the condensor https://uk.rs-online.com/web/p/aluminium-capacitors/7111110/? Gettigna bit confused with the diodes as there are tonnes of 1N4148's .... see https://uk.rs-online.com/web/c/?sra=oss&r=t&searchTerm=1N4148+diode

How are you tracking low voltage? i.e. batteries running below 3.3v? I've read somewhere that if you run the HUZZAH breakout on <3.3V you risk destroying the unit or at least you may end up having to reload the sketch. I've also seen that Adafruit have a low voltage protection (I can't find it on Adafruit website but it looks like a transistor). Do you know anything about this?

I can't quite get my head around these Lipoly batteries. Adafruit says that they have built in circuitry for over-voltage, under-voltage, etc. Does this mean that this type of circuitry has to replicated when using 3x AA or 4x NiMH batteries and is that what you are effectively doing with the capacitor/diode?

Finally, last but not least, that little circuit board hidden in the back of your box behind the wires and just about visible, is that a bunch of other sensors? Have you shared your design anywhere?

Cheers
Last edited by minitux on Sun Dec 30, 2018 8:48 pm, edited 2 times in total.

minitux
 
Posts: 10
Joined: Wed Nov 07, 2018 11:27 am

Re: Powering a HUZZAH ESP8266 breakout with batteries

by minitux on Sun Dec 30, 2018 8:37 pm

Oh, one last question: why all those resistors in the background?

EDIT: the idea of 3x AA batteries is not something I'm pretty keen on (both in terms of cost and environmentally) so I want to move to a NiMH solution and have ready charged batteries waiting to replace when the the others are discharged. Would this change the setup in any way in terms of power supply?

I'm trying to get my head around the difference between AA/NiMH batteries and Lipoly batteries. Why would I spend all that money for the Lipoly batteries if I can have the same achievement with 3x AA/4x NiMH? I must be missing something ....

minitux
 
Posts: 10
Joined: Wed Nov 07, 2018 11:27 am

Re: Powering a HUZZAH ESP8266 breakout with batteries

by adafruit_support_mike on Mon Dec 31, 2018 2:34 am

minitux wrote: I've read somewhere that if you run the HUZZAH breakout on <3.3V you risk destroying the unit or at least you may end up having to reload the sketch.

I haven't heard any reports of ESP8266s being damaged by low supply voltage, but running one at low voltage could make it unstable. The Wifi radio uses about 80mA, which could cause sudden changes in voltage when the batteries are low.

minitux wrote:I can't quite get my head around these Lipoly batteries. Adafruit says that they have built in circuitry for over-voltage, under-voltage, etc. Does this mean that this type of circuitry has to replicated when using 3x AA or 4x NiMH batteries and is that what you are effectively doing with the capacitor/diode?

The diode keeps the USB cable from sending power back to the battery when you program the ESP8266. Back-powering batteries is bad for them, especially when the voltage applied to them is higher than their own operating voltage.

The capacitor reduces the effects of voltage spikes, and using a debounce cap is good practice for almost any circuit.

minitux wrote:Oh, one last question: why all those resistors in the background?

Those would be voltage dividers, dropping 5V signals to 3.3V so they won't damage the ESP8266's GPIO pins.

minitux wrote:I'm trying to get my head around the difference between AA/NiMH batteries and Lipoly batteries. Why would I spend all that money for the Lipoly batteries if I can have the same achievement with 3x AA/4x NiMH? I must be missing something ....

The major advantages of LiPos are:

- Much higher energy density (a smaller/lighter battery holds more energy, and it takes three 1.2V NiMH cells to match one 3.7V LiPo)
- Much higher output current capacity (not much of an issue for an ESP8266)
- Much lower self-discharge rate (about 5% per month, compared to 40% per month for NiMH)
- Better voltage stability (all batteries lose voltage as they discharge, but LiPos lose it slower than NiMH)
- No voltage-depletion/memory effect

That doesn't mean LiPos are always better than NiMH cells, but the good features of LiPos are attractive for battery-powered portable devices, especially ones that use bursts of high current like cell phones.

adafruit_support_mike
 
Posts: 61121
Joined: Thu Feb 11, 2010 2:51 pm

Re: Powering a HUZZAH ESP8266 breakout with batteries

by minitux on Mon Dec 31, 2018 7:51 am

adafruit_support_mike wrote:The capacitor reduces the effects of voltage spikes, and using a debounce cap is good practice for almost any circuit.

What is a "debounce cap"?

adafruit_support_mike wrote:Those would be voltage dividers, dropping 5V signals to 3.3V so they won't damage the ESP8266's GPIO pins.

Oh dear, I'm powering the DHT22 off the +5V - does this mean that a 5V signal is going down the signal to GPIO5 and that I should have a resistor on the signal? WIll I be damaging the pin 5 only or do I risk messing the whole ESP?

People have reported operating the DHT22 without a resistor and not having any problems ... I have done the same but I guess I am taking a risk ... I've checked this (https://learn.adafruit.com/dht/connecti ... txx-sensor) out and it says that the resistor is acting as a "pull-up" ... not sure pull-up of what? Strength of the signal?

adafruit_support_mike wrote:The major advantages of LiPos are:

- Much higher energy density (a smaller/lighter battery holds more energy, and it takes three 1.2V NiMH cells to match one 3.7V LiPo)
- Much higher output current capacity (not much of an issue for an ESP8266)
- Much lower self-discharge rate (about 5% per month, compared to 40% per month for NiMH)
- Better voltage stability (all batteries lose voltage as they discharge, but LiPos lose it slower than NiMH)
- No voltage-depletion/memory effect

That doesn't mean LiPos are always better than NiMH cells, but the good features of LiPos are attractive for battery-powered portable devices, especially ones that use bursts of high current like cell phones.


That's very clear explanation, thanks.

minitux
 
Posts: 10
Joined: Wed Nov 07, 2018 11:27 am

Re: Powering a HUZZAH ESP8266 breakout with batteries

by adafruit_support_mike on Tue Jan 01, 2019 12:52 am

minitux wrote:What is a "debounce cap"?

See this post, above:

viewtopic.php?f=8&t=117336#p681493

adafruit_support_mike
 
Posts: 61121
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.