Shop OBEX P1 Docs P2 Docs Learn Events
DTMF tones for an Amateur Radio repeater controller — Parallax Forums

DTMF tones for an Amateur Radio repeater controller

AllenWAllenW Posts: 8
edited 2008-04-02 07:33 in BASIC Stamp
I am making a repeater controller for an Amateur Radio repeater. The program is working well - it has a pause at the end of a transmission and a Morse code ID comes on after the repeater has been in use. A Zarlink MT8880 DTMF decoder is used to provide additional controls through DTMF tones. For example, one tone (an "A" on a DTMF pad) causes the circuit to read the battery voltage and send it back via Morse code. Other single digit tones will be used to read out temperature, turn the transmitter on and off, and turn on or off an additional relay. Instead of using one tone to give access to these functions, however, I would like to use three tones that must be provided in the correct sequence so that someone doesn't accidently get a result that is different than intended. Unfortunately, I don't know how to do this and after spending a lot of time trying I still don't see an easy way. I would certainly appreciate any suggestions that would be helpful to overcome this problem. I have attached the relevant section of the complete program. It is adapted from the Parallax AppKit "Using the CM8880 DTMF Transceiver, and the place where I am having trouble is right near the end where it says IF dtmf = %1101 THEN GOSUB Voltmeter, etc. Just one tone is required and I would like to require three in the correct sequence.
Thank you,
AllenW

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-03-29 03:48
    You'll need to acquire three different DTMFs.

    IF (DTMF1=%0101) AND (DTMF2=%0100) AND (DTMF3=%1010) THEN Voltmeter
  • AllenWAllenW Posts: 8
    edited 2008-03-29 04:38
    Thank you for your suggestion, PJ, but unfortunately, it doesn't solve my problem. You see, on one cycle through the loop that checks the MT8880 the number received will go into dtmf1. How do I get the second DTMF input into dtmf2 and the third one into dtmf3? I think I need some way of having the program realize that the first tone has ended and it should then watch for the second tone and put it into dtmf2, etc.

    AllenW
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-03-29 05:08
    Keeping it conceptual, let's say:

    Get_DTMF1:
      IF ESt = 0 THEN Get_DTMF1          'no DTMF
      DTMF1 = Decoder
      [noparse][[/noparse]Check ESt pin for no activity]    'wait for time between DTMFs
     
    Get_DTMF2:
      IF ESt = 0 THEN Get_DTMF2          'no DTMF
      DTMF2 = Decoder
      [noparse][[/noparse]Check ESt pin for no activity]    'wait for time between DTMFs
     
    Get_DTMF3:
      IF ESt = 0 THEN Get_DTMF3          'no DTMF
      DTMF3 = Decoder
      [noparse][[/noparse]Check ESt pin for no activity]    'wait for time between DTMFs
     
     
    IF (DTMF1=%VALx) AND (DTMF2=%VALy) AND (DTMF3=%VALz) THEN Voltmeter
    
     
    
    
    

    Post Edit --·Use that ESt pin!



    Post Edited (PJ Allen) : 3/29/2008 5:30:31 AM GMT
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2008-03-29 16:55
    AllenW

    Is this the code that you are trying to use

    Please Post a Link where you get Demo Codes From

    Thank You

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
  • AllenWAllenW Posts: 8
    edited 2008-03-31 20:18
    Once again, thank you for your suggestions, PJ. I sorry to say that I don't fully understand them, however. I assume that by the ESt pin you mean the pin on the 8880 that goes high when a DTMF tone has been received.

    Next I assume that the first part of your code suggestion would cause the program to loop until the ESt pin goes high. It seems to me that some code (like that I am already using) would then be required to get the tone decoded and placed into the variable DTMF1. Where you have written in brackets [noparse][[/noparse]Check ESt pin for no activity], would something like DO...LOOP UNTIL ESt = 0 followed by GOTO Get_DTMF2 work?

    I have been working through this part of the program for the past 2 days and I did get it to respond to two tones in succession, but there seem to be some problems with my method and I am not very happy with it. I think the complete program is very near to completion, however, with this problem being the main difficulty remaining. Once the complete program is finished it could be quite a useful one.

    AllenW
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-04-01 02:35
    From your Reply I think that you have the thrust of my meaning.· I didn't use any time-outs, so each module will sit IF...THEN'ing·till it gets a DTMF result.· IF ESt=0 THEN Get_DTMF1 (it'll keep re-cycling till a DTMF comes in, signalled by ESt going HI.)

    I didn't included what to do if it's the wrong series of numbers, or a time-out, anything like that.· How does the following snippet work out for you?

    Get_DTMF1:
      IF ESt = 0 THEN Get_DTMF1          'no DTMF
      DTMF1 = Decoder
      GOSUB No_DTMF_period
     
    Get_DTMF2:
      IF ESt = 0 THEN Get_DTMF2          'no DTMF
      DTMF2 = Decoder
      GOSUB No_DTMF_period
     
    Get_DTMF3:
      IF ESt = 0 THEN Get_DTMF3          'no DTMF
      DTMF3 = Decoder
      GOSUB No_DTMF_period
     
    DEBUG "3 DTMFs, Results: " , DTMF1, DTMF2, DTMF3, CR
     
    GOTO Get_DTMF1
     
     
    No_DTMF_period:
      IF ESt = 1 THEN No_Button_period   'forces a DTMF'ing pause
      RETURN
    
    
    
    
  • AllenWAllenW Posts: 8
    edited 2008-04-01 05:25
    Thank you PJ. This looks very helpful and I think I can proceed onwards from what you have written. I will let you know when I get everything working properly.

    AllenW
  • DosManDanDosManDan Posts: 179
    edited 2008-04-01 18:19
    I don't have the book in front of me at the moment, but if I recall correctly, the book BASIC Stamp Communications is almost entirely devoted to amateur radio. It has the DTMF decoder, projects for repeaters, messaging and all kinds of things. You may want to look up the book because it sounds like it might help and also give you some ideas.

    Here is a link: http://www.amazon.com/STAMP-2-Communications-Control-Projects/dp/0071411976/ref=sr_1_2?ie=UTF8&s=books&qid=1207074193&sr=1-2

    Hope this helps,

    Dan

    Post Edited (DosManDan) : 4/1/2008 6:24:52 PM GMT
  • AllenWAllenW Posts: 8
    edited 2008-04-02 02:02
    Hello Dan,

    Thank you for the suggestion. I will try to get a copy of the book for future reference. At the moment I think I am almost done with my repeater controller - it already IDs and sends back battery voltage in Morse code and once I get the DTMF control issue all sorted out then it should be easy to add remote on/off and a standing wave ratio measurement. I think I now have a pretty good idea of how to work the DTMF selection process so I have hopes of finishing soon!

    AllenW
  • DosManDanDosManDan Posts: 179
    edited 2008-04-02 07:33
    I have the book on front of me now and Chapter 10 is Radio DTMF Tone Decoder and Display, Chapter 11 id Radio DTMF Tone Decoder/Control, Chapter 14 is Radio Mailbox, Chapter 16 Ham Radio Repeater

    The Mailbox project is basically voicemail for your radio. I just looked at the parts list and it looks like readily available parts. The voice is from an ISD2590 chip. I think those are being phased out, but you can still buy them for about $7.

    I don't use Ham radios, but they look like nice projects, and they appear to be laid out pretty well. I've read some reviews of the book that were critical, but I've read through it and I didn't see any glaring problems. There are diagrams, parts lists, explainations.

    At the very least, it might give you some ideas for future projects.

    Dan
Sign In or Register to comment.