How big a resistor is reasonable to stick on this regulator's enable pin? - Page 1
Forum section: electronics / projects

author: Starlord
author_rank: Frequent Contributor
timestamp: December 28, 2014, 05:37:27 pm
content: http://www.ti.com/lit/ds/symlink/tps62133.pdfI'm planning to use this regulator on one of my boards, and I would like to set the board up such that by default, it's on, but a switch can be plugged into the board if desired.The plan is to have an external pullup on the pin, and have the switch pull the pin to ground. No switch, no ground, and the device remains on.Easy enough, but the device is also battery operated. So, when the switch is "off", current will flow through my pullup resistor and slowly drain the battery.Obviously, I want this drain to be as slow as possible. I realize I could probably stick a transistor in there to avoid this, but that's another part I have to populate by hand and it adds to the cost, and all that.As long as my device can sit around for a year without draining more than 50% of a AAA battery, that would be good enough I guess. Actually, I should probably go find out what the capacity of those are and what the drain will be with a 10K or 50K resistor, maybe I'm worrying over nothing.Oh, and I should mention, there's a 400K internal pulldown on that pin which is disconnected when the pin goes high. I mention this because I assume it will affect the maximum value the 5V pullup can be. I'm guessing I'm gonna need to keep that 5V pullup below 100K.Anyway, off to find out the capacity of those batteries and how many mA different resistors will draw.

author: jeremy
author_rank: Super Contributor
timestamp: December 28, 2014, 05:42:13 pm
content: Ohms law has the answers for you my friend. V=IR

author: pyrohaz
author_rank: Regular Contributor
timestamp: December 28, 2014, 05:46:49 pm
content: Quote from: Starlord on December 28, 2014, 05:37:27 pmI don't want to seem stupid but if an AAA battery is 1.5v and that buck converter is 3v input minimum, what is actually happening?

author: Starlord
author_rank: Frequent Contributor
timestamp: December 28, 2014, 05:54:40 pm
content: Oops, I just realized I said the pullup would be to 5V, when actually it will be to VIN, and that matters when calculating how much current will be drawn.Anyway Wikipedia says a AAA alkaline has a 1200mAh capacity.And my input voltage will be anywhere from 6V to 12.6V.That means with a 10K I'll be pulling 1.26mA, with a 50K I'd be pulling 0.25mA, and with a 100K I'd be pulling 0.126mA.There are 8760 hours in a year, and I want my 1200mAh capacity battery to last twice that long. So it needs to last 17520 hours.1200mAh means I can draw 1mA for 1200 hours. And 17520 / 1200 = 14.6, so I need to reduce that 1mA 14.6x.So 1mA / 14.6 = .0685mAWell, poo. I'd be pulling twice as much even with a 100K resistor, and my battery would be dead in a year.I wonder if a 250K resistor would be okay to use. Actually I'm not sure if that's a standard size I gotta go look that up now.

author: Starlord
author_rank: Frequent Contributor
timestamp: December 28, 2014, 05:56:43 pm
content: Quote from: pyrohaz on December 28, 2014, 05:46:49 pmIf I put four batteries in series I get 6V, which the converter drops to 5V. Since they're in series, the total mAh capacity doesn't change versus a single battery for the purposes of my calculations.

author: Starlord
author_rank: Frequent Contributor
timestamp: December 28, 2014, 05:59:10 pm
content: Quote from: Starlord on December 28, 2014, 05:56:43 pmOh DUH...I just did the calculations above using 12.6V for a fully charged three cell LiPo. So that increased the current draw I got with my resistor calculations. It would be around half that much with 4 AAAs providing 6V. So the 100K resistor should do the job.

author: pyrohaz
author_rank: Regular Contributor
timestamp: December 28, 2014, 06:01:40 pm
content: Quote from: Starlord on December 28, 2014, 05:54:40 pmOff the top of my head, you could probably manage a 270K resistor. Don't forget to watch out for the self discharge of the batteries (dependent on their chemistry) along with the quiescent current of the rest of the circuit. Fortunately, your buck converter has a pretty nice and low quiescent current so that should be alright! Also, when calculating your resistor, its probably going to be in parallel with your internal 400K resistor.

