If I have a sensor which has 5V ouptut:
- I can't plug it directly to Raspberry PI, right?
- If so, what would I need to do so I would be able to do so?
I would like to connect it via input pins.
If I have a sensor which has 5V ouptut:
I would like to connect it via input pins.
You can use two or three resistors to form a voltage divider
Input----[ 1k ]-----[ 2k ]---GND
|
|
|
GPIO PIN
If your wires aren't too long, you can use higher resistors - say 10k & 20k
If you can't find 2k resistor, you can connect 2 1k resistors in series
Input----[ 1k ]-----[ 1k ]-----[ 1k ]---GND
|
|
|
GPIO PIN
It is correct that you cannot directly connect a 5V sensor to the Raspberry Pi as it provides 3.3V. There's a great new cape for the Pi on kickstarter that allows you to use 5V sensors using GVS connections. Here's a link: https://www.kickstarter.com/projects/1546666383/gvs-board-for-raspberry-pi?ref=discovery
This is a great alternative to painful wiring.