Very Low-Cost high side current sensing - Page 1
Forum section: electronics / projects

author: forrestc
author_rank: Unknown
timestamp: September 15, 2015, 11:51:28 am
content: I regularly need to include the capability for high side current sensing in designs. Almost all of these are sensing a high side rail which is up to 60V or so (i.e. the design needs to survive up to a common mode voltage of around 65V).So far, I tend to either use a INA195 or similar in combination with a sense resistor (works good, but you have the disadvantage of the voltage drop across the high-wattage sense resistor), or a ACS711 hall effect current sensor (which has horrible accuracy at low currents).These tend to have two uses - one is overcurrent detection to turn off power to an output in the presence of a fault, and the second is to provide a readout to the end user about power consumption. Normal currents one would want to read are typically up to about 1A or so (see note about ACS711 resolution being a problem), but can be much higher in a fault situation (see note about high-wattage sense resistor), although it is ok to just top the reading at a few amps and call it an overload. The reading needs to end up in a small microcontroller but I'm really flexible about how I have to read it (I have a 12 bit ADC available to me, but a sensor with an inbuilt ADC, or some sort of PWM output, etc would be fine - but level translation to the microcontroller needs to be considered in the cost).I would love to find a way to cut the cost of this high-side sense circuitry significantly. I've looked at lots of options but it always seems to end up back at about $1US parts cost per sensor (when assuming 1000-5000pc purchasing) when you consider the total cost of the sensor+conditioning circuitry to get it into the microcontroller.I'm hoping someone has some brilliant method (or part) that I haven't considered probably because I didn't think about it as an option. Anyone have any ideas?

author: tszaboo
author_rank: Super Contributor
timestamp: September 15, 2015, 12:30:32 pm
content: High side sensing is possible with difference amplifier. A cheap opamp with a few resistors can basically do 80% of what a current sense amplifier can, if you dont care about accuracy, CMRR, failure modes. Just take care of the rail to rail problems. Inputs are attenuated of course.The current sense resistor can be a PCB trace. That will have a nasty 3900 ppm temperature coefficient. If you really want to push the BOM, use the input fuse (if there is any). That will change with time and such, but ultimately it is usable.If you only want some fast overcurrent protection, I would rather use an ASIC. There are current limited load switches, which do everything for you like TPS25921.

author: Marco
author_rank: Super Contributor
timestamp: September 15, 2015, 12:54:59 pm
content: You can makea make shift high side current sense amplifierusing a matched PNP pair, bcm856 is around 10 cents in volume and can handle 65V.

author: forrestc
author_rank: Unknown
timestamp: September 15, 2015, 01:13:53 pm
content: Quote from: NANDBlog on September 15, 2015, 12:30:32 pmI've thought about the high side opamp. The 65V is a sticker. I either have to power it high (create a rail an appropriate number of volts below the high voltage) and then figure out how to level translate it down to 0V reference (hints?), or find a 65V powerable opamp with decent enough CMRR to be able to discern <100mV with a 60V Common mode voltage. Unless I've missed something that is (which is why I'm asking - sometimes I'm shocked at the holes I have in my knowledge, even after doing design for quite some time now)For some future designs where I've got a lot (i.e. 12 or more) of these on a single board, I'm actually looking at doing a fet switch on each, running into a voltage divider and then into a many-bit ADC and using the Vf of the main (not the adc-switching) Power FET switch itself as the current sensing element. By measuring the voltage on each side of the FET I should be able to derive at least a reasonable current. But again, once I start talking high side fet switching circuit, or a fet output opto, we start getting back into that $1 per sensor range.I did find a supertex HV7801 part this evening which may work, at around 50c each. Still have to add a sense resistor but that's starting to go in the right direction. I'm still digesting the datasheet, and I remember looking at this previously, just don't remember why I didn't go that way.I have looked at devices like the TPS25921. I haven't found one which works at 65V, or if I have it was very scary price-wise. Plus, I find that since I also don't really control the design of the loads these switch, I can run into an issue where I have to deal with inrush currents which some of these just don't like.

author: forrestc
author_rank: Unknown
timestamp: September 15, 2015, 01:21:10 pm
content: Quote from: Marco on September 15, 2015, 12:54:59 pmHmm... this definitely is potentially interesting.

