Author Topic: A newbie question about Radio Communication  (Read 9922 times)

Izzy

A newbie question about Radio Communication
« on: May 27, 2007, 09:00:13 AM »
Hello everyone,

I am kinda newbie into these stuff, so please bare my stupidity.

I am currently working in a Robotic swarm project and I am assigned for Radio communication and software in this project.

I have already written the codes to send data from a Robot to the base station. The robot sends data one integer at a time.

For eg. If the Robot wants to send "352637494853034" (Which is the value from compass, Ultrasonic cencors, encoder, etc.) to the base station, it will send 3 in into the 8 pin of the pic, then 5, then 2 and so on.

So From Robot:
PIC18f4250>encoder>Transmitter> Antena

PC base station:
Antena>receiver> decoder>PIC18f4250



Now my question is how does base station knows when to read the input pin? I mean the Robot cant acess the Read() function of the base station to make the base station read the input as soon as the robot sends it. So I am confused here.


Please someone shed some light here.
Thanks in advance

Izzy

Re: A newbie question about Radio Communication
« Reply #1 on: May 27, 2007, 01:28:08 PM »
Incase a picture of breadboard helps, here it is:



The Tone God

Re: A newbie question about Radio Communication
« Reply #2 on: May 27, 2007, 02:51:22 PM »
This could be an issue with the transmission protocol you are using. Which one are you using ?

Andrew

Izzy

Re: A newbie question about Radio Communication
« Reply #3 on: May 27, 2007, 03:01:00 PM »
Thanks for your reply, Sir.

The way I connected is,

For Receiving:
From the receiver the data out goes to CIP8D Decoder chip, serially . From the decoder there is 8 pins (D0-D7) connected parallelly to 8 pins (C0-C7) of PIC184520 microcontroller.

For Transmitting:
From the PIC18f4520, the pins (D0-D7) are connected to CIP8E Encoder chip (D0-D7), parallely . Then from the Encoder the data out is connected to the transmitter serially.

I dont know if this is what you are looking for. Ignore my stupidity. 


Datasheet of the PIC 18f4520
http://ww1.microchip.com/downloads/en/DeviceDoc/39631B.pdf


Data sheet of the Decoder and Encoder:
http://www.rentron.com/Files/CIP-8.pdf

Datasheet for Transmitter:
http://www.linxtechnologies.com/Documents/TXM-xxx-LR_Data_Guide.pdf


Datasheet for Receiver:
http://www.linxtechnologies.com/Documents/RXM-xxx-LR_Data_Guide.pdf

Chuck

Re: A newbie question about Radio Communication
« Reply #4 on: May 27, 2007, 03:39:59 PM »
Sure are good looking breadboards.
I've never seen anything so neat before.

You are going to need to either use an interrupt to let the code know to read the pins (when the state changes) or loop through a routine when you aren't doing aything else reading the pins.  The loop routine will probably be easier for you, but you need to be sure to keep up with other tasks AND keep your non looping routings quick so you don't miss any reads.

You'll probably want to slow down the transmission rate, so that the receiver has time to carry out any required tasks in between reading the pins.  You'll also want to clear the state of the pins after reading so you know when there is something new to read.

Don't let me scare you away from the interrupts.  That would probably be a better way to do it.  But you'll probably need to write the assembler routines yourself.

What compiler/library are you using?
Where'd you get that design?
« Last Edit: May 27, 2007, 03:45:54 PM by Chuck »

Izzy

Re: A newbie question about Radio Communication
« Reply #5 on: May 27, 2007, 05:20:04 PM »
Thanks for you reply, Sir.

we are currently using the student version of this compiler:
http://www.ccsinfo.com/content.php?page=compilers

I really want to use interupts but how would I use it? I am kind of confused as I am really new in microcontrollers.  :-\

Here is the PIC we are using:




I am using pins D0-D7 and C0-C7 for data transfer between encoder and decoder. I cant use B0-B7 because I need B3, B6,B7 for debugging. SO how would I use Interrupts?

Chuck

Re: A newbie question about Radio Communication
« Reply #6 on: May 27, 2007, 06:23:21 PM »
You should try the read loop first.
Just check the inputs every few milliseconds to see if there is anything there.

Izzy

Re: A newbie question about Radio Communication
« Reply #7 on: May 27, 2007, 06:32:27 PM »
If you dont mind can you write a small sample code.
I want to know how to activate the PIC and let it know to start reading the pins. :-\.

Izzy

Re: A newbie question about Radio Communication
« Reply #8 on: June 03, 2007, 08:59:13 AM »
Any RF engineers here?

I have some serious probelem with range. I am only getting 50-100', when datasheet mentions 3000' ??

Chuck

Re: A newbie question about Radio Communication
« Reply #9 on: June 03, 2007, 03:01:35 PM »
Prolly not giving it enough current.

Transmitter is 5.1ma.
Receiver is 5.2ma
PIC needs about 12++ ma.

