
PCB_GPIO Input Signal 12v to Arduino
STDPCB_GPIO Input Signal 12v to Arduino
License
:GPL 3.0
Description
⚙ How the Module Works:
- A 12V signal is applied to the +12 BUTTON terminal, passing through a current-limiting resistor before reaching the internal LED of the PC817 optocoupler.
- When 12V is applied, the LED inside the optocoupler lights up, activating the internal phototransistor.
- The phototransistor then connects GPIO to GND, generating a LOW logic signal on the microcontroller.
- If no 12V voltage is present, the phototransistor remains off, and the GPIO stays at HIGH logic (depending on the pull-up resistor).
📌 Module Specifications:
✔ Input Voltage: 12V
✔ Output Voltage (GPIO): 3.3V / 5V (Depending on the microcontroller)
✔ Main Component: PC817 (Optocoupler)
✔ Galvanic Isolation: Separates the input signal from the microcontroller to prevent electrical interference
✔ Safer than direct input since it does not connect 12V directly to GPIO
🔗 Connections to Arduino / ESP32:
Module Pin | Arduino / ESP32 Pin |
---|---|
GPIO | Connect to a digital pin (e.g., D2) |
GND | Connect to the microcontroller’s GND |
+12 BUTTON | Connect to the 12V signal you want to detect |
💡 Note: When using this module with an ESP32 (which operates at 3.3V), ensure a pull-up resistor is used or enable the internal pull-up (pinMode(pin, INPUT_PULLUP);
).
✅ Benefits of Using This Module:
🔹 Protects GPIO from high voltage (12V to 3.3V/5V conversion)
🔹 Reduces electrical noise in the microcontroller system
🔹 Isolates the sensor circuit from the main system, minimizing damage risks due to voltage spikes
Design Drawing

BOM


Project Members

Comment