Thanks to a lot of help from this website I have a functioning Arduino based whole house power monitoring setup. It seems to be working very well monitoring the mains.
I would really like to add some logic level sensors to specific circuits to measure individual major appliances - particularly my heat pumps, on demand electric hot water heaters, and some other 240v appliances. I could of course simply add more CTs to these circuits and run them to the Arduino but this would get a little bit pricey. I don't need to know how much power these devices are pulling -- just that they are using power. I will only be tracking high load appliances so I don't need high sensitivity.
Any ideas? DIY current sensor? Reed Switch? Has anyone else done this?
Re: Individual circuit/appliance monitoring
I've not tried anything like that, but two ideas:
If you're only looking at high current devices, then a reed switch inside a home-made solenoid is worth trying, but you need to be very careful with heating effects in the wire - i.e. generously uprate it to say 6 mm2 even for a 12 A load, because you have many current-carrying conductors in close proximity.
Low-cost c.t's have been mentioned on these forums, a c.t. followed by a rectifier (schottky diodes) and a zener clamp acting as the burden (and a small parallel capacitor for minimal smoothing), possibly driving into a transistor switch if there isn't enough voltage available, should give you a logic level signal from the sort of current I think you are talking about.
Re: Individual circuit/appliance monitoring
wow that is very interesting information i have been trying to find for ages.
I have tried to put together the circuit you mention, dont know if I am doing it right. I had to add some stuff to get the simulation working and a starting reasonable ouput graph.
the CT is representes by a AC supply
https://www.circuitlab.com/circuit/d932ty/ct-to-digital/
thank you so much for the help, Chesrae I hope this helps you too.
Re: Individual circuit/appliance monitoring
No, you misunderstood what I had in mind. The circuit I envisaged was this:
You should use Schottky diodes for the rectifier (D1-D4) to keep the voltage drop to a minimum, also the zener should be the lowest voltage consistent with obtaining a reliable digital '1' . All 5 diodes carry the c.t. secondary current and should be sized to suit that.
You can expect a very 'spiky' waveform out of the c.t. because it will be very heavily loaded (with a high secondary voltage). Unless you fully simulate the c.t. itself, a simulation using a sine wave current or voltage source will not show that.
Re: Individual circuit/appliance monitoring
These seem like excellent ideas. I will definitely play around with them. Your circuit will also be very helpful.
Another idea that I had was to use one of the very easily built EMF detectors. Build one that is not sensitive and wrap the antennae around the wire I want to monitor. Early tests seem to indicate it might work. Do you think this would be viable?
Re: Individual circuit/appliance monitoring
Without knowing what your 'EMF detector' comprises, I've absolutely no idea! I'm guessing but it sounds like a high impedance voltage detector that is relying on capacitance between the line conductor and a sensing electrode to detect the electric field surrounding the cable. It should work provided it is located downstream of any switch, otherwise you want to detect the magnetic field generated by the current in the cable. Your problem then is the adjacent return conductor carries an equal current in the opposite direction and the two fields will more or less cancel when the distance to each conductor is similar, ie everywhere except very close to one of the conductors when the relative distance to the two conductors is greatest.
Re: Individual circuit/appliance monitoring
Robert thank you so much for that !! I am really pleased you helped us out.
I had always wanted a method of sensing when a device is on but without having to use analog pins and long analogReads, I wanted to put this
http://www.ebay.com/itm/Non-invasive-AC-current-sensor-TA17L-03-/300771843768?pt=LH_DefaultDomain_0&hash=item4607661eb8
in devices which use a fix amount of power always, such as a water pump, garage door (aprox), server computer. some of this may vary a bit, but an average value is good enough.
this are ok?
http://www.ebay.com/itm/10PCS-1N5822-40V-3A-SCHOTTKY-DIODE-FREESHIP-/251111113365?pt=LH_DefaultDomain_0&hash=item3a77638295
or this
http://www.ebay.com/itm/20-x-1N60P-1N60-SCHOTTKY-DIODE-45V-30mA-HAM-Radio-THAISHOPETC-/400310068090?pt=LH_DefaultDomain_0&hash=item5d3456e37a
there is no need for a burden resistor because 4V7 is doing the job, right? Can this diode be like the ones listed above?
so I will buy the equipment needed to build your circuit, if you are kind and help me on the diode choosing. cause I dont know how it will be calibrated to not overcome the 5V limit of input pins. playing with the 4V7 diode? how?
thanks a lot robert
Re: Individual circuit/appliance monitoring
this is giving some interesting results.
https://www.circuitlab.com/circuit/az3wt9/ct-to-digital-pin/
dispite some wierd things going on in the simulation when waveform goes to zero
Re: Individual circuit/appliance monitoring
The Ebay link you gave to the current transformer gives no technical details. You do not make it easy for me
This http://iteadstudio.com/store/index.php?main_page=product_info&cPath=4&pr... tells me more. It does appear to be suitable, but you might not get enough voltage. I suggest you buy one and test it.
Yes, the 4.7V zener diode will be functioning as the burden. When you know the current that your chosen c.t. will deliver, you can calculate the power rating of the zener diode ( = current x 4.7V). The zener diode will clamp the output voltage from the c.t. at 4.7 V - which is less than 5 V ? ! ! ! You could use a 3.9 V zener diode instead, because a logic 1 = 5 V x 70% = 3.5 V. This will be better for the c.t. as it needs to deliver less power. A standard 1.3 W zener (BZY85 series) http://uk.rs-online.com/web/p/zener-diodes/0812364/ is suitable.
Look carefully at my circuit diagram, I did not draw zener diodes in positions D1-D4. In your circuitlab simulation, the zener diodes are NOT SUITABLE in the bridge rectifier (D1 - D4) and the voltage is too high for D5. For D1-D4 you could use something like a 1N4148 if your simulation does not have a Schottky diode. For D5 you must replace the 1N4773A - this is a 9.1 V zener - with a 3.9 V or 4.7 V version.
For the actual rectifier diodes, you could use these: http://uk.rs-online.com/web/p/rectifier-schottky-diodes/7000896/
Re: Individual circuit/appliance monitoring
Re: Individual circuit/appliance monitoring
trying to figure out how to put the transistor in, cause I guess I will need more voltage than the one coming from the CT .
no luck so far on how to place the transistor, but I am trying...
https://www.circuitlab.com/circuit/j53598/cttoarduino/
Re: Individual circuit/appliance monitoring
I got the thing "working" as far as simulation goes. I had to add a second transistor.
https://www.circuitlab.com/circuit/bt6bt3/ct_to_arduino_2transistors/
Is there any way to avoid it? I tried using NPN and PNP transistor but does not fix it. I thought I had understood the transistor theory, seams not.
thanks
Re: Individual circuit/appliance monitoring
There should be no need for the second transistor. It does not matter whether the input is high or low when the appliance is on, you just invert the logic in software. The resistors look rather low in value - I have not done the sums - I would have guessed 10k is a suitable value for the collector load. If you are having a transistor, remember you only need little more than 0.65 V on the base for it to start conducting, so I suggest you throw away the zener diode and use two ordinary silicon diodes in series (pointing DOWN towards ground!). These will have a forward drop of about 0.6 - 0.7 V each, so 1.2 - 1.4 V in total. (This means the c.t. will only need to generate about 2.5 V, which is better for it - remember that whereas you overload an ordinary voltage transformer by allowing the current to rise, you overload a c.t. by allowing the voltage to rise). If you have a 10 k collector resistor, then for a common small-signal transistor you can have a series resistor in the base of about 120 k. That should still comfortably saturate the transistor. ('saturate' means there is more base current than is necessary for the collector current that you have and the collector-emitter voltage falls to the minimum. If your transistor has an hFE (ß) of 50, and collector current is limited by the collector resistor to 0.5 mA, then you need a base current of 0.5 mA / 50 = 10 uA. Any more than that 'saturates' the transistor. In this case, a small amount of saturation is good. Too much would not cause a problem here, but it may cause a problem in some circumstances).
You are not interested in any sort of calibration - all you want to know is there is more than zero current flowing!
The zener diode acted as a constant voltage resistor! - it passes whatever current is necessary to hold the voltage constant. So it is equivalent to whatever resistance you choose. Say you have a 10 V zener and feed it 10 mA, it is equivalent to 1 kOhm. If you feed it 200 mA, it is equivalent to 50 Ohms.
Excellent. Keep up the good work, and continue asking the questions.
Re: Individual circuit/appliance monitoring
Hello Robert and once again thank you for your time in helping me! Amazing how I overcomplicated everything by wanting to have a 5V to detect the circuit was active when I could have just use code to invert the logic. Thanks for that tip!!
Although I must say that thanks to this overcomplication I have learnt even more.
Thanks for your full explanation in the last comment. I have read it a lot of times to understand every aspect of it.
Here is my simulation and my final circuit.
I am thinking of adding a led with a resistor, I know I will have the led on when no current is in the CT but its a quick way of knowing the state of the circuit.
http://imageshack.us/a/img228/9022/1transistor.png
Once I build it and test it I will come back to this post and confirm it works and specify the final resistor and capacitor values I use.
Thanks Robert
Re: Individual circuit/appliance monitoring
Think carefully where you connect your LED, and you might find a place where it comes on when the appliance is on.
(Hint: Which places have you got nearly 5 V between when the appliance is on?
Hint 2: Think about "how I overcomplicated everything").
If you put the LED where I think it should go, you might need to make another resistor smaller in value to provide the extra current - but it does not do that directly. That is another hint.
As well, you could change the value of a different resistor that you already have, then you don't need another one just for the LED, saving you a resistor. (4th hint).
Re: Individual circuit/appliance monitoring
thanks again Robert !!
I think I have got it !
I take the 5V that feed the transistor Collector and adjust the resistor there to generate a voltage drop of around 2V in the LED.
The simulation seems to work.
https://www.circuitlab.com/circuit/79zv4v/ct_to_digital_pin_with_indicator/
Re: Individual circuit/appliance monitoring
Yes, I think you have got it. Some minor points:
Re: Individual circuit/appliance monitoring
hi Robert thank you for such an explanation.
I went to get the parts and I have spend all afternoon looking into this.
Things look good but there is a small thing to make it all perfect. It seems that the digital input is not dropping enough voltage to maintain a low state.
Trying different loads:
- CT disconnected (0W) (0Vac) ------PinArduino (4.78V)------Pin HIGH + LED On OK!!
- CT connected (40W) (0.53Vac)--------PinArduino (2.07V)------Pin HIGHandLOW + LED On NOK!!!
-CT connected (900W) (1.50Vac)--------PinArduino (100mV)------Pin LOW + LED On OK!!!
A picture of the temporary setup, as you can see there are two parallel circuits, one for my last proposal and one for Robert's last proposal. The one of Robert is the one with the multimeter connected. Also you can see that the led is brighter with the same CT input.
Just for future reference this is the CT I am using: TA12L100
http://www.ebay.es/itm/Non-invasive-AC-current-sensor-TA12L-100-/290768310753?pt=LH_DefaultDomain_0&hash=item43b32451e1
Robert with your permission I will rewrite a full instruction on how to build this little circuit based on what I have learnt from you. I really have learnt a lot!
Re: Individual circuit/appliance monitoring
- CT disconnected (0W) (0Vac) ------PinArduino (4.78V)------Pin HIGH + LED On OK!!
- CT connected (40W) (0.53Vac)--------PinArduino (2.07V)------Pin HIGHandLOW + LED On NOK!!!
In the first line, do you not mean "LED off"?
In the second line, this is due to there being not enough current to develop sufficient voltage to turn on the transistor. The c.t. ratio is 1000:1 - that means with a 40 W load at 230 V, the c.t. primary current is 174 mA and the secondary current is 174 uA. If you go back to your simulation and use a current source of 174 mA, you will be able to see what is happening.
To make the LED light and the Arduino input low with a 40 W load, there are two things you can change - any ideas? Both involve the collector current of the transistor changing, but how?
Re: Individual circuit/appliance monitoring
yes of course,
- CT disconnected (0W) (0Vac) ------PinArduino (4.78V)------Pin HIGH + LED Off OK!!
about
- CT connected (40W) (0.53Vac)--------PinArduino (2.07V)------Pin HIGHandLOW + LED On NOK!!!
I did imagine that was the problem, about not having enough current.
My first approach was to change the R2 from 1Kohms to 470ohms but that did not help. (minimum resistance I have with me right now is 470 Ohms). after you saying that I have put the 3x470ohms in parallel that I have which gives 156ohms but still same problem, the voltage to Arduino is 1.6V,
If I remove the resistance R2 I get the same value for PinArduino , 1.6V so I guess I must change another thing.
Another option is to change the CT but I would like to stick with this CT as it is small enough to create a compact design and I already have several, in addition, I want to see if I can make it work with different CT using different resistance, etc.
The simulation is not working as expected as I am not getting the same values as I read from the multimeter, so its hard to tell.
latest build...and simulation with 0.5Vac on the CT. the current chart is of the collector.
Re: Individual circuit/appliance monitoring
I cant figure out where i can get more current from.
If I remove the resistance R2 then there is no restriction and all available current would got to the collector? I have tried it but as I said it gives the same value as with 156ohms. so maybe there is no current available?
bigger capacitor? want to make all this as small as possible but maybe is this the solution? I am not really sure cause what we need is current in the collector. I have tried removing one of the 1N4007 and even adding another one but it not helps.
I now understand much much more about al this but cant figure out how to solve it.
Re: Individual circuit/appliance monitoring
Changing R2 had no effect - can you think why? Hint: A voltage transformer changes one voltage into another, therefore what does a current transformer do? What is the output of a current transformer? (A voltage is the wrong answer).
OK, you are looking in the wrong place. The two solutions that I suggest:
You could of course change the c.t., but I discounted that because I knew you wanted to use the one you have.