Sending Morse-code with the RFM22B ?

577 views
Skip to first unread message

Sacha Tholl

unread,
Apr 13, 2014, 2:14:28 PM4/13/14
to rf22-a...@googlegroups.com
Hi,
 i want to use the RFM22B to send morse code besides normal FSK operation. So is there a possibility to do this with
the RF22 Library or is there a trick with which this could be possible to send Morse code
with the RFm22B?

Also i would like to express my gratitude for the work on the library done so far, this forum was a big help, i got it all working perfectly
thank to your and of course Mikem's great work!

Greetings from Germany - 
Sacha Tholl

Mike McCauley

unread,
Apr 13, 2014, 4:45:09 PM4/13/14
to rf22-a...@googlegroups.com
Hi,

On Sunday, April 13, 2014 11:14:28 AM Sacha Tholl wrote:
> Hi,
> i want to use the RFM22B to send morse code besides normal FSK operation.
> So is there a possibility to do this with
> the RF22 Library or is there a trick with which this could be possible to
> send Morse code
> with the RFm22B?

Hmm the library make no provision for morse code. But it is possible to put
the RF22 in an out of CW output. You could perhaps use that to pulse the
transmitter on an off?

Cheers.

>
> Also i would like to express my gratitude for the work on the library done
> so far, this forum was a big help, i got it all working perfectly
> thank to your and of course Mikem's great work!
>
> Greetings from Germany -
> Sacha Tholl
> https://www.facebook.com/SashElectrique?ref=tn_tnmn

--
Mike McCauley VK4AMM mi...@airspayce.com
Airspayce Pty Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia
http://www.airspayce.com
Phone +61 7 5598-7474 Fax +61 7 5598-7070

Kristoff Bonne

unread,
Apr 13, 2014, 5:30:44 PM4/13/14
to rf22-a...@googlegroups.com
Hallo Sacha,


If you look at the arduino part in my rf22_pocsag library, there is code in there to send out your ID in FSK.

It is very simple: it sends out a dummy FSK-message of a certain lengthn which, if you tune to the frequency with a FM receiver, "more or less" sends like an id.
It's far from perfect. I just added it because I transmit for my pocsag tests, on 439 Mhz (instead of the ISM frequencies of 433/434 Mhz) so I need to identify myself with my ham callsign.


BTW. The RF22 library does seams to offer option to emit a pure carrier instead of FSK/GFSK/OOK. I haven't really tried it, but it looks like a way to transmit a CW id in A1A.



Cheerio!
Kr. Bonne (ON1ARF)
--
You received this message because you are subscribed to the Google Groups "RF22-Arduino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rf22-arduino...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

stevech

unread,
Apr 13, 2014, 6:37:59 PM4/13/14
to rf22-a...@googlegroups.com
You could you use the on-off-keying (OOK) mode of the radio to sent time-space transmissions of duration "dot" or "dash"

stevech

unread,
Apr 13, 2014, 7:19:32 PM4/13/14
to rf22-a...@googlegroups.com
Yes, the RFM22 / Si4432 has the means to transmit an unmodulated carrier, and the RF22 library has a means to turn that on.
So that would be a simple way to do Morse code - CW transmission.

Sacha Tholl

unread,
Apr 14, 2014, 4:07:27 AM4/14/14
to rf22-a...@googlegroups.com
Hi, Wow - thats a fast response,
 
I will try all your advices and look how to put on the pure carrier and also the time-spaced OOK.

Sacha Tholl

unread,
Apr 14, 2014, 4:12:11 AM4/14/14
to rf22-a...@googlegroups.com
Hi MikeM,

I didn´t understand what you mean with ".. to put 
the RF22 in an out of CW output.". Do you mean
that i should put the receiver on and off or is there
some kind of PPT on the RFm22b Shield?

Sorry, my english is not that good.
Sash

Mike McCauley

unread,
Apr 14, 2014, 4:19:06 AM4/14/14
to rf22-a...@googlegroups.com
Hello,

No.

If you call:
rf22.setModemConfig(R22::UnmodulatedCarrier);

it will start the transmitter sending a carrier

if you some time later call:
rf22.setModemConfig(R22::FSK_PN9_Rb2Fd5);

it will turn the transmitter off.

If you time these calls with appropriate delays you could simulate morse code.

Documentation at http://www.airspayce.com/mikem/arduino/RF22

Cheers.

Sacha Tholl

unread,
Apr 14, 2014, 6:53:23 AM4/14/14
to rf22-a...@googlegroups.com
Aaaaah!!! Okay, so its the unmodulated carrier thing. Great!!
I will try this tonight after work.
If successfull i will poste the code right here
Thanks a lot!!
Sash


--
You received this message because you are subscribed to a topic in the Google Groups "RF22-Arduino" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rf22-arduino/DImEfPFfPkw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rf22-arduino...@googlegroups.com.

Kristoff Bonne

unread,
Apr 15, 2014, 2:36:44 AM4/15/14
to rf22-a...@googlegroups.com
Hi Mike,


Concodering the unmodulatedCarrier mode, would it be possible to change
the frequency without dropping the carrier.

