Turn on and off +10v -10v square wave

Discussion in 'The Projects Forum' started by NewStudent, Feb 16, 2008.

  1. NewStudent

    Thread Starter Member

    Feb 16, 2008
    25
    0
    Does anybody have a schematic for turning on and off a square wave?

    I have a continuously operating square wave +10v to -10v at 40kHz. Current draw is ~2mA.
    I need to turn this on and off with +5v from a PIC 16F877.

    Thanks in advance
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Can you use a relay? Or is the switching speed required too great.

    hgmjr
     
  3. NewStudent

    Thread Starter Member

    Feb 16, 2008
    25
    0
    Thanks hgmjr

    I need to turn this on and off ~200 times per second.
     
  4. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Then a relay is not the way to go.

    hgmjr
     
  5. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Digikey has an analog switch SSM2402/SSM2412 that could do the job. Price is under $7.

    You will need a transistor to level translate from 5V logic control from PIC to the control level required by the device.

    hgmjr
     
  6. NewStudent

    Thread Starter Member

    Feb 16, 2008
    25
    0
    Thanks hgmjr

    Do I understand correctly ?
    I should put the analog switch SSM2402/SSM2412 in series with both the +10v and -10v lines?
    +10v in on pin 6 out on pin 4
    -10v in on pin 11 out on pin 13
    control both switches at the same time with +5v on pins 2 and 15
     
  7. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    The analog switch will need to be powered by say +12V on pin 14 and -12V on pin 7 and ground on pin 1. You would then feed your +/- 10V signal into the input on pin 4 and the switched output would appear on pin 6. Your PIC control signal would feed to pin 2.

    You will notice that this is a dual channel switch of which you will only require one of the available switches.

    Does that make sense?

    hgmjr
     
  8. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    As I look at it more closely, 40KHz may be a bit beyond the frqeuency range of this device. I will need to look a bit more to find a device that can handle the 40KHz squarewave which will have some harmonics that are greater than this device can pass.

    An analog switch would seem to be the way to go but it may be tough to find one that can pass the 40KHz without degrading the signal.

    hgmjr
     
  9. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Are you generating the 40KHz signal or is it originating from an external source?

    hgmjr
     
  10. NewStudent

    Thread Starter Member

    Feb 16, 2008
    25
    0
    Thanks hgmr
    Yes, the connections that you suggested make sense to me. Help in locating the correct switch would be appreciated.

    The 40KHz signal is originating from an external source.
     
  11. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,699
    907
    I am assuming you want to do something like on off keying (OOK) modulation in a fairly low frequency range.

    That is easy with a couple of 555 or a 556 (one sets the carrier, one modulates) and I used it in a IR system a few years ago. It is far easier to do with a microcontroller. The big difference between what I did and what your question seems to ask is that I generated both waves. Thus my LF modulator turned on and off the 40KHz generation chip. If that is what you want, let us know and I will post the schematic.


    I searched on OOK and got a lot of hits, but nothing right on your question. I would approach it with a flip flop with the modulation being the enabler and the wave you need to modulate being on the data port. As an alternative, an AM modulator with settings of 0% and 100% is also supposed to work.

    Here are some hits on OOK that seemed interesting, but are not really answers to what I interpret your question to be.

    John

    http://www.epanorama.net/wwwboard/messages/8676.html
    http://www.freescale.com/files/microcontrollers/doc/app_note/AN3053.pdf
     
  12. Salgat

    Active Member

    Dec 23, 2006
    215
    1
    A transistor?
     
  13. NewStudent

    Thread Starter Member

    Feb 16, 2008
    25
    0
    hgmr

    Following your suggestion, I have been trying to read data sheets for CMOS Switches. What do you think of the ADG451 ?

    Thanks
     
  14. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    The ADG451 appears to be superior to the device I suggested.

    Due to the frequency response of the analog switch you will encounter some loss of squareness of the input squarewave since the input squarewave is composed of higher frequency harmonics that will be attenuated more than the 40KHz fundamental on which the input signal is based.

    You will have to decide if the loss of signal fidelity is too great.

    hgmjr
     
  15. RiJoRI

    Well-Known Member

    Aug 15, 2007
    536
    26
    How about using a transistor? Let's assume an NPN with all the right characteristics. The signal goes through a resistor to the collector; the emitter is tied to -10 V, which is also relative ground for the PIC chip, which has a pin tied to the base of the transistor -- possibly through another resistor. The output is from the collector of the transistor.* The PIC will change the level of the base, turning the transistor ON or OFF, and allowing the signal to pass or "grounding" it -- actually pulling it to -10V.

    --Rich

    *This is a basic commom-emitter configuration.
     
  16. nomurphy

    AAC Fanatic!

    Aug 8, 2005
    567
    12
    Look at the Maxim DG408 or DG409. You can run it from +/-15V and the selects are TTL compatible.
     
Loading...