Pages: 1 [2]   Go Down
Author Topic: Problems with x10 program  (Read 2491 times)
0 Members and 1 Guest are viewing this topic.
Denver
Offline Offline
God Member
*****
Karma: 19
Posts: 778
Inactive - PM
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

crites,

Thanks for getting back on this.
Quote
My goal is to use the Arduino and various modules to replace my current home control system.
That was mine too, and it was accomplished with the Nex10 gizmo I made. Being able to receive x10 and process them with the Arduino was key for me. When you get to that point, there are now several libs that will help you do this (as mentioned in my blog). Good luck with you project and let me know if I can help.  :-X
Logged

"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I'm having some issues with Arduino and X10 also.

Trying to controle some A10 (Xanura) micro modules. Using a Marmitek X10E (yeah 50hz) and a Xanura PMIX35 programmer / measurement interface to monitor the powerline.

I've been testing the contents of the zip from arduino.cc/en/Tutorial/X10 while creatrope.com/make/arduino-x10/ is currently unreachable for me.

I've noticed some settings need to be redefined for 50Hz usage
#define OFFSET_DELAY from 500 to 800
#define HALF_CYCLE_DELAY from 8334 to 10000
which i did.

If i'm not mistaken the folloing definition should be correct:
Black - Zero crossing
Red - Ground/Common
Green - Receive (from powerline to arduino)
Yellow - Send (from arduino to powerline)

I am able to send some commands, but the program halts until i disconect the black whire. Then some X10 commands are sent out to the X10E, but not very stable.

Need to connect/disconnect the ZC to be able to send some more x10 commands.




Logged

Denver
Offline Offline
God Member
*****
Karma: 19
Posts: 778
Inactive - PM
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Fabian,
The colors of the wire for an RJ11 do not mean anything. At least in the US, telephone cables are often a crossover - so the order of wires depends on which connector you cut off. Use the pin #'s coming your X10E.
Quote
I am able to send some commands, but the program halts until i disconect the black whire. Then some X10 commands are sent out to the X10E, but not very stable.

Just read that. So it is working sometimes?
« Last Edit: December 14, 2010, 05:25:28 pm by BroHogan » Logged

"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's a straight wire, pins 1-4 black/red/green/yellow, holding the pins upwards.

Yes i am (was) able to send x10 commands sometimes.

I've just added a 10k resistor between black (ZC) and 5+ and removed a 10k resistor between yellow (send) and 5+ which seems to help.


Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does anyone has the send/receive combined package from creatrope.com ?

Site has been down for quite some time

« Last Edit: December 15, 2010, 03:12:53 am by fabiannl » Logged

Denver
Offline Offline
God Member
*****
Karma: 19
Posts: 778
Inactive - PM
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Fabian,

I have creatrope's lib at home. PM me and I'll send you a link to it.

However you should look into a new combined lib - X10ex - written by  ThomasM. He's done an excellent job on it and it's settable for 50 or 60 Hz. etc. He has also written X10 IR and X10 RF libs. You can find them here:
http://load-8-1.blogspot.com/2010_06_01_archive.html

« Last Edit: December 15, 2010, 11:25:33 am by BroHogan » Logged

"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
However you should look into a new combined lib - X10ex - written by  ThomasM. He's done an excellent job on it and it's settable for 50 or 60 Hz. etc. He has also written X10 IR and X10 RF libs. You can find them here:
http://load-8-1.blogspot.com/2010_06_01_archive.html

Wauw, that looks great. I'm wondering why i missed that one while googleing on xm10+arduino. Could be due to the somewhat unusual page title.  TNX!

Quote
I have creatrope's lib at home. PM me and I'll send you a link to it.
Tnx. Just for future reference it's a nice lib to have i guess.

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
However you should look into a new combined lib - X10ex - written by  ThomasM. He's done an excellent job on it and it's settable for 50 or 60 Hz. etc. He has also written X10 IR and X10 RF libs. You can find them here:
http://load-8-1.blogspot.com/2010_06_01_archive.html

Do you happen to know what i'll need to connect to Pin2 ?

Code:
// zeroCrossInt = 2 (pin change interrupt), zeroCrossPin = 4, transmitPin = 5, receivePin = 6, receiveTransmits = true, phases = 1, sineWaveHz = 50
X10ex x10ex = X10ex(2, 4, 5, 6, true, processPlMessage, 1, 50);
// receiveInt = 0 (external interrupt), receivePin = 2
X10rf x10rf = X10rf(0, 2, processRfCommand);
// receiveInt = 1 (external interrupt), receivePin = 3, defaultHouse = 'A'
X10ir x10ir = X10ir(1, 3, 'A', processIrCommand);

Currently only intereseted in using the PLC interface. It seems zeroCrossInt  matches the rf receivePin ?
Logged

Denver
Offline Offline
God Member
*****
Karma: 19
Posts: 778
Inactive - PM
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
It seems zeroCrossInt  matches the rf receivePin ?
Not really.
The first param (2) for X10ex is the pin change interrupt. (The lib has a "trick" that provides an extra pin change interrupt on D4 for the 386 which the Zcross is connected to.)

The first param (0) for X10rf is the pin change interrupt triggered from the RF receiver on D2.

For only the PLC, you should be able to use:
-  X10ex(0, 2, 5, 6, . . .
-  X10ex(1, 3, 5, 6, . . .
-  X10ex(2, 4, 5, 6, . . .
« Last Edit: December 26, 2010, 12:36:24 pm by BroHogan » Logged

"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your fast response!

I'm not realy sure what to to with this pin.

PLC only provides 3 pins and ground. With debugging enabled and pin2 unused, i'm not receiving any X10 commands  (PLC > Arduino)
Logged

Denver
Offline Offline
God Member
*****
Karma: 19
Posts: 778
Inactive - PM
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The first param is not a PIN - it's an interrupt #. So 3 pins are defined - 2,5,6, or 3,5,6, or 4,5,6,. Put zcross on D2, D3, or D4 and use the respective interrupt # - 0, 1, or 2.
Logged

"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

Pages: 1 [2]   Go Up
Jump to: