EEVblog Electronics Community Forum
Electronics => Projects, Designs, and Technical Stuff => Topic started by: jwhitmore on June 11, 2017, 06:00:31 pm
-
I'm working on an automotive project, (12V supply) and wanted to create a microcontroller board to switch current to outputs with P Channel MOSFET's as a high side switch. I think that should be an easy enough circuit.
My question is about current sensing as I'd like to be able to monitor the current drawn by these outputs and possibly shut them down if a short circuit is detected. I've never played with current sensing at all but there are current sensing amplifiers so all I'd need is a small shunt resistor. If I say that the uC is a 3v3 device and the maximum current I'm going to switch is 10 Amps what should I be looking for in the data sheet? I know that's a very vague question but I just picked a part on the web, (the maxim MAX4080SASA+) and looking through the data sheet I'm a bit confused by the output which seems to exceed 12V. Because of the 3v3 uC the input to its ADC can only be 3v3 so I'd have to use a voltage divider circuit to limit the input to the uC down to the 3v3?
Is that about right or is there a simpler solution, I should be looking at? Sorry about the vague nature of this but thanks for any advice
-
Hello,
there are fully protected high side switches for automotive applications available.
(including switch off and status output in case of fault).
Some also have a current monitor output which is not very accurate but should be suitable for a over current detection
with best regards
Andreas
-
Hi,
I used STs intelligent high side drivers in a number of automotive project. Good diagnostic features and they have all the protection the automotive industry demands.
Just be aware that the current sense is not very accurate over the whole temperature range. +-10% if I recall correct.
Example:
http://www.st.com/content/st_com/en/products/automotive-analog-and-power/high-and-low-side-drivers-switches/high-side-switches/vn5012ak-e.html (http://www.st.com/content/st_com/en/products/automotive-analog-and-power/high-and-low-side-drivers-switches/high-side-switches/vn5012ak-e.html)
-
Integrated devices are nice if you don't need best accuracy. If you do need the accuracy you can use a shunt resistor and a special kind of op-amp.
The two op-amp types that could be useful are current sense op-amps (specifically designed for purpose) and instrumentation amplifiers (more general purpose). Texas Instruments, Linear Tech, Analog Devices, Maxim and many others sell these.
Re ADC pin protection:
It's common to use a reference voltage of say 2.5V. This is because the 3.3V supply rail will move around a bit with load current an temperature and degrade accuracy.
You could add a series resistor (say 100 Ohm) small capacitor (say 1nF) and a clamp Zener diode (say 2.7V) on the ADC input pin.
-
You can use an isolating DC-DC converter to give you a floating 5V or 3.3V rail, and use the traditional low side sensing and switching circuit here. You do have to isolate the signals too or your battery will be shorted out.
-
The ZXCTxx devices are nice cheap simple little transimpedance amplifiers for basic high-side current sensing.
If you don't want an integrated "smart high-side switch" sort of solution, and you don't mind providing the ADC yourself (as opposed to an integrated ADC device that sits on an I2C bus or similar) this may be a good choice.
https://www.diodes.com/assets/Datasheets/ZXCT1107_10.pdf (https://www.diodes.com/assets/Datasheets/ZXCT1107_10.pdf)
-
Another high-side current monitor like the Zetex ZXCTxx mentioned by LukeW is the INA138/INA168 (http://www.ti.com/lit/ds/symlink/ina168.pdf). Example using INA138 for your situation:
The maximum recommended voltage over the shunt resistor for accurate current measurements with the INA138/INA168 is 0.5 V. Let's say that we want to measure up to 20 A accurately. In that case the shunt resistor should be:
Rshunt = Ushunt / Ishunt = 0.5 / 20 = 0.025 or 25 milliohm
The output voltage of the INA138/INA168 is given by following formula (see datasheet):
Vout = Ishunt * Rshunt * 0.0002 * Rgain
Say that you want the 20 A maximum current to correspond to an output voltage of 3.3 V, then you can calculate the gain resistor as follows:
Rgain = Vout / (Ishunt * Rshunt * 0.0002) = 3.3 / (20 * 0.025 * 0.0002) = 33000 or 33 kiloohm
You can then feed this output to the ADC input of your microcontroller. Note that the accuracy depends on the stability of the reference voltage (power supply) of your microcontroller. Depending on the desired accuracy using Vcc may not be the best reference.
I've used the INA138 before in automotive projects but never to protect MOSFETs. I would imagine that you need very fast response if you want to protect a plain MOSFET against a dead short. If you're more concerned about protecting your MOSFETs than the actual current consumption, I would recommend to look at protected high-side switches instead as mentioned by Andreas and halexa.
-
Thank you all for that information. I was unaware of smart high side switches for automotive which are exactly what I was trying to roll myself. Searching through specs at present trying to make a decision. Thanks again