Shop OBEX P1 Docs P2 Docs Learn Events
Controlling a single-needle gauge — Parallax Forums

Controlling a single-needle gauge

ChrisNChrisN Posts: 4
edited 2006-03-16 18:11 in BASIC Stamp
I'm planning a project in which I'd like to control several single-needle guages (like a spedometer) with a BASIC stamp.

1. Has anyone done this in the past?
2. Does anyone know where I can get a digitally-controlled guage (and the smaller, the better)

Here's an example of the type of gauge:
http://store.gaugemagazine.com/index.asp?PageAction=VIEWPROD&ProdID=1859

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-15 23:56
    What's the input the the gauge? You need to start there. If it's zero to N volts, you need to know what N is and put a suitable circuit between the Stamp and the gauge (ADC and buffer/amp).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • ChrisNChrisN Posts: 4
    edited 2006-03-16 00:01
    I think I know what you mean, but I'm new to this. I don't have a particular gauge in mind (I don't even know if a small, digitally controlled one exists out there) so I can't say what it's input ranges are. If I can find some, I'll try and look this up and share it.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-16 00:07
    If you can find a guage with a 0 to 5 volt input that will be pretty easy to control; you can use the PWM output through an RC (with opamp buffer), or use an off-the-shelf ADC. If all this is Greek, you may want to download our "What's A Microcontroller?" text and give it a read.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • PARPAR Posts: 285
    edited 2006-03-16 06:27
    ChrisN said...
    ... I don't have a particular gauge in mind....
    You have to determine what the purpose of your guage is first (i.e., what do you want to measure, or learn about?). The URL you initially provided shows a guage that measures air pressure (by directly connecting the pressurized air to the guage's input). It does not measure any manner of electrical parameter directly.

    PAR
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-03-16 09:37
    First of all, needle gauges come in many sizes.

    0- 5ma; 0-20ma; 0-100ma;0-10amps;0-3 volts;0-100volts; -15 to +15 voltsand many more.

    Second of all, that needle will bounce around on a car or motorcycle [noparse][[/noparse]the speedometer is a mechanical needle, not electrical].

    Third, if you want it to indicate something like MPH, you have to take it apart and change the face with your own art work.
    If you can live with the needle bouncing and changing the face, then you have to deal with the actual range.

    If you don't want to see a bouncing needle, an LED numerical guage may be more useful and teach you more about electronics.
    And an LCD will tell you what your are measuring without making an new face.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • ChrisNChrisN Posts: 4
    edited 2006-03-16 17:37
    Thanks for the reply, Kramer. I didn't know the size, so it's good that there's a selection to choose from.

    I'm not actually going to be using these on a car, (spedometer was just an example in my original post) but it will be on a device that will be carried around, so it won't exactly be on a stable surface. It will probably be still when the gauges are being read.

    I don't mind changing the faces for my use, I kind of expected that.

    I'm really after the analog aestehtics of the gauge rather than the digital aesthetics of the LED. Do you have any online resources for purchasing the gauges you cited?
  • JohnnyBJohnnyB Posts: 13
    edited 2006-03-16 18:11
    Most modern auto and motorcycle speedometers are actually analog electronic now. I don't think a mechanical type has been used in the last ten or 15 years.

    There are numerous places to buy the gauge "movements" ...meaning the needle, windings and associated parts. You'd have to build the enclosure and make the face. They are based on voltage or current input...you'll have to figure out what you need. You can get a movement and tailor the signal to meet the needs of the movement or you can find out what your signal to the gauge is going to be (voltage range, current range) and pick a movement to match possibly.

    I'd imagine you'll have to do some kind of analog to digital conversion....either going from the sensor into the BS or from the digital output of the BS to the movement.

    You could also make a servo gauge using the BS to drive the servo....that way you could use a digital input or a pulse input, do the math in the BS program and convert it to 1.0 - 2.0 ms pulses to drive the servo. Just did that myself with a simple circuit to test a tachometer idea. Took input pulses...measured the negative pulse width between the spikes and then did the math in the BS program.

    For instance...if the BS measures a 5ms pulse width...that's 200 pulses per second (1000ms / 5ms)...200 pulses per second x 60 seconds = 12,000 rpm. Then you write some math into the program to convert 12,000 into the .5 ms pulse to drive the servo clockwise...etc.

    Probably not very understandable to you at this point. But what you want to do IS possible....might not even require a BS to do it. More details always helps.

    JohnnyB
Sign In or Register to comment.