Mains AC current monitoring approaches - Page 1
Forum section: electronics / projects

author: Circuitous
author_rank: Unknown
timestamp: June 13, 2014, 02:29:46 am
content: In a current project I need a micro-controller to measure AC line voltage and current, and if possible to identify spikes and brown outs.I have tried a few approaches and documented them.ACS-756 from Allegro:ADE 7913 from Analog Devices:Now I am starting on the CS5464 from Cirrus. I should finish that testing up in a couple of days.Does anyone have a particular favorite device for this sort of thing?If you have any suggested approaches or other feedback, I'd be glad to hear it!

author: mjkuwp
author_rank: Unknown
timestamp: June 13, 2014, 02:55:57 am
content: thanks for sharing your work!! I will definitely be checking it out.I have built a few meters with ADE7953.So far has been pretty easy to work with. It can capture peaks, detect sag and the coolest thing is you can read out the waveforms. There are outputs you can configure and I think one could have these give a signal out for brown-out or a reading above a peak threshold. I don't use those features - I primarily simply use active energy accumulation to calculate and log power.http://mjkuwp94.tumblr.com/WattMeter2waveform samples herehttp://mjkuwp94.tumblr.com/wattmeterwaveformsAll the code is shared as well as the Eagle files... however my board design is nothing to shout about. I am bringing up a new design now that is a lot better and that I will share when it is verified.I like that it is 3.3V and it is pretty easy to calibrate. I have also shared documentation on how to calibrate it. I use either a .0005 or .001 ohm 4-terminal resistor. I need my meters to go up to 20A RMS and at least 50A peak DC levels.I used electric imp but much of the information is portable to other micros.This picture is of my new design (does not match the Eagle files on my Tumblr page). I have not powered this one yet...

author: djacobow
author_rank: Super Contributor
timestamp: June 13, 2014, 05:09:39 am
content: I did a similarish thing for a project of mine that I'm working on. It's a 4-channel "smart" power strip and it plays with a Spark Core or just and Ard Pro Mini.I used the ACS712 current sensor. It seemed to work fine for this purpose. It's just going right into the uC's ADC without an amplification.Here's a pic of my first board. It has a major design error in that I used the wrong SOIC footprint for the ACS712. It was too wide. Also did not leave enough space for the caps for the switcher. Second rev board is on its way now from Seeed with those fixes and a few others, and ore parts converted to SMD. However, the board pictured does work. :-)There is a bit more description here:https://www.eevblog.com/forum/chat/what-are-u-working-on-right-now-(electronics-related-and-with-picture-please)/msg437730/#msg437730Note that I did not even bother to measure voltage in this project. I only want to know if a plugged in device is drawing power. Having the exact voltage wasn't critical (though I do get zero crossings so I can phase angle dim).Like njkuwp, I used a PCB-mount ACDC converter, though I actually put mine on the PCB. I am so not thrilled with these. They cost like $12+ But if you are going to use one, I can say that the Mean Well IRM-05 series work better than CUI one I used. Have not tried the RECOM.-- dave j

author: eneuro
author_rank: Super Contributor
timestamp: June 13, 2014, 07:49:37 pm
content: I like analog Hall sensors like SS495A and successfully used it in current limiting circuits.This is of course made in home first prototype, but at bigger currents even only a few turns and shortcut with mains power supply tracks circuit do the job.It will depend on your application requirements, but while I was playing with electric vehicle motor drivers and higher currents were in my interests, nice thing is it is easy to design this isolated AC/DC current sensor while I can adjust its wires to expected maximum currents.SS495A hall sensor is easy to connect while it has built in resistors and when no external magnetic field is present its output is abount Vcc/2, so when powered from 5V about 2.5V analog output we get.I think, using Hall efect current sensors is good idea while we can detect on the same ADC uC pin positive and negative currents.For mass production such prototypes based on SS495A are not a solution but it worked for me and I knew exactly what is going on in those circuits while they are simple and easy to fix problems

author: nctnico
author_rank: Super Contributor
timestamp: June 14, 2014, 12:24:24 am
content: Quote from: Circuitous on June 13, 2014, 02:29:46 amIf it doesn't need to be isolated then you could use a sense resistor. Hall sensors are nice but they are sensitive to magnetic fields (including the one from the planet). If the circuit needs to be isolated an option would be to have some analog electronics + ADC connected to the mains and use an I2C isolator to read them.