Thats a7 least 23 ma.
Plus whatever else you got on there, decoders, encoders....

Are you trying to run it off a battery?

Izzy

Re: A newbie question about Radio Communication
« Reply #10 on: June 03, 2007, 03:17:19 PM »
Thanks for your reply, Sir.
I have tried it with both adapter and battery and I dont see much change.


Chuck

Re: A newbie question about Radio Communication
« Reply #11 on: June 03, 2007, 05:17:43 PM »
What abot an antenna?
What are you using for that?


johngreene

Re: A newbie question about Radio Communication
« Reply #13 on: June 14, 2007, 06:22:39 PM »
The coax for your antenna needs to attach to the transmit and receiver modules as close to the output/input pins as possible. You cannot route the RF through the protoboard, it needs to be a 50 ohm line.

--john
I started out with nothing... I still have most of it.

RaceDriver205

Re: A newbie question about Radio Communication
« Reply #14 on: July 22, 2007, 03:25:44 AM »
Quote
Datasheet for Transmitter:
http://www.linxtechnologies.com/Documents/TXM-xxx-LR_Data_Guide.pdf


Datasheet for Receiver:
http://www.linxtechnologies.com/Documents/RXM-xxx-LR_Data_Guide.pdf
Where did you get this parts from? They look really good!

Izzy

Re: A newbie question about Radio Communication
« Reply #15 on: July 22, 2007, 09:29:53 AM »
I got those RF modules from here.
http://www.rentron.com/PicBasic/RemoteControl.htm

They are only good for short range application. I really had hard time getting good range ou of it. And their customer service is really really bad.

So we moved to Maxstream Xtend 900Mhz RF modules. They are kind of expensive, around $180 a peice (Transceiver). But gives pretty good range. In the data sheet it is mentioned that  it can give about 40  miles with yagi antenna. Tt has many features too. And customer service is great .

RaceDriver205

Re: A newbie question about Radio Communication
« Reply #16 on: July 22, 2007, 08:17:04 PM »
Quote
They are kind of expensive, around $180 a peice (Transceiver). But gives pretty good range. In the data sheet it is mentioned that  it can give about 40  miles with yagi antenna.
40miles! :icon_eek:
What are you making with these things anyway?

Izzy

Re: A newbie question about Radio Communication
« Reply #17 on: July 22, 2007, 09:09:36 PM »
Actually I am working in a project. We are building a swarm of 10 Robots that will be sent inside a building (Where human cant go) and send the information to the base station to map the building.  And I am doing communication stuff.
I dont need 40 miles of range so I didnt get yagi antenna, instead I got Dipole antenna. We havent done much of range testing but inside a concrete building we were able to get about 300 ft. Which is good enough compared to Linx which only gave about 50 feet.  :-\

Checkout Maxstream.net , these modules have 100 times more features than Linx. But dont forget the price too! ;D

johngreene

Re: A newbie question about Radio Communication
« Reply #18 on: July 22, 2007, 09:24:06 PM »
Actually I am working in a project. We are building a swarm of 10 Robots that will be sent inside a building (Where human cant go) and send the information to the base station to map the building.  And I am doing communication stuff.
I dont need 40 miles of range so I didnt get yagi antenna, instead I got Dipole antenna. We havent done much of range testing but inside a concrete building we were able to get about 300 ft. Which is good enough compared to Linx which only gave about 50 feet.  :-\

Checkout Maxstream.net , these modules have 100 times more features than Linx. But dont forget the price too! ;D

At 900 MHz you are allowed to transmit up to 1 Watt if it is spread spectrum. If you use the yagi antenna I think you are limited to 250 mW. I designed a spread-spectrum radio link at 2.4 GHz (years ago) that could get 50 miles range with 250 mW transmit power. Probably could have gone further but the protocol limited it to 50 miles (delay).

I'm working on a remote control project (full duplex) now that uses 900 MHz radios, I designed my own around the Semtec XM1205 device. They seem to work pretty well. They have the ability to fine tune the local oscillators enabling you to narrow the IF bandwidth to less than 10kHz. That helps a lot with the receive sensitivity. I'm getting around 350-400 ft with 1mW of transmit power and a printed antenna.

I've done several 433MHz remotes for the iPod as well. The latest one should be showing up in Best Buy pretty soon. It's a combination 433 MHz remote control and FM transmitter.

--john
I started out with nothing... I still have most of it.

Izzy

Re: A newbie question about Radio Communication
« Reply #19 on: July 23, 2007, 08:55:25 AM »


At 900 MHz you are allowed to transmit up to 1 Watt if it is spread spectrum. If you use the yagi antenna I think you are limited to 250 mW. I designed a spread-spectrum radio link at 2.4 GHz (years ago) that could get 50 miles range with 250 mW transmit power. Probably could have gone further but the protocol limited it to 50 miles (delay).


That is really cool! I didnt know you were an RF Module designer.
So what is the range inside a building?

And is there any way to increase the range inside the building, in my case?