Author Topic: Switching Oscillators into Audio Output  (Read 1420 times)

0 Members and 1 Guest are viewing this topic.

Offline DrMagTopic starter

  • Regular Contributor
  • *
  • Posts: 61
Switching Oscillators into Audio Output
« on: March 06, 2017, 09:29:48 pm »
I'm working on designing a board that has three audio-frequency sine-wave oscillators. The intent is to have one board that can play a message in Morse code (using OSC_MS), and also (simultaneously) transmit data using AFSK (oscillators OSC_Mk and OSC_Sp for the two tones).

It seems the right path forward is to use a summing amplifier (with equal gain on both) to mix the audio tones together. I'm attaching a schematic I drew up quickly to illustrate my idea here.. but my version of KiCad doesn't have a P-Channel MOSFET component in the library, and I didn't want to take the time to build one until I know this will work. I've drawn the schematic using all N-Channel MOSFETS, but the transistors for switching on OSC_Sp and enabling AFSK (needed so there isn't a constant space tone all the time) would ideally be P-Channel so that they are active low, and I could do the circuit with a pair of complementary MOSFET chips. The four transistors would be controlled by a microcontroller, using a UART peripheral to feed data to the AFSK oscillator.

Things that I'm thinking:
  * Each oscillator needs a buffer so that the phase-shift circuits aren't loaded.
  * Tying both the OSC_Mk and OSC_Sp to the same control input lets you just use the UART with no change, as one is active high and the other active low.
  * The resistor choices for each of these don't matter too much, as long as the feedback resistors on the summer are equal. Might as well use the same value on all of them; 100k ish would do.

What I'm not sure about:
  * Do I need a buffer between each MOSFET and the summing amplifier?
  * Would tying the N-Channel and P-Channel MOSFETS for the AFSK portion have any behavior I'm not anticipating? In which case, would I be better off disconnecting the outputs and adding another channel on the summing amplifier?
  * Is there a cleaner way of mixing these sine waves together?

Notes for reference:
  * I'm planning on using single-supply op-amps only, operating at 3.3V to match the microcontroller.
  * The oscillators would be individual Bubba Oscillators (4-stage phase-shift oscillators using op-amps)
  * I don't want to switch capacitors into the phase shift portion to change the AFSK frequency. I want to keep the sine waves as pure as I can, so I'm avoiding any side effects by changing the oscillators directly after start-up.

Please send questions or thoughts about what I'm trying here!
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19536
  • Country: gb
  • 0999
Re: Switching Oscillators into Audio Output
« Reply #1 on: March 06, 2017, 11:27:53 pm »
Have you considered generating the sine wave digitally?

It won't work like that with P-MOSFETs, which will need to be connected source, to the positive supply.

What about using an analogue switch IC, such as the 74HC4066 rather than those MOSFETs? The signal can then properly be turned on/off, rather than being shunted to 0V.
http://assets.nexperia.com/documents/data-sheet/74HC_HCT4066.pdf
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 4532
  • Country: au
    • send complaints here
Re: Switching Oscillators into Audio Output
« Reply #2 on: March 07, 2017, 01:36:59 am »
Its also worth going back and simulating what you've drawn out, the gains and switching arent working the way you describe them.
 

Offline DrMagTopic starter

  • Regular Contributor
  • *
  • Posts: 61
Re: Switching Oscillators into Audio Output
« Reply #3 on: March 07, 2017, 03:51:43 pm »
Thanks, everyone--that's helpful! I was sure there had to be an IC that did exactly the job I was after. I was also able to find the TS5A2066, which would do the same job with a design for minimizing distortion on audio signals. To switch the tones for AFSK, I could use one chip with an inverter on one input and just feed the UART into that. The other chip would switch in the Morse with a mark, and allow the uc to enable the AFSK output. Let me draw up a better circuit and see what you think.

And yes, I know that how I drew it doesn't work like I described--like I said, my KiCad library doesn't (yet) have all the parts needed. It was mostly just to illustrate what I had in mind--oscillators switched into a summing amplifier with MOSFETS. Once I have a full circuit drawn out, I'll run it through a simulator.
 

Offline DrMagTopic starter

  • Regular Contributor
  • *
  • Posts: 61
Re: Switching Oscillators into Audio Output
« Reply #4 on: March 07, 2017, 05:17:12 pm »
Alright, I've updated my schematic. One last question before I move on to the next step: Would I be better off putting a resistor on the buffer output of each oscillator, rather than putting a shared resistor on the output of the switch? I suppose there could be a brief moment when the oscillator buffer outputs are shorted together with a signal... so perhaps I've just answered my own question. Let me know if anyone has other thoughts!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf