BeagleBone GPIO reading signal

Thread Starter

Oussama Zaidi

Joined Mar 1, 2016
53
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
 

kubeek

Joined Sep 20, 2005
5,794
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.
 

Thread Starter

Oussama Zaidi

Joined Mar 1, 2016
53
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.
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
 
Top