View previous topic :: View next topic |
Author |
Message |
nina
Joined: 20 Apr 2007 Posts: 111
|
wifi |
Posted: Mon May 31, 2010 3:28 pm |
|
|
I am looking for the way to collect data from temperature sensor and send to computer and have kind of datalog.
I know I need use RF modules, PIC, max232.
I would like to know what is the best way to do wifi interface?
Are telecontrolle modules are good to do this? Where can I find protocol for transfer data?
Do I need use encoder/decoder to do this?
Thank you very much
Nina |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Tue Jun 01, 2010 5:48 am |
|
|
There is no 'best way'. It all depends on how you want to use the system.
- What is the distance you have to send the data?
- Network topology? Single master or multi master?
- How many slave/master units?
- How much data do you have to send per second/minute/hour?
- Which parts of the world is your system go to be deployed?
- Are your devices battery operated? What capacity?
- Do you have the budget to buy a ready made module?
- Size/weight constraints?
- How many units are you thinking to build?
- etc.
Quote: | Are telecontrolle modules are good to do this? | I have no clue what you are talking about. Is this a ready available product? If yes, provide a link to a product description.
Quote: | Where can I find protocol for transfer data? | Ehhh... Google?
For just sending a small amount of sensor data you can cook your own protocol. As a starting point study the X-modem protocol. Then as your project grows extend it with a source/destination address field, collision detection, etc. |
|
|
nina
Joined: 20 Apr 2007 Posts: 111
|
|
Posted: Tue Jun 01, 2010 9:22 am |
|
|
ckielstra wrote: | There is no 'best way'. It all depends on how you want to use the system.
- What is the distance you have to send the data? Around 100 meters
- Network topology? Single master or multi master? Radial and single mastar
- How many slave/master units? one master and 01 slave
- How much data do you have to send per second/minute/hour? Just readings from sensors. Maybe each 5 minutes
- Which parts of the world is your system go to be deployed? In my home
- Are your devices battery operated? What capacity? No battery.
- Do you have the budget to buy a ready made module? Not too much.
- Size/weight constraints?
- How many units are you thinking to build? Just one...to myself...
- etc.
Quote: | Are telecontrolle modules are good to do this? | I have no clue what you are talking about. Is this a ready available product? If yes, provide a link to a product description.
http://robokits.co.in/shop/index.php?main_page=product_info&products_id=75
Quote: | Where can I find protocol for transfer data? | Ehhh... Google?
For just sending a small amount of sensor data you can cook your own protocol. As a starting point study the X-modem protocol. Then as your project grows extend it with a source/destination address field, collision detection, etc. |
Thank you very much for you answer.
nina |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Tue Jun 01, 2010 4:21 pm |
|
|
We can help you make a decision if you provide more info on the questions I mentioned. |
|
|
nina
Joined: 20 Apr 2007 Posts: 111
|
answers |
Posted: Tue Jun 01, 2010 4:28 pm |
|
|
There is no 'best way'. It all depends on how you want to use the system.
- What is the distance you have to send the data? Around 100 meters
- Network topology? Single master or multi master? Radial and single mastar
- How many slave/master units? one master and 01 slave
- How much data do you have to send per second/minute/hour? Just readings from sensors. Maybe each 5 minutes
- Which parts of the world is your system go to be deployed? In my home
- Are your devices battery operated? What capacity? No battery.
- Do you have the budget to buy a ready made module? Not too much.
- Size/weight constraints?
- How many units are you thinking to build? Just one...to myself...
- etc. |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Tue Jun 01, 2010 5:41 pm |
|
|
What comes to mind are the 433MHz modules. These are 'dumb' but cheap, easy to use and cover the 100m distance requirement.
Disadvantage of these modules is that only one transmitter will work within the same location, but for you this seems no problem.
802.11.4 based electronics like Zigbee, etc., are nice but more difficult to configure and have troubles with the 100m requirement.
One-way communication is cheapest as you don't have to buy two transceivers but can do with a transmitter at the sensor location and a receiver at the PIC side.
Sparkfun has a cheap module for around $4. Read the description on their site about how they hook up these modules directly to a PIC's UART. Sounds good: http://www.sparkfun.com/commerce/product_info.php?products_id=8946
Expect communication errors, so add good error handling to your protocol (easiest is to send the same data several times). |
|
|
nina
Joined: 20 Apr 2007 Posts: 111
|
rf |
Posted: Wed Jun 02, 2010 8:23 am |
|
|
ckielstra
I have heard zigbee has already the own protocol and don`t need to be developed that`s why would be interesting use them but disadvantage, it is not very cheap.
My big concern use this sparkfun modules is about protocol.
Could you tell me what do I need study to learn how develop the protocol?
Is it necessary use decoder/encoder with these modules?
Thank you very much
Nina |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Wed Jun 02, 2010 11:47 am |
|
|
I'm no expert at WiFi, but here a few remarks:
- The higher the frequency the more difficult it becomes to transmit data when there is no direct Line Of Sight. At 2.4 GHz, everything becomes an obstacle and a reflector. That's why for you 100m target I would prefer a lower frequency like the 433MHz band.
Most Zigbee modules are operating in the 2.4GHz band, lots of reflections. And yes, because of license costs these modules are more expensive.
I did a bit more reading on the 433MHz modules and there are two basic modulation types:
- Amplitude Shift Keying (ASK), is the simplest but also most susceptible to receive errors.
- Frequency Shift Keying (FSK), slightly more difficult electronics (but who cares if you buy a module?) and much better receive quality.
From the comments on the Sparkfun site it is not recommended to buy the RFM12B-S2 Wireless Transceiver ($6.95) because it is difficult to configure. The RFM22-S2 is easier to configure ($10.95). Don't forget to buy the aerial too with these modules.
Quote: | Is it necessary use decoder/encoder with these modules? | I'm not sure what kind of encoder/decoder you mean, but no. Most of these modules have a serial port in and and out. You directly connect the PIC UART bus to this. The RFM22-S2 uses the SPI bus and needs a bit of configuration before transmitting.
Quote: | Could you tell me what do I need study to learn how develop the protocol? | for a simple point-to-point connection I can recommend you to read up on the X-modem protocol. This is a very basic protocol but has all important features like checksum and retransmission. |
|
|
nina
Joined: 20 Apr 2007 Posts: 111
|
rf |
Posted: Wed Jun 02, 2010 2:14 pm |
|
|
ckielstra
Thank you for all information.
I have read something about manchester, preamble. Do you know what is it?
Are they different way to transmit and receive data?
Thank you again
Nina |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Thu Jun 03, 2010 4:23 am |
|
|
Manchester Encoding and preamble are transmission related techniques (layer 2 and 3 in the OSI model).
Read more on the OSI-model: http://en.wikipedia.org/wiki/OSI_model
I'd say in your situation you will get a much quicker result if you don't use the $5 modules, but use the $10 or higher versions as these are more intelligent and will handle the lower protocol layers for you. This reduces the effort to the same level as connecting two programs running on the same computer (the hardware related transmission is hidden for you).
You'd still have to design your own protocol for communication between your two applications, but this is at a higher level. A good starting point is the X-modem protocol I already mentioned. |
|
|
|