Reading multiple ~12 volt inputs from a car

I'm currently working on creating a custom PCB for my instrument cluster in my car. And because I want to do it "properly", I'd figure I'd make the circuits first with a breadboard, make sure everything functions before creating the actual PCB.

My car is quite a bit older, and does not have fancy CAN-bus, or anything similar. It has 'regular' old fashioned warning lights, 12 volt on means light must be on type of things. I also want to have a speedometer function, which is powered by a 12 volt transducer and the RPM I'd be able to calculate using the - contact on the ignition coil.

I have then, passed a problem. There are approximately 15 warning lights, which all function as mentioned above on 12 volts. I'd want to read them and turn on and off the correct lights (which are controlled by the arduino).

From my research, the best way would be optocouplers (or opto-isolators) with multiplexers in order to reduce the amount of GPIOs required and not having to deal with reducing every 12 volt input separately (for example with voltage dividers). Would that indeed be the best way? And what would you recommend from the Speedo/RPM, since I'd need that more continuously than the lights (which wouldn't be a absolute disaster if there is a small delay on them)?

Thank you for your assistance.

Zener diodes are commonly used to drain excess V to ground.
A 12V Zener per input should do the job.

What would be the advantage of using zener diodes for this instead of optocouplers? From what I'd been able to find optocouplers are more "safe"?

Also, would you then use a multiplexer to reduce the amount of GPIO pins required? Or would you use something else?

I am not sure where you are but check the local and national laws. Here the OEM odometer must remain connected. Here is some reading you need to do before going very far into your project. Your older vehicle is a much more nasty and dirty on the electrical system then newer models. Check this out.

There is many good app notes such as AN2689 by ST on automotive electronics. reading it will help you a lot.
https://www.st.com/resource/en/application_note/cd00181783-protection-of-automotive-electronics-from-electrical-hazards-guidelines-for-design-and-component-selection-stmicroelectronics.pdf
Also take a look at these: Distilled Automotive Electronics Design | Analog Devices and
Transient Voltage Suppression in Automotive Applications

Is the speedometer 0-12V analog? Or is it a pulse?

If it's an analog voltage you can use a voltage divider into an Arduino input. The output to a display or meter depends on what you want to do...

On the Arduino digital inputs, you can use an over-voltage protection circuit. (I would increase the resistor to between 1K and 10K). Or you can add a "protection diode" to a voltage divider.

An optical isolator (AKA opto-coupler) is also a good solution.

Sometimes a voltage divider alone doesn't work well because the "12V" in a car varies.

For Arduino outputs, the Arduino can't directly power much more than a regular little LED. If you want to control incandescent light bulbs with the Arduino, you'll need MOSFET Drivers (you can leave-out the diode which is for motors and other inductive loads) ,or transistor drivers, or relays.

Electromechanical relays need a driver circuit for the relay coil but there are solid state relays that can be directly controlled with the Arduino. If you get solid state relays, make sure they are designed to switch DC. (AC & DC solid state relays are not generally interchangeable.)

Just be aware auto systems are earth return and your additions could possibly introduce feedback which can really upset the billycart.

Thank you for your information, but TLDR it's adding TVS protection to the PCB? That's doable I think. As for the legal advice, I'm certain it's legal in my country.

As for the speedometer, it's a pulse sensor. So either opto-coupler would be the best option I understand from you?

As for the arduino driving leds, maybe I wasn't clear, but it's just meant to light some LEDs in the instrument clusters. Not the actual headlamps or anything similar.

What would be a protection for that? Diodes?

I ended up re-creating the TIDA-01628 reference design by Texas Instruments: TIDA-01628 reference design | TI.com

Any remarks on that?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.