Control Analog signal with microcontroller I/O

Discussion in 'General Electronics Chat' started by ReLe, Jun 11, 2008.

  1. ReLe

    Thread Starter New Member

    Jun 2, 2008
    I have a microcontroller and a A/D converter on the circuitboard. There are 2 powers, Vd for digital and Va for analog. I use this board with LIS3L02AQ acceleration sensor. What i would like to do is to switch the FS ("Full Scale selection Logic 0: 2g Full-scale; Logic 1: 6g Full-scale") on and off with the microcontroller output (Vd), but the sensor should get the FS logic from analog side.

    So how do i make a isolated switch to switch the FS 0V-5V from reference analog power with the microcontroller output. The Analog reference signal should not be disturbed!

    My own vision would be to use a optocoupler of some kind, but my need would be to switch on/off the high side, not to cut off the gnd. That's because the gnd to the sensor is common, and if i switch that off the sensor shutsdown.

    Thanks in advance
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    What makes Vd and Va different? Assuming ground is common and the voltages are the same, why not do the scale switching with a line straight out of the microcontroller?
  3. ReLe

    Thread Starter New Member

    Jun 2, 2008
    Thank you for answering.

    That's what i was considering, but i'm a bit concerned about the noise from vd to reaching the analog side if i do that. The ground is the same but separated at pcb and it's connected together with a wire with a ferrite bead near the power source.

    Maybe i'm bit too careful, but keeping the separate agnd and dgnd as long as possible especially near the measurement area would be wise in my opinion.

    If i would like to do a isolated switch that would just connect FS pin to vref (like a relay) what are my options (besides relay.. I'm a bit concerned that relay would introduce a fields that would affect the measuring. Also relay would eat too much juice (around 1ma) when it's connected.