The RFM12B can be tricked into sending OOK (on-off-keying) signals – which is also called ASK (amplitude shift keying), by doing exactly what the term stands for: turning the transmitter on and off.
This has been used in several examples to control FS20 and KAKU remote power switches – just search for these terms on this weblog in the box at the bottom right of this page and you’ll get all the related posts.
The code I’ve been using for FS20 so far is:
As it turns out, the timing is not quite up to scratch. JGJ Veken drew my attention to this in the forum and by sending in a couple of pictures, including this one:
(Wow – great instrument, a 100 MHz Tektronix 2232 storage scope!)
A 0 bit comes out as 250/468 µS, and a 1 bit as 428/722 µS – pretty far off the 400/400 + 600/600 µS specs.
Here’s what we came up with after a few trials:
The end result is within a few percent of the target, well within spec – yippie!
A similar tweak could probably be used for the KAKU signals, but these use a lower rate of bit signaling, so the jitter is probably somewhat less important.
Update – the KAKU tweak has also been checked in, and the code has been simplified a bit further.