Help with AC current level detection over sense resistor   - Page 1
Forum section: electronics / beginners

author: Back2Volts
author_rank: Unknown
timestamp: August 17, 2018, 01:42:28 pm
content: I want to detect the AC current level on the load driven by an existing device which has a built in sense resistor with externalized pins. I need to detect load status, which can be either 0 mA, 300 mA or 600 mA on 24VAC.In addition, there will be a 1-wire serial line and a handful of input digital signals, all connected via FT232H/USB to a Raspberri Pi. I am counting with a layer of isolation between FTDI chip and device.I have attached a simplified schematic. There is no DC readily available in the device. One of the two 24VAC legs is tied to ground; the modules in the device have hidden DC supplies drawing from the 24VAC. The digital signals expose DC levels related to ground.I am struggling with how to deal with the AC current sense voltage on the 24VAC leg. The simplest solution I can think of is using a signal transformer, rectifier/filter and two voltage comparators. Are there micro size transformers for 60Hz? Will something like this work?https://www.mouser.com/datasheet/2/281/kmp_da100-185018.pdf. (It shows up on a Mouser search for 50-60Hz, but obviously is rated higher frequency.)What would be a common solution? As a last resort, I could put a current sense transformer on the 24VAC line for the whole device, but they are bulkier than I would like...Are there any specialized ICs for AC current measurement with I2C interface, like INA219 but for AC. Is there such a thing?Comments and suggestions appreciated.

author: Kleinstein
author_rank: Super Contributor
timestamp: August 17, 2018, 02:27:10 pm
content: One can use a normal toroid core inductor as a crude current transformer - just add a well insulated wire for the primary current through the center.Those linked small digital signal transformers are not really suitable for 50/60 Hz. The maximum voltage would be really low ( mV range).

author: MasterT
author_rank: Frequent Contributor
timestamp: August 17, 2018, 03:54:15 pm
content: Alternatives to current sense transformer are hall effect IC (ACS712 etc.) , so would not be accurate < 1A.Or Isolation amplifiers, most of them needs power supply at high side, but there are some with integrated dc-dc converters, can't find part number right now.https://www.mouser.com/Semiconductors/Integrated-Circuits-ICs/Amplifier-ICs/Isolation-Amplifiers/_/N-6j73s/

author: Back2Volts
author_rank: Unknown
timestamp: August 18, 2018, 02:02:50 am
content: Quote from: Kleinstein on August 17, 2018, 02:27:10 pmI have found/ordered this oddball transformer. I'll give it a try.https://www.ebay.com/itm/5PCS-2mA-2mA-Voltage-transformer-precision-micro-voltage-transformer-ZMPT107/263629041550I'll keep in mind the possibility of building my own current sense transformer.Thanks

author: Back2Volts
author_rank: Unknown
timestamp: August 18, 2018, 02:17:39 am
content: Quote from: MasterT on August 17, 2018, 03:54:15 pmI had looked at the Hall sensors but as you say they are out of range. The use of isolated amplifiers is a good idea and I did not realize some are at reasonable prices. I would need a power supply, so for now it is a backup solution.Thanks

author: Ian.M
author_rank: Super Contributor
timestamp: August 18, 2018, 05:52:47 am
content: A power supply is very simple - you've got 24V AC so all you need for a low current DC supply referenced to either rail is a capacitive dropper feeding a charge pump, then regulate.

author: Back2Volts
author_rank: Unknown
timestamp: August 18, 2018, 05:00:09 pm
content: Quote from: Ian.M on August 18, 2018, 05:52:47 amWould that look like a 2-diode/2-capacitor voltage doubler circuit with the first capacitor much smaller than the second and something like a 7905 on the output ? Any pointers to calculating the capacitor values?

author: Ian.M
author_rank: Super Contributor
timestamp: August 18, 2018, 06:52:50 pm
content: Yep. However you'd want a shunt Zener limiting the max voltage into the 7905.The easiest option is to sim it in LTspice. Here's a +5V 10mA one I put together - it looks like it needs 6.8uF for a reliable 10mA allowing for supply voltage and capacitor tolerances. Put your own figures in for load current and tolerances.

