Negative trigger/pwm

Good evening guy/gals

I'm a complete novice with Arduino. I have a uno R3 and im building a Sim rig for my son. The speedo in the car has a 5v supply and is controlled by the ecu and uses a negative trigger. Can this be done using a Arduino ? I can't seem to find anything that helps?

Thanks in advance

Please explain what this means.

An Arduino input cannot be exposed to negative voltages (with respect to Arduino GND).

The speedo has a permanent 5v supply and ecu grounds the circuit to complete it, So i need to Arduino to be the ecu?

If the "ecu" acts as an ordinary switch, that is with no voltage present on the line, you can treat it as a simple push button switch.

Use the Arduino pinMode function to set INPUT_PULLUP, which puts 5V on the pin through a resistor, and when the pin is grounded, digitalRead() will report LOW.

//in setup()
pinMode(pin, INPUT_PULLUP);

//in loop()
if (digitalRead(pin) == LOW) do_something();

Don't forget to connect the grounds.

The ecu does act as a switch but the line to the ecu from the speedo will have 5v going to it. So if i understand what your idea is that won't work?

The action of pinMode(pin,INPUT_PULLUP) is to put 5V on the line, acting like the "speedo".

Use your multimeter to make sure that the ECU input does not put any voltage on the line.

Hi @ctrtech ,

I assume that ECU means "Electronic Control Unit". Correct?

If yes, does it have a brand and type and do you have access to a manual or interface description? How is the speedometer connected to it? Can you provide a drawing?

That information would be helpful...

I have used a multi meter and the line does have 5v on it, so i dont need the 5v i need the ground but it need to be pulsed.

Hi @ec2021

Yes ECU means engine control unit. I dont actually have the ecu.
I only have the dash harness and fuse box which i have powered up with a 12v power supply. This has given me all the 5v supply's i needed for the dash unit.
So the dash/speedo unit has a 5v supply that is sent from the speedo to the ecu which triggers/switches the circuit on and off the control the speedo gauge.
What i need the Arduino to do is act like the ecu. I'm using sim hub (which i probably should have stated in the 1st place) to control the Arduino but what i can see i can't use the Arduino to control the earth?

Could You provide technical docimentation telling how those devices work?
The replies given shows lack of information from You.
The dialogue would take for ever going on this way, and it's not necessary.

A link telling what forum requests is: How to get the best out of this forum - Using Arduino / IDE 1.x - Arduino Forum

I think you mean the "idle state" is HIGH and the pulse goes LOW momentarily.

I assume you mean "to pull a signal pin to GND", do you?

That's possible of course. The electrical situation with your different devices is just unknown. Once this is clear an appropriate solution can be posted, e.g. whether the Arduino can be used hardwired or if e.g. optocouplers are required.

No need to give in ...

I can't believe that a speedometer is driven from the ecu.
A tachometer could be driven from the ecu.

There is no direct link between engine speed and road speed.

The information needed to drive a speedometer has to come from somewhere in the transmission.

You mentioned you use simhub. As far as I understand it now you want to use the prepared solution from simhub.

After some research I found this page

https://github.com/SHWotever/SimHub/wiki/Arduino-After-Market-Speedo-support

and there a link to this webpage

https://github.com/SHWotever/SimHub/wiki/Arduino-After-Market-Tach-support

where the wiring is explained as required for simhub provided Arduino sketches.

If there are still problems occuring it might be a good idea to post your questions in the simhub forum, wouldn't it?

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