author: Marco
author_rank: Super Contributor
timestamp: September 15, 2015, 01:46:58 pm
content: Quote from: forrestc on September 15, 2015, 01:13:53 pmIntersil hasa cookbookabout that. I'd try LMV321+PNP transistor (the beta error isn't terribly relevant and the PNP transistor is more robust than the P-Mosfet). Not sure it would be much more accurate than the PNP pair one though, you'd have to try.The errors on the HV7801 are pretty obscene, starts at ~15 mV offset at low Vsense and shoots up from there. I think the PNP pair could do better than that.PS. early effect error would be rather high for the "Battery charger high side current sensing" circuit in the NXP doc, I think the one for "Current monitor for DC/DC converter ..." would be okay though and you could probably get away with an unmatched pair for the bottom two.

author: macboy
author_rank: Super Contributor
timestamp: September 15, 2015, 02:35:08 pm
content: Look for an op-amp with "over the top" inputs. There are definitely a few that can handle well over 65 V common mode. When I Google "op-amp over-the-top inputs", the first hit is a Linear design note that has a high side current sense amp in it among other things.

author: langwadt
author_rank: Super Contributor
timestamp: September 15, 2015, 02:39:11 pm
content: how accurate? how much voltage drop allowed?

author: tszaboo
author_rank: Super Contributor
timestamp: September 15, 2015, 03:02:18 pm
content: Quote from: forrestc on September 15, 2015, 01:13:53 pmYou dont need high voltage opamp. As I said, if CMRR is not a concern, and you can get relatively accurate, say 0,1% resistors, it is doable.Check out this diff amp datasheet:http://www.analog.com/media/en/technical-documentation/data-sheets/AD629.pdfCommon mode voltage 250V, power supply 15V. Just make sure the resistors are good.

author: Marco
author_rank: Super Contributor
timestamp: September 15, 2015, 05:39:25 pm
content: If you want to maintain that 0.1% over a decent temperature range (ie. 25ppm or better) you are already looking at 5 cent resistors AFAICS. Even ignoring the divider error, a 10x divider will make the offset voltage error 10 times worse too.Combining the two I think you are looking at about 50 mV of error, for small shunts this is huge.

author: nctnico
author_rank: Super Contributor
timestamp: September 15, 2015, 06:11:56 pm
content: Quote from: NANDBlog on September 15, 2015, 03:02:18 pmI have used this solution (divider + amplifier) in a design but I'm not happy with it; even with 0.1% resistors the resulting error is 5% because errors due to amplification go up quickly.BTW Analog has some nice high side current sensing amplifiers useable up to 80V but those will probably cost too much.

author: eneuro
author_rank: Super Contributor
timestamp: September 15, 2015, 06:58:39 pm
content: Quote from: forrestc on September 15, 2015, 11:51:28 amWhat kind of application is it, while so small current sensing?Anyway, in synchronous rectifier driver I test this custom made Hall efect ensor based on radiometric SS495A and with a few turns it shouldn't be a problem detect currents above 1A, but I'm interested in tens of amps up to hundred amps, so even decided forget about ACS711 and make custom high current sensor, where there is no problem with thin ACS71 pins which limits maximum current availableHowever, very low-cost might someone cost a lot if this thing fails and more expensive non galvanic insulated circuit fails, so for EV high power application decided use only Hall effect insulated current sensing in both directions-those sensors while galvanic insulated are basicly non destructable to external magnetic field, etc

author: Marco
author_rank: Super Contributor
timestamp: September 15, 2015, 08:28:17 pm
content: Quote from: forrestc on September 15, 2015, 01:13:53 pmAll on the same rail? Because this makes it easier to bring down cost, just multiplex into a single high quality fast current sense amplifier (probably build from a standard auto-zero opamp like the MCP6V81, since the integrated auto-zero current sense amplifiers have disappointing GBW).

author: forrestc
author_rank: Unknown
timestamp: September 16, 2015, 02:01:22 am
content: Quote from: Marco on September 15, 2015, 05:39:25 pmThis is my thinking too. I'd really like to keep the voltage drop across the shunt to <50mV. Even less if possible. If I've got 50mV of error this is a major problem. My other challenge that I haven't mentioned yet is that these are in a unconditioned environment so we have to pay attention to behavior from at least -40C to +60C. Which makes this even harder, unless you're using (expensive) paired, matched resistors.

