Go Down

Topic: TW523 and X10 problems (Read 3484 times) previous topic - next topic

jdubuke

Hi all,
I have been reading any/all posts regarding the X10 and TW523. I am attempting a very simple test of turning a fan off using Arduino/XTB523/Lamp Module and the x10 library.
I *believe* i have the correct setup, since when i send the command i see the light on the 523 blink from dim green to bright green, and my serial output shows the command completed, but i get no response from the appliance.
my first (and hopefully only) question is:
do I need anything from the arduino related to power? In one post i saw that a +5V was needed on the ZC pin, on another I saw it was needed on the xmt pin, and on a few others it was never mentioned!
The same question goes for a 10K resistor... although i believe that using the internal pullup solves that question.
Thanks in advance for any help in this matter.
Jerry

LarryD

Show us in a schematic how you are connected to the TW523.
Are your house and unit codes correct?
The way you have it in your schematic isn't the same as how you have it wired up!

jdubuke

Hi Larry,
I have the following
523 is from left to right

523.       Color.       Arduino
1.           Not connected
2.           Blk.            2       
3.           Red.           4
4.           Grn.           Gnd
5.           Yell.           5
6.           Not connected

The above are going directly into the arduino with nothing else inline e.g. +5 or resistors

I believe it is correct because any other combination hangs the code on the write command.  This combination allows the code to complete.

jdubuke

and here is my code:
#include <x10.h>
#include <x10constants.h>

#define zcPin 2
#define dataPin 5
#define RCVE_PIN       4

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

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

void loop() {
  Serial.println("Sending off:");
  // send a "lights off" command 3 times:
  myHouse.write(HOUSE_B, UNIT_1,3);
  myHouse.write(HOUSE_B, OFF,3);
  Serial.println("Sent off:");
  delay(10000);
}

LarryD

#4
Aug 31, 2013, 12:32 am Last Edit: Aug 31, 2013, 01:12 am by LarryD Reason: 1
Do you have?

                     TW523.       Arduino

Zero Crossing  1.      --->     2        Input, coming to Arduino zero crossing
GND                2.                GND
RX O/P            3.                N.C.
TX I/P             4.      <---     5        TX data output, going to TW523
The way you have it in your schematic isn't the same as how you have it wired up!

jdubuke

I have the rx connected. Otherwise, yes to the questions, as per my schematic and code...

LarryD

#6
Aug 31, 2013, 03:57 am Last Edit: Aug 31, 2013, 04:03 am by LarryD Reason: 1
I hook up a unit here, it works as it should with your code.

EDIT: I used the original TW523 module

-  Is your UNIT_1 on the same side of the phase as the TW523?
-  Are you sure you have the TW523 wired as I suggested?
The way you have it in your schematic isn't the same as how you have it wired up!

LarryD

Send me a web link to the schematic for your XTB523
The way you have it in your schematic isn't the same as how you have it wired up!

jdubuke

Thanks for your patience here!
http://jvde.us/xtb/XTB-523_description.htm
That is the module I have  could it just be something stupid like initializing it correctly?

jdubuke

Oh forgot to mention. I am in the same outlet for both modules so same phase...

LarryD

#10
Aug 31, 2013, 10:14 pm Last Edit: Aug 31, 2013, 11:43 pm by LarryD Reason: 1
I am having trouble coming to grips with your wiring in reply #2 and my reply #4.
Since things here are working, you either have a wiring problem, the XTB523 has a problem or is not compatible with the TW523/Arduino library.
Larry
The way you have it in your schematic isn't the same as how you have it wired up!

jdubuke

When you set up the test, did you have the wires going directly into the arduino?
This goes back to my first question   Do I need external 5V or any resistors?

LarryD

#12
Sep 01, 2013, 09:46 pm Last Edit: Sep 02, 2013, 01:45 am by LarryD Reason: 1
I used no resistors.
I connected the TW523 directly to: GND, Pin 2 and Pin 5 as in my reply #4.

I used this library:
https://github.com/DougC/arduino-x10
The way you have it in your schematic isn't the same as how you have it wired up!

jdubuke

sigh - ok i guess i am dead in the water until i can get someone to help me with an O-scope to see what is actually happening.
Thanks for all your help/support!
Jerry

Go Up