author: eneuro
author_rank: Super Contributor
timestamp: June 14, 2014, 09:19:56 am
content: Quote from: nctnico on June 14, 2014, 12:24:24 amIt could be interesting test to see how sensitive to Earth's magnetic filed this ACS-756 from Allegro isLets see how sensitive SS495A is.Earth's magnetic field (http://en.wikipedia.org/wiki/Earth%27s_magnetic_field)QuoteSo, we have Earth magnetic field range from 0.000025 T to 0.000065 T .Looking into SS495A (eg this one:http://datasheet.octopart.com/SS495A-Honeywell-datasheet-8359995.pdf)QuoteThis Hall sensor has magnetic range about:+/- 0.067TQuoteSo, for minimum and maximum Earth's surface magnetic field we have such influence:+/- 0.000781 Vmin+/- 0.002031 VmaxWhen using 10bit ADC (eg. ATTiny85 with TL431I voltage reference)5V/1024= 0.004882 VIt looks like Earth's magnetic field can influence readings from SS495A, but it is up to you to determine whether those 2mV matters in your application, while... you are not able read this Hall sensor output with higher accuracy without better ADC and more stable voltage reference in this standard AVR uC.Problem is that there is nothing about requirements of this AC/DC current detections and frequencies needed in this thread.So, even such simple Hall sensor (<2$) I've implemented in my overcurrent detection & protection circuit can do the job but you have to know its limits and which is expected response from this Hall sensor and how it will behave in environment you want to use it.

author: nctnico
author_rank: Super Contributor
timestamp: June 14, 2014, 11:23:59 am
content: In my experience a hall current sensor's output can change 10mV by just turning the PCB upside down. There is not just the magnetic field of the earth but also influence by metal objects nearby. I'm not saying these sensors are useless but the output may have some DC offset due to various magnetic fields.

author: Circuitous
author_rank: Unknown
timestamp: June 17, 2014, 01:04:09 am
content: Thanks for the responses.I'll have to check out the ACS756 sensitivity to the Earth's magnetic field, but it might not be too apparent at my bench (with all of the AC lines, pipes, ducts, etc.) The ACS756 is sensitive to other nearby magnetic fields. A permanent magnet can affect the reading, but remove the magnet and the readings return to normal.Meanwhile, I finally completed the CS5464 prototype (hideous perfboard wiring) and initial testing with AC line voltage loads.As always, looking for feedback on what to improve or what I left out... even more importantly: what to watch out for!

author: mjkuwp
author_rank: Unknown
timestamp: June 17, 2014, 01:17:07 pm
content: That Cirrus part is very similar to the ADE7769 that I am using. If you want to consider wireless operation you could get rid of all the isolation parts. Some ideas are jeenode, sparkcore, xbee or as i have used electricimp.comI am interested in the overall dynamic range that you can achieve with your design and that chip. Will that be an issue at all in your project? When one considers crest factor for current it lowers the range. For example a published range of 1000:1 probably assumes a pure sine wave. In my design I account for about 60A peaks so that on a 20A load the crest factor can be 3.I have found I can only read down to around 5W resistive loads at the lowest for a meter designed to read up to 2400Watts maximum or just 480:1 dynamic range. I did not do a full accuracy test yet - I just judge based on how much noise is on the current waveform when I read it out of the IC. I will probably calibrate the meters at 15W load to get the low offset and at 1700W to set the gain.I didn't catch what resistor value you used but if you used .001R and set the amplifier to 5 then you just reach the ability to reach 50Amps [2.5 crest factor on a 20A RMS load].again, thanks for sharing your project,Mark

author: LukeW
author_rank: Frequent Contributor
timestamp: June 17, 2014, 03:22:20 pm
content: Do you want a hall-effect galvanically isolated approach, or a shunt resistor approach?For a shunt resistor, chips such as the INA19* or LMP8601 may be cheaper than the ADI/Cirrus/MCP etc/ dedicated "energy meter" chips with voltage/current acquisition and built-in 16-bit multipliers etc.For a Hall-effect approach, the Honeywell CSLT6B100 gives you the Hall sensor in a slotted toroid, as a pre-fabricated unit.For a shunt approach, the Silicon Labs Si890x gives you a nice galvanically isolated output with minimal parts, integrating the microcontroller, ADC and optocouplers together.

author: Circuitous
author_rank: Unknown
timestamp: June 17, 2014, 04:06:54 pm
content: @mjkuwp For that test I'm using a shunt resistor of 10m Ohms, but will probably use 1 or 5 mOhms on my next PC board.My intended load is about 100 - 1240 Watts incandescent for this project. One channel will need to measure marker lamps... load range from 60 - 300 Watts total. The other channel will need to measure 620 - 1240 Watts.This will be hardwired for a fixed installation, literally in the field... hours away from any city.@LukeW Great recommendations on the chips. I see that Silicon Labs has a whitepaper about the Si890x. I'll take a look at those.The CS5464 isn't cheap and that would matter for a lot of products. This is a sizeable project, so a few pricier components isn't too bad. But, it will add up with the CS5464 and the various ADuM parts.Thanks for the feedback and taking the time to look it over.

author: mjkuwp
author_rank: Unknown
timestamp: June 17, 2014, 05:37:57 pm
content: So this is for agriculture? sounds possibly interesting. Being so remote - do you datalog and then get the results periodically?Have you considered the possibility of adding a cellular modem? I have not done any projects like this but considering the pace of technology, something like this should soon be pretty easy.Looks like you will not have any trouble with the ratio of the loads.

author: Circuitous
author_rank: Unknown
timestamp: June 17, 2014, 10:43:09 pm
content: It's for monitoring and control of the navigation lights on a 450 foot (135? meter) radio tower that is used for internet back-haul.The controller be mounted on the tower, about 30 feet (10m) above ground. The controller will be connected to the radio building via a serial cable... inside the building it will connect to the network through a dedicated (and thoroughly surge protected) linux box... probably a RaspberryPi or BeagleBone.The current monitoring is to identify if any lamps have failed so that the owner knows to visit the tower. And, if there appears to be a full failure of the beacon lamps (the one at the top), then to also contact the FAA.The tower has an anti-collision paint scheme, so the lights are only needed at night.The big things with this so far are identifying the failure modes and thorough surge/lightning protection. Nothing I can do for a bad strike, but the goal would be to survive smaller hits. If the board does blow out, then the RPi (or BBB) will notice and send an SNMP trap. If the RPi gets blown as well, then the SNMP manager should notice.... that's the short summary of the project.

author: eneuro
author_rank: Super Contributor
timestamp: June 18, 2014, 02:57:58 pm
content: Quote from: Circuitous on June 17, 2014, 10:43:09 pmTower >100 meter high nice but what about lighting?Maybe it could be better to connect this controller using wireless radio or even POF (optic fibre) to the building?It looks like you don't need precise power meter, while you only need to detect light failue, but this light circuit can be hit by lighting -is it other option than galvanic isolation in this AC current sensing?If you know AC current frequency you could sense this current even with Hall sensor and simply compute response signal analysis and compare if it fits into expected AC power supply figures, so noise should not be a big problem I guess while you can detect lack of sine wave.Did you tried to put those comercial Hall sensor based current meters inside magnetic field shield?http://www.magnetic-shield.com/pdf/magnetic_fields_shields_overview.pdfQuoteThis will not protect against Earth's magnetic field but maybe reduce magnetic noise from electronics?

author: Richard Crowley
author_rank: Super Contributor
timestamp: June 18, 2014, 03:15:21 pm
content: Why so exotic? If you want something reliable, I would just use very simple current sensing transformers down at the power breaker panel. Then monitor the current and report any deviation. Too high if something gets shorted. Too low if a lamp burns out, zero if the breaker blows, etc.You could also monitor other things like temperature, etc. Ice falling off high towers is a big problem in more northern areas. Even here in Portland, Oregon where it only snows about once every 3-4 years.

author: Circuitous
author_rank: Unknown
timestamp: June 18, 2014, 03:27:52 pm
content: I'll definitely be measuring temperature. Ice fall is a problem here in Kansas, that has actually damaged the night sensor before, and can even damage the radio buildings (not my problem). I could throw in an accelerometer or shock sensor just for reporting purposes.The current light control equipment is 30-40 years old, I have repaired the simple controller before.http://corgitronics.com/2012/08/26/radio-tower-navigation-lights/And now I'm working on the improved solution.A simple current transformer will do the job, but then I need to do the differential amp and then sample it, then the RMS calculation (for 2 channels), plus do the same for the line voltage. If I can get all of that in one chip plus a couple of current shunts and a voltage divider, then that seems to be the easy approach. Although easy, is it the best approach? Maybe not. Is it good enough? ...remains to be seen.I appreciate the comments, and I'll keep trying new things out for a while.on the magnetic field sensitivity, the ACS756 didn't seem too sensitive to external currents, but I'll test that out.

author: Richard Crowley
author_rank: Super Contributor
timestamp: June 18, 2014, 03:56:25 pm
content: Quote from: Circuitous on June 18, 2014, 03:27:52 pmIMHO you are dramatically over-thinking this. A bare-bones diode resistor capacitor "signal conditioning" circuit is all you need between the shunt resistor and the analog input to the microcontroller. You aren't doing precision calibrated laboratory measurements here, you are MONITORING the clearance lamp current. You establish the "baseline" signal for all lamps operating normally, pick some "delta" real-world wiggle-room, and then report any deviation, higher or lower as something to be checked.This is actually LESS critical even than all those people who want to monitor the current draw of their refrigerator and their bedroom light circuit, etc. The critical factor here is not MEASUREMENT of the AMOUNT of current, it is DEVIATION from NOMINAL that prompts a human to travel out there to see what is happening. At least that is how I see it. The simpler the better for maximum reliability. You DO NOT want to get fined by the FCC or the FAA for letting any of the lights burn out. That is one reason people are making LED replacements for these things. For many tower operators, it is cheaper in the long run because it is expensive to hire someone to climb the tower just to replace 100-year old technology (incandescent lamps).

author: eneuro
author_rank: Super Contributor
timestamp: June 19, 2014, 11:58:10 am
content: Quote from: nctnico on June 14, 2014, 11:23:59 amBut which Hall sensor? There are diffrent ones on the market.I can confirm that Earth's magnetic field (Northern Hemisphere -Europe ) on analog Hall sensor SS495A powered by 5.01  is close to those theoretical calculations I've made a few posts above.When it is in this position - SS495A faced up (as shown in its datasheet) than its output voltage from 2x 4.7k resistors divider is: 1.240 If PCB is reversed then this voltage changes to 1.242 , so difference is about 2mV * 2= 4mV, so close to 1LSB on ATTiny85 @ 5Vcc 10bit ADC.However, it is interesting that when this sensor is in vertical position, looks like regardles of turn angle output is: 1.241 .When we use it in application which does not move like typical controller, than this Earth's magnetinc field small influence simply is not a noise while it is constant and does not afffect our detection of current changes.Quote from: Richard Crowley on June 18, 2014, 03:15:21 pmIf we add a few turns and put this small (5mm x 5mm) SS495A inside toroid core we can monitor current, but in my apllication ATTiny85 (DIP8) computes a few moveing avarages of this Hall sensor output and this way I can detect different signal figures and I'm able switch off in one of my applications in current minimum, while in other just trying to calculate alternator RPM speed based on sensing rectified current in output power limiting application.It is easy to monitor current using Hall sensors, but sometimes a few more lines of C code are needed to do those detections, so such simple approach shown hereQuote from: Circuitous on June 13, 2014, 02:29:46 amand those basic processing using even Arduino will not work, but I was able to do much more complicated analog Hall sensor output signal processing using DIP8 AVR ATTiny85 512 bytes SRAM 8kB flash without any external clock switched to 8Mhz internal clock

author: Circuitous
author_rank: Unknown
timestamp: June 19, 2014, 12:20:21 pm
content: QuoteYep, I absolutely agree. But, it's just a hobby. If this were a cost-driven commercial venture then I'd already be way over budget.Your suggested approach is very much along the lines of earlier tests of just establishing a baseline and looking for deviation. But, then began to think about the next project, maybe power monitoring for a few other things, and that led to this exploration...The tower owner considered upgrading to LED lighting, but that may cost more than he paid for the tower (bought at tax auction).@enuero: thanks for the test, I will run some tests on the ACS756 for sensitivity to the earth's and stray magnetic fields. Have you noticed much deviation in the hall sensor due to temperature change?I can be a bit slow in replying, or doing tests, during the week due to the day job...

author: mjkuwp
author_rank: Unknown
timestamp: June 19, 2014, 03:03:02 pm
content: @Circuitous, maybe my opinion is the minority one but I don't think you are over-thinking it all. the trend is that more and more features are put into chips so why not use them? Your time is valuable and that chip is only a few $$.The system layout is really simple - voltage divider, shunt resistor + fully featured chip that does all the main tasks for you. no problem. I don't see why one would do things the old way unless you are in a mass produced product where each penny on the BOM counts.one thing I might ask - should you consider overall system reliability. including the system you are measuring? I wonder if it would be better to use a coil than a shunt to read current into that chip. It would give you several fewer hypothetical failure points. does that make sense? The chip that I used allows one to use a Rogowski coil and I am guessing this is also possible on that Cirrus part. I think I remember reading about a phase compensation register to account for this type of sensing.You have an awfully nice lab for your hobby : )

author: eneuro
author_rank: Super Contributor
timestamp: June 20, 2014, 10:24:54 am
content: Quote from: Circuitous on June 19, 2014, 12:20:21 pmI haven't got liquid nitrogen to put this thing in low temperature but this SS495A analog Hall sensor is rated between -40*C..125*C and its Null & sensitivity drift over temperature is something like +/-0.1% acording to its datasheet.Of course I've choosen device rated for lower minus temperatures while in Europe sometimes at winter we have -20*C and more so simply put this one and it work for me as expected.Quote from: mjkuwp on June 19, 2014, 03:03:02 pmYep

author: Circuitous
author_rank: Unknown
timestamp: June 21, 2014, 03:04:08 am
content: @mjkuwp Thank you for the comments.@eneuro You don't have liquid nitrogen at home? Well, I guess that's okay (I don't either). I was just wondering about the temperature deviation as the device will be outdoors, in a very wind-swept area with wide temperature variations.I did run a few tests of how external fields affect the ACS756, I'll try to do some additional tests (temp and such) and be more thorough in the next videos.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 21, 2014, 05:58:35 am
content: CT seconded. Absolutely dumb, passive, resistant to overloads and transients, noise, ambient fields (as long as you don't saturate the core near a friggin' MRI magnet or something!), no DC error (in fact, no DC at all; obviously, not suitable where you need to read DC). Much better accuracy and dynamic range than a noisy and drifty hall sensor, no core hysteresis.Tim

author: eneuro
author_rank: Super Contributor
timestamp: June 21, 2014, 03:29:52 pm
content: Quote from: Circuitous on June 21, 2014, 03:04:08 amHowever, without knowledge how its internal Hall sensor is orientated you missed something I think.In this experiment with loop of a few wires you created diffrent orientated magnetic field when you simply put this one wire before above this ACS756It looks like this Hall sensor is sensitive to vertical magnetic field, so loop put around it horizontal created magnetic field which affects Hall sensor, while single wire on top of this chip simply could not affect its readings while magnetic field is differenthttp://hyperphysics.phy-astr.gsu.edu/hbase/magnetic/biosav.htmlIf you put this wire not on the top but side by side with ACS756 it could affect more its readings I guess, while this is simply physics and you could also try to compute magnetic field created by single wire and calculate how it should affect its readings, but ORIENTATION and POSITION is important while Hall voltage is taken from oposite sides of conductor I guess, so if you put this chip pararel to external magnetic fields they should not affect its readings at all.http://hyperphysics.phy-astr.gsu.edu/hbase/magnetic/hall.htmlI will try again put my Ss495A into strong magnetic field from neodynium magnet from hard drive which perpendicular to this device created Hall effect that shifted output voltage close to maximum ranges and supply voltage 5VccIt will be interesting to see what happends if I put this magnet not from top/bottom but left/right side in the middle of the magnetUpdate: Myth bustedAs expected when Hall sensor SS495A is oriented pararell to magnetic field created by magnets below at their central point it creates very small output effect, so hopefully physics works

author: eneuro
author_rank: Super Contributor
timestamp: June 23, 2014, 07:12:03 pm
content: Today I've did another test of monitoring AC current using hall sensor SS495A.Quote from: T3sl4co1l on June 21, 2014, 05:58:35 amSometimes it does not matter and using cut toroid no problem to detect 50 Hz 18VAC 0.3A current signal shape needed to know If light bulb is not burnedIn this experiment analog Hall sennsor SS495A inside cut toroid core 20mm diametrer, 22 turns 18VAC, load 2 x light bulb 5W 12V so average current about 0.3A :Strong neodynium magnets were positioned in such way that it had to affect hall sensor readings-about 15mm from hall sensor.It looks like it of course those strong magnets shifts a little bit hall sensor output, but simply it does not matter while when we use lets say 1ms moveing average from this hall sensor output and make another one lets say 1s, than we can simply calculate how many times current hits zero so if we know that signal frequency should be abount 50Hz in my country we can easy detect deviations or flat output when bulb light is bunnedHowever, no problem at all with strong neodynium magnets close to this detection circuit and any noise can be filtered while we have so many time to make decision whether light bulb is in good shape or not, but there is no noise at all.One can simply turn on lights for test a few times during the day before night comes and ensure its good shape, so easy and cheap and reliable solution is sometimes closer than you think and easy to implement.So, after those tests I'm sure, this will be convenient way to monitor output current (close to 1000A in pulse) of this beast- spot welder and detect failure of its primary controll circuit when it should be turned off, but due to triac or mosfet AC switch failure if primary still conducts, but it should not, then primary 230VAC circuit will be disconnected in emergency mode in second switch off automatically.It shoud be easy task, while added another microcontroller on 5cm x 5cm PCB close to this SS495A hall sensor outout and a few lines of code in C on ATTiny85 will output emergency state when such kind of failure is detected

author: Circuitous
author_rank: Unknown
timestamp: June 24, 2014, 02:25:12 pm
content: I dug out a current transformer from my parts bins and hooked it up to the CS5464, and it worked well.Without any tweaking I got an accuracy across the range of 0 - 4 Amps of 0.6%That's plenty accurate for my use. Also, using CTs might simplify board placement.So, the next issue is isolated voltage measurement. If I can stick with using the CS5464, that would be a win... one chip, simple interface, etc.I could use a transformer to do that... just a voltage divider across the low voltage outputs. Not sure how accurate that will be, but I'll try it this evening. I am planning to use a Hammond that has two 8V secondaries and I really only need one to power the board, so this might work out.Any other suggestions on making isolated AC voltage measurements?I looked at using a linear opto-coupler, but I understand those drift over time and I'm looking for many years of service with no maintenance.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 25, 2014, 06:04:24 am
content: You can do the same thing again: it's called a potential transformer. Not nearly as popular as CTs are, outside of power transmission, though.If you don't need galvanic isolation per se (is the equipment grounded..?), you might be okay with high-value resistors, upwards of 1M. Differential amplifier, precision resistors (1% or better in 1M values aren't awful).More esoteric approaches include a resistor (to convert voltage to current -- assuming you have more than a few mA to spare from the source) running into a current converter (isolation transformer and chopper of some sort), or any other sort of analog isolation method (which unfortunately range from bad to ugly -- often the best solution is a precision ref and ADC with optos for digital isolation!).Tim

author: nsayer
author_rank: Regular Contributor
timestamp: June 25, 2014, 09:33:15 pm
content: For my Hydra project, I use a pair of CTs to measure the current of a car... but my circuit for doing so is far simpler.CURRENT_RD_B goes into an ATMega328 analog pin. The ammeter code looks for 3 zero (which is 512 because of the biasing) crossings, and samples between the first and third. You subtract 512 from each reading, square it and gather the sum of the squares and sample count. After the third zero crossing, take the mean and then the square root of the mean.Lastly, you need to scale the result using a precalculated scale factor based on the Te of the CT and the burden resistor.Since the range is up to 30A or 50A, the resulting resolution is not great - each step of the A/D represents around 100 or 200 mA depending on the burden resistor, but it works.

author: Circuitous
author_rank: Unknown
timestamp: June 26, 2014, 12:24:22 pm
content: Quote from: gazelle on June 25, 2014, 10:59:03 amGazelle: thanks for the diagram.I tested out a couple of approaches using a voltage divider on the low voltage side of a small power transformer (Hammond 8V, 400ma). No load on the transformer other than the divider. I used a variac set to various voltages to check out the linearity.The dividers seem to work well and the output is very linear with the line voltage (in green). But, when that is fed into the CS5464, the results are not that great (in red). The CS5464 did great measuring AC voltage when connected directly to the line (mains) through a divider, but not through a transformer.See the table, where the offset is the CS5464 output at 0V.

author: Circuitous
author_rank: Unknown
timestamp: June 26, 2014, 12:48:36 pm
content: I didn't put in an op-amp... I had hoped that the input impedance wouldn't be a big problem. But, I might need to do that. I did try other divider values, same ratio with lower values but that didn't help. The mV readings are taken directly at the input to the CS5464 and seemed quite stable. The CS5464 has (I think from the diagram) differential inputs, so I didn't think it would need an op-amp to buffer the input.I haven't put the scope on it, not sure why I didn't do that yesterday. The input might be noisier than expected, so I'll scope it tonight and maybe throw in an op-amp.If all else fails, I'll hook the CS5464 inputs to the line voltage (through a divider) and then just isolate the digital connections.

author: eneuro
author_rank: Super Contributor
timestamp: June 26, 2014, 06:25:14 pm
content: Quote from: gazelle on June 26, 2014, 01:09:36 pmWhich was maximum measurement current in this project?For 400A three-phase I found CTs something like those herehttp://en.wikipedia.org/wiki/Current_transformerIt looks solid, but howto choose correct toroidal core and number of turns for current up to 100A for example?Are there any good CT calculators to design this thing?For the moment for my projects I've designed this simple SS495A Hall sensor based current sensor with I2C interface to setup its internal RMS moveing average time and a few other parameters eg. overcurrent value needed to limit output power etc.For 230VAC 50Hz applications up to 10Amax I use it in this configuration with additional fuse of course.In the case of short circuit there is no chance that this PCB will explode, while this blue wire simply should be burned, but fuse should fire firstFor one of my high current low volage spot welder and power inverter project this PCB is used in this configuration where high current wire up to 10mm in diameter goes THT and there is no chance that even 1000A current will destroy analog Hall sensor inside this toriod coreHowever, CTs are very interesting and cool thing.Maybe Dave could make one of his fundamentals friday howto design those CTs

author: eneuro
author_rank: Super Contributor
timestamp: June 27, 2014, 10:56:42 am
content: Quote from: gazelle on June 27, 2014, 06:22:32 amThank you for links to those comercial CTs. While such huge ratio is needed in those things of course only automated production line can do such stuff at low cost.This Allegro ACS-756 Hall based current sensor of course could disapear when too high current flow in the case of short while I've found them rated up to 100A or 50A as well as its Hall sensor is placed so close to wire inside this chip I guess, so isolation isn't too good.While I don't need high accuracy in my current detection circuits and can quite easy estimate external magnetic fields influence on this SS495A Hall sensor while its sensitivity to magnetic field is known, it looks like that I do not need anything else for the moment and maybe I'll use CTs in power measurement circuit if accuracy of this designed current sensor will be too low.However, I wonder what theseUL requirements for double isolationmeans and more detailed test description is available?Wikihttp://en.wikipedia.org/wiki/Appliance_classessays something like this about it:QuoteReading this description it looks like that this configuration of my SS495A based current sensor PCB with isolated wire in the middle without any electric contact on PCB, while rest of this PCB can be easy filled with solid isolator with only 4-5 control wires on one side should pass this test easy too, while its construction is very similar to those CTs with one big hole in the middle for current wire-only differs in the way magnetic field is sensed in toroid core and desired accuracy?

author: Circuitous
author_rank: Unknown
timestamp: June 28, 2014, 02:01:46 am
content: QuoteI have now added an op-amp to buffer the signal to the CS5464. But, it didn't seem to improve the results.So, I hooked up a signal generator to the inputs of the CS5464 and ran it through the same voltages as the divider and again go the same non-linear results.I'll try a few mor things over the weekend.