author: forrestc
author_rank: Unknown
timestamp: September 16, 2015, 02:05:40 am
content: Quote from: eneuro on September 15, 2015, 06:58:39 pmRemember that at 48V (nominal) 1A equates to around 48W. This isn't a teency bit of power.This is an application where we are switching PoE devices which use either 24 or 48V at around 7-15W each. So a typical current (at 48V) is around 150mA. Some devices do use up to 1.5A or so, total.Cool hall effect current sensor solution...

author: forrestc
author_rank: Unknown
timestamp: September 16, 2015, 02:09:41 am
content: Quote from: Marco on September 15, 2015, 08:28:17 pmYeah, for the higher quantity port solution they're all the same rail, or often one of two rails. Unfortunately I sell a lot more of the low-port versions for whatever reason, and this doesn't start looking good until a half dozen or so.

author: forrestc
author_rank: Unknown
timestamp: September 16, 2015, 02:28:16 am
content: Quote from: langwadt on September 15, 2015, 02:39:11 pmAre "not very" and "as small as possible" good answers?+-10% or so is probably fine, although I'd prefer less (now we're getting into the how much is better accuracy worth to a customer game).Same with the voltage drop, although I don't really want to go over 100mV at around 1.5A. I'd really rather be under 10mV.

author: forrestc
author_rank: Unknown
timestamp: September 16, 2015, 02:30:13 am
content: Quote from: Marco on September 15, 2015, 01:46:58 pmExcellent reference, and that LMV321 is impressive for it's price. The LMV324 is even more impressive.This is definitely going to get a shot as the solution.

author: eneuro
author_rank: Super Contributor
timestamp: September 16, 2015, 06:57:39 am
content: Quote from: forrestc on September 16, 2015, 02:05:40 amThere is no such equation and voltage drop maters not nominal power, o I have no idea what are you talking aboutIn high power low voltage (36Vrange so similar) synchronous rectifier driver voltage drop at 1A in diode might be 1V (or less), so we have loss 1V*1A= 1W (not 36W) which means that less than 10W will be lost when for three phase synchronous rectifier (6 diodes in full bridge) such Hall effect sensor will be used capable to detect currents >=1A and bypass mosfet body diode (or external in parallel). So, even 10W is nothing compared to a few kW rectified using.... only 3 Hall effect sensors and a few opamps, in a very reliable and a way that this current sensor (like shown above prototype) can't be destroyed by high power circuit, while galvanically insulated.I have now idea what do you mean by thisQuoteso, I've shown how I've estimated power losses dou to usage of non destructable Hall effect current sensor, which is trade off between lower current sensing accuracy and resolution, but in my application it is fully acceptable and this is not for a toy, but for EV so it must be very reliable too and it can be

author: forrestc
author_rank: Unknown
timestamp: September 16, 2015, 08:17:05 am
content: Quote from: eneuro on September 16, 2015, 06:57:39 amYou asked 'why such a low amount of current'. I was trying to respond by saying that the reason why it was such low current was that it was a higher voltage application, and in those high of voltages, even 1A delivers a lot of power (50W) to the load. I'm switching third-party devices which need 48V, and which use less than 0.25A as a typical load. But I also have to design for short duration short-circuit currents which are obviously much higher, and can dissipate a lot power in a very short amount of time.Today, I use Hall effect sensors regularly. (I buy ACS711's in reel quantities regularly). I actually love the non-contact, isolated nature of them, and they have such high instantaneous current ratings that I never have a problem. The problem is that my customers really want to know how much power their equipment is taking for power system planning and to locate devices which are taking more than a normal amount of power (these are regularly installed at solar sites where every watt is precious). As you stated, the real problem is the accuracy and resolution of a hall effect device. If I could overcome that (at a reasonable cost), then for me that would be a preferred solution.

author: Marco
author_rank: Super Contributor
timestamp: September 16, 2015, 07:19:48 pm
content: If you really want say 10 mA resolution measurement I just don't see any way around it, you'll need an auto-zero opamp or current sense amplifier (like the LTC6102) so you can take say 10 uV range readings from a mOhm shunt.Maybe you could do it cheaper with a DIY chopper circuit, but it's getting rather exotic at that point.

