2 picaxe 08m radio comunication

alexthefox

Senior Member
good morning,
im looking to have comunication between 2 picaxe 08M or 14M, via radio comunication.
i know there are some problem to syncronize the comunication, so have somebody experience with radio comunication?
i want to send some command (3-4) to do at the reciver
example:
code 1= led 1 on
code 2= led 1 off
code 3= led 2 on
code 4= led 2 off
code 5= led 3 on
code 6= led 3 off

this two are the link of tx and rx module, but are standard 433Mhz tx-rx.

http://www.aurelwireless.com/wireless/moduli-wireless/manuali/650200689_mu.pdf
http://www.aurelwireless.com/wireless/moduli-wireless/manuali/650200473_mu.pdf


thk again
 

steliosm

Senior Member
Pay attention to the 'UUUUU' that you need to send, in order to wake-up your transmitter and also make sure you are using a "qualifier" string, as you will see in the examples while searching the forum.
 

eclectic

Moderator
Please look again.

To Alex.

1. Did you look at the 2 links?

2. Search for

"radio" and "communication"

"433*" and "serout"

"433*"


It is very easy with a Picaxe.

e.
 
Last edited:

manuka

Senior Member
Alex: It indeed couldn't be simpler- these darlings are made for each other! There are a large number of cheap 433.92MHz units around, & they vary considerably in both output power & receiver sensitivity (see => http://www.picaxe.orcon.net.nz/433rxtx.jpg). PRICES also vary greatly- I find a US$3 offering here in NZ OK for simple stuff, but the so called "Jaycar" units are the best for more demanding links. Experiment- most are swappable & a breadboard allows design tweaking. You can readily extend ranges with DIY antenna => http://picaxe.orcon.net.nz/yagi433.jpg

NB- this license free band is full of other ISM "rubbish" & dropped data may be an issue. Hippy has waved his magic wand over CRC issues however- check his link above. Stan
 

Attachments

Last edited:

manuka

Senior Member
I've been using all manner of 433 ISM offerings for ~5 years & yet to have one die. Of course normal ESD precautions are observed (grounded fingers,foil storage & simple static mat etc). In fact the last hi tech devices I recall going belly up were some (costly) Basic Stamps back about 1997. YMMV however, as NZ has fairly moist air year round (especially with our current heat wave- it's 33°C presently here at my non AC loft workbench, with sweat drips on my paper work!) Stan
 
Last edited:

alexthefox

Senior Member
To Alex.

1. Did you look at the 2 links?

2. Search for

"radio" and "communication"

"433*" and "serout"

"433*"


It is very easy with a Picaxe.

e.
1-yes i looked the second link and i try to simulate the program but it come in error. (tx and rx program).
2- no i try to find picaxe communication... and not radio... or 433...
thk.
 

Denzel

Senior Member
....

this link provided in the second post:
http://www.picaxe.orcon.net.nz/all3.jpg

works beautifully however I am having trouble with communicating via rf using an 18x and 08m. I am using the same common 433 modules.

The supplied code uses the baude mode n300 which is not available on the 18x

serin 1,n300,("ABC"), b1

I am having trouble getting my communication to work.
can someone give me a baude rate that will suite both (n2400??) or some example recieving code and transmitting code from an 08m to 18x

thanks.

This is an excellent thread I have learnt alot :)
 

manuka

Senior Member
300bps just followed the usual wireless data maxim of (in general) "the slower the better". Of course I should look it up, but what's the slowest 18X serial speed? How about UNDERCLOCKING both the tx & rx PICAXEs instead? Maybe even use a cheap pair of 08s for the serial donkey work?
 

alexthefox

Senior Member
i was test tx-rx and it work fine, but now i have a little question. this is part of my code:

serin 4,n300,("abc"),b10
if b10=1 then goto bip
if b10=2 then goto attesa

let b5=0
if pin1=1 then
pause 200
let b6=b6+1
endif
if b6=>2 then
ecc..

at the moment the program stop and listen about serin. but if i dont send nothing the program will wait. i want to have something like "timeout", after this time the program jump serin, and follow other istruction of the program.
how can i do that?
 
Last edited:

hippy

Ex-Staff (retired)
Not easily unless using an X1 PICAXE. The best option is a separate PICAXE which reads from the RF reveceiver and lets the master PICAXE know when data has been received. That way the master can do whatever it wants until data becomes available.

Using SETINT looks attractive but what likely happens is some noise gives the false impression that data is about to arrive, interrupt occurs and you end up waiting then for data which is not forthcoming. You could use some sort of watchdog to physically reset the PICAXE or fake the data the receiver expects to see.
 

Dippy

Moderator
I'll go along with the old hipster on this, but I have two general comments-
1. Stan's "the slower the better". Some Rx modules have quite fussy AGC and Data Slicing, so the slower the better doesn't always apply. Depends on module. Read up.
2. Some (better) Rx modules have an RSSI or status pin. This could be used to sense genuine incoming RF.

I don't know what modules you are using, but sometimes it is better to spend that extra quid to make life easier downstream.
 

alexthefox

Senior Member
I'll go along with the old hipster on this, but I have two general comments-
1. Stan's "the slower the better". Some Rx modules have quite fussy AGC and Data Slicing, so the slower the better doesn't always apply. Depends on module. Read up.
2. Some (better) Rx modules have an RSSI or status pin. This could be used to sense genuine incoming RF.

I don't know what modules you are using, but sometimes it is better to spend that extra quid to make life easier downstream.
i use the RF module linked on 1st post.
i think that dont have RSSI...
so there are no way with 08M or 14M... i cant use bigger PICAXE like 28X for space (i have only 30X60 mm of board).
 

premelec

