Mesuring currents on residentials conexions with my PICAXE

djsoftlayer

New Member
Hi, what hardware do you recomend to get current values from my house conexion in order to bring this data to my PIC?

PS: Of course a serial resistor its not an option because the current average of my house is 25 Amps. It will be nice a solution without breaking the cable, something by inducction, but i dont know how. A DIY solution is acceptable too.

Thanks!
 

Dippy

Moderator
Search around for Current Transformers or CT.

Obviously you will know the limitation of accuracy with inductive-only measurements. (Phase Angle / Power Factor).
 

manuka

Senior Member
There are all manner of mains quality clamps & swish turn key systems (mostly wireless- "Current Cost" etc) available now,but years ago I had quite some mileage using an ex spark plug lead sensor clamp. This fed into a data logging DMM & was so amazingly insightful that even the TV advert breaks (when the set often had more colour) could be noted. See here and here.There's probably too much data available for PICAXE storage & reference, although instantaneous drain & LCD readout may be doable.

Warning - do not even begin such clamping unless you are VERY mains wiring experienced ! Many switchboards have exposed terminals & ancient wiring that awaits the unwary. It's probably illegal even to brush the cobwebs away in some countries too... Stan.
 
Last edited:

westaust55

Moderator
While the ubiqitous CT is the typical method of measuing currents (other then Hall effect devices and Rogowski coils) which gains access to a proportionally lower current for measurement purposes, there are safety considerations such as NEVER leaving the secondary winding open circuit otherwise the secondary resistance is infinite and the CT is trying to drive the current and the secondary voltage will go very high trying to achieve this.
 

Dippy

Moderator
True, I had stupidly assumed that any device Data Sheet would have been studied prior to application :rolleyes:.

djsofty, for accuracy you need to measure voltage AND current (to deduce phase diffs and hence power) - however, this would mean physical connection to measure volts. This could be lethal and could affect insurance.
I do NOT recommend anyone (let alone a novice) do this.
(AND the ADC sampling rate required for accurate processing is way too fast for PICAXE and many PICs anyway).

Many cheapo home Greenie power meters are simple clamps.
They should only be used for guidance and can be miles out depending on type of load.

I worked on a design using a proper Metering chip. The results from a proper chip were superb - but I'm afraid it is over the Made-In-China-and-sod-the-quality prices.

An inductive method is safest and means you don't have to break a line.
A little CT with a load resistor of a few ohms plus filtering / gain should give reasonable results, but it won't be anywhere near the accuracy and consistency of a proper metering chip. The chip we used was an STPM01 from ST Microelectronics (who were about as much use as a broken jock-strap as far as support is concerned). But the end-result is excellent.
 

Dippy

Moderator
Yes, Allegro make a number of interestng devices.
But, without checking, I really would avoid this for Mains use. Chopping wires and live boards is NOT for the novice!!
 

westaust55

Moderator
What make/model/type of kiloWatt-hour meter do you have on the house?

Does it have an LED that flashes for every 1 kWH of energy consumed?

There have been past threads where at least one forum member has developed a project to detect the LED flashing to count the pulses.

This can be a non contact and far safer method if the type of meter is suitable.
 

SAborn

Senior Member
I just wish members would list in their profile where they are located or what country they are in, so we knew more about what is needed and where they might get it.

What degree of accuracy are you happy to except, as i think any information is far better than none, even with a little error.

I have adapted cheap $10.00 clamp meters (CT) from China to do this, with fair to good results and currently log the power consumption for my house to a PC.

I look at it this way that most cheap multimeters are not 100% accurate but we are happy to except the readings they give us and the same for power logging.

Why make a project so hard that we never start it and end up worst off because we dont have any data, where as something is better than nothing.

Every time this question gets asked here on the forum many jump in and quote error factors and all the reasons why its not practical to the point many give up and dont attempt it.

I say to hell with them and do it, because its simple and rewarding to see our consumption, to the point you will go looking to find what is consuming the power, as well as start switching more things off.

It all equals $$$ save on the next power bill weather it is 100% accurate or not it dont matter as its a win, win situation.

I will try to find and post the CT circuit i use later.
 

Dippy

Moderator
Absolutely. Have a go (with care!!).

Perhaps contributors could post example schematics for the connection between CT/Clamp and Micro?
The djsoft and others can see how to do it.

Yes, any method to highlight consumption and waste is good .
Personally, I prefer the accuracy that the 2 quid ST chip offers.
It's totally up to the constructor: cheap and cheerful or not-so-cheap and meter-quality.

I think people bang on about the errors to tell people not to expect too much from a lightweight design.
If people aren't made aware then they'll be scratching their heads as to why their measurements are way out on some things and fine on others.

I can't remember anyone saying "you can't" etc. , but I can remember people pointing out the potential errors. But, hey ho, to hell with anyone suggesting accuracy huh.:rolleyes:


Then, after 6 months, when the novelty has worn off it can all go back into the drawer.... ;)
 

MartinM57

Moderator
As I never go above 12v DC, I'm wondering what the magnitude of the typical error on house consumption is if you just measure AC current and assume a PF of 1? Any takers?

Does my roundy-roundy old fashioned UK meter measure actual KWh power (i.e PF<>1) and I'm billed on that?
 

manuka

Senior Member
Yes -the novelty certainly wears off,& the switchboard spiders start protesting about the dangling clamp wiring ! I must have half dozen different mains monitors here, but am presently not using any, although it's educational to clamp monitor an individual load & compare the likes of CFL versus filament lamp energy usage. Classic switchboard energy meters measure TRUE POWER rather than the apparent power that can be biased by reactive (usually inductive) loads.

Historically Power Factor (PF) was not an issue domestically, as most energy was consumed in resistive loads where the PF=1. Far more of a bias (here in NZ anyway) relates to a daily supply charge arising just for being connected ! This naturally distorts most low usage readings. Factor in also different night/day/ripple control water heating rates & it becomes a job for a dedicated smart/remote reading switchboard meter. Energy companies globally are installing these now anyway- Asian adoption is extremely keen.
 
Last edited:

SAborn

Senior Member
Ok here is a simple CT circuit that you can connect direct to a picaxe pin and read the value in with ADC. Best to use readadc10.

It should work with almost all CT's bur you might need to change R1 the shunt resistor to suit the ct and the amp range required.

The CT will work on all AC power, high or low voltage but not on DC power.
Only one wire can be run through the CT and not both.

By looping the wire around through the CT several turns will increase the gain if the CT has trouble reading a low signal.

Try just passing it through to start with.

As always when working with mains power use caution.

The CT should be connected to the circuit before clamping it onto the AC cable.

If you want to send ma an email i can give more information if this is of interest to you.


View attachment CT LM-358 OpAmp circuit.pdf

View attachment LM-358 CT circuit on vero.pdf
 

SAborn

Senior Member
Here is some photos of a cheap Chinese clamp meter modified to work with the above circuit.

The mod required a earphone plug to be fitted to the meter so when the plug was inserted it diconected the CT from the meter and fed it directly to the opamp circuit.

This way the meter could still be used as normal and is very handy when calibrating the Picaxe.

If you want more information email me as it drives me insain with this 2 file limit on the forum.

Tong meter 02 Small.jpg

Tong meter 03 Small.jpg
 

manuka

Senior Member
Very nifty- how much was that clamp meter? Larger digital clamp offerings are available here in NZ for ~Aust$20, but yours (& the enhancing hack) is most appealing.
 

SAborn

Senior Member
It was under $10.00 including postage.....off fleabay.

There is many meters and many the same but a lot dearer so it pays to look.

I also bought a Jaycar tong ($20.00) designed for a multimeter add on, that i hacked in the same way but the China special is far better than the junk thing from jaycar.

The best CT's i am using are from virtual village (fleabay) for $10.00 but are a block style with a through hole and not tong, so thought best not to recommend them for mains use for the lesser adapt.

The tongs will work well enough and beats reading someone fried themself installing a CT.


You will get some errors with this system but no more than that the tong it self is likely to give, and most would trust that because they bought it....?????
 

djsoftlayer

New Member
No

Yes, Allegro make a number of interestng devices.
But, without checking, I really would avoid this for Mains use. Chopping wires and live boards is NOT for the novice!!
Im an Electrical Engeniring, im only a novice in electronics, so you can speak freely without wondering for my security, i use to work lines of 14Kv, so 120v (my residential level) its not a problem.
 

westaust55

Moderator
Historically Power Factor (PF) was not an issue domestically, as most energy was consumed in resistive loads where the PF=1. Far more of a bias (here in NZ anyway) relates to a daily supply charge arising just for being connected !
True to an extent.
But motors in refridgerators, freezers, washing machines, dish washers, clothes driers,pool pumps, garden bore pumps, air conditioners, fans and other devices are all inductive. While in industry we normally think of motors of reasonable size as 0.8 pf, the very small motors (eg <1kW) can be as low as 0.6 pf.
Modern electric cooktops are induction heating.

The recent trend (compared to some decades ago) to solid sate devices and switchmode power supplies has introduced harmonics as the "new' problem.
Even the old linear tube type fluorescent lights generated 3rd harmonic, but all the PC's and related equipment has added significantly top the 'problem'.

Industry is often penalised for poor power factor and generating harmonics - so they have to correct/filter. Those penalties may eventually also become part of the domestic tariff structure in years to come.
 

fernando_g

Senior Member
I've used the following device with excellent results.... very simple to use and inexpensive:

http://www.analog.com/en/analog-to-digital-converters/energy-measurement/ade7757a/products/product.html

Since its output is a frequency which is directly proportional to true power, the Picaxe implementation is exceedingly simple. Even with a lowly 08M you can build it and have a nice LCD display.

The device is very accurate, so the actual accuracy is related mostly on how precisely the PICAXE maintains its internal clock over the temperature range. But since my application was indoors, the temperature swings were not extreme.
 

fernando_g

Senior Member
No;
Actually a 100:5 current transformer. The resulting shunt resistor was 5 milliohm if my mind serves my right, a value which is fairly simple to get in SMT types. Also since it is SMT, it is fairly straightforward to do a PWB layout with Kelvin-sensing, even if one does not use a 4-terminal resistor.
 

SgtB

Member
This may have been said, but always ground the common leg of the ct to the enclosre. That applies to step down transformers as well. It keeps the case from becoming hot if the transformer floats.
 
Top