I recently built (for fun) a current monitoring system for a large computer gaming LAN.
40x $15 current sensors was just too expensive so i built my own.
At the lan we had every 6-way powerboard modded to have a tiny home-built current transformer around the neutral wire and a one-transistor amplifier inside. All powerboards were cabled to a few external boxes, each containing one mcu (one box could monitor 12 boards using it's built in adc channels). All the boxes were connected together with daisy chained differential SPI to a master mcu which connected to a PC over rs232. The PC displayed the power usage for the entire lan on the projector.
The mcu's were programed to do RMS calculations on all adc channels and store the results ready to be sent back to the master mcu and PC when next polled. The PC was in charge of applying a correction formula to correct for the sensors not being totally linear. The PC also produced nice eye candy 3D graphs which were displayed on the projector at the lan showing the power usage of each powerboard.
They mcu's were also able to send a raw 200point current waveform plots for each powerboard, just for extra eye candy to display.
The current monitoring was done using the cheapest method i could find, as it was only really done for fun. I didn't care too much how accurate it was. After a few tests with different ideas i found the cheapest way was to just wind my own tiny current transformers.
NOTE: This isn't the quickest way, it in-fact takes ages to wind toroids, it's just the cheapest if you have time
You also have to be aware of safety, i was very careful to keep my power monitoring system isolated and it only ever came in contact with the neutral wire and never phase.)
After testing a few types of small toroid cores that i found available for cheap from the local surplus store i settled on a core that seemed to work the best using around 260cm of AWG33 . I'm not sure what type of core it is, it's probably the wrong core for the job, but it worked well enough once you applied a correction to the response. I built a small one transistor amplifier to go with each core since the output of 50mV=10A was too small to travel 20meters to the mcu by itself. This amplified the AC current signal to around +/-2V at 10A
![](http://psi.abcom.co.nz/currentt.jpg)
The amp was powered remotely by 24V at the mcu end (pulled to ~12v by the transistor at the sensor end).
The same two power wires were used to transfer the analog current signal to the mcu as +/-2V on top of the 12V DC on the cable.
Here is how it was connected up.
![](http://psi.abcom.co.nz/currentcircuit.jpg)
Because the mcu rectified the 10bit adc data in software half the 1->1024 range was lost and the signal ends up 1->512 fully rectified.
The (value^2) was totaled up for 4096 samples and then shifted right by 12 to do a binary divide by 4096. Resulting in a rms value.
NOTE: I was unable to apply the formula to correct the sensor non-linearity before the RMS calculation was done due to it being too complex for a 8bit mcu to do fast enough to keep up with 100's of samples every waveform at 50Hz. I'm aware that this is wrong and that it negatively affected the accuracy. The sensor should have been corrected first but i couldn't get the code fast enough.
The correction for the sensor non-linearity ended up being applied by the computer to the rms value later on.
To get it as accurate as possible i recorded rms readings using many pure resistive loads from 0->10A as well as many computers for non-resistive loads. Both times recording the RMS value from the mcu's and the RMS value from my true rms DMM.
The line labeled FUNCTION below is the formula that i ended up using to try and correct for the sensor non-linearity in the rms value obtained.
As you can see there is a difference between the RMS resistive value and RMS non-resistive value of about 200mA from the Function line.
This accuracy was fine for my purposes
![](http://psi.abcom.co.nz/currentgraph.jpg)
And some tests after the correction was applied to confirm linearity and accuracy...
![](http://psi.abcom.co.nz/currentgraph2.jpg)
So that was pretty much it, its not pretty, but it worked really well for its purpose.