5VDC 6A switching and measurement circuit - Page 1
Forum section: electronics / projects

author: Nominal Animal
author_rank: Super Contributor
timestamp: March 10, 2019, 07:52:49 pm
content: I have a number of Linux single-board computers and gadgets that take a well-regulated 5 VDC at various currents, say up to 6A or so (although typical is 0.5 - 3A).A year ago David Hess helped me with the current measurement part (in this thread), but now I'd like to incorporate a power on/off switching too. I'd appreciate any comments or suggestions on achieving this.The core idea is to use a 5VDC switchmode supply, say aMeanwell RS-50-5that can provide up to 10A at 5VDC, to provide a slightly higher voltage, say 5.2VDC to 5.3VDC. This is split into two, with simple LC filters as these SBCs are usually too small to include sufficient filtering in them. One rail is always on, and provides power to a Teensy LC or 3.2 (via internal LDO, as it uses 3.3V logic level; unless powered by USB. The two MBR130 Schottky diodes are needed as the Teensies do not have those themselves). The other rail is switchable on/off, and should be able to provide up to say 6 or 8 A at 5 VDC to an SBC. This high power rail is monitored for voltage and current glitches by the microcontroller. The other rail will have a much smaller load, 500mA or less.Here's the schematic I've got thus far:The filtering section splits the incoming 5.25VDC into two, and applies some filtering. L1 is a high-current choke (something like max. 15A, 5mOhm; at this voltage and current levels, it'll have about 0.1uH of inductance), and C1 a bulk electrolytic capacitor, something on the order of 1000uF. L2 and C2 are similar but smaller/cheaper, as the maximum load on the other rail is much less. The 470kOhm resistors are just to bleed off any charge from the capacitors when the power is turned off, for safety; I'm thinking especially accidental discharges when connecting new USB devices, or touching USB connectors. None of the values for these components are decided yet; any suggestions? I'd especially appreciate any practical observations.The on/off control section uses a P-channel MOSFET (Infineon IP50P04P4L-11). (I do need to switch the positive rail on and off; the microcontroller and the SBC share the ground, so the switch must be between positive rail and the load.) Although I could probably drive this MOSFET using a 3.3V pin from the Teensy at the target currents, I think using an NPN transistor (2N3904) to drive the MOSFET using the 5.25VDC rail is better. Note that this is essentially steady state operation, not PWM. In order to ensure the MOSFET is off during power-on (when the ENABLE pin is an input to the MCU; floating), there is a 47kOhm pull-down resistor; the 3.92kOhm to the base of the transistor is for current limiting the microcontroller output pin to roughly 1mA.Note that if the load is inductive, and generates a voltage spike at switch-off, I'd rather have the MOSFET take the hit rather than pass it through to the power supply; that's why I did not include a flyback diode to the MOSFET. (I could add an MBR130 Schottky or something though, if there were a reason to.)The current sensing section is the same asin this thread, so you can probably ignore that. The voltage sensing section uses a voltage divider to halve the voltage, and uses the second half of the TLV2372 rail-to-rail in/out opamp to buffer it, so that the Teensy can measure the analog signal (and it'll be in 0 to 3.3V range). Again, the current and voltage are measured for glitches/spikes, not necessarily for their exact absolute value. (Both current and voltage will have to be calibrated using a test load and a DMM anyway.)The MCU section is just a note that the upper (lower-current) 5V rail is also used to power a microcontroller. However, the total current draw for the upper rail will be less than 500mA.Suggestions? Criticisms? Does this look sane to you?

author: Miti
author_rank: Super Contributor
timestamp: March 10, 2019, 09:18:44 pm
content: Ideally, you would like to discharge the capacitors pretty fast. The time constant of C1, C2, R11, R12 is about 4 min. Many bad things could happen in 4 min. I would rather use a diode, or better, a FET. See attached.Edit: I'm thinking input short but if the SMPS and the switch are permanently connected and enclosed, press ignore.

