Using a 12V signal from my car to make the Adruino draw on a display

So I've come up with the idea to make the Arduino display something on a tiny OLED display once it gets a signal. However this signal is 12v.

The signal in question is the VTEC signal (1994 Honda), this wire powers the VTEC solenoid on the engine. Now what I want that signal wire to do is send a signal to the Arduino aswell. Once the arduino sees this signal, it should draw something on the OLED display.

I know the Arduino can only do 5V on the pins, and AFAIK the signal is always 12v. So would it be the easiest to add a resistor between the wire (spliced ofcourse) and the arduino so its 5v?

Would this work?

Any help would be great

No, a single resistor would not lower the voltage at all. You need to protect the Arduino pins, and anything inside a car is a hostile environment for electronics.

Is this an analog or digital signal?

You can use a voltage divider. (The resistors should add-up to about 10K.)

But since "12V" in car isn't always 12V you can add a protection diode between the Arduino's input and ground.

Or if it's digital you can just use the protection circuit with one resistor & diode (but I recommending changing the current-limiting resistor to between 1K and 10K.) An opto-isolator is another "popular" solution for digital (including PWM).

If the signal is PWM you'll need a low-pass filter (a resistor and capacitor) to get variable DC.

P.S.
Voltage dividers are for "signals", not "power".

Hmm okay.

I believe the signal is in fact digital. The ECU sends out 12v or it doesnt. I'll look into the links you've sent me. Thanks

How much current can the ECU output source? Opto coupler needs an input current of several mA to switch reliably.

I think if this "signal" drives a solenoid directly, driving an opto-isolator additionally won't be a problem.

I used to own a Honda with a vtec engine many years ago. The valve timing was "variable" but not continuously variable like the ignition timing is. There were only two timings, one for lower revs, one for higher revs, and you could feel the changeover at 4,500 or 5,000 RPM, almost like a turbocharger cutting in. That engine would red-line somewhere between 6,500 and 7,000 RPM. So if the engine you are talking about is similar to that, yes, it would be a digital signal.

Yes its exactly that. Its the VTEC engagement. I basically want a display to show me that it has gone to VTEC mode, since its a performance built engine with a chipped ECU I want to keep an eye on it to see if the signal comes through

I'm not that great with these sorts of schematics, but still learning to understand them. So the Input would be the signal wire, then a 47K resistor going to 2 diodes and then another 22k resistor. But where does the resistor lead to? And the 5v and input pin doesn't make sense to me, could you explain that?

Thanks for the help!

Oh wait after R2 is ground, so the chassis of the car, okay that makes sense. Still unsure about the Input Pin and the 5v

If you could explain that that would be super helpful

An Arduino and an oled screen seems 1000% overkill for that. Couldn't you just wire up an led (with suitable series resistor, of course)? You can buy an LED with a shiny bezel and a built-in series resistor for 12V use very cheaply!

I know its overkill. I want the oled display to show the vtec logo animated and I'd like to mount it in my gauge cluster. I also want to use that screen to show intake air temps on the bottom too using a thermistor and placing that in the intake piping

The 5 V pin is the 5 V Vcc of the Arduino, and the input pin is the input pin on the Arduino.

Ah okay. That vcc is to power the Arduino? If so I'd need that signal from another source, say the car's ignition. Since I want te display to show my air intake temperature even when its not in VTEC.

Would that D2 diode be unneccesary in that case? If I want the power source from something else?

You must have some regulator to power the Arduino with 5 V via its "5V" pin. That is the connection from which you get the 5 V in the diagram. Same as anything else which runs on 5 V.

The diode is to protect the Arduino input from voltages in excess of 5 V. The diagram links to the discussion where I originally posted it; some people seemed to think that certain parts are not necessary but this circuit is simply designed to protect the Arduino under all circumstances.

Yes I think I understand. But in this setup I think it would mean that the arduino only gets power when that vtec wire gets power. I want the arduino to get power as soon as the ignition is turned on and that the vtec wire is just a signal for the Arduino to draw something on the Oled screen

Or am I wrong here?

How you connect the input has nothing whatsoever to do with how you power the Arduino.

You need to find a good quality "buck" converter to drop the 14 V from the ignition circuit to 5 V to operate the Arduino, connected to the "5V" pin.

Okay. Good thing that I'm doing some other project aswell that uses a 12-5v buck converter. I can tap into that

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