Shop OBEX P1 Docs P2 Docs Learn Events
Controlling servo position with varying dc voltage — Parallax Forums

Controlling servo position with varying dc voltage

Jim RicheyJim Richey Posts: 82
edited 2014-03-27 09:01 in BASIC Stamp
Hello
As the title suggests,I desire to use a dc voltage varying from 0-5v as the input to a BS2.
The input needs to change the servo position through it's 180 degree sweep.
I wonder if there is way of doing this as I haven't been able to figure it out.
I have converted a variable reluctance signal from an automotive speed sensor into a related dc voltage and wish to use a moving servo shaft with a needle attached to function as a speedometer as substitute for a mechanical type.

many thanks to the Parallax brain trust

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-03-25 11:55
    This shouldn't be too hard.

    You need to decide how you want to measure the voltage. I think you could use an RC decay circuit or you could use an ADC chip.

    Learn to read the voltage, learn to control a servo and then put the two together.

    It might be possible to use a simple servo tester from ebay to do this.

    Feed your 0 to 5V to where the wiper of the pot connects and use the 0 to 5V as the control knob. I'm not really sure if this would work or not.

    The BS2 route shouldn't be too hard.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-03-26 11:06
    I believe there's an example in the What's A Microcontroller manual on doing this. You control a servo position with a potentiometer. In that example the pot is read using RCTIME, but you could use an ADC, such as ADC0831 and get back a value of 0-255 and scale that to control the servo in the same manner.
  • Jim RicheyJim Richey Posts: 82
    edited 2014-03-27 07:00
    Hey,Thanks for the suggestions guys.I did think through the ADC concept while reading in the WAM manual.This seems promising.
    Right now,I have breadboarded a sensor,F/V converter,and a pair of LM 3914 display drivers with outputs sending a sequential H/L signal to the BS2 inputs.If I manage to work out the scaling and code ( miracle ),I will have 15 servo positions corresponding to the sensor output.After this method succeeds or fails,I'll happily move on to the ADC version.

    variable reluctance speed sensor >>>F/V converter>>>display drivers>>>BS2>>>servo position
    (electronic speedometer sensor)..........LM2907............. (2)LM3914......................speedometer needle

    The reason for this is to utilize the current design electronic speed sensor type transmission in an older mechanical type cable driven speedometer car. (67 Camaro with newer 6 speed manual from corvette). The servo will take the place of the existing mechanical speedometer drive in the original 67 instrument cluster.Very similar to the current industry method using stepper motors.

    TY
  • ercoerco Posts: 20,256
    edited 2014-03-27 09:01
    Neat project. Your '67 Camaro is further down the road than my '67 Corvair!

    I faked a tach using a servo on this art project several years ago. Synched the tach motion, and other motors & LEDs to sound files using a few BS1s. Fun stuff.
Sign In or Register to comment.