@Robert93820 @Alan73922
Hello, still working on my buck converter project as time permits. I am using the following schematic but want to use the EN pin to on/off the IC via a pushbutton switch. I cant see how to incorporate the switch without creating a short between the Vin and Gnd but suspect it is probably done similar to an Adafruit product that places a 100kOhm resistor between the Vin and EN pin then connects the EN pin to GND via a switch leaving out the C2 Capacitor. My reading indicates there is a very low signal from the EN pin which when shorted to Gnd disables the IC and shuts down the output but I am assuming it still requires some voltage at the EN pin hence the connection via the Resistor to Vin. The data sheet says for pin EN “Device enable logic input. Logic high enables the device, logic low
disables the device and turns it into shutdown. Do not leave floating.”
I am hoping someone may be able to advise if connecting the EN pin to Vin via a resistor and the EN pin to Gnd via a switch will achieve my on/off goal and if so any thoughts on the Resistor size. Or better yet how to calculate that Resistor size?
Thank you in advance for any suggestions.
Hi Leslie
You are basically correct. 100k might be a bit high. Anything between 10k and 50k should be OK with the switch between EN and ground.
Don’t leave the capacitor connected to EN or it will take some time to come on when required and when you close the switch (which would be across it) you are likely to damage it with the cap discharge current. Connect it to the battery input or Vin.
Doing it this way will leave the battery connected at all times. Is there anything wrong with having a switch in the line from the battery so you disconnect it. If you are switching large currents I can see your point but I am not sure what sort of current capability that IC has.
Cheers Bob
Thanks Bob, that is really helpful. I was hoping I had it right as I keep trying to improve my understanding and knowledge. How would you determine the Resistor size if you were calculating it?
What is not showing in the schematic as it is a separate item is a Lipo Charger for the battery so if I were to switch the battery V+ wire I would then need to connect the charger on the battery side of the switch. I will take a look at that but had assumed the draw from the battery when the the IC was not enabled would be negligible so had taken the easy route. I am switching about 700mA so low although the ADA1683 I was going to use in the EN-GND connection is only rated to 500mA so that would’t be suitable for switching the battery and my design is quite space limited so hard to find a suitable switch that will handle the load and work in my design.
Thank you for your help
Hi Leslie
Calculate resistor size ?? Not terribly critical. Depends on how much current you can afford. Don’t forget current will be flowing through this resistor while the device is switched off with your proposed configuration. But you don’t particularly want the impedance so high as to be a good antenna for interference. Maybe a better approach would be to put your switch between Vin and En with about 10k or 20k from En to ground as a pull down. Once again connect the capacitor to Vin NOT to En You will waste a bit of current then when the device is ON. All a bit of a trade off really but it is a fact of life you get nuttin for nuttin.
Work out how much current you can afford to dump then use ohms law.
Voltage (V) divided by current (mA) equals resistance (kΩ).
Cheers Bob
I agree with @Robert93820. I think the switch should be placed between Vin and EN, and a resistor from EN to GND. From the specifications, the Off voltage for EN can be as low as 0.4V and the Shutdown current as high as 2uA. A 150K resistor will only show 0.3V with 2uA so is low enough. This arrangement means no current is drawn by the switching system when the switch is open (but the device itself draws a small amount).
Although 150K is adequate according to the specification, it could be regarded as high impedance and susceptible to stray electrostatic fields. If this could be a problem then the value can be reduced with the penalty of a greater current draw when the device is on. If the on current is 700mA then diverting 1 or 2 mA makes very little difference, make the resistor 10K. And as an added precaution, perhaps put a 100nF bypass capacitor between EN and GND.
Hope this helps
Hi Leslie, Alan
Agree with Alan.
Make this resistor between En and ground 10kΩ. At 5V this is only 0.5mA and if this is going to be a concern your supply is not big enough in the first place. As Alan says 150kΩ is too high and for stability reasons this pin has to be as close to Vin and Ground as possible. 10kΩ is OK. Cap is a good idea too. It won’t hurt anything.
Cheers Bob
Thank you gentlemen, that is great advice. I have reworked the schematic taking on board your advice re the switch location, resistor and Cap and prepared the following schematic. I would appreciate your comments on whether I have got it right or have misinterpreted your suggestions.
In this configuration when the switch is closed the 3.7Vin is fed directly to the EN pin to activate the IC but also is directly feeding to Gnd via R4. The Lipo battery I am using is a 2600mAh battery so is the 10kΩ R4 suitable for the battery output?
When the switch is open the EN pin is, I believe, not floating as it is connected to Gnd so that should meet the specs for the IC?
Regards and thank you both again
Hi Leslie
Yes that is what we mean. The En pin is tied to ground via the 10k resistor and is not floating.
The current drawn is 0.37mA which is pretty small.
That is entirely up to you and depends on how much current you can afford to waste at that point. Whichever way you do it you are going to lose something. The only way not to is to disconnect the battery completely when switching off.
But like I said. You get nuttin for nuttin in this world and if you can’t afford 0.037mA your supply in not big enough in the first place.
As far as battery size is concerned don’t forger that so far from this end we have no idea of your output voltage (without going to the data sheet for that IC and calculating it), your continuous current requirement and how long is the battery expected to last.
Cheers Bob
@Robert93820 @Alan73922
Thanks for your comments. You are right and I should have given more detail when asking for help.
The buck converter is using a 2600mAh 3.7v Lipo battery and the output I am chasing is 2.9v and 900mA. This will run the LED I am using for the light for a small table lamp design I am working on with my daughter. I am expecting (and I do get) a couple of hours before it starts to noticeably dim.
I produced my first PCB and that was only a partial success as I screwed up the Inductor sizing and you guys helped me sort that problem so I then produced version 2. Version 1 and 2 both gave me the voltage output I required but I screwed up version 2 by misreading and badly designing the switching process so it is always on unless I put a switch in the battery V+ which I can do but not easily in the current lamp design so they will be used for another design at a later time. The inductor however works perfectly.
So version 3 which I am working on now will have the switching sorted I hope, again with your and Alan’s help. The following is a photo of version 2. Only included for interest
Regards
Bob a quick edit! In your last post you mentioned current draw as 0.37mA in the first para but then later in the post you used 0.037mA. I am guessing the second one is correct and the first a typo but thought I should check and I will do the calculations as well as I can learn more that way.
Edit2; I see when calclating the current that it is indeed 0.37mA so 0.037mA is the typo?
No,sorry, the first one is correct 0.37mA
Bob
That is correct, but there is nothing in the circuit to ensure that the draw from the battery is negligible when the battery is charging. You should check the specs for your charger very carefully to confirm that it can be used while the battery is under load. If not, then you need to implement something (could be mechanical) to ensure that the buck converter is not running when the charger is connected.
@Jeff105671
Thanks Jeff, I had probably just erroneously assumed it would be ok as all I am doing is feeding in a second power source and couldnt see how that would affect anything as it will still be feeding a max 5.5v and according to the specs the circuit is able to handle 3.2v-5.5v input but good point so I will check.
I am actually using a ADA 4410 Micro Lipo charger for the charging process and that will feed in to the circuit via the PP1 & PP2 pin headers.
Cheers
Charging LiPo involves several steps that are controlled by sensing battery voltage. A load on the battery will confuse the charger calculations and it will be unable to detect when the battery is properly charged, possibly leading to overcharging and battery damage. If the charger has separate battery and load outputs, then the load (the buck converter) can be connected so it can be used while charging - circuitry within the charger ensures that the load does not interfere with the charging process. For example: LiPo Charger with Load Sharing | Hackaday.io
It does not appear that the charger you mentioned has this facility, so you will need something to ensure that the converter is not running when the battery is charging. For instance, the charger input voltage could be used to control the converter EN input to ensure that the converter is disabled when the charger has input… A simple mechanical solution would be to position the connectors so that the USB and converter cannot both be connected at the same time (but that might not suit your application).
Leslie,
if you are looking at the data sheet, it should also be telling you that the EN pin is a LOGIC input, and list the threshold voltages.
e.g.https://www.mouser.com/datasheet/2/405/tlv62569-1077958.pdf says on page 5 that a logic high should be above 1.2V and low is below 0.4V. Elsewhere the current into the pin is stated to be 0.01uA, so you could calculate the pull-up value. e.g a 100k resistor would drop 0.1mV with 0.01uA through it so the pin would have only 0.1mV below the battery voltage, well above the logic High level.
Just a note on the schematic too, the data sheet is drawn slightly differently. The capacitor should connect across the supply (Vin to GND) and the resistor goes from Vin to EN, with the switch from EN to GND and therefore the switch will not short the supply.
Dave
Hi Dave
Can be either way. Resistor between EN and Vin and switch to Gnd to switch off or as Leslie has drawn to turn it on.
The 100nF cap is OK where it is. Put it in or leave out it will do no harm.
Might only be me but I don’t like high value resistors in solid state circuits. Prone to any interference that is floating around especially some of the rats nests developed using the plug-in proto boards Keeping everything a bit more closely tied to Batt or Gnd saves a lot of grief.
Cheers Bob
@Jeff105671
Hello Jeff, very late response to your last post but I have been away in the back blocks of WA so sorry for the silence. I am hoping you can help me some more.
I agree with your comments that the best way to manage the load and the LIPO charging is to disable the Buck Converter via the EN pin when the charger is connected.
Big ask I know but can you advise any way I can achieve that cutoff.
My amateur thinking:
I assume the battery charger voltage will be used to drive the EN pin low.
Can i do this with a NO mosfet between the EN pin and GND so that when the mosfet is open the switch controls theEN pin and when the mosfet is closed the EN pin is connected to GND regardless of the state of the switch. The mosfet would be controlled by the battery charge current/voltage. Does this make sense? If it does how would i determine a suitable mosfet for this application. In the circuit i will use the current between EN and Gnd will be.037mA and the power in from the battery charger will be 5v 1A. I have read a lot on Mosfets but am still somewhat mystified by all their options.
Hope you can advise some ideas for me to look at.
Regards
les
Hi Leslie
As I corrected some time ago and you calculated the current will be 0.37mA.
Cheers Bob
I don’t think I suggested that using the charger voltage to control the EN pin was the easiest solution. The easiest solution would be to arrange the inputs so that they can’t both be connected at the same time - that’s what I do. If that doesn’t suit your application I would recommend changing the on-off switch to a three position switch - on, off and charging. Using the voltage at the charger to control the EN input is the most sophisticated solution, but also the most complex. It would involve a logic level inverter that dragged the EN input to ground when the voltage was high. That’s easy - a single transistor can do it (and it doesn’t have to be a MOSFET). But then you have to wire it in alongside the on/off switch, so that it drags the input safely to ground regardless of the setting of the on/off switch. At the same time you have to switch the charger output to the battery lead, but that has to be done in such a way that the battery voltage does not drive the enable pin low when the charger is not powered. It is doable, but it involves re-doing what you already have for the on-off switch. Adding a third position to that switch doesn’t disturb what you already have - simply wire it so that EN is grounded and the charger feed is connected to B+ when in the charging position.
@Jeff105671 @Robert93820
Having another look at the BuckBooster circuit and a way to disconnect the IC when the battery is being charged. I have taken on board all the very good suggestions made by all on this question and topic and in my naive and unskilled way have put together the attached schematic in the hope that those who have helped me so far can advise what is wrong with my schematic and/or how to improve it or maybe just discard it alltogether. In my simple thinking I have introduced a transistor to send the logic pin to ground when the charge connection is live (battery being charged and voltage to Transistor Base) and also added a diode to prevent the battery power from providing power to the transistor when the charger is disconnected. My thinking is when Transistor Base is charged the very low current at EN will be sent to ground un-enabling the IC and will overide the Switch regardless of the Switch’s on/off position.
In this circuit I have used a 100k R5 as I am using a PB Switch with very low ratings and the 0.37mA (thank you again Bob) will fit the switch’s tolerances. I have also used a 1k R6 as I wanted the current at the Transistor to be well below max. In my calculations I end up with 4.3mA using a 0.7v drop at the diode. But I may have this all wrong.
So I hope this makes some sense and will look forward to the comments I hope to receive from all of you very generous advisors or maybe it makes no sense whatsoever and I should stick to other pursuits:-)?
EDIT. I forgot to say I did benchtest the idea using a prviously built board using the circuit shown but witout the Transistor/Diode addition and it appeared to work although I also appeared to have a constant voltage drain when the transistor was closed.
Hi Leslie
The first thing that comes to mind is the 0.7V drop across D1. This would probably upset the charging operation. Assuming the charger outputs 4.2V this drop reduces this to 3.5V which is a bit low I think. Perhaps someone with LIPO charging experience could comment. Even using a schottky diode would have probably 0.2 or 0.3V drop which is still some percentage of available volts.
That is the main problem with these low voltage circuits. All these small voltage drops add up and it doesn’t take much to finish up with almost nothing. When you get up into higher voltage circuits these small voltage drops can largely be ignored.
There may be a way to insert a P channel mosfet between Batt and IC Vin to cut power to the IC when the charger is connected. Will think about that.
Cheers Bob