High side driver (7V-9V) with 3.3V microcontroller pin to switch it questions... - Page 1
Forum section: electronics / projects

author: alank2
author_rank: Super Contributor
timestamp: July 25, 2019, 09:01:29 pm
content: I'm thinking about using 4 NiMH cells for a 3.3V project. It might use up to 300mA maxmimum, probably half of that or less normally.I'm probably going to use a TR05S3V3 dc-to-dc to convert the 4.4V to 5.8V battery voltage to the 3.3V.My question is what can be done to charge from a 7V adapter. Something else in this same system uses the 7V adapter, so that is the voltage the adapter needs to be.I looked at some NiMH charge controller IC's, but they all seemed very pricy, like $8+ for some reason.This is for a retrocomputer and it has a 4 pack NiCd that it has its own charging method for. It basically uses a resistor to trickle charge it at one rate and then monitors the battery voltage to decide whether to bypass a resistor and kick up the charging current. It basically has an always inline resistor of a smaller value (fast charging) and then uses a resistor to switch past another resistor which when added to the smaller value resistor lowers the current to the slow/trickle method.My question is - what kind of driver is best to switch this? I've been looking up transistor/mosfet high side drivers, but there seems to be an issue trying to turn on a p channel mosfet when you only have a 3.3V logic level unless you use a BJT to drive the gate. Is there an easier way or solution? Basically I want to switch by the larger value resistor from a 3.3V logic level to allow a higher voltage (7V, but potentially 9V) to charge a battery pack.

author: David Hess
author_rank: Super Contributor
timestamp: July 25, 2019, 10:57:16 pm
content: Quote from: alank2 on July 25, 2019, 09:01:29 pmHow much simpler for level shifting than a single bipolar transistor or MOSFET do you want?If you have a logic level n-channel MOSFET, connect its gate to the 3.3 volt positive supply and its source to the logic output. When the logic output is low, it will pull the drain down to the same low logic level. When the logic output is high, the drain can be pulled up to the breakdown voltage of the MOSFET.An NPN transistor can be used the same way with a resistor in series with the base as long as the transistor is allowed to saturate. Or if the resistor is moved to the emitter, then the bipolar transistor becomes a switchable current sink which might be advantageous in some applications but the collector cannot fall lower than the logic supply.

author: iMo
author_rank: Super Contributor
timestamp: July 25, 2019, 11:09:35 pm
content: You may use an optocoupler, the led diode driven off the MCU 3.3V level via a 1k resistor, and the output transistor bypassing the larger value resistor. I think this is the simplest solution.

author: David Hess
author_rank: Super Contributor
timestamp: July 25, 2019, 11:55:47 pm
content: An optocoupler has the virtue of galvanic isolation which prevents ground loops.

author: mark03
author_rank: Frequent Contributor
timestamp: July 26, 2019, 12:00:12 am
content: The single transistor is nice if open collector/drain is adequate, but what's the easiest solution when you need a high-voltage totem pole (low output impedance in both the high and low states) with logic-level input? I ended up using a FAN3268 but was not sure if simpler options were available.

author: David Hess
author_rank: Super Contributor
timestamp: July 27, 2019, 04:07:24 am
content: Quote from: mark03 on July 26, 2019, 12:00:12 amAdd a class-b complementary emitter follower pair to the output. If the sink current is great enough, then the bottom transistor may be replaced with a diode.

author: mark03
author_rank: Frequent Contributor
timestamp: July 27, 2019, 04:40:48 am
content: Sorry, not an analog guy, so I may not know the correct terminology. By "totem pole output" I meant a typical CMOS structure, with a low ohmic path to +V when on, and a low ohmic path to GND when off, where +V is higher than typical logic voltages (in my case 10 volts). In other words, the rise and fall times at the output should be symmetric.

author: David Hess
author_rank: Super Contributor
timestamp: July 27, 2019, 06:00:40 pm
content: Quote from: mark03 on July 27, 2019, 04:40:48 amThe example I gave does have a low impedance in either state. There are various ways to do it and some are better than others but they all come down to doing a high impedance DC level shift followed by amplification to lower the output impedance. Faster designs use AC coupling across the DC level shift to speed up the high side transistor.

author: Zero999
author_rank: Super Contributor
timestamp: July 27, 2019, 09:57:33 pm
content: Lots of plain MOSFET driver ICs can do this. My favourite is the TC4420 or TC4429, but there are many options.https://ww1.microchip.com/downloads/en/DeviceDoc/21419D.pdf

author: mark03
author_rank: Frequent Contributor
timestamp: July 28, 2019, 01:37:07 am
content: Quote from: David Hess on July 27, 2019, 06:00:40 pmI must be really dense. The output is taken from the drain of the IRF540, right? How does that give you a low impedance to +V?Edit: I *am* really dense. Took me until now to figure out the IRF540 was just there as a gate-drive example

author: poorchava
author_rank: Super Contributor
timestamp: July 29, 2019, 02:12:41 pm
content: Quote from: Zero999 on July 27, 2019, 09:57:33 pm+1, I use those a lot too. Also, there are MCP1404, which are 4 Amps peak (TC are 1.5A), but TC442x parts are much more tolerant to various kinds of abuse.There is also MCP1415 and 1416 if u need only one signal.That's what I like about Microchip. They make lots of simple, useful chips that are cheap, available and just get the job done. Too bad they really suck at designing microcontrollers though.Nice "trick" with TC4428 and similar complimentary drivers is that you can connect inputs together, feed them with any random 50% pwm from a microcontroller , hook up a trafo with cap in series to it and there you have a floating power supply. Perfect for floating gate drives and similar stuff.