Shop OBEX P1 Docs P2 Docs Learn Events
Switching analog voltage — Parallax Forums

Switching analog voltage

BasilBasil Posts: 380
edited 2010-02-23 01:38 in Propeller 1
Hi Guys,

Can some suggest a method of switching a 0-14V analog voltage?

I am working on a design and need the prop to switch up to 8 analog outputs between auto (i.e. voltage level determined by the prop through a 12bit DAC) to manual (Output = manual input)
The output will only be switched maybe once or twice every day or so, so I was thinking of using a small PIC (16F675or similar) with 8 outputs on a I2C bus (with the prop as the master) to do the switching.

Would a MOSFET or optocoupler do the trick?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Alec

Velden in N scale

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-02-21 21:35
    Three possibilities:
    1) You're already using DACs for these outputs. Why not set the manual input as a digital value and have the Propeller simply change the value for the DAC from whatever it's using for its automatic value to the one set from a keyboard or keypad or ADC input

    2) Use a relay to select between the DAC and the manual input. You'd need an MOSFET or junction transistor to drive the relay.

    3) Use a CMOS analog multiplexor. Some of them can switch up to 14V. The MAX4622 is a dual SPDT switch that can handle up to 20V and has a logic input control that can be directly controlled by a Propeller I/O pin
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-02-21 23:59
    Following on from Mike's #3. Take a look at:

    www.maxim-ic.com/app-notes/index.mvp/id/638

    For info on choosing analogue switches.

    Graham
  • BasilBasil Posts: 380
    edited 2010-02-22 04:44
    Hi Mike,

    Thanks for the 3 options [noparse]:)[/noparse]

    I did not think of option number 1! Makes sense but I would prefer 'manual' to be as direct as possible as not digitalised in any way.
    Option 3 is what I had in mind but didn't realise these devices went over 5V (Thanks for the link Graham). I am trying not to use mechanical relays.

    Thanks guys, I knew I could count on you [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Alec

    Velden in N scale
  • AleAle Posts: 2,363
    edited 2010-02-22 13:30
    Why not using normal relays ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Visit some of my articles at Propeller Wiki:
    MATH on the propeller propeller.wikispaces.com/MATH
    pPropQL: propeller.wikispaces.com/pPropQL
    pPropQL020: propeller.wikispaces.com/pPropQL020
    OMU for the pPropQL/020 propeller.wikispaces.com/OMU
    pPropellerSim - A propeller simulator for ASM development sourceforge.net/projects/ppropellersim
  • BasilBasil Posts: 380
    edited 2010-02-23 01:38
    Hi Ale,

    I am trying to do away with relays for reliability reasons. I know the switching frequency will in no way approach the MTBF of a relay...ever...

    I have no real reason I guess, just being difficult!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Alec

    Velden in N scale
Sign In or Register to comment.