Ive seen videos on the internet about useing car gauges for lfs i have the servos but i dont know what i need from there can someone plz help im willing to learn and program i just need some more info about it and im wanting to do it all by myself i dont plan on buying anything big just little parts. Thanks Cya P.s. 300th post
Servos are usually too slow to use as gauges. Unless they are high-speed servos, which still are a bit slow. If you want really responsive gauges, air-core is the way to go.
What you want to do takes a bit more than programming. I haven't seen any inexpensive kits for hooking up gauges the way you'd like to. OutGauge gives you a bunch of numbers (e.g., 4000 if the engine is revving at 4000 RPM). Most gauges fit to work in a sim cockpit take some kind of variable voltage over range of their movement (e.g., 1.2v = 4000 RPM on the dial). Your exercise is to turn a number coming from OutGauge into voltage going into the tachometer. There are a number of write-ups from people who have done it. Usually it involves writing a program that can grab the number from OutGauge, send it out the serial port on the computer to a microcontroller circuit that takes the number and uses something like PWM to turn it into a variable voltage. The hard part is the electronics, and writing the code for the microcontroller. If you are interested in learning about these things, it's well worth it, especially if imagining the project done keeps you going. This was just a quick overview, but you can see it's not really just a case of connecting the guage and having it work somehow. There are people here who have done it, and hopefully they'll point you to their write-ups, or do a write-up if they haven't yet. Good luck!
OK, I'll give it a try. I'll start at LFS and end at the gauge. The links after each section apply to that section.
1) Get the data from OutGauge. There are a number of libraries that help you do this. I wrote the first version of JInSim, so I'll use that as an example. In fact, there's an example program that uses OutGauge to control a GUI speedometer.
2) Send the data out. You'll use the data in exactly the same way, except instead of using it to update a graphical gauge, you'll send it out a serial (or USB) port.
3) Turn the number into a voltage. At the other end of your cable, a microcontroller circuit will be attached. There are a number of microcontrollers with built-in serial or USB support. All the playing around that I've done is will Atmel microcontrollers. You'll need to write another program for the microcontroller. This one will be written in assembler or C. It will need to take the number you sent down the serial cable and vary the voltage coming out of one of the pins on the microcontroller. A lot of people use a simple hack called Pulse Width Modulation (PWM). You'll need to figure out what voltage corresponds to what reading on the gauge to figure out how to turn your number into the voltage.
4) Hook up the gauge. One wire of the gauge will hook up to a circuit that comes from one pin of the microcontroller, and the other wire will go to ground.
great to see more and more people interested in this field.
PWM and DAC are two different things.
PWM is a square wave signal where the "on" and "off" time is varied to achieve an overall average voltage.
a DAC is a Digital to Analog Voltage. The output is a constant and steady voltage.
I haven't messed around with DACs a lot, but from the ones that I've heard of, they use multiple op amps and switches to accumulate a voltage with respect to the binary input.
Apart from Atmel, check out Microchip USB devices. I've used the 18f4550 and it's got a lot of tools you can use, especially various sample codes to get you up and running. Some microcontrollers even support internal DAC so that you don't even need to buy a seperate one.
you also can take a look to projects like this , everything you need to use gauges is available there or here is some package often used for simulator projects.