Arduino interfacing with X10  system

We are working on our senior project in which we are using the Arduino Duemilanove and an X10 system. We want the arduino to send basic x10 commands.What we have done is as far we have done the hardware setup as shown in We are using X10 power line interface, X10 lamp module, X10 transceiver module along with Arduino Duemilanove and Rj-11 cable. We also downloaded the x10 library from this website and tried to run a simple blink program:

X10 blink

Blinks an lamp on an X10 lamp module.
Example was built using a PL513
X10 One-Way Interface Module from
as the modem, and a Powerhouse X10 Lamp Module from Smarthome
to plug the lamp in.

created 15 June 2007
by Tom Igoe

#include <x10.h>
#include <x10constants.h>

#define zcPin 5
#define dataPin 6

// set up a new x10 instance:
x10 myHouse = x10(zcPin, dataPin);

void setup() {

void loop() {
Serial.println(“Lights on:”);
// send a “lights on” command 3 times:
myHouse.write(A, ON,3);

Serial.println(“Lights off:”);
// send a “lights off” command 3 times:
myHouse.write(A, OFF,3);

The program uploads and runs just fine however, we get this output:

Lights on:

and thats it. The module should be turning on and off so lights on and lights off should be repeating. We have tried changing the delay and rewiring some connections also with using different digital pins for zero crossing and data but still no success. Also when we try to measure the data of the data pin on the oscilloscope we do not get anything. What do you suggest we do? We have looked at all the hardware connections and they seem to be right and software is directly from the library itself. We were thinking maybe where we are connecting these X10 modules may attenuate the signal but we are not exactly sure why it is not workin. Any ideas or suggestions on what is wrong or how to find out what is possibly wrong?

Thank you,

Start by going through this thread . . . and using the search box to find others.

(Please use the # icon when posting code.)

We are using PSC04 module for X10 and we have let the green wire float. The code is now running but we are seeing no reaction on the PSC04 or the lamp connected to the lamp module. Upon reading other threads a person suggested that the zero crossing pin is active low and should use a pullup resistor. However, there is no mention of what value that pullup resistor should be and if this would work. Any suggestions?

I have used a 10k pullup on the TW-523 unit...

Hi there,

So we have now used a straight RJ-11 connection meaning there is no crossover. We have got the configuration as follows

1) Black to TRANSMIT 2) Yellow to ZERO-CROSSING 3) Red to RECEIVE 4) Green to GND

We have done this and wired a 10K pullup resistor to the Transmit connection and also programmed an internal pullup resistor of 20K to the Zero Crossing using the digitalWrite as mentioned in the other Arduino forums. We still got no response!!! However when we ground Red and Green we see the light blinking on the powerline interface(PLI). This may indicate that something is being sent however, using the Lamp Blink example that comes with the x10 library we see no response in the lamp. We have tried various connections and nothing seems to work. Any suggestions on to what is going on?