DIY digital oscilloscope help with AC/DC coupling switch

Discussion in 'Embedded Systems and Microcontrollers' started by portreathbeach, Jun 22, 2015.

  1. portreathbeach

    Thread Starter Active Member

    Mar 7, 2010
    143
    5
    I've decided I'd have a go at making a small oscilloscope using a PIC microprocessor, a touch screen LCD and a couple of 8 bit ADC chips. I should be able to sample 2 channels at 8MHz, or 1 channel at 16MHz, which is plenty fast enough for what I normally need. It'll also have triggers and all of the normal stuff you would expect to have on a scope.

    I've done previous projects with the LCD and touch screen and want to make my entire scope work with just the touch screen, but I'm a bit unsure as to how to switch the AC coupling capacitor in and out of circuit without using a physical switch. I could use a relay, but I'm trying to keep the PCB as small as possible (the same size as the LCD) and didn't really want to use a relay as the other components will all be SOIC chips and smaller. I was thinking of using small MOSFETs, but as AC signals are positive and negative, could I use 2 MOSFETs in parallel (drain to source, source to drain) to bypass the capacitor, or is there a better way?

    Cheers for any help

    Craig
     
  2. JWHassler

    Member

    Sep 25, 2013
    201
    33
    OBW0549 likes this.
  3. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,999
    745
    reed relay, cd4016 quad switch
     
    Last edited: Jun 22, 2015
  4. portreathbeach

    Thread Starter Active Member

    Mar 7, 2010
    143
    5
    Last edited: Jun 22, 2015
  5. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,999
    745
    yes thats one gate of a cd4016, you could put it across the capacitor to short it out for dc input signal.
     
  6. portreathbeach

    Thread Starter Active Member

    Mar 7, 2010
    143
    5
    Cheers ;)
     
  7. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,327
    890
    "Normal" SSRs, using Triacs, definitely wouldn't work well (or at all) in your application; they're for AC mains power control. The ones that JWHassler pointed to are a completely different animal: those are optically isolated, floating, linear analog switches meant for exactly the type of circuit you are trying to make. Not only do they have high isolation voltages, but they have high voltage ratings for their OFF state and are completely independent of supply rails. CMOS switches like the CD4016 have none of that, and won't work right (and can even be damaged) if your scope input voltage were to go outside the 4016's supply rails.
     
    JWHassler likes this.
  8. portreathbeach

    Thread Starter Active Member

    Mar 7, 2010
    143
    5
    Just realised from your post that JWHassler's post had a link in it. That looks like the sort of thing I'm after.

    Cheers

    EDIT: Do these type of devices allow for negative voltages to pass too?
     
  9. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,327
    890
    Yup. Take a look at the datasheets; they're bi-directional, made from back-to-back photo-MOSFETs.
     
  10. portreathbeach

    Thread Starter Active Member

    Mar 7, 2010
    143
    5
    Cool. Thanks very much.

    On another note: I've been looking for a programmable gain amplifier similar to the PGA112 that will allow a negative voltage to be applied to the REF pin so I can amplify and offset the voltage out of the device. Does such a thing exist?

    I've played around with the LM386 amplifiers before. These give an offset in the middle of the positive supply and ground. These are good for audio, but not sure how good they would be for a scope input. Also, these are kind of programmable in a way you put different value capacitors across a couple of the pins, I am more after something which is SPI controlled.
     
    Last edited: Jun 24, 2015
Loading...