Shop OBEX P1 Docs P2 Docs Learn Events
Controlling analog dials via stamps — Parallax Forums

Controlling analog dials via stamps

OakGraphicsOakGraphics Posts: 202
edited 2006-09-06 10:17 in General Discussion
I would like to contol some analog gauges like automotive gauges for tach, speed, oil temp, gas gauge, etc from some form of basic stamp· whether its the BS1, bs2, sx, or propeller.· I would ultimately like to make the project be able to hook up to a pc via usb so I can control it via software to make the external gauges for a virtual car I am making.· It would be great if I can make it Human Interface Design (HID) complient, but I dont know how more complex or even if this would fall into a HID design since it's more of an 'output'·then an input. (I will have to read up on that)·

Any suggestions or directions on this would be very handy!· Has anybody done something like this?
·

Comments

  • steve_bsteve_b Posts: 1,563
    edited 2006-09-01 01:52
    Most "sending units" in cars, output a 5v voltage. When you've only got half a tank of gas, your 'gas tank sending unit' might be outputting 2.5Volts.

    You could do a few things to mimic this. You could look in to controlling a digital Potentiometer with the stamp...and set up a voltage divider using the digital pot and another reference resistor.
    OR, you might look in to Pulse width modulation. Install PBasic editor and go to the help menu and look up Pulseout....essentially, you could pulse out to a transistor that switches 5volts on and off.....if you switch the 5volts so that's it's on for half the time and off for the other half (known as 50% duty cycle) you could invariably have 2.5volts.

    Guys, please jump in if I'm simplifying this too much or have missed something.

    Op-amps might be another method....but I'll let someone else chime in on that one!

    Cheers

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • Lee HarkerLee Harker Posts: 104
    edited 2006-09-01 03:14
    Pwm would be a realistic possibility. An analog automotive meter is a natural filter for the PWM waveform. The sticking point is what makes the meter tick. I'm sure not all automotive meters react the same. For example a voltmeter might actually read the battery voltage directly whereas a gas guage might respond to a different voltage range.
    You will need to pick your meters and see what it takes to get them to move. It will probably need more current than a Stamp pin can provide.
    Since this will be a virtual car, you may want to pick a meter you like and that responds well and then just change the face markings to what you want them to say.
    I did something like that in a project once where they wanted two meters that would display heat and cold. I only had a couple of 1mA analog meters so I made up a graphic for the faces and used resistors to adjust the needle range.
    Hope this helps.

    Lee
  • tech-mechtech-mech Posts: 14
    edited 2006-09-01 03:22
    I think you will find that automotive gauges are current sensitive, and very slow responding. The voltage regulators were bi-meta hotwire devices and you could watch them pulse with an analog multimeter. The senders are variable resistors on the ground side. Tachs are another thing and vary more in design.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dale Bartel

    Portland Or
  • hammerhead74000hammerhead74000 Posts: 58
    edited 2006-09-01 06:21
    Are you trying to use existing guages (like, say, autometer or some other aftermarket brand), or are you trying to make your own?

    If it's option 1 (existing guages), then the input for them will depend on the guage. Some (like mentioned above) take a 0-5V signal, others take a 0-12V signal; and some are voltage-driven, but some are current driven; and a few (like speed and tach) are pulse-rate driven. If you are going to use a PWM signal; I might suggest using something like a ULN2803 to drive them; as that will protect your MCU from any inductive issues (some meters have coils in them).

    If it's option 2 (DIY guages), and you don't want to go digital; you could use some RC servos, and just mount needles on them; they are easy to drive, and interface directly to your MCU. Google "microcontroller RC servo", there's lots of info. Third link down when I just did it was this:

    http://www.geocities.com/BourbonStreet/3220/servobasics.html

    which has a good explanation of the control signal.
  • John BondJohn Bond Posts: 369
    edited 2006-09-05 11:36
    Hi Guys

    I'm playing with the same idea at present, but large guages, 600mm or 2 foot in Diameter. I've played with Steppers but servos seem to be the answer.

    Circuit Cellar No 189 - April 2006 has a very interesting article on a·remote, radio controlled (Zigbee) guage. It displays the NASDAQ. I suggest you get the magazine and look the article up. Attached is a Photo from the article.

    General knowledge question - Who knows what·NASDAQ stands for? Don't google it now. We South Africans·use the JSE, Honkong the Hangsen and Germany the DAX

    Kind regards from Africa where even the fall of the NASDAQ doesn't upset us.

    John Bond
    451 x 347 - 41K
  • OakGraphicsOakGraphics Posts: 202
    edited 2006-09-05 23:05
    John Bond said...
    Hi Guys

    I'm playing with the same idea at present, but large guages, 600mm or 2 foot in Diameter. I've played with Steppers but servos seem to be the answer.

    Circuit Cellar No 189 - April 2006 has a very interesting article on a·remote, radio controlled (Zigbee) guage. It displays the NASDAQ. I suggest you get the magazine and look the article up. Attached is a Photo from the article.

    General knowledge question - Who knows what·NASDAQ stands for? Don't google it now. We South Africans·use the JSE, Honkong the Hangsen and Germany the DAX

    Kind regards from Africa where even the fall of the NASDAQ doesn't upset us.

    John Bond
    Howdy John, That sounds like a cool idea.· I will check out the article in Circuit Cellar as it sounds like an idea worth investigating.

    I have thought of using servos before but thought they would have·2 problems for my purposes:
    1: they are noisy
    2: They are not very quick responding - so they don't look like a 'gauge' in movement

    I also like the idea of the previous post to find a guage I like and then change the graphics to suit my needs.· There is one guage I might have problems with though as it's an old 'smith' style dual guage.
    attachment.php?attachmentid=43122
    ·I supose I could have 2 servos in that spot work.· I just need fast-acting and lightweight servos I guess.

    Post Edited (OakGraphics) : 9/6/2006 7:09:07 AM GMT
    178 x 133 - 7K
  • John BondJohn Bond Posts: 369
    edited 2006-09-06 10:17
    Hi Daniel

    If you can lay your hands on CorelDraw, Guages are a piece of cake...

    I produced a quick example of a dial but unfortunately·our internet service won't let me send it.

    Kind regards

    John B
    1175 x 1124 - 73K
Sign In or Register to comment.