Question about absolute maximum rating

I'm not formally trained in this stuff, so I have some serious knowledge gaps that get me in trouble sometimes. This situation involves using a USB- to-serial adapter to flash firmware to a microprocessor in-circuit, and whether the adapter can, or should, provide 3.3V power to the MPU during this process.

So if the adapter provides power, and the regular power is switched off, it would be applied at the junction of the MPU's Vcc pin, the existing voltage regulator's OUT pin, and the capacitor there. But the regulator is powered down. So that would be applying 3.3V at the OUT pin of the regulator while it is off. I know there is a question of how much current might flow backwards through the regulator and mess up the flashing process, but what's not clear is whether just applying that voltage would destroy the regulator even if no significant current flows.

I use the MCP1702 regulator for lots of stuff, and looking at its datasheet I find this line under Absolute Maximum Ratings:

"All inputs and outputs w.r.t. .............(VSS-0.3V) to (VIN+0.3V)"

I don't understand what that means.

If it means that the voltage at OUT can't exceed the voltage at IN by more than 0.3V, then it seems to me that that is violated every time the device is powered down - unless the voltage drop on the regulator pass transistor's body diode is less than 0.3V. If the power is switched off, the voltage at IN may quickly drop to zero, but the capacitor at OUT may not do so nearly as fast.

What does that line in the datasheet mean?

The basic question is - as a practical matter, how is this issue handled with Arduinos and all the other MPU devices that need to be flashable? Are those devices always powered normally, and not from the adapter, so this issue never comes up?

If it matters, the reason why I'd like to provide power from the adapter, or at least have the option to do so, is that I'll using a soft power switch to provide normal power. The device powers on when a momentary button is pressed, but thereafter the MPU keeps the power transistor turned on by driving it from an I/O port. But the flashing process resets the device at the beginning, at which point the power would go off. So it would be necessary to keep pressing the momentary switch during the entire flashing process, which I don't think is a very reliable practice.

In the process of measuring the backwards current flow in circuit, I've applied 3.3V at OUT a number of times, and the regulator still works fine, which is exactly what I would expect. So I'm really puzzled by the datasheet.

Reply to
Peabody
Loading thread data ...

Is there a diode inside the regulator, from OUT back to IN? In other words, when you apply 3.3 volts to OUT, does that pull up IN?

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

So, yes, you appear to be violating the absolute maximum ratings of the chip. However, you appear to be doing so in a way that's not damaging the chip -- nailing VIN to 0V and putting a stiff 3.3V source on VOUT that can supply lots of current would probably be a different story (with more smoke involved, too).

I would say that as long as there's nothing on the VIN side that's going to consume a lot of current when the regulator is back-feeding 3.3V minus a diode drop, then you're probably OK.

Normally the absolute maximum ratings of a chip mean the ratings beyond which the manufacturer isn't going to guarantee the chip -- it _usually_ means that the chip will, or might, get damaged. But it doesn't definitely mean that the chip won't function somehow above those ratings, or even that commercially viable products can't be built using chips operated beyond those ratings. Take it to mean "here be dragons" and proceed as your intuition tells you.

--
Tim Wescott 
Control systems, embedded software and circuit design 
I'm looking for work!  See my website if you're interested 
http://www.wescottdesign.com
Reply to
Tim Wescott

It's an LDO, so there's the P-FET's body diode in reverse-parallel from output to input.

If OP is suoer-concerned he can just stick a resistor divider and S-diode on the input line to the flashing voltage source to pull the input up when the flashing voltage is connected

Reply to
bitrex

Den fredag den 31. marts 2017 kl. 17.59.25 UTC+2 skrev Peabody:

as long you you don't short/load the regulator input you should fine, the input will just rise with the output through the bodydiode of the pass device

Reply to
Lasse Langwadt Christensen

Same with most people, they may not be willing to admit it though.

Very simple solution. Don't connect the power from the USB adapter to the rest of your design. Why can't it power itself the usual way?

It means just what it says, no pin on the device should be more than 0.3 volts above Vin.

That's a true statement, but the specification doesn't say violating it will automatically destroy the device. Also, your caveat above is valid, the cap won't retain it's voltage as current is drawn off.

It means you should not drive the Vout pin when Vin is zero unless you test the crap out of it and prove to yourself nothing bad will happen.

I don't know, but that would be the easy solution, wouldn't it?

You could add an input to the power control to turn on power when the USB adapter power is present.

