+ Post New Thread
Results 1 to 6 of 6
  1. #1
    Advanced Member level 5
    Points: 16,343, Level: 30
    Achievements:
    7 years registered
    neazoi's Avatar
    Join Date
    Jan 2008
    Location
    Greece
    Posts
    3,315
    Helped
    12 / 12
    Points
    16,343
    Level
    30

    TTL to AF tone and AF tone to TTL conversion. Ideas, suggestions

    Hi, I have a kind of special requirement. I want two MCUs with serial (TTL) ports to communicate each other over a channel that accepts only audio signals, like the telephone or a ham radio transceiver. Serial speed is at 1200 baud and communication takes place in half duplex only.

    Instead of using modem ICs, I was thinking that it may be able to be done much more simply with a few transistors. So I challenge myself in finding ways this can be done, the simplest possible with the fewer components needed. In that sense, I believe ASK will be the simplest way, detect a tone or not, regardless of the frequency, so no filtering is needed.

    An idea I had

    An AF oscillator on TX, runs continuously and a transistor shunts it's output AF to ground. The transistor being controlled by the TX data. On receive, A detector detects the AF tones (switched on and off) and switches the RX data to 5v or gnd. Since data is half duplex it could work. Some circuicity may be needed to prohibit the RXD during TX and vice versa, so as to not looping back data.

    Do you think that would be feasible in a low components count?
    Other ways/block diagrams you may think of? (always having simplicity in mind).
    Professional engineering is the top, but amateur engineering is more fun.
    It is when you cross the barrier between these two, that things become really fascinating!

    •   AltAdvertisment

        
       

  2. #2
    Super Moderator
    Points: 78,711, Level: 68
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,889
    Helped
    4303 / 4303
    Points
    78,711
    Level
    68

    Re: TTL to AF tone and AF tone to TTL conversion. Ideas, suggestions

    Most ASK systems work by switching the power off and on to the oscillator as it is more power efficient but shunting unwanted audio to ground will also work.

    Your problem is that the audio tone probably needs to be quite high pitched to ensure enough cycles arrive at the detector to be converted back to a level that can be converted to TTL. At 1200 Bauds, a 1200Hz tone will only allow one cycle per bit, 2400Hz will allow two cycles and so on. Consider the available bandwidth to see how many cycles might pass per bit. For a voice bandwidth extending to say 3.5KHz you would struggle to get three cycles to represent a single bit. Using a conventional rectifier and capacitor to recover the envelope would be difficult simply because of inadequate time to charge the capacitor.

    This is why PLL detectors are normally used, they can have a faster reaction time to seeing incoming tones and they also offer a degree of selectivity against noise and other unwanted signals in the passband.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.


    1 members found this post helpful.

    •   AltAdvertisment

        
       

  3. #3
    Advanced Member level 5
    Points: 16,343, Level: 30
    Achievements:
    7 years registered
    neazoi's Avatar
    Join Date
    Jan 2008
    Location
    Greece
    Posts
    3,315
    Helped
    12 / 12
    Points
    16,343
    Level
    30

    Re: TTL to AF tone and AF tone to TTL conversion. Ideas, suggestions

    Quote Originally Posted by betwixt View Post
    Most ASK systems work by switching the power off and on to the oscillator as it is more power efficient but shunting unwanted audio to ground will also work.

    Your problem is that the audio tone probably needs to be quite high pitched to ensure enough cycles arrive at the detector to be converted back to a level that can be converted to TTL. At 1200 Bauds, a 1200Hz tone will only allow one cycle per bit, 2400Hz will allow two cycles and so on. Consider the available bandwidth to see how many cycles might pass per bit. For a voice bandwidth extending to say 3.5KHz you would struggle to get three cycles to represent a single bit. Using a conventional rectifier and capacitor to recover the envelope would be difficult simply because of inadequate time to charge the capacitor.

    This is why PLL detectors are normally used, they can have a faster reaction time to seeing incoming tones and they also offer a degree of selectivity against noise and other unwanted signals in the passband.

    Brian.
    Thanks Brian that is very useful to know!
    What if I did not use a capacitor in the detector, but drive the transistor base directly with a diode? This should be fast and detect only the positive part of this 1200Hz "cycle". This would switch the transistor on during the positive part and ignore the negative. So here there will be no capacitor to be charged and drive the transistor, but the base would be driven directly from positive pulses. Because of the 1200, one pulse would be like one bit. The negative part ignored though
    I just wonder.
    Professional engineering is the top, but amateur engineering is more fun.
    It is when you cross the barrier between these two, that things become really fascinating!



    •   AltAdvertisment

        
       

  4. #4
    Super Moderator
    Points: 78,711, Level: 68
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,889
    Helped
    4303 / 4303
    Points
    78,711
    Level
    68

    Re: TTL to AF tone and AF tone to TTL conversion. Ideas, suggestions

    Yes, it would work but doing it that way makes it very prone to any signal, no matter what frequency it was. The transistor would switch on with any positive pulse including crackles and maybe even background hiss. You would need a sharp filter to eliminate anything except the tone you wanted or some seriously complicated algorith after the transistor to select only pulses that were the right period and width.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.


    1 members found this post helpful.

  5. #5
    Advanced Member level 5
    Points: 16,343, Level: 30
    Achievements:
    7 years registered
    neazoi's Avatar
    Join Date
    Jan 2008
    Location
    Greece
    Posts
    3,315
    Helped
    12 / 12
    Points
    16,343
    Level
    30

    Re: TTL to AF tone and AF tone to TTL conversion. Ideas, suggestions

    Quote Originally Posted by betwixt View Post
    Yes, it would work but doing it that way makes it very prone to any signal, no matter what frequency it was. The transistor would switch on with any positive pulse including crackles and maybe even background hiss. You would need a sharp filter to eliminate anything except the tone you wanted or some seriously complicated algorith after the transistor to select only pulses that were the right period and width.

    Brian.
    Of course. And it takes lot of trial and error practically. However because of the ASK, I tend not to think of frequency here. Even if this tone frequency is not stable enough and even if it is full of harmonics, it should not matter. All is needed is for the transistor to be switched. And because harmonics occur at the same timing as the main, it should be ok.
    The noises you mention could be removed with a simple squelch circuit, unless they are of very high level, which I do not think it is the case with phone lines or even tape recorders. Even without a squelch, two series diodes before the base of the transistor could raise the input threshold and ignore noise.
    Well these are just thoughts..
    Professional engineering is the top, but amateur engineering is more fun.
    It is when you cross the barrier between these two, that things become really fascinating!



    •   AltAdvertisment

        
       

  6. #6
    Super Moderator
    Points: 78,711, Level: 68
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,889
    Helped
    4303 / 4303
    Points
    78,711
    Level
    68

    Re: TTL to AF tone and AF tone to TTL conversion. Ideas, suggestions

    You are thinking that the presence or absence of a tone can represent a 1 or a 0 of data. It doesn't work quite like that I'm afraid unless you have a strong carrier to provide silence in the background. What the transistor sees is 'tone + noise' or just noise alone and there may not be much difference between them. When the tone is turned off, it is imperative the receiver hears nothing at all so it can clearly see a digital zero.

    The best you can achieve is with an 'adaptive data slicer', a kind of comparator that has the raw data on one input and the average level of the data on the other so it can track the mid point between tone and no tone and see the instantaneous difference regardless of the actual levels.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.


    1 members found this post helpful.

--[[ ]]--