BeagleBone GPIO reading signal

Discussion in 'General Electronics Chat' started by Oussama Zaidi, May 12, 2016.

  1. Oussama Zaidi

    Thread Starter Member

    Mar 1, 2016
    53
    0
    Hi
    I am using the circuit in the picture bellow to read a DC signal with a voltage from 0 to 24V with a BeagleBone GPIO, what I need is that the GPIO read 0 if the voltage is lower than 12V and 1 if it is bigger, 1 in BeagleBone GPIO that is mean 3.3V, so my idea was to use a zener diode with 11.7 voltage for example in the base of the first transistor which is the input of the circuit also so any voltage lower than that the first transistor will be blocked and the second saturated so the output of the circuit will be connected to the ground so it is 0 logic and if it is the opposit case then i will get 3.3V of output which is 1 logic.
    I don't know if this circuit matchs with the Beagle GPIO or no, I am affraid from the pull-up or pull-down resistors in the GPIO or something like that, I don't understand them verry well, if they can make a voltage divider with the resitors I already use in my circuit or other thing, so what do you think about this circuit.
    beagle.PNG
     
  2. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    1N4147 is a 22V zener, not 11.7. The circuit looks ok, but I would add a diode and a 10k resistor from ground to the base of Q1, to protect from reverse polarity and make sure the transistor is off when nothing is connected. Also some capactior in the same place wouldn´t hurt, something like 10nF should block unwanted interference.

    In the beaglebone you should disasble the pullups/pulldowns on the IO port.
     
    Oussama Zaidi likes this.
  3. Oussama Zaidi

    Thread Starter Member

    Mar 1, 2016
    53
    0
    I had read that BeagleBone GPIOs are always in pull_down mode and can't be changed, chek this link :https://github.com/adafruit/adafruit-beaglebone-io-python/issues/5
     
  4. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Well even if it has a pull down set, it will be pretty weak compared to the 1k, so it should be ok.
     
Loading...