I posted recently a message but it seemed to be not very specific.
(Thank you for the comments Marc_F_Hult).
So here I try again:
I would like to measure some parameters (temperature, humidity, smoke
etc.) in every room of the house. What I have concluded so far, based on
my own little research, is that the easiest would be to connect all the
sensors in each room to a wireless network node. This network node sends
the previously sampled data to the PC. I would also need a network node
in the PC which receives the data from each network node placed in each
room.
The question is:
Do you know about a cheap _wireless_ network solution where there are
several nodes sending data to the PC?
It is not a requirement that the nodes receive data but I guess that the
mayority of the network protocols require a 2-way communication. The
nodes must be such that I can program them in order to receive data from
the sensors and send the data to the PC.
Thank you for the suggestions,
Enrique
1) All the sensors in every room will be connected to a Basic Stamp 2
(based on the PIC16 IC).
The signals from the digital sensors are directly connected to the Basic
Stamp. The signals from the analog sensors are converted by an A/D
converter (ADC0831) and the output of the AD is connected to the Basic
Stamp.
2) The data from the Basic Stamps is sent through a TWS-434 unit
(wireless RF 434Mhz).
3) a RWS-434 unit is connected to the PC receiving all the information
from the Basic Stamps.
A weak point is that several Basic Stamps could be sending data to the
PC resulting in lost data. I have to investigate how to avoid this problem.
Do you have any comments on the suggested idea? Or have you tried any
thing similar?
regards,
Enrique
I would use the Atmel AVR ATTiny15L. It has 4 10-bit ADC channels and an
internal oscillator so you'll have minimum parts count. The ADC pins can
also be used for Digital inputs. There are 6 IO pins, all can be used for
digital inputs, 4 can also be used for ADC. You can get 0.5°C resolution
using inexpensive temperature ICs like the LM34. The ATTiny15L sells for
$2-3. It can use 2.5-5.5V power. There are a couple of Basic compilers for
it as well as a free GCC compiler and free ASM tools from Atmel.
The TWS-BS3 transmitter is smaller than the TWS-434. Both are made by the
same company. The RCT-433-AS from Radiotronix is even smaller...
http://www.radiotronix.com/prodrctas.asp
In the US, the FCC limits these types of data transmissions to low power and
to infrequent transmissions. Most wireless temperature sensors (e.g. Oregon
Scientific, LaCrosse) send about every 15 minutes. I believe European
regulations are a bit more lax but still similar. You can program the MCUs
to sleep for ~15 minutes, wake up, take an ADC reading, transmit, go back to
sleep. Differences in the internal oscillators will guarantee that each is
on a slightly different time scale so collisions will be rare (almost
never). It is possible to do Forward Error Correction with extra bits but I
don't think you will need it.
Digital inputs, like alarm sensor switches for doors/windows send whenever
activated. They also send an "all's well" message about once an hour or two
hours.
If you want to use the protocol I developed, you could build a BX24-AHT to
act as the receiver. I needed to make the protocol work within the limits of
the X-10 RF protocol so I did not use FER. If you go that way, you can use
X-10's door/window switches, motion sensors, etc. and only need to build the
ADC nodes.
I've also toyed with the idea of using the ATTiny15L as the core of a
two-way X-10 powerline modem. It can generate 120KHz on its PWM pin.
http://www.avrfreaks.net/Devices/devices.php?action=1&devid=44
If you find the Atmel chip too daunting, use the BasicX-24. It costs less
that the stamp, is faster, can do more.
>I think I've found an acceptable solution.
>
>1) All the sensors in every room will be connected to a Basic Stamp 2
>(based on the PIC16 IC).
>The signals from the digital sensors are directly connected to the Basic
>Stamp. The signals from the analog sensors are converted by an A/D
>converter (ADC0831) and the output of the AD is connected to the Basic
>Stamp.
>
>2) The data from the Basic Stamps is sent through a TWS-434 unit
>(wireless RF 434Mhz).
>
>3) a RWS-434 unit is connected to the PC receiving all the information
>from the Basic Stamps.
>
>A weak point is that several Basic Stamps could be sending data to the
>PC resulting in lost data. I have to investigate how to avoid this problem.
>
Do you really need a wireless link here? Wireless adds a lot of
complexity and makes things less reliable. The BASIC Stamps dea itself
looks good.
>
>Do you have any comments on the suggested idea? Or have you tried any
>thing similar?
>
That sounds like something I may do (without the wireless part). I've
already got CAT5 cables running around my house, a few more won't make
that much difference.
>
>regards,
>Enrique
>
--
37 days until the winter solstice celebration
Mark Lloyd
http://go.to/notstupid
http://notstupid.laughingsquid.com
"There's no more proof for the existence of God than there is for the existence of the
Easter Bunny. That's right. The Easter Bunny."
Faced a similiar problem about collisions on some other project I was
working on. Solution is, use a *random* delay between each
transmission burst of each PC, and a simple checksum algorithm. This
way, the chances of multiple transmissions happening are reduced, and
the chances of multiple transmissions happenning *consecutively* are
almost nil. The checksum would help the receiver decide about the
integrity (and acceptance) of a received string.
Somewhat similiar to Ethernet!?
Regards,
Anand Dhuru
thank you for the very informative reply!
Dave Houston wrote:
> I would use the Atmel AVR ATTiny15L.
> If you find the Atmel chip too daunting, use the BasicX-24.
I never heard about Atmel's microprocessor nor BasicX-24. As far as I
can see BasicX-24 resembles somehow Basic Stamp. But Atmel's
microprocessors seem too good to be true! I still cannot believe it.
- Is there any "pitfall" with Atmel's microprocessors? (I am not
thinking about the technical specs, that I must consider carefuly by my
own. ATTiny might be too tiny, however ATMega seems to fit better to my
purposes):
- Can I just buy one, make an easy DIY-connection between the
microprocessor and the PC, get a free compiler, compile the program,
download the executable file and run? That is, no more expenses that the
microprocessor itself?
regards,
Enrique
thank you for the very informative reply!
Dave Houston wrote:
> I would use the Atmel AVR ATTiny15L.
> If you find the Atmel chip too daunting, use the BasicX-24.
I never heard about Atmel's microprocessor nor BasicX-24. As far as I
can see BasicX-24 resembles somehow Basic Stamp. But Atmel's
microprocessors seem too good to be true! I still cannot believe it.
- Is there any "pitfall" with Atmel's microprocessors? (I am not
thinking about the technical specs, that I must consider carefuly by my
own. ATTiny might be too tiny, however ATMega seems to fit better to my
purposes):
Can I just buy one, make an easy DIY-connection between the
thank you for the very informative reply!
Dave Houston wrote:
> I would use the Atmel AVR ATTiny15L.
> If you find the Atmel chip too daunting, use the BasicX-24.
I never heard about Atmel's microprocessor nor BasicX-24. As far as I
thank you for the very informative reply!
Dave Houston wrote:
> I would use the Atmel AVR ATTiny15L.
> If you find the Atmel chip too daunting, use the BasicX-24.
I never heard about Atmel's microprocessor nor BasicX-24. As far as I
Hello Dave,
thank you for the very informative reply!
Dave Houston wrote:
> I would use the Atmel AVR ATTiny15L.
> If you find the Atmel chip too daunting, use the BasicX-24.
I never heard about Atmel's microprocessor nor BasicX-24. As far as I
>Hello Dave,
>
>thank you for the very informative reply!
>
>Dave Houston wrote:
>> I would use the Atmel AVR ATTiny15L.
> > If you find the Atmel chip too daunting, use the BasicX-24.
>
>I never heard about Atmel's microprocessor nor BasicX-24. As far as I
>can see BasicX-24 resembles somehow Basic Stamp. But Atmel's
>microprocessors seem too good to be true! I still cannot believe it.
The BX-24 is pin compatible with the Basic Stamp but is based on the Atmel
AT 90S8535. IMO it is far more powerful than the BS. It uses a version of
Basic that is very close to Visual Basic which is more structured than
PBasic.
>- Is there any "pitfall" with Atmel's microprocessors? (I am not
>thinking about the technical specs, that I must consider carefuly by my
>own. ATTiny might be too tiny, however ATMega seems to fit better to my
>purposes):
>
>- Can I just buy one, make an easy DIY-connection between the
>microprocessor and the PC, get a free compiler, compile the program,
>download the executable file and run? That is, no more expenses that the
>microprocessor itself?
I'm not sure about European sources but in the US I can buy quantities of 1
from Digi-Key. There are free compilers for C and ASM and there was a recent
7-8 article series in "Nuts & Volts" magazine detailing RVKBasic which is a
free (for non-commercial use) Basic compiler. (I don't like it - it's too
PBasic-ky.) BAScom AVR and FastAVR are commercial Basic compilers. Both use
a structured VB-like language.
Downloading the program is as easy as building your own programmer cable.
There are plans for DIY but you can buy an assembled serial or parallel port
programmer cheap from Olimex in Bulgaria...
http://www.olimex.com/dev/avr_left.htm
I get PCB boards made there - they have been 100% reliable.
Note, however, that I'm mostly familiar with the pre-Mega chips so I'm not
sure how easy the Mega chips and tools are to find. The Mega has just
recently come to market. The ATTiny ant AT90s up to the AT90S8535 are more
than adequate for anything I'm interested in.
Also, I'm not sure that the Mega comes in a DIP package. I think all are
AMD.
For other tools, the AVR Freaks site cited earlier is the best place to
start.
There are also a couple of development boards from Thailand that you might
find of interest. There are links on my web page in the "Links" section.
See...
I've been comparing a bit more and the only remarkable advantage of the
BX-24/Basic Stamp versus the AVR ATTiny/ATMega is the user-friendly
programming language. But of course I can start programming the AVRs in
C and when I feel more comfortable I can switch to ASM.
> I'm not sure about European sources but in the US I can buy quantities of 1
> from Digi-Key.
I've just checked it. Digi-Key does also export to Europe.
http://www.elfa.se in Sweden is also an alternative.
> Also, I'm not sure that the Mega comes in a DIP package.
Have just also checked it. Some Mega comes in a DIP package, some others
in TQFP.
Thank you for the links. I have now tons of material to read. I'd better
study more in details the Atmel's microprocessors and will repport the
final configuration to the newgroup in a couple of weeks. I have in mind
to have a microprocessor servicing all the sensors in each room and to
send the data via RF to the PC (I'm not interested in X10 as long as it
is only supervision of parameters).
Regards,
Enrique
>Dave Houston wrote:
>> The BX-24 is pin compatible with the Basic Stamp but is based on the Atmel
>> AT 90S8535.
>
>I've been comparing a bit more and the only remarkable advantage of the
>BX-24/Basic Stamp versus the AVR ATTiny/ATMega is the user-friendly
>programming language. But of course I can start programming the AVRs in
>C and when I feel more comfortable I can switch to ASM.
The BX-24 is great for prototyping and proving a concept. I used it in the
BX24-AHT because it greatly reduced the parts count which made it far more
feasible as a DIY project. The BasicX language gives you access to all of
the AT90S8535's registers so you can do things at a low level although at
considerably less speed than if you are using C or ASM or even one of the
Basic packages to program the Atmel MCU directly (most have inline ASM).
Another advantage of the Atmel AVR is that it executes one instruction per
CLK vs 1:4 with a PIC.
>> I'm not sure about European sources but in the US I can buy quantities of 1
>> from Digi-Key.
>
>I've just checked it. Digi-Key does also export to Europe.
>http://www.elfa.se in Sweden is also an alternative.
>
>> Also, I'm not sure that the Mega comes in a DIP package.
>
>Have just also checked it. Some Mega comes in a DIP package, some others
>in TQFP.
There are adapters that will let you program the SMD devices in DIP
programmers but I seem to have lost the link I had to them.
>Thank you for the links. I have now tons of material to read. I'd better
>study more in details the Atmel's microprocessors and will repport the
>final configuration to the newgroup in a couple of weeks. I have in mind
>to have a microprocessor servicing all the sensors in each room and to
>send the data via RF to the PC (I'm not interested in X10 as long as it
>is only supervision of parameters).
Again, you can use my protocol. That will allow you to communicate your data
to the BX24-AHT which can provide an interface to a PC and/or to other
devices. It will also give BX24-AHT users a way to access your devices. You
can get an idea of what it can do from reading the user manual which can be
downloaded from my web page. I had planned to make devices such as you
propose available but my health is failing fast and I don't think I will be
able to manage that.
I've detailed the X-10 RF protocol on my web page. See "X-10 RF Protocol" in
the "Links" section. My extensions fit within the same 32-bit limit but
differ in the details and do not conflict with those used by X-10. Coding
for transmission is extremely simple.
A final protocol consideration:
X-10 is already selling (buggy) all housecode transceivers in Europe and
will shortly introduce an all housecode version of the IR7243 (240V IR543
for those in the US) called the IR7243W which will receive RF as well as IR.
In Europe, the X-10 RF devices use 433.92MHz, the same as you are planning.
I think there are advantages to using a protocol that can coexist with them.
Some final thoughts on transmitters and antennas. I am using a specially
made 310MHz version of the TWS-BS transmitter in the Pronto RF conversion
(see my web page) and have also tested the Radiotronix transmitter in a
433.92MHz version. Both give adequate range with a short wire antenna -
roughly equivalent to an X-10 Palmpad. You can increase the output by
increasing Vcc but there are regulatory limits and you will be using a band
adjacent to an amateur radio band. You can always increase range (almost
without practical limit) by adding cascaded wideband preamps on the
receiving end (again, see my web page.) I think EDV will shortly be stocking
prebuilt Eggbeater antennas with a built-in 20dB gain wideband preamp.
Here's a picture of the prototype...
http://www.laser.com/dhouston/ant10.jpg
If you want, I can put you in e-mail contact with someone who is an HA
enthusiast, is an amateur radio operator, who knows the European RF
regulations (having gotten approvals for commercial products) and who is
also cognizant of things regarding X-10.
---
http://www.laser.com/dhouston/bx24-pcb.htm
With their VMLAB, you don't even need an MCU to prove your code.
Enrique Vidal Sanchez <enriqueD...@control.auc.dk> wrote:
> Again, you can use my protocol. That will allow you to communicate your data
> to the BX24-AHT which can provide an interface to a PC and/or to other
> devices.
Thanks for your generosity. I've been looking in your web page and there
are some interesting projects. I really need now to sit down and
consider what to put/not to put in the design of the "wireless sensor
nodes". I may use your protocol but instead of having a BX24-AHT I might
have one of those microprocessors from Atmel (ATMega 32).
> In Europe, the X-10 RF devices use 433.92MHz, the same as you are planning.
> I think there are advantages to using a protocol that can coexist with them.
Yes, you have a point there. It's better I make the communication X-10
compatible. I don't loose nothing in doing that.
> Some final thoughts on transmitters and antennas. I am using a specially
> made 310MHz version of the TWS-BS transmitter in the Pronto RF conversion
> (see my web page) and have also tested the Radiotronix transmitter in a
> 433.92MHz version.
I have to read your webpage when I have more time. You have interesting
material.
> I think EDV will shortly be stocking
> prebuilt Eggbeater antennas with a built-in 20dB gain wideband preamp.
> Here's a picture of the prototype...
>
> http://www.laser.com/dhouston/ant10.jpg
Wierd antenna :-)
> If you want, I can put you in e-mail contact with someone who is an HA
> enthusiast, is an amateur radio operator, who knows the European RF
> regulations (having gotten approvals for commercial products) and who is
> also cognizant of things regarding X-10.
Yes, sure. I appreciate that. I must say that the "Wireless Sensor Node"
is a hobby project in the spare time which is becoming a bigger project
than what I imagined at the beginning. It might take some weeks before I
have decided how the nodes will look like. When I get closer to the RF
communication part I may contact the radio operator you suggest.
Thank you,
regards,
Enrique
Enrique Vidal Sanchez wrote:
<rest deleted>
> A weak point is that several Basic Stamps could be sending data to the
> PC resulting in lost data. I have to investigate how to avoid this problem.
>
> Do you have any comments on the suggested idea? Or have you tried any
> thing similar?
Enrique,
I am working on something similar for my home. However each unit both
have a transmitter and receiver. The computer polls each unit at a time.
Each unit responds when asked. A very basic checksum is used to validate
the information sent. If the information is incorrect then the unit is
asked to send it again.
The important bit is, in your situation if all the transmitters are
constantly on then the receiver connected to your PC will be deaf to all
the other units but the strongest signal (possibly one most nearest to
the PC).
I use a DPDT (double pole double throw) relay to switch the antenna for
the transmitter / receiver and power supply for the transmitter only. If
the unit goes in to transmit, the relay is switched on, thus the
transmitter is powered up and the antenna is switched over to the
transmitters output. I have a delay loop to ensure that the transmitter
running at the correct frequency before sending the data, as the
transmitter does take time to warm up and can cause 'chirping'
interference upon powerup. The receiver is constantly powered up and its
antenna input is switch to ground when the unit is transmitting.
I will be shortly working on a more slient approach to switching power
and antenna using a diode switch method normal employed in modern
transceivers.
The receivers tend to wake up from a sleep mode, so send a dummy byte
first to ensure that the receiver is ready to start accepting data.
In the UK a cheap 432MHZ AM TX/RX pair can be brought for approx 10 UKP.
The FM units are a lot better, but are more expensive.
Another advantage of this method of communicating is that you could get
one unit to talk to another with or with out the PC
Greg Milligan
Hello Milligan,
I've recently changed to the idea of having a receiver/transmitter pair
in each node. However I haven't yet gone into details on how to send the
data from the wireless nodes to the PC. There are many methods but I
like particulary two:
a) The PC polls each units, as you explained.
b) Token ring topology: where the node passes the token to the next node
in the list. The advantage here is that by sending a checksum and
assuming that there is no transmission error, the PC will just listen.
There are two types of data which I want the nodes to communicate to the PC:
periodic data: temperature, humidity etc.
aperiodic data: motion sensor, smoke etc.
The periodic data would cause no problem with the "polling" or "token
ring" topologies. But what about aperiodic data? The node willing to
send data here and now will have to wait. In that case the ethernet-like
approach explained by Anand Dhuru (11/19/02) would be better, where the
node in question listens to the media and if it is free, it waits a
random period of delay and it sends the data to the PC. As far as I can
see, one of the main advantages of this method is its simplicity.
But as I said before, I have not yet goe into details on which design I
will go for.
> I use a DPDT (double pole double throw) relay to switch the antenna for
> the transmitter / receiver and power supply for the transmitter only.
Interesting. Could you please post which relay you use to switch the
antenna with? I wouldn't like to have two antennas when it can be done
with one... :-)
> In the UK a cheap 432MHZ AM TX/RX pair can be brought for approx 10 UKP.
I've been searching in the net but couldn't find any tranceiver for that
money. Which one do you refer to?
May I ask you what is the "brain" you have chosen for each wireless
node? I've ordered some AVR-ATmega32 microprocessors (less than 12$
each) which I hope will do the job without problems. The Basic Stamps
became too small as my ambitions increased...
And what are the sensors you have in each node?
Regards,
Enrique
http://www.chipcon.com/files/CC1000_Product_Notice_High_Data_Rate_1_0.pdf
There are also commercial applications that already do what you want,
including the network. Look at Z-Wave from Zensys...
http://www.zen-sys.com/technology/zwave.htm
Enrique Vidal Sanchez <enriqueD...@control.auc.dk> wrote:
dhou...@fuse.net (Dave Houston) wrote:
>G. Milligan wrote:
>> I am working on something similar for my home. However each unit both
>> have a transmitter and receiver. The computer polls each unit at a time.
>
>Hello Milligan,
>
>I've recently changed to the idea of having a receiver/transmitter pair
>in each node. However I haven't yet gone into details on how to send the
>data from the wireless nodes to the PC. There are many methods but I
>like particulary two:
>
>a) The PC polls each units, as you explained.
>b) Token ring topology: where the node passes the token to the next node
>in the list. The advantage here is that by sending a checksum and
>assuming that there is no transmission error, the PC will just listen.
>
>There are two types of data which I want the nodes to communicate to the PC:
>
>periodic data: temperature, humidity etc.
>aperiodic data: motion sensor, smoke etc.
>
>The periodic data would cause no problem with the "polling" or "token
>ring" topologies. But what about aperiodic data? The node willing to
>send data here and now will have to wait. In that case the ethernet-like
>approach explained by Anand Dhuru (11/19/02) would be better, where the
>node in question listens to the media and if it is free, it waits a
>random period of delay and it sends the data to the PC. As far as I can
>see, one of the main advantages of this method is its simplicity.
Another way is a time-divison (time-slot allocation) scheme with a period
that is short/fast enough for your intended purpose. Many satellite data
systems use this approach. What is the maximum lag time that would be
acceptable for all of your applications? 10 sec? 1 sec? 100ms? 10ms?
Note that all channels can _listen_ to all other channels all the time. There
is never collision/interference or the need to repeat if the system is
operating properly.
DMX-512 is an international standard that transmits n= 512 channels of 8-bit
data over a wired RS-485 variant at 250k baud. Each of the 512 channels is
transmitted and read at ~44 hz. So there is no need for "periodic" and
"periodic" modes as long as there are less than 512 sensors and a response
time of about 25 milliseconds is "good enough"
(Although DMX 512 allows more channels with multiple "universes". 16-bit data
is accomplished with two channels).
There is at least one commercial wireless DMX-512 version but I think it uses
a completely different rf transmission scheme (2.4ghz)
Some of the faster inexpensive commercial transmitters that can operate at
76kbaud may be more than adequate for your needs.
See www.activeknob.com (bottom of page) for some DMX-512 links.
HTH ... Marc
Marc_F_Hult <use...@xxxhydrologistxxx.com>
>
>Another way is a time-divison (time-slot allocation) scheme with a period
>that is short/fast enough for your intended purpose. Many satellite data
>systems use this approach. What is the maximum lag time that would be
>acceptable for all of your applications? 10 sec? 1 sec? 100ms? 10ms?
>
>Note that all channels can _listen_ to all other channels all the time.
There
>is never collision/interference or the need to repeat if the system is
>operating properly.
>
>DMX-512 is an international standard that transmits n= 512 channels of 8-bit
>data over a wired RS-485 variant at 250k baud. Each of the 512 channels is
>transmitted and read at ~44 hz. So there is no need for "periodic" and
>"periodic" modes as long as there are less than 512 sensors and a response
^^ should read "aperiodic" ...
>time of about 25 milliseconds is "good enough"
>
>(Although DMX 512 allows more channels with multiple "universes". 16-bit
>data is accomplished with two channels).
>
>There is at least one commercial wireless DMX-512 version but I think it
>uses a completely different rf transmission scheme (2.4ghz)
>
>Some of the faster inexpensive commercial transmitters that can operate at
>76kbaud may be more than adequate for your needs.
>
>See www.activeknob.com (bottom of page) for some DMX-512 links.
>
>HTH ... Marc
>Marc_F_Hult <use...@xxxhydrologistxxx.com>
Note corrected typo above.
See in particular Ujjal’s DMX512 website at www.dmx512-online.com
The DMX512 standards group site is www.usitt.org/DMX/DMX512.htm
Marc_F_Hult <use...@xxxhydrologistxxx.com>