Hello everyone,
I'm working on a home automation project of my own and one of the things I'd like to do is to be able to determine if things (like lights or my TV) are on or off without having to hack anything. I was recommended to use a non-invasive current sensor so I built one my self using this instructable: http://www.instructables.com/id/2-Carabiner-split-core-AC-transducer/
and made an extension cable with every cable separated so I was able to place the sensor around just one of the cables as you would do with a current clamp (which I have tried and it worked)
and wired it to my arduino using this diagram
Burden = 27 ohm, C1 = 10uf capacitor, Rvd = 1k ohm
my code is just a regular analog read and output to serial
Well even if the sensor is correctly constructed (and I'm not saying it is or is not) the interface circuitry is just applying a +2.5 bias on which a small AC voltage will be superimposed on that bias. You are then just taking a random one time reading of the voltage with the analogRead() command with no idea where within the 60Hz sine wave you are. You are going to need a much more complex reading method such that you keep reading looking for the highest and lowest values within a 16.666 millsec window so that you can then calculate the RMS voltage that corresponds to the RMS current being drawn from the sensor primary. This is bound to be a very difficult sensing method to make work if at all possible. I would say look for a better AC current monitor that outputs a pure DC measurement voltage.
all I'm getting is 511 or 512 values both when the TV is on and off...
That value makes sense, right: it comes from Rvd dividing the 5v Vref.
The signal from your current sensor is going to be very low: how low? it depends on your ct design and likely in the mv range. You should have it amplified to be detected by the arduino. This can be done via a simple amplifier.
How to detect the amplified signal will be a matter of implementation. For example, you can detect the presence of 50/60hz voltage; or if you have rectification, you can detect the rectified dc voltage...
You should analyze the pros / cons of each approach and pick one that suits your needs.
Did you tested the sensor itself? How?
Are you sure it is working?
I'm working in the same project from the energy monitor website, but i bought a current sensor ( see here: http://arduino.cc/forum/index.php/topic,125863.0.html ), but i'm having a bad time to calibrate it. The value given in the datasheet doesn't give the right current value... I'm now finishing to connect a energy meter that gives me the current value to check what is wrong.. I hope.
I used to be an electrician and I know that if you clamp on your amp meter to both the neutral and the hot they will cancel out each other on your meter as current flows. on your extension cables are you sampling both conductors at the same time? if so you need to split them apart and only wrap around one conductor. either hot or neutral no difference there when current is flowing.