Let's Make Robots!

How to be very happy when communicating serial wireless low tech

Updated with Bonus tip! You can "easily" hook up some cheap UHF / FM whatever units to make 2 MCU's talk wireless by serial. But you need to learn some stuff, this is what I learned :)

Since I discovered this:

http://letsmakerobots.com/node/5916 

all has changed! I was blind, but now I can see. And I can program!

On Picaxe, in order to send with these modules, use this code:

testsender:
for b0 = 0 to 255
high 3 pause 3 low 3 pause 1 serout 3,N2400, (85, 85, b0)
pause 200
next b0
goto testsender

and to recieve, use this code:

testreciever:
serin 7, N2400, (85,85), b0
sound 0, (b0,10) low 0
goto testreciever

- Of course adapted to your own setup etc.

The important parts here are:

high 3 pause  3 low 3 pause 1 serout 3,N2400, (85,85...

and

serin 7, N2400, (85,85...

Because with that combination all together, the reciever is left most happy in all states, and the result is 100% rock steady. Like in not a single bit lost in a thousand!

***

Bonus tip:

A) Hook up a speaker to your MCU

B) Send sound to it in a loop

C) Take off the speaker, and hook up the sender

D) Power up the reciever, and on the out-pin, hook up the speaker (and other wire to ground on the reciever)

Now do you hear sound from the reciever, punk? If not, you can rest assured that your recieving MCU will not get any signal either :)

Yes, you can start your own little radio station with these ;)

***

(Note that this post has changed, some of the comments below may be from earlier)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Hello,

As for your sujested code for:

How to be very happy when communicating serial wireless low tech

Do you have also an Assember code for PIC Micro such as 16F870, that works in a robust way using these pair of RX/TX modules?

Thanks,

Gid 

 

No, I am sorry.

However, the BASIC examples above should be close to plain English, so you should be able to copy the functionality :)

Thanks.
Hello, I was manage to get it work. I’m using the pair RF link for transferring data to/from PIC microcontroller, and in the beginning I had some problem to get this pair of TX/RX to sends the data, I got on the RX unit noise all time. But once I have added the preamble (0XAA) before the data I started to get the RF link works properly. So my understanding is that if the RX RF unit do not SYNC properly its input gain rise and as a result we see periodic noise on its output, once the SYNC signal (0XAA) is received the RX unit Sync on it and we start to see on its output the data that was transmitted. Also my RX unit supposes to operate up to 4800 baud rate, but I have notice that with 300 baud rate I’m getting the most accurate data (without using Data Integrity), and it seems to work well up to 10m in hose between walls. Gid.

with this modules some kind of redundant algorithm must be emplyed have a look at this:

http://www.open.com.au/mikem/arduino/VirtualWire.pdf

 

 

 

I use these modules for my robots also. It is very cheap to get from China. ($2 for a pair).  But there are easily interrupted (by TV, motors ...).

May be you are interested to check on this RF5050 protocol. With a 2 byte encoding method, I can send any data effectively.

http://www.seattlerobotics.org/encoder/200304/donc/TwoWayRF.htm

 

so what does your testsender code actialy do?

Did you read the "Forget everything written originally in this posting"-part in the top?

(This posting is void)

yes, and the picaxe manuel.  
I am sorry, I just do not know what to write to you. Anyone out there who can help me here?