A newbie question about Radio Communication

Started by Izzy, May 27, 2007, 09:00:13 AM

Previous topic - Next topic

Izzy

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

Incase a picture of breadboard helps, here it is:



The Tone God

This could be an issue with the transmission protocol you are using. Which one are you using ?

Andrew

Izzy

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

#4
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?

Izzy

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

You should try the read loop first.
Just check the inputs every few milliseconds to see if there is anything there.

Izzy

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

Any RF engineers here?

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

Chuck

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

Thanks for your reply, Sir.
I have tried it with both adapter and battery and I dont see much change.


Chuck

What abot an antenna?
What are you using for that?


johngreene

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


Izzy

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

QuoteThey 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

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

Quote from: Izzy 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

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

Quote from: johngreene on July 22, 2007, 09:24:06 PM


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?