Senior Member
Surface mount 08Ms take up very little board space... if need be with external hard SERIN reset strategy you can store some numbers with poking and peeking in your program if that is necessary...
 

alexthefox

Senior Member
Surface mount 08Ms take up very little board space... if need be with external hard SERIN reset strategy you can store some numbers with poking and peeking in your program if that is necessary...
i dont understand what you want explayn me... sorry, i can use 2 08m.... 1 for rf and one master. but how to connect 2 pixaxe? in serial? that is true?
so when i get signal from RF i send the code i recive, like b10=1...b10=2 ecc... if i dont recive nothing from rf, i send a empty code like b10=0... that is true?
 

alexthefox

Senior Member
about my last post, i think that is not correct. if i dont recive data from rf, i cant send data to master picaxe, because in tha same way master at the moment wait for serin data, if i connect second picaxe, and connect to master, master wait for serin from slave, but slave wait for RF. im little confused...
RF---slave--->master.

no data from RF, slave wait.... but if slave dont send data to master, master wait too...
 

hippy

Ex-Staff (retired)
In the two PICAXE solution you use extra control lines between the two so the first tells the second there is data, the second says, okay send it and is ready and waiting when it does. Until the line indicating there is data there's no attempt made to read any data.

A bit like not opening the front door to see who's there until someone starts pressing the door bell.
 

alexthefox

Senior Member
maybe i move to 28X1... i just buy a 28X1 surface monting... write you when recive it fon help... thk for the moment
 

manuka

Senior Member
alexthefox: Suggest you try that 2 x 08M master/slave approach first, perhaps following a breadboarded layout as shown below. Although devised for IR datacomms this modifies easily for 433 MHz. More details (& code)=> www.picaxe.orcon.net.nz (under April 2007 SiChip article)
 

Attachments

alexthefox

Senior Member
i try to do with 2 picaxe 08, but it not work.
this is the 3 code:
----------------------------------------------------
tx
----------------------------------------------------

main:
if pin3=1 then
let b1=1
goto tx
endif
if pin4=1 then
let b1=2
goto tx
endif
goto main
tx:
serout 2,n300,(85,85,85,85,"abc",b1)
wait 2
let b1=0
goto main

------------------------------------------------------------
reciver and send to picaxe 08m master
------------------------------------------------------------
irsense:
serin 3,n300,("abc"),b10
high 4: pause 500
serout 4,t2400,(b10)
pause 500
serout 4,t2400,(0)
low 4
goto irsense

-------------------------------------------------------------
08 master
-------------------------------------------------------------
if pin4=1 then
serin 3,t2400,b10
if b10=1 then goto bip
if b10=2 then goto attesa
endif


what do you think?


P.S.
pin 4 of reciver and pin 3 of master are connect with wire
 

moxhamj

New Member
Any reason why the irsense to 08 master is a different baud rate, different parity and has no ABC header? At the very least, maybe put a different header eg DEF in that code.

Also, you have 3 chips, which part isn't working?

And if radio won't work, take out the radio chips for the moment and test whether it works with wires. You might need a few led flashes or debugs to test each code got to each point.
 

alexthefox

Senior Member
i did quick test.
08m master don't work
i can see pin 4 high for a moment.
it looklike wait for serial input. he dont recive nothing it can do, and waiting for right code (this is what i think).
i can try to change "abc" with other letter, but in the biggining, without a RF recive it work fine.
maybe something in the 2° code?
radio tx-rx work, because if you see my post (about 2 week ago in this thrend) there is a code,it work but reciver wait every time for serin...
 

alexthefox

Senior Member
i try to change baud rate, and way to send and recive data. but it not work yet. maybe i change with picaxe 28x1 and using timeout function...
 

alexthefox

Senior Member
i tried again to do test with 2 08M, but not result. why it not work? if somebody test with infrared and it work, with RF it is the same. or not?
 

manuka

Senior Member
Alex: 433MHz versus IR data -although both use serial feed these are totally different approaches, needing different hardware.I'm getting confused about your actual needs! Can you please clarify & perhaps upload simple schematics of your setup- even a clear digital photo may do.

You DO now realise that 08Ms have no SERIN time out ? Have you tried the 2 x 08M approach I mentioned? Jeremy Leach's elegant approach from late 2006 used just a single receiving 08M and an interupt. Here's what he effectively said then-

Basically you just raise the line high briefly before sending, and the receiving PICAXE loops to detect this line high before plunging into the Serin command. If the sending device sets the line low by default, and goes high just before (e.g 1 ms) it sends data, then this can work very effectively. Thus instead of running the Serin command, check the input for 'line high' status in a "timeout loop". N.B. Because the line is high before the send you need to use the "T" option in the Serout/Serin commands - thus T2400 rather than the normal N2400 etc
Jeremy- are you out there to comment/update this ?

Perhaps also check Hippy's very lucid insights => http://www.hippy.freeserve.co.uk/picaxesi.htm & an approach shown => http://www.users.on.net/~alw1746/electronics/serin/SerialInterrupt.htm Stan
 
Last edited:

alexthefox

Senior Member
i will to post a schematic. i tryed to do what you suggest with 2 picaxe, and i used T protocol like he sayd.
i whand to redraw the schematic, because now it is an adjustment over other project. i will do a clear project, try from the bigining, and i will do news, and ofcouse it will work i post schematic and code. so maybe other peaple can find solution if they comming in this problem. i say again thk for your help
 

alexthefox

Senior Member
problem solved!!!!

after lot of test, i can say the project is finish. i solve the problem. everythink comming from the syncro from the RF RX and the TX to 08 master. the project of IR RX-MASTER work fine.
thank to everybody
 
Last edited:
Top