How to measure AC current flow


Senior Member

I am implementing a generator at home that will be used to provide general base load power generation whilst running on waste vegetable Oil (WVO).

The system will be interfaced into our main ciruit board (and yes i have a fully qualified electrican involved for all the 240v wiring).

What i need to do is sense the current that is flowing from the generator - there will be a certain base load of about 1.7kw that will be always there - but this is less than 30% capacity of the system - it is not good to run a diesel generator at low output from an extended period.

I have a number of other loads that i wish to introduce/shed based on the keeping the load on the unit in the 80% range (around the 4.8Kw) range - but it can handle a load upto 6Kw - sustained if required.

I therefore need to be able to sense the current flow in the mains outlet (single phase) from the unit and activate different loads (such as pool pumps etc), through the use of Opto isolated relays (i am OK on that side) - what i am looking for is a method with a picaxe for monitoring this current draw - any ideas ?




Senior Member
Currrent transformer

Commonly a current transformer is used [q.v. Google...] - basically a large turns ratio transformer into a resistor... like the clamp on ammeter you may be aquainted with. The CT provides electrical isolation as well as a stepped down current. There are commercial CTs for hundreds of amperes or a few amperes...


Senior Member
Hall effect sensor with a ferrite ring. It can externally safely monitor the power without having to tap into it like using a shunt.


Senior Member
Thanks for the replies


Thanks for this. I am only talking about a max of 40amps )thats being conservative - more likely 35 amps)

I have no idea how to put together a hall effect sensor but will do some reading. Do firms market these as a total solution with an ADC or something similar to a Picaxe etc ?



I don't pretend to understand your system, but I have used CTs in Energy Monitoring.

You take the CT o/p , put a load across it, then some simple RC filtering, then into Op-amps.
Once you have a clean-ish signal you can relate the pk-pk voltage to current flow (obv some kind of rough calibration will be needed).
I used an Energy Monitoring chip so the hard ADC work was done by that device.
But if you don't need accuracy then I'm sure you can experiment with op-amps. You could rectify the output and check voltage with ADC. I don't think the PICAXEs ADC is fast enough for serious direct processing.

For fine tuning you would probably need a 'scope.

There may be ready made unit on the Internet or you may be able to hack a cheap plug-in Energy Meter.
I'll leave the Googling to others.


Senior Member
Craig: I have used a unit made by LEM, to measure heavy DC currents >100A. The guys here will remember the Hydroxy-gas experiments. Here is a datasheet of the one I have used for DC. LEM also makes them for AC use, the output is easy to read on ADC and the unit is robust and works well. See datasheet.

Sorry, the file Upload error showed "Upload failed...". Here is a link to their products:


New Member
Making a current transformer is a piece of cake. Acquire a mains transformer with a "split bobbin" (primary and secondary isolated from one another by the nylon bobbin). Use a hacksaw or rotary tool with a burr to remove the wire from one winding - I removed the secondary on mine. The "burden" resistor for me was 1000 to 2000 ohms, but isn't very critical 500 to 2500 would work, but the peak power transfer was at 1250 ohms (120 VAC winding on the small transformer).

Full wave bridge across the resistor and power the circuit of your choice or measure the voltage proportional to current. I run a buzzer that tells me when the water heater turns on and off and blinks a light when its drawing current. I can use about 40+ milliwatts from it with about 6.5V with the resistor in circuit. The led is powered by a "relaxation" oscillator and flashes in proportion to current flow.

Do not run it with no load - the transient spikes can be very large.


Senior Member
If you are measuring exclusively an AC sinewave at a fairly fixed frequency, then nothing beats the cost/performance/ruggedness of a current transformer.

These "doughnut" transformers almost always have a 5 amp secondary, so, say, if the primary rating is 100 amps, it has a ratio of 20 (100:5).

For best accuracy, the secondary must operate as close as possible to a short circuit. This means that the secondary sampling resistor will be a low value, usually an ohm or less. The resultant voltage may be too low, but you can alway use an opamp configured as a precision rectifier with gain, previous to feeding the signal to the ADC.


Senior Member
thanks for all the replies - but i am getting lost !!

In relation to my application (Hippy) - my generator can output a max of (approx) 8KW. It is most comfortable running in the 6KW range.

I live in Australia (nominal 240v, but the generator will output a fairly constant 230v) with AVR.

I intend to run the generator for approximately 15 hours per day (7AM to 10PM) - we are on time based metering so this picks up the peak and shoulder times for maximum $savings.

I run a business from home so have a number of computers that are continually on - these are all serviced by UPS. The plan is to have a couple of relays (NO and NC) that will effectively isolate one leg of my switchboard from mains input and direct the generator output to this leg.

I then want to be able to sequence various loads to come on based on power characteristics and keeping the loading on the generator at a fairly constant 6KW.

The base load of all computers is 1500w.

I then have other loads that i can sequence to come in such as

Pool pump
Hot water heater
Washing machine
Fridge and Freezer

What i would like to be able to do is monitor the current being drawn at any time and to then startup the appropriate device(s) to bring the current use into the optimal range

So i need something relatively simple and relatively accurate to a couple of amps to enable me on a Picaxe to monitor the current flow and then activate relays to power the various components on and off.




Senior Member
No need to be confused, you can use either a current transformer or a Hall sensor. each one has its own unique features, as follows:

Current transformer:
-Completely passive, no supply is required.
-Output is an AC current, requires a resistor to convert it to a voltage.
-Zero output for zero input.
-Works best for sinewaves, this is important, as I explain later.
-Rectification is mandatory before the ADC conversion.
-Usually the cheaper option.

Hall sensor
-Requires a power supply, but it can be the same one used by the PICAXE.
-Output is an AC voltage superimposed on a quiescent DC voltage.
-Output is usually (but not always) Vcc/2 for zero input. This quiescent voltage also has some TEMPCO issues.
-Works with sinewaves, squarewaves, and distorted waves easily.
-Does not require rectification before ADC conversion, but could be advantageous to do some pre-processing.
-Slightly more expensive solution.

Both solutions
-Offer electrical isolation.
-Although not strictly mandatory, some sort of calibration scheme is required.
-Hopefully your auxillary loads have a large power factor to ignore the differences between KVA and Kw.

Now, some questions. Your 1.7 Kw base load is computers and associated equipment, am I correct? If so, do you know if the load is active-power-factor corrected?
The reason that I'm asking this, is because electronic loads without active correction will have a large current crest factor, that could affect your readings. In plain english, the current drawn from non-corrected equipment is heavily distorted, non-sinusoidal, full of harmonics.
I know that the Europeans have strict requirements with respect to mains current harmonics, and most if not all equipment sold there will include it. Here in the US, we are unfortunately lagging in this respect. I ignore what Australia's regulations are in this respect. But in case that your equipment is non-corrected and produces harmonics, then the best choice will be a Hall sensor, as it will produce a more faithful replica of the current waveform.

I hope that I've not further confused you with my explanation
Last edited: