How to drive digital inputs from car to an Arduino?
Posted: 23 Apr 2019, 15:39
In this blog post i will show how to detect 12V signals from the car using an Arduino in a way, the Arduino will survive
The common problem is to
<PICT>
The main problem here is that it won't protect against high voltage. For this a Zener Diode is a nice and simple way. A Zener will clip to the given voltage, e.g. 5V for the Arduino Nano digital IO-pins (beware, other shields may use 3.3V or something different!):
<PICT>
To cancel high frequency noise, add a ceramic capacitor to ground (low pass filter):
<PICT>
To prevent the signal detection against low frequency voltage pulses, add a electrolyt capacitor to ground:
<PICT>
To prevent against reverse polarity current, add a Diode in flow direction:
<PICT>
The common problem is to
- Get voltage level down to a value that Arduino (Atmega328P chip) can handle
- Protect input from high current flow
- Remove noise (spikes, pulses, etc.) from the signal so it won't hurt the chip's electronic nor produce false results
<PICT>
The main problem here is that it won't protect against high voltage. For this a Zener Diode is a nice and simple way. A Zener will clip to the given voltage, e.g. 5V for the Arduino Nano digital IO-pins (beware, other shields may use 3.3V or something different!):
<PICT>
To cancel high frequency noise, add a ceramic capacitor to ground (low pass filter):
<PICT>
To prevent the signal detection against low frequency voltage pulses, add a electrolyt capacitor to ground:
<PICT>
To prevent against reverse polarity current, add a Diode in flow direction:
<PICT>