Outgauge
(14 posts, started )
#1 - kyler
Outgauge
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.
#3 - kyler
Can u explain what aircore is and what do I need to do to go about using aircore?
#4 - kyler
can anyone plz help me??
kyler,

I think what he was talking about are these gauges: http://www.mikesflightdeck.com/diy_aircore_instruments.htm

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!
#6 - kyler
I'm willing to do anything just point me in the direction and I'll go from thee can u give me somewere to read or somthing?
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.

http://jinsim.sf.net

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.

http://users.frii.com/jarvi/rxtx/

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.

http://www.atmel.com
http://www.avrfreaks.net
http://www.embedded.com/story/OEG20010821S0096
http://www.youtube.com/watch?v=Q-EK1x_f39s

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.
Quote from rheiser :A lot of people use a simple hack called Pulse Width Modulation (PWM).

Wouldn't it be better to use a DAC instead?
Quote from wheel4hummer :Wouldn't it be better to use a DAC instead?

Actually, a lot of DACs use PWM internally. I just didn't want to add another chip to his circuit when it's easily done with the microocontroller.
so do i need to do that hole pwm process?
A lot of microcontrollers have PWM built into available library code or commands. This makes PWM simple and lowers tha parts count.

Air Core gauges are expensive because they require the winding of a lot of copper coils in a small space.
Quote from PWILLARD :A lot of microcontrollers have PWM built into available library code or commands. This makes PWM simple and lowers tha parts count.

I was just thinking, if you run PWM through a capacitor, wouldn't it smooth it out and basically act like a DAC?
Quote from wheel4hummer :I was just thinking, if you run PWM through a capacitor, wouldn't it smooth it out and basically act like a DAC?

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.

good luck.

Outgauge
(14 posts, started )
FGED GREDG RDFGDR GSFDG