Go Down

Topic: arduino+ctsensor (Read 2 times) previous topic - next topic

tarekza3tari

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

draythomp

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 http://www.desert-home.com/p/test-html-code.html . That should get you started.
Trying to keep my house under control http://www.desert-home.com/

tarekza3tari

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?)

2) 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




draythomp

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.
Trying to keep my house under control http://www.desert-home.com/

wildbill

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.

draythomp

Good Job wildbill;  I was completely missing his point. 
Trying to keep my house under control http://www.desert-home.com/

tarekza3tari

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.

draythomp

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 http://www.powerswitchtail.com/Pages/PSTIIU.aspx. 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
Trying to keep my house under control http://www.desert-home.com/

tarekza3tari

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.





draythomp

Quote
1) why I need to control the high voltage??


Because you said:

Quote
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.

Quote
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.

Quote
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?

Quote
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.
Trying to keep my house under control http://www.desert-home.com/

floresta

There is another thread here --> http://arduino.cc/forum/index.php/topic,133093.msg1001429.html#msg1001429 <-- 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









Go Up