The datasheet doesn't say the regulator *will* be destroyed. Also, applying power to the output does not guarantee the spec was violated. Did current flow to bring the input voltage up?

--

Rick C
Reply to
rickman

It wouldn't be the first time.

So if I wanted to be extra protective of the regulator, I could install an external diode like you see used sometimes from OUT to IN in parallel with the mosfet body diode, even a schottky external diode.

But that would still leave open the question of whether so much current would flow through whatever else is normally fed by the IN voltage that it would overload the regulated

3.3V output of the USB adapter. Not to mention the risk of smoke somewhere.

Maybe the best solution is to insert a diode in the IN line. That might marginally reduce effective battery life, but it wouldn't reduce the OUT voltage, or I think even use more power. The drop across the diode just means the regulator drops less.

And Bob might even be your uncle.

Reply to
Peabody

The series diode to the regulator would be the most conservative thing to do, certainly. I'd use a Schottkey, and double-check that I'd be happy with the low-battery performance of the system as a whole.

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com 

I'm looking for work -- see my website!
Reply to
Tim Wescott

One issue that I hadn't mentioned is that this is for the MSP430 processors, and they can be set up to operate as low as 1.8V. So if the circuit has a 1.8V regulator, or really anything below 3.0V, I can't be applying 3.3V from the adapter to the processor pins. So that would require either reducing all the UART lines down to Vcc level, or simply supplying 3.3V to Vcc, with the regular circuit power turned off.

Reply to
Peabody

Not sure why you want the diode between out and in. Shunting the current to the input means you would be powering the power source! Is this a plug that is not plugged in or what?

A "diode" doesn't have to be a diode. You can switch a FET on and off. I think this was discussed recently. I had suggested an analog switch in the signal/power path and the OP thought that was a good approach. That would work here too. Provide power to an analog switch through a pair of higher value resistors, one from each side of the switch. Connect the enable to Vin and it will disconnect the voltage regulator output from the load when Vin drops. A resistor from the regulator Vout might also be useful to keep the power resistor from driving any real current into the output. 1 Meg for the power resistors should do the job and a 47k resistor from Vout to ground will keep that voltage very low.

--

Rick C
Reply to
rickman

Sounds like an analog switch solution to me!

--

Rick C
Reply to
rickman

Hell! That was YOU! Why are you dragging this out again? What changed?

--

Rick C
Reply to
rickman

I've done something similar recently, but I can't remember the details.

Basically it controls what gets turned on by whether the "on" decision is coming from the on switch or by USB being powered up -- the point being to turn the processor on in either case, but to leave a whole bunch of other stuff turned off if all the user is doing is charging the batteries or querying the processor for data.

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com 

I'm looking for work -- see my website!
Reply to
Tim Wescott

In that case, he shouldn't have any problem. The 0.3 volt rating is actually an overcurrent limit, not really a voltage limit.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

Well, the analog switch you mentioned turned out to be nearly $8 at Digikey, and this just isn't that kind of project.

Also, I need to control up to five lines depneding on which processor it is - power, TXD, RXD, DTR and RTS, so a quad switch doesn't quite get me there, particularly if I also need to switch the circuit power supply.

But I thought I had basically taken your advice when I found the MC74VHCT50A which is a hex buffer. 40 cents. Supposedly it is totally off at all pins when not powered. So it could be powered up by the USB, and then all the lines would in effect go through, but only then. But it would not let me isolate the in-circuit regulator as an analog switch would do.

So I was just trying to figure out if I really need to do that, and of course it would depend on the rest of the circuit. But if I wanted to do something that would work no matter what the circuit does, it seemed the most effective thing would be to insert a series diode in the IN line, a schottky if the voltage drop is important, and that would just block any flow back out through the regulator when only the USB power is on.

But as you point out, it perhaps could be a transistor instead, and that could be in the OUT line. I've used P-channel mosfets as reverse battery protection, and that might work here as you described. Have the body diode oriented the right way, with the gate tied to ground through a resistor, then connect the USB power directly to the gate. That should bring the gate voltage up and shut off the mosfet.

So with the 50A, the adapter 3.3V output would power it, but the power to the processor would come from the output of two of the six buffers whose inputs would be tied high. When the 50A powers down, I get full isolation even on power.

I still kinda like that 40 cent option, but I think I do need to look at a diode or transistor to keep current from flowing back out through the regulator when USB is supplying power.