author: Back2Volts
author_rank: Unknown
timestamp: August 19, 2018, 12:19:27 pm
content: Awesome ! Thank you.

author: mzzj
author_rank: Super Contributor
timestamp: August 19, 2018, 01:42:04 pm
content: Quote from: Back2Volts on August 18, 2018, 02:02:50 amThat transformer doesn't look really well suited for the task but maybe you can bodge it to work if you really want.Better options:https://www.digikey.com/product-detail/en/talema-group-llc/ASM-010/1295-1125-ND/4172347orhttps://www.ebay.com/itm/5pcs-5A-5mA-micro-precision-current-transformer-accuracy-class-0-2/291547857754?_trkparms=aid%3D888007%26algo%3DDISC.MBE%26ao%3D1%26asc%3D51915%26meid%3D2a8770ba27bf4ab59596c975ddfa5fe7%26pid%3D100009%26rk%3D1%26rkt%3D1%26sd%3D263629041550%26itm%3D291547857754&_trksid=p2047675.c100009.m1982

author: Back2Volts
author_rank: Unknown
timestamp: August 19, 2018, 04:21:52 pm
content: Quote from: mzzj on August 19, 2018, 01:42:04 pmThose two current sense transformers are for straight current sense, but with them, I could only measure the total device current and not just the one through the load which would be preferred. The best not intrusive solution is to tap on the existing current sense resistor drop, which will be a fraction of a volt. That is why I am trying a two coil transformer instead of the pass through current sense one.Thanks for the interest.

author: mzzj
author_rank: Super Contributor
timestamp: August 19, 2018, 04:25:42 pm
content: Quote from: Back2Volts on August 19, 2018, 04:21:52 pmI don't really see why you couldn't use "straight" current sense transformers to measure the individual load current(s)

author: Back2Volts
author_rank: Unknown
timestamp: August 20, 2018, 01:43:10 am
content: Quote from: mzzj on August 19, 2018, 04:25:42 pmThe load wire is not on the connector I want to tap into. On the other hand, the two pins of the sense resistor are available, so my wishful thinking is that a 1:1 transformer connected in parallel with the sense resistor may allow to read the reflection of the sense voltage on the secondary. May be I can play with it in LTspice. I know the current sense transformer is a backup solution.

author: Ian.M
author_rank: Super Contributor
timestamp: August 20, 2018, 03:29:06 am
content: Shunting the internal sense resistor with a transformer winding would be unwise if the sense resistor is used for any sort of internal status sensing, fault detection or current limiting.With a 0.82 ohm sense resistor, you've got less than 0.5V of sense voltage at 600mA load current, and do you really want to have to deal with measuring AC in realtime with an ADC controlled by the Pi?I think I'd design a split rail +/-2.5V supply riding on the 24V AC line, then *either* use an OPAMP precision rectifier circuit and low pass filter to drive two comparators driving optocouplers, *or* use a Microchip PIC16F1765 which has an integrated OPAMP and ZCD module, and can run at 8 MIPs from its so is well suited to doing whole cycle true RMS measurements of small signals, then either do the thresholding in the PIC and use a dual OPTO to drive two Pi GPIO pins, or use its UART to report the RMS current to the Pi by optoisolated asynch serial.

author: mzzj
author_rank: Super Contributor
timestamp: August 20, 2018, 05:16:04 am
content: Quote from: Back2Volts on August 20, 2018, 01:43:10 amAh, I see your point now. The miniature transformer you found looked just right for the job then.

author: Back2Volts
author_rank: Unknown
timestamp: August 20, 2018, 02:44:19 pm
content: Quote from: Ian.M on August 20, 2018, 03:29:06 amThe resistor is used for continuity/short detection. I was just hoping that the parallel effect of the transformer with something like a 50-100 ohm series resistor would not be significant, but you have a point.QuoteNo, two bit status would be fine.QuoteFunny you mention that. Yesterday afternoon, I took your PS LTspice and added a precision rectifier, thinking to make a rectifier-peak-detector-dual-comparator with a quad opamp. The rectifier seemed to work on a single voltage power supply using a couple of LT1413. I will finish it tonight or tomorrow.Thank you for posting the LTspice because it pushed me to use the simulator, which I had not touched in a long while.