I have an arduino that has one of its inputs pulled high and 'listening' for when either of two push buttons are pressed by pulling it to ground.
I would like this signal to also be sent to a nearby raspberry pi on one of its GPIO pins, so that it's pulled high by default and when either of the push buttons are pressed it is also pulled to ground. As the rpi expects 3.3v I was wondering if a simple transistor would suffice here.
Would the above circuit work as expected? So when the transistor switches on it would pull the 3.3v away, leaving that input pin on the rpi reading 0 volts?
Lastly, if the circuit does make sense is the following calculation correct for the base resistor...
- current at collector = V/R = 3.3 / 10000 = 0.00033 A
- hfe = 35
- current at base... Ib = Ic / hfe = 0.00033 / 35 = 0.000009428 A
- R1 = V/I = (5 - 0.7) / 0.000009428 = 456000 Ohm