The 50A is actually pretty neat. It will accept up to about

7V on inputs, but high outputs are at its Vcc voltage. So it can be used for level shifting either way. Inputs actually switch at TTL levels. But what interested me is the high-Z thing on power down. I have some coming in, and will test that.
Reply to
Peabody

There are cheaper parts available. Those parts were about going high-z when unpowered which the data sheet doesn't indicate anyway. I explained how they didn't need to be used that way anyhow, the enable will make them high-z.

The quick switch parts I use on the same board are 10 per package. I think they are $2 each. Dig around a little using the excellent Digikey selection guide and you will find very inexpensive switch devices.

A buffer is *not* a switch although it can be used to power low power devices, but the power only flows one way.

That is what an analog (or digital) switch is, a series pass FET with control logic built in.

If you use a MOSFET, the body diode conducts in the reverse direction. So either it will be conducting in the direction of current from the regulator to the USB chip in which case you could just use a diode, or it conducts from the USB device to the regulator which you don't want.

Can you afford a buck?

formatting link

--

Rick C
Reply to
rickman

I do this all the time with a MCP1702 regulator and a PICkit programmer, so long as the input supply is disconnected or can float to ~3V without pulling too much current then it works fine. For 3.3V supplies I set the programming voltage to 3.2V, then it doesn't matter if it's powered or not. As far as what is too much back current, don't know but one thing I'm working on draws about ~50ma from the 5V buss feeding the 3V regulator and if I don't disconnect the supply when programming it just powers it up to 3V. Into a powered-off 7805. But if it's a high drain app disconnect the supply before programming. If that can't be avoided then use a diode before the MCP1702 to block the current backflow...

Vin >---|>|---*---MCP1702---*---> 3.3V

Reply to
Terry Newton

Yes, but that part has enables for two groups of four, and I need to turn on five lines while turning off one.

Anyway, the Digikey box arrrived yesterday, and I've confirmed that the 74VHCT50A does behave properly when not powered. Well, to be precise, when its Vcc is at zero volts. It can't be floating. Both inputs and outputs sink no measurable current when 3.6V is applied to them. And I confirmed that tieing Vcc to the 3.3V output of a USB module that isn't connected to the cable is effectively the same as grounding it - not literally grounded, but it's not floating.

I also confirmed that two 50A buffers tied together will supply the 7 mA needed to erase and flash, and will do so only dropping .015V, which is plenty close enough.

For the moment I've settled on the circuit pictured here:

formatting link

The 50A is powered by the adapter, and all the lines to the processor, including the power supply to Vcc, go through the

50A. Then if needed to protect the circuit voltage regulator, I run its OUT line through a P-channel MOSFET oriented "backwards".

I don't yet have the specified MOSFET to test, but I've used this method to protect against battery reverse polarity, and it works fine for that purpose, with no voltage drop. The only question is whether it will work at these low voltages. But the selected MOSFET begins to turn on at about -0.5V, and is fully on at about -1.5V, which should work.

The MOSFET is oriented so the body diode is forward biased toward the processor. As you pointed out, that has to be the case, otherwise current from the adapter would flow through it back through the regulator, which is what we want to prevent.

The gate is tied directly to the 3.3V output of the adapter, which if not connected to USB is effectively at ground. When the regular circuit powers up normally, current flows from the regulator through the body diode to the source, and as the capacitor charges up enough to get the source high enough, the MOSFET turns on, thereby bypassing the body diode and elminating its voltage drop. So in effect the MOSFET behaves like a zero-drop diode, or an analog switch.

Then when the adapter powers up, the gate is raised to the same voltage as the source, or even a bit higher, and the MOSFET is turned off.

The question that needs to be tested is whether the combination of the intially fully discharged capacitor and whatever current flows into Vcc when it's below, say, 1V, would cause the source to never get high enough for turn-on. My guess is that's not going to be the case, but I need to get some parts and test it. Also to be tested is whether the initial current through the body diode is tolerated.

This is a pretty simple and inexpensive design, and I think it will work ok unless there's something I haven't thought of. And I think it is a design that I hope might be useful for more general application and not just my project.

I appreciate everyone's comments and suggestions.

Reply to
Peabody

Thanks very much, Terry. That's the same regulator I use, so it's comforting to know it works well for this kind of stuff.

You might want to look at my reply to Rickman today for a possible alternative to using a diode.

Reply to
Peabody

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.