I have been replacing X-10 home automation modules with these Wen Shing transmitters and receivers; their models TWS-BS3 and RWS-371-6 which I get from Spark Fun as their WRL-10534 and WRL-10532. Having made 7 transmitters and 10 receivers I have yet to experience a false control action. Two of the transmitters and receivers use data messages sent once per minute. All use the same technology which I will attempt to describe better than my previous post.
The attachments are typical and are of a display in my living room which receives both data messages and control messages to select which item to display. Space does not permit a description of a transmitter, which is trivial.
The digital output of the receiver, pin 2, is directly connected to the Picaxe pin C.3, for SERIN. It is also connected to an itegrate-and-dump circuit then to pin C.0, the interrupt input. In the absence of a signal the receiver output is saturated with thermal noise. Peaks exceeding the 3V gate threshold of the FET cause the bipolar transistor to shut off, and its collector voltage to rise. However, as soon as the noise input falls below 3V, the bipolar transistor very quickly dumps the charge on the capacitor on the collector. The circuit is designed so the interrupt is triggered infrequently on noise. This is my first trick.
My signals are preceded by a 20-ms pulse, made by setting the transmitter Picaxe Serout pin High, Pause 20, then Low. After 4.4 ms the interrupt occurs. The pulse also sets the receiver’s AGC to an appropriate level for the rest of the message.
For the rest please refer to the interrupt section at the bottom of the program listing. First, the time is measured until the C.0 goes low, using a loop. Almost always a noise-generated interrupt will be less that the 15.6 ms of the true signal. This terminates the interrupt so that the Picaxe is not tied up. This is my second trick.
After that, my messages have a 10ms gap before SEROUT. This is my third trick. It allows time for the Picaxe to set up SERIN.
SEROUT is at 2400 baud not the 4800 claimed by Wen Shing. Incoming data is stored in memory, but only after a key code is received. I use 14L1776, the license plate number of one of my former motorcycles. This is my fourth trick.
SERIN will time out since enough memory is allocated to exceed my longest message. If not, interrupt is terminated.
The first stored character of my message, after ”6” is a control action or a message ID. If this was not changed by SERIN, interrupt is terminated. This is my fifth trick.
The rest is specific to this device and I will not go into it.
The attachments are typical and are of a display in my living room which receives both data messages and control messages to select which item to display. Space does not permit a description of a transmitter, which is trivial.
The digital output of the receiver, pin 2, is directly connected to the Picaxe pin C.3, for SERIN. It is also connected to an itegrate-and-dump circuit then to pin C.0, the interrupt input. In the absence of a signal the receiver output is saturated with thermal noise. Peaks exceeding the 3V gate threshold of the FET cause the bipolar transistor to shut off, and its collector voltage to rise. However, as soon as the noise input falls below 3V, the bipolar transistor very quickly dumps the charge on the capacitor on the collector. The circuit is designed so the interrupt is triggered infrequently on noise. This is my first trick.
My signals are preceded by a 20-ms pulse, made by setting the transmitter Picaxe Serout pin High, Pause 20, then Low. After 4.4 ms the interrupt occurs. The pulse also sets the receiver’s AGC to an appropriate level for the rest of the message.
For the rest please refer to the interrupt section at the bottom of the program listing. First, the time is measured until the C.0 goes low, using a loop. Almost always a noise-generated interrupt will be less that the 15.6 ms of the true signal. This terminates the interrupt so that the Picaxe is not tied up. This is my second trick.
After that, my messages have a 10ms gap before SEROUT. This is my third trick. It allows time for the Picaxe to set up SERIN.
SEROUT is at 2400 baud not the 4800 claimed by Wen Shing. Incoming data is stored in memory, but only after a key code is received. I use 14L1776, the license plate number of one of my former motorcycles. This is my fourth trick.
SERIN will time out since enough memory is allocated to exceed my longest message. If not, interrupt is terminated.
The first stored character of my message, after ”6” is a control action or a message ID. If this was not changed by SERIN, interrupt is terminated. This is my fifth trick.
The rest is specific to this device and I will not go into it.
Attachments
-
5.9 KB Views: 43
-
70 KB Views: 100
Last edited: