arduino+ctsensor

My project is when the state electricity cut i want automatic turn off the material in house so that the electricity off motor turn on so that the breaker do not cut.
i have a project to measure current of each material in house ex.: current of tv ,current of Refrigerator etc....
i solve this using current sensor .....this is true yo use that? and how it's the code to read each current and display that at lcd?? and i want to display to high current to low current?? and i want connect the state electricity and motor electricity to arduino but i don't know that because i want compare the two for the arduino know who is arrive?? and i want to make button automatic/manual because the people would you change the on to off or off to on using lcd therefor how to control to lcd to change in the ocd on to off and off to on

thank you

Since your first language is not English, I'm having a little trouble understanding what you need to accomplish. However, I use CT sensors to measure current coming into my house and update a web feed with the data. Take a look at my blog page at Desert Home: How I Monitor Power . That should get you started.

yes I know I am weak in my english langauge and thank you very much

1)my project is i have 3 material (tv,refrig,x) i want to measure the current for each ( i use CTsensor connect to arduino) http://openenergymonitor.org/emon/buildingblocks/how-to-build-an-arduino-energy-monitor-measuring-current-only

and arduino connect to lcd for display the current for each and i want to display it to high current for low current(i need the code?)

  1. I want to connect two arduino electricity: electricity one state and another motor for electricity in the arduino makes a comparison with the two
    state when electricity is cut electricity comes before motor must turn off both high current lcd display and remains in the 3rd turn on
    When the motor is automatically electricity I see the tv turn on and turn off the other (ie automatically)

but I did not connect two arduino and electricity to the code

3)3) I want this experience is manual so I need a button automatic / manual connect to arduino and the lcd to pushbutton to control

but I did not how I connect the button and how I control lcd

can you help me please

Trystan has code for the ct reading current only at the site you gave, it works pretty well. His code gives you a value for the current, this will tell you that the power is on and flowing to a device. You can watch a TV with this and be able to turn it on by using a relay in the power line (or several other methods).

It appears you have two devices, a motor and a tv that you want to sample and turn the motor off if the tv is turned on. If this is the case, I would monitor the tv current, and if it is off, close a relay to turn on the motor. When the tv is turned on open the relay. This kind of thing can be done with only one arduino.

Have you tried posting on one of the language forums? If you scroll down the main forum page a ways, there are specific language sections for other countries. If yours isn't there take a look at google translate (http://translate.google.com) it may help you.

To check my understanding, is this what you're saying?

You have state supplied electricity and your own generator. When the state power stops working, you want the generator to start automatically. However, if there are a lot of things switched on when you change over to generator power, there is a surge which flips breakers. Before the generator starts, you want to turn off any high power devices for a little while, until the generator gets going and then turn them back on.

Good Job wildbill; I was completely missing his point.

My project is:
1- I have 3 devices (refrigerator, washing machine and a television) I need to take a current for each device and connect it to the Arduino (done that by the ct sensor and connected them , and I want to display on the LCD how much of current I consume from the maximum to the minimum)
2- I have 2 sources of electricity connected to the arduino : governmental and the generator (but I don’t know how to connect them).I need when the governmental electricity goes off the higher 2 currents shown on the LCD goes off and keep the 3rd and after discussion turn the generator on and keep the 3rd device on, and in case the governmental electricity came give it the priority.
3- I want to use an Automatic/manual button, in case automatic is chosen the system does what is explained in (number 2) and in case of manual I can choose from the LCD from the devices on which one to turn it off.

Let's take this one step at a time. Since you're already using CTs (current transformers) to measure the power we can address turning off the appliances. I'm not sure what power you have, 220, 110, etc. but they both need something to control the high voltage and the arduino can't do it directly. Something like this can be used to control the appliances Information.com People Search | Free People Finder & White Pages - Locate Anyone. These devices make power control easier.

Using the input on the powerswitch hooked to the arduino, you can turn the appliance on or off as needed. According to the datasheet on the relay they use, it is not a latching relay, so when the power goes off, the relay will open and the appliance will not have power when the power comes back. So your need to have the appliances off when power comes back on is met automatically.

As for a button for manual control, almost any momentary action button can be used. Look at the buttons on SparkFun, they have a number of them to choose from. To make it work, you need some debounce code to handle the series of little voltage changes that happen when a button is pressed. There are code samples and libraries in the Arduino playground that you can look through to see which method you want to use.

You can't actually hook the generator and government power together, this will cause major problems. Take a look (on the web) at techniques for wiring generators into homes. Generally a contactor (google will help you here) is used to switch between the two sources.

You should start with controlling one appliance, then the next, etc. before looking into switching the power coming into them.

There should be enough here to get you started

thank you very much for your reply
I understand what your saying, but I have a few questions:

  1. why I need to control the high voltage?? my project is
    measurement current for each device from ct sensor is connect to arduino and arduino connect to LCD (20 * 4)
    my first step is I want to measure current for each device and display current from the lcd ways:
    ref:3A on
    washer:2A on
    tv:1.5A on
    how can I do that?

NB.: should connect arduino to battery

2)there is not any relay connect
government to arduino and the arduino to generato???

3)you did not say how I can control from lcd.
i want to turn off ref. and washer from lcd.

  1. why I need to control the high voltage??

Because you said:

2- I have 2 sources of electricity connected to the arduino : governmental and the generator (but I don’t know how to connect them).I need when the governmental electricity goes off the higher 2 currents shown on the LCD goes off and keep the 3rd and after discussion turn the generator on and keep the 3rd device on, and in case the governmental electricity came give it the priority.

You turn off an appliance by removing it's power.

If you don't need to turn the off and back on to prevent tripping the breakers when the power comes back on, simply ignore my comments on that.

I want to measure current for each device and display current from the lcd ways:

This is a very complicated answer. It is best you understand the methods and calculations involved in doing this, and the site you already mentioned http://openenergymonitor.org/emon/buildingblocks/how-to-build-an-arduino-energy-monitor-measuring-current-only has a good example of how this works.

Or, If you have already done this and only need to display it on the LCD, there are thousands of examples of how to send data to an LCD. There's even an LCD library on the Arduino playground that you can use.

2)there is not any relay connect
government to arduino and the arduino to generato???

You mentioned that you wanted to use a generator to power the appliances when the government power was removed. To do this, you need a contactor that will keep the two power providers separate. If you do not want to do this, what is the generator for?

3)you did not say how I can control from lcd.
i want to turn off ref. and washer from lcd.

An LCD cannot control anything. It is a display device that displays things you send to it. If you want to control something, it should be controlled from the arduino.

There is another thread here --> control lcd - Displays - Arduino Forum <-- which is dealing with the same question. You seem to have a better handle on it here. These are bordering on cross-posting but due to the language problems it might be best to keep them both going.

Don