CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

wifi

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
nina



Joined: 20 Apr 2007
Posts: 111

View user's profile Send private message Send e-mail

wifi
PostPosted: Mon May 31, 2010 3:28 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Jun 01, 2010 5:48 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Tue Jun 01, 2010 9:22 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Jun 01, 2010 4:21 pm     Reply with quote

We can help you make a decision if you provide more info on the questions I mentioned.
nina



Joined: 20 Apr 2007
Posts: 111

View user's profile Send private message Send e-mail

answers
PostPosted: Tue Jun 01, 2010 4:28 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Jun 01, 2010 5:41 pm     Reply with quote

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

View user's profile Send private message Send e-mail

rf
PostPosted: Wed Jun 02, 2010 8:23 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Jun 02, 2010 11:47 am     Reply with quote

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

View user's profile Send private message Send e-mail

rf
PostPosted: Wed Jun 02, 2010 2:14 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Jun 03, 2010 4:23 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group