Skip to main content
added 55 characters in body
Source Link
Janka
  • 1.7k
  • 9
  • 11

A very secure solution uses an optocouple. AsA 1kΩ resistor is good for an input voltage range of 5 to 20 volts. You may connect the two grounds, but it's not required.

The output is inverted, that means, the Pi senses low on it'sits GPIO if there is 5–12V5–20V on the input, and high if not.

schematicschematic

simulate this circuitsimulate this circuit – Schematic created using CircuitLab

A very secure solution uses an optocouple. As 1kΩ resistor is good for an input voltage range of 5 to 20 volts.

The output is inverted, that means, the Pi senses low on it's GPIO if there is 5–12V on the input, and high if not.

schematic

simulate this circuit – Schematic created using CircuitLab

A very secure solution uses an optocouple. A 1kΩ resistor is good for an input voltage range of 5 to 20 volts. You may connect the two grounds, but it's not required.

The output is inverted, that means, the Pi senses low on its GPIO if there is 5–20V on the input, and high if not.

schematic

simulate this circuit – Schematic created using CircuitLab

Source Link
Janka
  • 1.7k
  • 9
  • 11

A very secure solution uses an optocouple. As 1kΩ resistor is good for an input voltage range of 5 to 20 volts.

The output is inverted, that means, the Pi senses low on it's GPIO if there is 5–12V on the input, and high if not.

schematic

simulate this circuit – Schematic created using CircuitLab