The Lab (Technical Talk) > New Hardware Projects

12v car power to gpio input - opto isolator?

(1/2) > >>

n8huntsman:
Im running an rpi with pi cap on my RZR Offroad utility vehicle. Im going to pull a +12v wire from the brake light circuit to control a gpio input.


I think I need an opto isolator like this circuit: https://www.raspberrypi.org/forums/viewtopic.php?t=177841#p1133968
It needs to be pretty tough because of all the bouncing around it will experience so Id like to find a breakout board thats already made. If not I can make it but would rather not.
Has anyone found something like that?
Will I need the debouncing cap?
Am I missing a simpler solution?
Thanks

n8huntsman:
Anyone?

CaptainMurdoch:
I think what you are describing would work, here's another example without the debouncing cap:  https://www.raspberrypi.org/forums/viewtopic.php?t=173362#p1108927

The only other thing that I can think of would be a relay, but I'm not sure that is simpler and it could be bouncing around when offroad. :) You may be able to find a small pre-made board with an opto isolator on it on sparkfun somewhere.  I saw several when googling for a solution but didn't look at the details on them.

n8huntsman:
I've looked over there and this is the closest thing I can find: https://www.sparkfun.com/products/9118
Not sure if it would work or not; because the extra transistors are confusing me.  The schematic is here: https://www.sparkfun.com/datasheets/BreakoutBoards/Optoisolator-v12.pdf




I'm leaning towards just building it myself on a proto-board and using a couple 6N137 opto's.  I need at least two inputs to control the falcon player.

David_AVD:
I've done up a quick schematic that is similar to the one you linked to, but with revised values.


Navigation

[0] Message Index

[#] Next page

Go to full version