Show Posts
Pages: [1] 2
1  Topics / Home Automation and Networked Objects / question help plz on: February 12, 2013, 06:01:57 pm
hi
i have 2 question and reply plz (i have a project, i don't have many time and thanks).

the first
My project is a controller lamp (did ​​from the control relay 5v) and used two other relays.

one relay plays the role of a (motor electricity) and the other relay plays the role of (the state electricity).

Relay 5 V: Connect to pin 5 arduino and connect to lamp that connects to electricity
relay 220v (State): Connect to pin 2 (interrupt 0) and connect  cable to electricity
relay 220v (motor):  connect pin 3 (interrupt 1) and connect  cable to electricity
and a sensor measuring the lamp current

I'm there when (the state electricity) the fluorescent lamp when I remove the cable of electricity (turn off the lamp) and at the same time must measure the current and if the current> 0.2 light the lamp nor Turns off the lamp from relay pin 3

if anyone can help with, thank you.


code



#define relayx 2
#define relay2 5
#define relayy 3

volatile int x=LOW;


void setup()

  Serial.begin(9600);
  pinMode(relay2, OUTPUT);
  attachInterrupt(0,ETAT,FALLING);
  attachInterrupt(1,relaymoteur,RISING);
}

void loop()
{
  measure current ( x)
}

void ETAT(){
  digitalWrite(relay2,HIGH);
  }
 
void relaymoteur(){
  if (x>0.2)
  {
    digitalWrite(relay2, HIGH);
    while(1){}
  }
   else
   {
     digitalWrite(relay2, LOW);
     while(1){}
   }
 
}

a une relation avec:http://arduino.cc/forum/index.php/topic,147562.0.html


the second

i have 3 push button and i want to control lcd (16*2).
 the 3 push button is up,down  and select to lcd
for example
if the lamp appears (turn on) in lcd
I want to click button select (for turn off the lamp)
2  Topics / Home Automation and Networked Objects / Re: help code relay on: February 09, 2013, 02:43:57 pm
My project is a controller lamp (did ​​from the control relay 5v) and used two other relays.

one relay plays the role of a (motor electricity) and the other relay plays the role of (the state electricity).

Relay 5 V: Connect to pin 5 arduino and connect to lamp that connects to electricity
relay 220v (State): Connect to pin 2 (interrupt 0) and connect  cable to electricity
relay 220v (motor):  connect pin 3 (interrupt 1) and connect  cable to electricity
and a sensor measuring the lamp current

I'm there when (the state electricity) the fluorescent lamp when I remove the cable of electricity (turn off the lamp) and at the same time must measure the current and if the current> 0.2 light the lamp nor Turns off the lamp from relay pin 3

if anyone can help with, thank you.


code



#define relayx 2
#define relay2 5
#define relayy 3

volatile int x=LOW;


void setup()

  Serial.begin(9600);
  pinMode(relay2, OUTPUT);
  attachInterrupt(0,ETAT,FALLING);
  attachInterrupt(1,relaymoteur,RISING);
}

void loop()
{
  measure current ( x)
}

void ETAT(){
  digitalWrite(relay2,HIGH);
  }
 
void relaymoteur(){
  if (x>0.2)
  {
    digitalWrite(relay2, HIGH);
    while(1){}
  }
   else
   {
     digitalWrite(relay2, LOW);
     while(1){}
   }
 
}
3  Topics / Home Automation and Networked Objects / help code relay on: February 07, 2013, 01:20:29 pm
i have 2 relays: the first relay connect to pin 2 (interrupt)(220v) and the second connect to pin 5 (control a lamp)(5v) , i want when the 2 relays connect to electricity the lamp turn on and when disconnect the first relay to electricity the lamp turn off and when reconnect the lamp turn off.
i write a code but does not work if you have someone help me thank u.

Note: it's Necessary to use interrupt

code:

#define relay2  5;
#define relayx 2
//int x=0;


void setup()

  Serial.begin(9600);
  pinMode(relay2, OUTPUT);
  attachInterrupt(0,ETAT,FALLING);
   
}

void loop()
{
 
}

void ETAT(){
      digitalWrite(relay2,HIGH); //Pull ledPin to high
 
 
}