author: Nominal Animal
author_rank: Super Contributor
timestamp: March 10, 2019, 10:27:22 pm
content: Quote from: Miti on March 10, 2019, 09:18:44 pmRight. So, for the high-power rail, that means combining the on/off control section with the high-power rail filtering, similar to how the following figure by Ian Milne for Diodes Inc. (fromhere) uses two MOSFETs in conjunction with the DC-DC converter EN line to discarge a 15mF capacitor on the load side,R1 being a pull-down resistor, R2 the actual bleed resistor, and Q1 and Q2 the P and N-channel MOSFETs needed.My situation is further complicated by the fact that there are two different discharge situations: One is when ENABLE goes low, to disconnect the load; the other is when the supply is disconnected. I am not worried about shorts and such; if those happens, more expensive stuff will fail anyway.Using the idea shown above, I think I understand how to use two MOSFETs to handle the high-power rail, moving the filtering after the on/off control, and ensuring the load is either connected to VIN, or through a small discharge resistor to ground, depending on whether ENABLE is driven high or not. (With a pull-down resistor, so a floating/high-Z ENABLE is pulled down, when booting up.)However, I don't see how to handle the lower-power 5VDC line; the case when the VIN supply goes off. I can't use Schottky diodes at VIN, because the opamps need a voltage at least as high as the high-power rail has. Since I'm targeting total VIN current of about 10A at 5.25 VDC or so, and the supplies can be adjusted max. 5.4 VDC or so, I can't even adjust the supply to be even higher to account for Schottkies (and I'd prefer to not generate waste heat). So, I'm having difficulty detecting when VIN drops, since the caps will pull it high.Darnit, I could really use a example circuit for this. Any suggestions?(Edit: I could just drop the low-current filtering. Is that the best option here?)

author: Miti
author_rank: Super Contributor
timestamp: March 10, 2019, 11:41:39 pm
content: Quote from: Nominal Animal on March 10, 2019, 10:27:22 pmThat's why I said "or better a FET", literally, one FET that makes an almost ideal diode on VIN. Take a look at Fig. 3 in the attached pdf.

author: Nominal Animal
author_rank: Super Contributor
timestamp: March 10, 2019, 11:47:26 pm
content: So, perhaps something likeperhaps?Q1 is an N-channel power MOSFET, used essentially as a low forward drop diode replacement. L1 and C1 form the simple LC filter I desire. Q2 is an P-channel power MOSFET, used to short Vout to ground through the bleed resistor R2, if Vin is disconnected (and C1 is still charged).R1 is just a current-limiting resistor, perhaps unnecessary. I probably need to do a simulation to see what happens if there is an intermittent failure in Vin, say something like contact bounce when connecting or disconnecting Vin. I wouldn't want it to behave like a boost converter.Edit: No, wait: I need something to pull the MOSFET gates down when Vin becomes floating; otherwise L1 and C1 can keep the MOSFET gates charged. Ouch.Edit 2: I think the best option might be to add a physical discharge button. Disconnecting Vin should be a rare occasion, in the sense that pressing the button after disconnecting the power supply, is IMO an acceptable requirement. Otherwise, I need to build some kind of time delay circuit (replacing R1 with a cap and a zener, perhaps), in which case the requirement changes from pressing the button to waiting a specific time. I think the button is safer. (When connecting e.g. new USB devices without Vin connected, keeping the discharge button depressed should help with ESD, I'm thinking, as it just shorts load V+ to GND through a resistor.)

author: Miti
author_rank: Super Contributor
timestamp: March 11, 2019, 12:48:50 am
content: Use P-FET on the high side.

author: Nominal Animal
author_rank: Super Contributor
timestamp: March 11, 2019, 02:49:19 am
content: Ah, indeed. I think this is finally making sense to me. So, in my previous post, Q1 should be a P-FET with gate tied to ground. That obviously changes the rest of the schematic, and therefore that post is garbage.I now realize my actual problem at hand. (Bleeding off the supply (and ground) is connected, but the microcontroller drops the ENABLE signal.)What I want to do, is to detect when the entire system is disconnected, say after half a second or so, and dissipate any residual charge into a resistor. While in normal operation VIN-GND will be 5.3 V or so, at disconnect they both float. When they do float, I would prefer the load to be shorted to ground via a small resistor, to help with ESD.I wonder how others have solved this problem. I do believe that typical desktop and laptop computer power systems do not bother. A disconnect-discharge button makes more an more sense to me!