Problem: Arduino Uno + Ultra Compact RS232 to TTL Converter -> Projector-Control

Hello ladies and gentleman,

i looking for an answer of my problem. I want to control a Nec Beamer with a Arduino – Power On / Off. So i bought a RS232 to TTL Converter at Amazon and connected it with my Arduino. But it seems that it doesn’t works. I don’t know why.

I tested it with a USB-RS232-Adapter and CoolTerm for OSX and sended the HEX-String “02 00 00 00 00 02” for Power ON and “02 01 00 00 00 03” for Power OFF – It works (send_data_usbadapter_to_projector _ WORKS).

When i connect my Arduino over RS232 to my RS232-USB-Adapter, it receives Data like in the attachment (send_data_arduino_to_usbadapter.png): 200002200002200002

Because it is a Loop, see the Arduino-Code:

#include <SoftwareSerial.h>

const int rx = 10; // rx pin of Arduino, SO(serial out)of TRex.
const int tx = 11; // tx pin of Arduino, SI(serial in)of TRex.

SoftwareSerial mySerial (rx, tx); // RX to SO of Trex, TX to SI of Trex

void setup() {
Serial.begin(9600);
mySerial.begin(9600);

}

void loop() {

delay(1000);
mySerial.print(0x02,HEX);
mySerial.print(0x00,HEX);
mySerial.print(0x00,HEX);
mySerial.print(0x00,HEX);
mySerial.print(0x00,HEX);
mySerial.print(0x02,HEX);

delay(1000);

if (mySerial.peek() == -1) {
Serial.println(“no response”);
}
while (mySerial.peek() != -1) {
Serial.println(mySerial.read());
}
}

I also tested it with Serial.print and the RX, TX-Pins, but it doesn’t work to.

Who knows the problem and help me? :slight_smile:

Best regards
Benni

I also tested:

void setup() { Serial.begin(9600); }

void loop() {

delay(1000);

Serial.write(0x02); Serial.write(0x00); Serial.write(0x00); Serial.write(0x00); Serial.write(0x00); Serial.write(0x02);

delay(1000);

}


void setup() { Serial.begin(9600); }

void loop() {

delay(1000);

Serial.write(02); Serial.write(00); Serial.write(00); Serial.write(00); Serial.write(00); Serial.write(02);

delay(1000);

}


void setup() { Serial.begin(9600); }

void loop() {

delay(1000);

Serial.write("02 00 00 00 00 02);

delay(1000);

}

Looking at a NEC serial protocol manual here it looks like you might need a different baud rate to the 9600 your using.

i already tested 9600 and 38400... My projector is the NEC M403H and i could find it in your pdf ;)

i changed the settings of the projector already form 38400 to 9600 :)

With the usbadapter and CoolTerm it works with baudrate 9600, I think thats not the problem.

Now it works... i used a cross gender changer, because it doesn't worked without. The manual tells me to use a crosscable... With the the USB-Adapter i need a crosscable, instead of the RS232-Konverter – its crossed internal ;D

Thanks a lot

das_benni: Now it works... i used a cross gender changer, because it doesn't worked without. The manual tells me to use a crosscable... With the the USB-Adapter i need a crosscable, instead of the RS232-Konverter – its crossed internal ;D

Glad you got it working though I was of no help in doing so.