author: eneuro
author_rank: Super Contributor
timestamp: September 16, 2015, 07:30:43 pm
content: Quote from: forrestc on September 16, 2015, 08:17:05 amWhen made a quick look at ACS711 datasheet, they says on top that:Code:ACS711 Hall Effect Linear Current Sensor with Overcurrent Fault Output for <100 V Isolation ApplicationsNotice this <100V isolation applications, which is not acceptable even in my DIY spot welder project where 230VAC is used?Really, those things are rated at such low solation applications?Anyway, when searched for them at Digikey they specified its response to current as:Quotewhich doesn't look great eg. for 31A.I will check tomorow response to current of my custom SS495A based Hall effect sensor shown a few links above with a few turns of thick copper wire with at least 230VAC insulation, but It should be much more than 100mA/A i guess, but limited by +/-2.5V @ 5Vcc, so I should be able detect currents close to 25A.Which is more interesting, when we calculate at 30A resistance losses in ACS711 eg. this quite nice 8-SOIC with 1.2m Ohm, we get close to 1W loss in this small part, while in the case of my custom Hall effect sensor with thick 2.5mm2 wires, I expect much less losses.This is tradeoff in those Hall effect sensors, between Vcc used, than at 5Vcc, it is clear that while we have only +/-2.5V available for linear current sensing when we want sense let say up to 10A, than we have 2.5V/10A~250mV/A, and lowest currents capable to sense sometimes limited by Vcc precision and accuracy, but we should remember that Earth magnetic field is in the range of 0.5 Gauss, which means we can hit the point where this small Hall effect sense current which we could sense with high precision power supply will interfere with Earth magnetic field and it will not allow to go for such high precision Hall effect current sensing.Hopefully, for high current applications I'm interested in even 250mV/A is fine since in my custom Hall effect current sensor I can easy detect 1A overcurrent and even if i can estimate up to 10A only @ 5Vcc, sometimes it is fine, because I'm only interested in going above 1A, etc.It depends on application, but 1.2m Ohm resistance of 8-SOIC ACS711 is not acceptable for me, while eg, at 100A there were... 12W eenrgy loss in this thing, which probably means it could quickly hit temperature of hot iron

author: forrestc
author_rank: Unknown
timestamp: September 17, 2015, 01:33:57 am
content: Quote from: eneuro on September 16, 2015, 07:30:43 pmSounds like you want something more like an ACS722....265mv/A for the 5A version. 2400V (working 297V), 0.65mOhm conductor resistance.The ACS711 is *specifically designed* for low voltage DC applications which need an isolated, fairly inexpensive current sensor. It's actually the lowest cost member of the family. They have others which go all the way up to 200A and 4800Vrms isolation. The caveat being the higher the amperage the lower the mv/A since they have to fit the specced range into Vcc.

author: eneuro
author_rank: Super Contributor
timestamp: September 17, 2015, 07:35:49 am
content: Quote from: forrestc on September 17, 2015, 01:33:57 amLooks better, but still the problem is that this sensor itself breaks circuit since you have to connect it itself somehow with wires, so it have to be soldered on PCB, etc.I think that using custom Hall effect current sensor I've shown above, have this advantage that there is no need to solder connectors for high power wires on crappy PCB, so I expect better overall performance.Just right now, I will test response to current of my new prototype Hall effect sensor with those few turns of wire...I think I should get at least 100mV/A or so...Update: Yep, I was very closeDuring calibration I've got86.7mV/Ain this thing, which means +/-29Amax, ~20A RMS @ 230VAC 4.6kW under current control

author: Marco
author_rank: Super Contributor
timestamp: September 21, 2015, 06:55:43 pm
content: Quote from: forrestc on September 16, 2015, 02:30:13 amI'd just spring for the 40 extra cents for a AD8538, you can use that with a 10 mOhm shunt for better than 5 mA Vos limited accuracy over a large temperature range (assuming the offset voltage does nothing terribly weird at Vcm=0 at temperature extremes). It's still under a dollar and you give your client mA range accuracy, they gotta like that.