Anyone interested in the RFM12 Transceiver Module ?
Marcello
Posts: 29
The RFM12 is sold in Europe for approx. 3,80 Euro (find the datasheet at HOPERF).
Frequency 312, 433, 868 (FM)
A lot of options (too many), 16 Bit FIFO, Baudrate until·115.2 kB/s,·programmable channels·and so on ...
They are really nice and powerful. Some guys have even programmend some kind of comm stack on them (with Atmel uCs).
Anybody interested in a first and small test·spin ?
Frequency 312, 433, 868 (FM)
A lot of options (too many), 16 Bit FIFO, Baudrate until·115.2 kB/s,·programmable channels·and so on ...
They are really nice and powerful. Some guys have even programmend some kind of comm stack on them (with Atmel uCs).
Anybody interested in a first and small test·spin ?
Comments
I have attached the datasheet for anyone interested.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Does that byte of memory hold "A", 65, $41 or %01000001 ?
Yes it does...
Can't it even do more than 115.2kB/s, if you attach a better antenna? Thought I read that somwhere.
PS: Found it in Beans pdf ... 256kbps with external RC filter
PPS: Maybe also worth mentioning... these modules are available as transceivers, but also as pure receivers or transmitters.
Where do you get the transceivers for 3,80€? I paid 5€something. The receiver/transmitter is cheaper.
Post Edited (MagIO2) : 11/13/2009 5:09:05 PM GMT
a nice little module and the price is right.
Russ
The Prices are allways a bet ... now looks like:
Price······· pieces
4.390 EUR· 1·
4.250 EUR· 3·
3.900 EUR· 10
Writing a software driver is not the problem. Understandig how the modules work is the "challenge".
The maximal baud rate hangs on how fast can you talk on the SPI channel.·The·module supports something between 2,5-5 Mhz.
How fast is the obex assembler SPI object ?
At the time i use a simple spin SPI driver so i transmit at ~ 8 Kbs
Ciao
Marcello
I will try to post ist later ...
Ciao
So now: i have written a small spin test program for the RFM12.
- IT WORKS ! (but it took me one month trys)
- It is only a test program and not a good·formed object ...
If somebody is interested please·contact me (via post for instance)·
the code is really not the best example of programming practice !
I get the SW from the cellar (lab)·and i post it as soon as possible.
@MagIO2: i just play with the propeller and use it for Art Installations.
Tschüss to all
Marcello
·
The programming documentation for setting the baud rate is not very clear and I noticed the demo board only went to sub 18K baud.
The code contains a good RFM12 configuration (this is the first requirement for having success with those transceivers !) and some tricks·without whom you will hardly have a RFM12 working.
The transmitter sends a very short "datagram" (16,1) and the receiver lights up a LED as soon as he recognizes the datagram.
I would be really interested in deploying the Assembler spin object for talking with the RF module instead of the spin one.
Has any of you time to do this ?
Have fun
Marcello
PS: i uploaded an improved/corrected software version ...
Post Edited (Marcello) : 11/24/2009 9:01:58 PM GMT
- porting of the RFM12 SPI procedures to the assembler version
- writing of a complete RFM12 object with some setup methods like
--- Init()
--- SetChannel(),
--- SetBaudRate(),
--- SetTransmitPower(RFPowerLevel, FreqDeviation)
--- SetReceiveSensitivity(Gain, Threshold)
--- Setxxxxxxx·········· (further tx / rx parameters)
--- Transmission(On/Off)
--- Reception(On/Off)··· FIFO
--- Transmit(Char) OR/AND Transmit(Char[noparse]/noparse)
--- Receive(char[noparse]/noparse, PacketSize)·· maybe with CRC Check and returning true/false for success
Anybody interested in writing some clean code ?
I tryed Beau's SPI Obex Object.
SHIFTOUT can be easily modified to work, but i need to read the SDO signal while writing a special value into the SDI line.
Some kind of SHIFTSOUT together with SHIFTIN.
This task, expecially with assembler written by Beau, is too complicated for me.
Can anyone help me ?
This routine takes a 16 bit word you want to send to the unit in outreg, and returns a 16 bit word read from the unit afterwards.
I wrote a unit using these devices but I was using the raw FSK output/input using a modified biphase manchester code rather than the inbuilt shift registers. I managed to get from one end of the house to the other at about 2400 baud, and across the room (mostly) at 115200, but I never got it to be very reliable.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.
I will try to embed your code into Beau's.
(well maybe i do not even need to do it)
You helped me a lot, but i think i must still struggle a bit to get it going.
Can you maybe explain me how it works ?
How do i pass and read the 16 bit Value and how do i set the Pins ?
Operating the RFM12 the standard way i had more or less 8000 baud reliably 200 meters from hause away to the house cellar !
I send very short packages and had allmost no errors ...
Ciao & grazie
Marcello
·
I have struggled with these modules and an ATmega32 a few weeks ago.
Got them working now, but the programming guide for the RFM12 seems to be wrong.
A friend of mine created this pdf file with a working C code example.
Hope this will help.
Kind regards,
RobotFreak
I Had your code working, but some issues are still in progress ...
Tanx again.
@mikediv: www.octamex.de
@Robot Freak: i did it with the RFM12 collecting infos from many, many sources. The FRM12 Chip datasheet is relative good.
I'm using a bit of wire cut to 1/4 wave on both boards at ~433 Mhz.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life may be "too short", but it's the longest thing we ever do.
- circa 3000-4000 b/s (now i reach mor throughput, but the test was done with slow baud rate)
- Packet more or less·6 bytes long
- distance: from cellar (1/2 underground) over the garden to the next house. That means thurough 11 Metres house and 30 Metres garden.
···························· 30MT garden··················· (TX)
10 Mt
|
(RX)················· |
························ |
cellar················· |
|
I was impressed !
I used the 433 Mhz version and I think that the 800 Mhz would bring more performance.
Ciao
Are the configuration constants the same as you posted in your test code zip above?
Do you get worse results if you make the packets longer?
What kind of antennas are you using?
I found a bug in my assembler code to talk to the SPI on the chips. The received data is not clocked in correctly. The write code works ok though.
I get quite reasonable results if I don't use the FIFO and just use the FSK pin, but I don't seem to be able to get anywhere near the results you are seeing while using the FIFO.
One thing I did find, is playing with the crystal load capacitor value can increase the range considerably.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life may be "too short", but it's the longest thing we ever do.
I did not play with packet size, but I do not think it makes a big difference.
just a piece of wire as antenna.
I only used FIFO without problems.
Playing with cristal load capa can increase the performances because of better tuning between the Tx & RX, I think.
Ciao
Marcello
How long is your antenna? If it's two long or two short it can affect performance dramatically. At 916 MHz, a wire or PC trace that is 2.25 inches (57 mm) long will provide a reasonable impedance.( as per the referred doc)
For more info on antenna design for this module have a look at this:
www.hoperf.com/upfile/ANTENNAS_MODULE.pdf
If it has automatic independence matching, the matching circuit will only compensate with a certain range for a given length of antenna wire.
What has me stumped is using my own modulation on the FSK input, I can get quite a respectable range. Using the same configuration, but the internal mod/demod (which I'd have assumed to be better than my bletcherous hack) I can get as far as the next room.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life may be "too short", but it's the longest thing we ever do.
I haven't had any time to work with these modules up to now, but I think this weekend I''m gonna start with it. So, I'd really appreciate if you post your latest code here. I can't make any promises when I can add some results -if help is still needed- as I have so many cunstruction areas ;o)
Ciao
It should work. I hope I did not make any last minute errors.
It sends and receives a the max speed I could observe, please change this line
SendCMD($C604,NOWAIT)··········· 'Data Rate C67f= 2.6kbs···
in both programs (TX & RX) to make your firs tests at a slower speed.
I used following pins on TX
nSEL··· = 25
SCK···· = 26
SDI···· = 27
SDO···· = 20
and on RX
nSEL··· = 11
SCK···· = 12
SDI···· = 13
SDO···· = 14
Have FUN !
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life may be "too short", but it's the longest thing we ever do.
I was wondering whether there are any updates available for the code posted. A complete object in the obex would be nice.
Keep up the good work!
TheRaven
K.
Here is a web article describing the detailed configuration and fine tuning of RFM12b:
http://blog.strobotics.com.au/2008/06/23/rfm12b-bit-rates-and-throughput/
http://blog.strobotics.com.au/topics/embedded/rfm12b/
Also a nice tool to calculate the commands:
http://www.kewlit.com/RFM12B/
Could anyone get 16 bytes payload to be sent with speed higher than 2.6kbps? I have trouble with that..
Cheers
Thank you.