Arduino and electronic gauges

Hello, I am really new to arduino-havent got a board yet but I have a project in mind. I am taking the ouput of an online racing sim and writing a few things out to a textbox in c#. I want to take that info and send it out to control physical gauges. The gauges I’m looking at use stepper motors but only a single wire to control the gauge, other wires are for voltage and ground. They are standard 12vdc gauges and the link I have for the wiring is: http://www.glowshift.com/instructions/7 … -Gauge.pdf

I’ve seen many examples of arduinos controlling stepper motors but they have been 4 wires. I am wondering if I can use an arduino to get this data from my pc and output to control the gauge using a single wire as shown in the wriing instructions for the gauge. Trying to figure as much as I can on my own just to learn it and for the accomplishment of it but I will still have to figure out how to output data to the arduino(although I have seen it done). Just mainly wondering if I could use the arduino this way or if maybe I need to use the motor shield too. Probably won’t be until next month when I actually get everything to try it out but but wanted to ask people that have used arduino before I go and buy stuff so I know what to order. Any help to this noob on arduinos would be greatly appreciated, thanks.

Shawn

smokinsport:
The gauges I’m looking at use stepper motors but only a single wire to control the gauge, other wires are for voltage and ground. They are standard 12vdc gauges and the link I have for the wiring is: http://www.glowshift.com/instructions/7 … -Gauge.pdf

I’ve seen many examples of arduinos controlling stepper motors but they have been 4 wires. I am wondering if I can use an arduino to get this data from my pc and output to control the gauge using a single wire as shown in the wriing instructions for the gauge.

I doubt the gauge you linked to uses a stepper motor. It seems to be a more common analog meter movement where the current flowing through the meter determines the needles deflection.

http://en.wikipedia.org/wiki/Galvanometer

What I think is happening is that the gauge gets 12V from the car and connects one end of the meter to that. The other end of the meter is connected to the sensor, in this case an oil pressure sensor. The sensor’s resistance varies with the oil pressure and so the current though the meter varies with oil pressure. The gauge is in effect an ammeter. There’s no motor involved.

Can you use an Arduino to control a variable current and thus control your gauges ? Yes I think so but we’d need some specifics on the sensors or gauges to know what do to. Specifically how much current is needed for full deflection of the gauge. My first thought is the PWM a transistor (or use a driver IC) at a high enough rate that the meter averages the current through it and moves according to that average. I think you’d also need some fixed resistance in that circuit to limit the max current through the meter. If you can’t get the information from the manufacturer you could probably find it out via experiment.

BTW if the gauge has some digital readout vs a needle, all the above basically remains true. You would still need to control current to make a reading. The question would be if the circuitry inside the gauge responds to a PWM’ed current like a traditional meter does.

OK, thanks. Found some more info and also said something about using transistor. The gauge description said they use steppermotor technology, but I wondered how. That would make more sense if it was current sensing. Also think it would make it easier. Think what I’ll do is order a gauge and see what I see, so to speak. Like you said, if you nothing else i will experiment. At worst I have to buy a couple gauges. Once I get one I should be able to figure out some more and maybe get more info on the gauge itself. Best part of diy is experimenting. Thanks for the reply, will try and keep updated in case others want something simlar.

smokinsport:
The gauge description said they use steppermotor technology, but I wondered how. That would make more sense if it was current sensing.

Regardless of how the meter moves it’s needle, it’s sensing current to determine how much to move it. Look at the sensor. It’s only got 2 terminals, one of which is connected to ground. The other is connected to the gauge. If I’ve understood what your intentions are, you need to imitate the sensor(s). The gauge then does whatever it does, however it does it.

EDIT : I read the gauge descriptions at the site you linked to. I believe the White7 gauges work as I’ve described. The Tinted7 & Elite10 gauges claim to have a “microprocessor controlled Swiss stepper motor”, no doubt because they have a peak recall feature. It has to be able to drive the needle independant of what the sensor is trying to indicate. If you’re using these gauges you may need to be careful in how you mimic a sensor. The MCU in these gauges is sampling the sensors current at some rate and may not respond to a PWM/averaged signal like a White7 gauge would.

If it were me doing this project, I’d set up a test bed for the meter. A multimeter, potentiometer and 12V source could be used to determine 0 and full scale.

There may also be published standards for this kind of gear.

For an update: I finally got c# to display the info in a textbox from the racing sim. I just need to figure out how to send serial to the arduino and then program the arduino. Looking at all the examples I think I am close for the first part, but then I started wondering:with all the products out there for individual things as far as a board for inputs, a board for output to LED’s, and another board to display gear, I think if I switch to the Mega it would be an all in one solution and do like I mentioned above to control gauges. After looking more at them I think the gauges will work just like a meter, again I think. I’m sure someone smarter with more experience could do it faster, but I also had to learn enough c# to get the output from the racing sim but if I get it to work, will be a nice project.

smokinsport:
After looking more at them I think the gauges will work just like a meter, again I think.

Well in case the gauges aren’t simple, if they are “smart” then my guess is that they work like I show below and you’d need a simple driver circuit. Values for the R’s and C’s would depend on the sensor you’re simulating. Even if the gauges are “dumb” you may need the transistor part to handle the current normally sunk by a sensor. Adding in R1 & R2 would ensure that the 0 - 100% PWM of the Arduino corresponds to min and max movement of the needle. And then you might as well add in C1 for good measure. :stuck_out_tongue:

I’d make R1 and R2 trim pots. Multiturn will give you much finer control. C1 may not be necessary depending on how much filtering the gauge does. PWM frequency is something you might need to play with.