author: ovnr
author_rank: Frequent Contributor
timestamp: December 28, 2014, 06:20:08 pm
content: How about the obvious boring electromechanical solution?You say that a shutoff switch can be plugged in. Use a connector with an internal switch (like 2.5mm/3.5mm audio connectors, most barrel power jacks, etc).If your switch is closed when the connector is unplugged, it'd work like so:Since the internal pulldown switches off if the enable is high, it will not consume any extraneous current. The two connector pins are the pullup voltage (hence safe as it's thru a 100k resistor) and the EN input; you may want to add ESD protection to that, and probably a 10k series resistor.

author: Starlord
author_rank: Frequent Contributor
timestamp: December 28, 2014, 06:33:13 pm
content: Ovnr:That's a clever idea!But this is a tiny 2x2" board where space is at a premium, I'm trying to keep the price down on, those kinds of jacks cost $0.50-$1.00, the cables for them are just as expensive, the switch will only rarely be used, and I already have a 3.5mm and barrel jack on the board and having another would be confusing for my end users.

author: Unknown
author_rank: Unknown
timestamp: December 28, 2014, 07:15:26 pm
content: You know you can call or email TI and ask, right?Another thing you could do is to hook up a resistor substitution box between EN and Vin and see what the highest resistance you can put in there and still have the board turn on. (Then halve that number for safety in the production units).But - page 3 of the datasheet says Vh ("High level input threshold voltage") is only 0.9 volts.So if you get EN above 0.9v that's enough to turn it on. The resistance you need to do that depends on your Vin voltage (spec is 3 to 17 volts), but from there you can easily calculate the needed resistance with Ohm's law - you have 400k pulling to ground, so you have a voltage divider consisting of 400k + your resistance (connected to Vin), with the EN pin in the middle.Calculate the value needed to bring EN to 1 volt or so. It's going to be > 1 Mohm, so I don't think you'll have a significant battery drain problem.

author: tautech
author_rank: Super Contributor
timestamp: December 28, 2014, 07:31:47 pm
content: Quote from: Dave92F1 on December 28, 2014, 07:15:26 pm+1Refer to P 16 of your linked datasheet.

author: Starlord
author_rank: Frequent Contributor
timestamp: December 28, 2014, 08:11:28 pm
content: Quote from: Dave92F1 on December 28, 2014, 07:15:26 pmWell, yeah, but I figured I'd get an answer faster this way and maybe an explanation of how I should calculate this in the future.QuoteAh, yeah... I should have thought of that. I just got done explaining the same principles to someone who asked about the internal pullups in an Arduino.So 400K / (400K + 100K) = 0.8 * 6V = 4.8V. More than high enough.Also, I would have thought the high for EN would need to be more like 0.7Vcc like the microcontroller I'm using. I didn't even think to check it. If it were 0.7Vcc, then you can see that with a 100K I'd be cutting it close, so my intuition there was on the right track anyway, if it were 0.7Vcc like I assumed.QuoteHuh, yeah I guess you're right. TI probably thought of this when choosing that voltage too. It just seems so wrong to me that a much larger pull up than pull down makes the pin read high.

author: Starlord
author_rank: Frequent Contributor
timestamp: December 28, 2014, 08:59:16 pm
content: Okay, did the math.Assuming worst case of 4 dead AAA batteries supplying a paltry 4V which is a bit outside the specs for my processor running at 16MHz:400K / (400K + X) = YY = 1V / 4.5V = 0.25400K / (400K + X) = 0.25400K / 0.25 = 400K + X1600K = 400K + X1600K - 400K = X1200K = XSo, a pull up resistor of up to 1.2M is fine.If I plug in 4.5V instead, which is the minimum voltage that's in spec for the processor and still mostly dead batteries, I get 1.4M.And if I use 4.5V and 0.9V which is the actual minimum for the EN pin, I get 1.6M.I'd probably just use a 1M resistor if I go that high since it's a nice round value and something I might use with touch sensing.Anyway, if the 100K would drain the AAA after 2 years, then the 1M would take 20. That's good enough for me.

author: tautech
author_rank: Super Contributor
timestamp: December 28, 2014, 09:14:52 pm
content: Generally you will find the answer in the datasheets, it just a case of RTFM.Problem is there are so many incomplete datasheets for devices on the net now, unless you get the original manufacturers version it may not contain full device specs.Been bitten by that before, skimped by downloading a smaller version to save my broadband bandwidth, only to get an incomplete datasheet.Lesson: get the manufacturers version.