If yes, it would be interesting if we cannot use this mode to do WSPR.
It a low-power mode where you (slowly) switch between 4 different
carriers (very closeby). Why not try WSPR In one of the ISM-bands (like
869 Mhz).




Cheerio! Kr. Bonne.

Sacha Tholl

unread,
Apr 15, 2014, 7:18:39 PM4/15/14
to rf22-a...@googlegroups.com
Hi Dudes,
 i just have finished the code for the cw code stuff. It is a little bit different than the sugestions proposed, but the hints helped me a lot.Thank you for that!
 Although i think that the solution found has a lot of room left for optimization, it is a  solution more or less. For the CW code generation from serial ascii code
i inspired myself elsewhere from the net (i will post the credits) I will clean up the code tomorrow before i post it here, but for now
you can watch this video:


Details about the code will be posted tomorrow, i promiss.
Greets from Germany and good Night.



 
 

Sacha Tholl

unread,
Apr 16, 2014, 11:01:25 AM4/16/14
to rf22-a...@googlegroups.com
Hi,

As promised i posted the sketch for the CW encoder in the appendix of this mail. Make sure to input all the text in capitals
otherwise the app will send "nothing" :-)

I used the RFM22B Shield from sparkfun: https://www.sparkfun.com/products/11018
For translating chars to morse code i transformed a sketch from Mark VandeWettering from 

Actually to produce Thie "dit" and "dashes" i extended the sketch from brainwagon with the following peace of code:

void
dash()
{  
  rf22.setFrequency(Frequency);
  rf22.setTxPower(RF22_TXPOW_17DBM);
  rf22.setModeRx();
  delay(DOTLEN);
  
 rf22.setModemConfig(RF22::UnmodulatedCarrier); 
 rf22.setModeTx();
 delay(DASHLEN);
}

void
dit()
{
  rf22.setFrequency(Frequency);
  rf22.setTxPower(RF22_TXPOW_17DBM);
  rf22.setModeRx();
  delay(DOTLEN);
  
  rf22.setModemConfig(RF22::UnmodulatedCarrier);
  rf22.setModeTx(); 
  delay(DOTLEN);
}

For the rest i only extended the sketch with the posibility to process the string comming from a serial console.
I also included a wave file so you can hear the outcome. 

Question:
There is an audible drift of the unmodulated carrier signal (i guess), so i am wondering if there is 
a possibility to get this audible signal at a fixed audio frequency
or did i something wrong? I would like to here something like a "Pip piiip" :-)

Cheers Sash

 
HDSDR_20140416_144717Z_434051kHz_AF.wav
RFM22B_Morse_encoder2.ino

Mladen Bruck

unread,
Apr 16, 2014, 11:06:11 AM4/16/14
to rf22-a...@googlegroups.com
CQ CQ... :)


--
You received this message because you are subscribed to the Google Groups "RF22-Arduino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rf22-arduino...@googlegroups.com.

stevech

unread,
Apr 16, 2014, 7:37:38 PM4/16/14
to rf22-a...@googlegroups.com

The RFM22's GPIO1, GPIO2 will have the digital pulses corresponding to when the receiver and transmitter are enabled. These bits go to the antenna switch.
Look at these bits with a 'scope.
You could use the TX bit to gate an audio tone on/off.

Simpler, have the MCU toggle an I/O bit at, say, 440Hz for the Morse code bits as audio.

Mike McCauley

unread,
Apr 18, 2014, 3:41:44 AM4/18/14
to rf22-a...@googlegroups.com
Hello,

On Tuesday, April 15, 2014 08:36:44 AM Kristoff Bonne wrote:
> Hi Mike,
>
>
> Concodering the unmodulatedCarrier mode, would it be possible to change
> the frequency without dropping the carrier.

I think you but it might be very messy in the RF domain.

Cheers.

>
> If yes, it would be interesting if we cannot use this mode to do WSPR..

Sacha Tholl

unread,
Apr 18, 2014, 7:34:53 PM4/18/14
to rf22-a...@googlegroups.com
Hi stevech,

could you tell me how i have the code has to look like
in order to obtain the 440Hz by toggling the MCU.
I didn't understand what you mean? You
must know i can program a little bit but
i don't really understand the internals of
the RFM22b?

friendly73
Sash


--
You received this message because you are subscribed to a topic in the Google Groups "RF22-Arduino" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rf22-arduino/DImEfPFfPkw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rf22-arduino...@googlegroups.com.

stevech

unread,
Apr 22, 2014, 9:51:32 PM4/22/14
to rf22-a...@googlegroups.com
You wanted an audio frequency tone corresponding to the dits and dahs of Morse code.
So I suggested a 440Hz (or so) tone, turned on briefly for a dit, and 3 times longer for a dah.
This would be done by the MCU, and the RFM22 would not be involved.
For example, the Arduino compatible MCUs and libraries (including the Teensy 3 which is another compatible one but is a low cost ARM Cortex MCU on a tiny PC board).
In the Arduino libraries you'll find a "tone" function. You can take an example program for that tone() funciton and modify it and learn how to control timing, etc.
This is a tangent to the radio part of you work, as this is audio, not radio/RF.
Reply all
Reply to author
Forward
0 new messages