Voltage reduction question

Discussion in 'General Electronics Discussion' started by C0st, Feb 11, 2018.

  1. C0st

    C0st

    Joined:
    Feb 11, 2018
    Messages:
    3
    Likes Received:
    0
    I have an old alarm system I would like to connect to a raspberry pi,
    the alarm system uses a voltage of 4.5v for digital 0 and 9v for digital 1
    I need somehow to reduce 4.5v to close to 0 volts and 9v to 3.3v for digital 1 of the raspberry pi.
    Voltage divider circuit with a zener is the best I could do but it doesn't achieve the close to 0 :)
    Any help would be appreciated.
     
    C0st, Feb 11, 2018
    #1
    1. Advertisements

  2. C0st

    Harald Kapp Moderator Moderator

    Joined:
    Nov 17, 2011
    Messages:
    8,385
    Likes Received:
    1,592
    Location:
    Germany-Europe-Earth-Sol System-Milky Way-Laniakea
    Welcome to EP.

    The quality solution is a comparator with 5 V output. Divide the input voltage down by e.g. a factor 4 (1.125 V low, 2.25 V high), set the treshold to ~1.7 V and you're set.

    The cheap solution is a 5.6 V zener diode, transistor and a few resistors:
    upload_2018-2-11_11-44-7.png
    Note that this circuit inverts the signal 4.5 V in -> 5 V out, 9 V in -> 0 V out but that can easily be handled on the raspbery in software.
     
    Harald Kapp, Feb 11, 2018
    #2
    1. Advertisements

  3. C0st

    C0st

    Joined:
    Feb 11, 2018
    Messages:
    3
    Likes Received:
    0
    Thank you very very much, gonna try it soon. Won't the 5v fry the Rpi gpio?
     
    C0st, Feb 12, 2018
    #3
  4. C0st

    Harald Kapp Moderator Moderator

    Joined:
    Nov 17, 2011
    Messages:
    8,385
    Likes Received:
    1,592
    Location:
    Germany-Europe-Earth-Sol System-Milky Way-Laniakea
    Right, I came up with this rather quickly. Of course, it the raspberrie's I/O is 3.3 V use Vcc=3.3 V.
     
    Harald Kapp, Feb 12, 2018
    #4
  5. C0st

    C0st

    Joined:
    Feb 11, 2018
    Messages:
    3
    Likes Received:
    0
    Thank you so so much!
     
    C0st, Feb 13, 2018
    #5
  6. C0st

    AnalogKid

    Joined:
    Jun 10, 2015
    Messages:
    2,172
    Likes Received:
    615
    Location:
    Ohio - GMT-5
    100K from the base to the emitter?

    ak
     
    AnalogKid, Feb 13, 2018
    #6
  7. C0st

    Harald Kapp Moderator Moderator

    Joined:
    Nov 17, 2011
    Messages:
    8,385
    Likes Received:
    1,592
    Location:
    Germany-Europe-Earth-Sol System-Milky Way-Laniakea
    will not hurt ;)
     
    Harald Kapp, Feb 13, 2018
    #7
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.