Connect with us

Voltage reduction question

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

  1. C0st

    C0st

    3
    0
    Feb 11, 2018
    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.
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    8,830
    1,741
    Nov 17, 2011
    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.
     
  3. C0st

    C0st

    3
    0
    Feb 11, 2018
    Thank you very very much, gonna try it soon. Won't the 5v fry the Rpi gpio?
     
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    8,830
    1,741
    Nov 17, 2011
    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.
     
  5. C0st

    C0st

    3
    0
    Feb 11, 2018
    Thank you so so much!
     
  6. AnalogKid

    AnalogKid

    2,234
    629
    Jun 10, 2015
    100K from the base to the emitter?

    ak
     
  7. Harald Kapp

    Harald Kapp Moderator Moderator

    8,830
    1,741
    Nov 17, 2011
    will not hurt ;)
     
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.
Electronics Point Logo
Continue to site
Quote of the day

-