24V Voltage Monitor to uC

Discussion in 'The Projects Forum' started by Alicec63, Sep 17, 2013.

  1. Alicec63

    Thread Starter New Member

    Jun 20, 2013

    I have a design that essentially works as a programmable DC voltage supply. i.e. it outputs a DC voltage waveform between 0V and 24V. The output of the desgin comes from an amplifier circuit (powered by +- 24V) that can deliver up to 10A to power certain devices.

    My idea now, is to monitor the output voltage - by the processor (ATMEGA164) - to ensure there is a valid output.

    I am just after some ideas on the best way to do this? I guess it needs to be level shifted in some way to interface with the 5V powered processor, unless there is a suitable voltage monitor part that can do this specifically.

    I am yet to decide whether it should just have a 'switch' type signal to just tell the processor that "yes there is an output of some sort" or to actually use the ADC on the processor to give an exact voltage.

    Any thoughts would be much appreciated.

  2. odinhg

    Active Member

    Jul 22, 2009
    If you're going to use a uC with ADC anyways, I think you are best of using a resistor voltage divider and read the analog voltage. You can make it into an on/off signal in software and do different types of signal processing there without change in hardware if you need to.
  3. Alicec63

    Thread Starter New Member

    Jun 20, 2013
    Thanks for the reply. That was my 1st thought as it seems the simplest option I guess.

    As the amp is powered by +/- 24V, and there was a problem/failure somewhere, would this cause a problem if a negative voltage came out of the amp? Using the potential divider would not provide any protection/isolation to the uC from this?
  4. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    You cannot use a simple voltage divider if a negative output voltage is a possibility.. It also does not provide isolation either. Do you require isolation?
    Do you have 0-24V or could you have -24 to 24V?
  5. Alicec63

    Thread Starter New Member

    Jun 20, 2013
    The output of the amplifier will fall between 0 and 24V. It should never be negative, unless there is a fault/error with the amp - as this is powered by a split +-24V supply.

    I only mention isolation in terms of in case there was a failure, and a negative voltage did occur. So maybe I am just being over-precautious and isolation is not needed. All am after really is a way to monitor the output voltage (between 0 and +24V) - most likely by using the ADC on the uC (5V powered) - that will be reliable and accurate.

  6. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    Typically every micro I/O pin has electrostatic discharge (ESD) diodes. Some don't, so do check. These are in fact speced to handle some current, so the resistive divider may be all you need to keep the input safe from negative events.

    If you don't like using those diodes for another purpose (I've done it for monitoring the AC line directly thru several hundred K ohms) then you can add a parallel diode. Schottky types are recommended so you actually use the external diode.