4  Topics / Home Automation and Networked Objects / relay problem on: December 24, 2012, 12:02:44 pm
i have questions
I use ct sensor and relays.
ct sensor to measure the current output of the lamp is given (turn off:0A turn on : 0.89, 0.90, 0.91)
 and when I use relay to control is given (turn off:0.07  turn on:between 0.3 and 0.9 and etc.)

what's problem? thank you in advance
5  Topics / Home Automation and Networked Objects / question of code ct on: December 22, 2012, 04:29:40 pm
goodnight,
i have a question
I measure the lamp current (200watt) -> (0.9) from ct sensor and I put a relay
for lamp, i want when the current greater than 0.6 then turn off lamp.
When upload algorithm to arduino, current flows from 0.3 to 0.9 then 0.3 etc and does not remain fixed.



// EmonLibrary examples openenergymonitor.org, Licence GNU GPL V3

#include "EmonLib.h"                   // Include Emon Library
 #include <LiquidCrystal.h>
EnergyMonitor emon1;
// Create an instance


//#define relay2 22
LiquidCrystal lcd(8,9,10,11,12,13);

void setup()

  Serial.begin(9600);
  lcd.begin(16,2);
   
   // pinMode(relay2, OUTPUT);
 
  emon1.current(0, 90.3);             // Current: input pin, calibration.
}

void loop()
{
  double Irms = emon1.calcIrms(1480);  // Calculate Irms only
 
  Serial.print(Irms*230.0);          // Apparent power
  Serial.print(" ");
  Serial.println(Irms);             // Irms
  lcd.setCursor(0, 0);
  lcd.print("lampe100=");
  lcd.print(Irms);
  lcd.print(" A");
 if (Irms>0.6){
    digitalWrite(relay2, LOW);
    //delay(1000); //Delay 1 second
  }
  else{
    digitalWrite(relay2,HIGH);
    //delay(1000); //Delay 1 second
 
 
 

  }*/
 
}
6  Using Arduino / Displays / Re: display on: December 14, 2012, 12:51:57 pm
someone has given thought to the LCD menu
but I do not understand.
you Have Any Idea???
7  Using Arduino / Displays / display on: December 14, 2012, 11:10:22 am
i want to display to lcd 16*2 , 3 word and each word on a line
but I only have 2 lines on lcd and not 3
how do I do that?
8  Using Arduino / Displays / Re: question of code display on: November 27, 2012, 05:04:03 am
if code is true?
9  Using Arduino / Displays / question of code display on: November 26, 2012, 06:08:46 pm
i connect ct sensor to arduino and i connect lcd to arduino.
i want to read analog input (current of lamp) and display the value to lcd
this code is true:




#include <LiquidCrystal.h> // include the LCD library
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int analogPin = A0;
int val = 0;

void setup()
{
  Serial.begin(9600);          //  setup serial

lcd.begin(16, 2); // lcd rows and columns
    lcd.print("lampe"); // title
}

void loop()
{
  val = analogRead(analogPin);    // read the input pin


lcd.setCursor(0, 1);

  lcd.print("lampe=");
   lcd.print(val);
  Serial.println(val);             // debug value
}

10  Using Arduino / Displays / Re: control lcd on: November 20, 2012, 05:56:43 pm
?
11  Using Arduino / Displays / Re: control lcd on: November 20, 2012, 05:21:12 pm
i want to use lcd 16*2 how i do lcd menu? and how i control lcd from the pushbutton?
12  Topics / Home Automation and Networked Objects / Re: arduino+ctsensor on: November 20, 2012, 06:36:26 am
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.




13  Using Arduino / Displays / Re: control lcd on: November 20, 2012, 05:49:54 am
display at lcd make
ref:3A turn on
washer:2A turn on
tv:1.5A turn on

i want to turn off ref. and washer from lcd
14  Using Arduino / Displays / Re: control lcd on: November 19, 2012, 08:08:55 pm
1) my main question how to control LCD
for example: lcd display: ref.: 3A is
                                              washer: 2A is
                                              tv: we 1.5A
I want to change it for off from lcd

2) my first step is to read current for each devices and display to lcd in way as to example
15  Using Arduino / Displays / Re: control lcd on: November 19, 2012, 06:56:57 pm
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.
Pages: [1] 2