Control 4 high voltage lights from a RS232 ascii message

Hi,
I am very new to this and I only know a few about Arduino.

I would like to catch a message from RS232, do some maths with it and light one of the lamp (depending on the result). The lights would be of high power and thus there'll be an external battery.

Am I right to use Arduino, and so which card should I pick?

Look at examples folder for "switchcase2" this should form the basis of your system.

You will need relays to handle the larger Voltages.

Uno would be my choice and depending on number of lights/ampages etc etc you could utilise a motor driver board ?.

Essef :8)

Use SSR's (solid state relays).

The demos here and here show how to receive data from a PC.

…R

What do you mean "high voltage" ?

@ESSEF

You will need relays to handle the larger Voltages.

Wrong! Look up transistor they made relays almost complete redundant 50 odd years ago.

@Titanium69

Use SSR's (solid state relays).

SSR's are very expensive compared with a simple transistor and not need unless you want to use mains AC.

Mark

You can use this fully working example as a basis for receiving command "verbs" and optional data and performing event handling:

Or
Arduino Scientific Calculator

Ray

holmes4:
What do you mean "high voltage" ?

I mean only a little bit more than the Arduino : it should be about 28V.

Thanks for all your message, I'm having a look on it !

Very simple delimited serial code for turning the arduino LED on and off using the serial monitor.

//zoomkat 3-5-12 simple delimited ',' string parse 
//from serial port input (via serial monitor)
//and print result out serial port
//send on, or off, from the serial monitor to operate LED

int ledPin = 13;
String readString;

void setup() {
  Serial.begin(9600);
  pinMode(ledPin, OUTPUT); 
  Serial.println("serial LED on/off test with , delimiter"); // so I can keep track
}

void loop() {

  if (Serial.available())  {
    char c = Serial.read();  //gets one byte from serial buffer
    if (c == ',') {
      Serial.println(readString); //prints string to serial port out
      //do stuff with the captured readString
      if(readString.indexOf("on") >=0)
      {
        digitalWrite(ledPin, HIGH);
        Serial.println("LED ON");
      }
      if(readString.indexOf("off") >=0)
      {
        digitalWrite(ledPin, LOW);
        Serial.println("LED OFF");
      }       
      readString=""; //clears variable for new input
    }  
    else {     
      readString += c; //makes the string readString
    }
  }
}