Shop OBEX P1 Docs P2 Docs Learn Events
pontentiometer to control standard servo — Parallax Forums

pontentiometer to control standard servo

sushiandmorihikosushiandmorihiko Posts: 40
edited 2007-10-05 22:03 in BASIC Stamp
hello,

now i am planning to rotate standard servo by means of 3-pin potentiometer---so when you turn the knob of the potentiometer,the servo will move the same amount and direction with the potentiometer.
is there any way i can do this?--i have seen the servo driver made by robotic world which have this function--so i would like to make my own too.

thank you for the attention

Comments

  • D FaustD Faust Posts: 608
    edited 2007-10-04 22:29
    You make the RCTIME circuit for photoresistors (see boe-bot book)··and retieve a value.· Next you run this value through some calculations (do some testing to get it right {extremes and middle, If you give me some values I might be able to help if you need it}) and output it through a pulsout command ie: PULSOUT pulsetime

    Hope this helps

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    LOOKDOWN ThisThread, [noparse][[/noparse]Your_?, My_?, Cool_Thing], looknum
    LOOKUP looknum, [noparse][[/noparse]1, 2, 3], subnum
    ON subnum GOTO Hope_this_helps, Thanks!, WOW!!
    END 
    
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2007-10-05 00:10
    If all you want to do is throttle a servo·with a pot·you could use a 555 timer, potentiometer size not important since it's being used as a voltage divider:



    attachment.php?attachmentid=49735

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR

    Post Edited (TechnoRobbo) : 10/5/2007 12:24:35 AM GMT
    1561 x 961 - 126K
  • sushiandmorihikosushiandmorihiko Posts: 40
    edited 2007-10-05 04:26
    many thanks to d faust and technorobbo

    i have followed your method ,d faust and it works just great. it works really well and sensitive with RCTIME. here is how i did it: with reference to page 208 of boe-bot book
    note--you just have to replace the photoresistor with the potentiometer and voila. ok here is the code:

    timeleft VAR Word
    x VAR Word


    DO
    HIGH 0
    PAUSE 3
    RCTIME 0,1,timeleft

    DEBUG HOME, "timeleft=", DEC5 timeleft
    PAUSE 1

    x = timeleft * 16 + 200

    PULSOUT 1,x

    and the rest is like what d faust has said----again thank you for the advice(i have been trying this for about an hour and finally figures it out).

    i would like to try out technno robbo ideas too but i dont have the ics with me right now and it is considerably quite complex but i bet it packs more functions.
    looks really cool--is it the kind of circuit that parallax or lynmotion used for driving servos--wow.

    you guys seem really experienced in driving standard servo--perhaps until my project is done i will show you guys--hope it is up to your guys standard

    thanks a lot guys
  • sushiandmorihikosushiandmorihiko Posts: 40
    edited 2007-10-05 04:35
    hi guys
    what does centering servo actually means?
    -is it turning anyway you like and then it will go back to the centre 90 degree for 180 degree rotation servo, or
    -is it turning anyway you like and it will go back to where it first started,or
    -is it turining anyway you like then it will go back according to the preset angle of your choice.

    if anyone knows about centering--pls help me.
    i want my servo to move anywhere around and after i m done it will go back to the preset angle or the degrees that i have set in the first place.

    i will gladly accept sample codes for standard servo centering

    thank you in advance
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2007-10-05 06:20
    sushiandmorihiko,

    You might find this link useful:
    http://forums.parallax.com/showthread.php?p=629063


    "centering" is usually referred to servos that have been modified for continuous rotation. It is the position that keeps the servo stationary. You can adjust this position either with a set screw if that option is available, or you can adjust the PULSE width offset that you are sending to the servo through software.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2007-10-05 10:39
    sushiandmorihiko said...
    --is it the kind of circuit that parallax or lynmotion used for driving servos--
    Can't speak for Parallax but I highly doubt it - that's an old fashioned analog method -both chips are really inexpensive because there from the stone-age.
    sushiandmorihiko said...

    i bet it packs more functions.
    I've used Parallax PSC's in my projects and those are really flexible. You can drive them straight from a PC using their software or from your Stamp.·They don't cost an arm and a leg either. This chip solves the issue of running multiple servos (16 or more if daisy chained)·and not having to worry about your programs timing loop and data storage. It has smooth ramping built in.·

    ·
    http://www.parallax.com/detail.asp?product_id=28023
    Here's the PC direct software:
    http://www.parallax.com/dl/sw/SetupPSCI.exe


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR

    Post Edited (TechnoRobbo) : 10/5/2007 10:48:50 AM GMT
  • stephenwagnerstephenwagner Posts: 147
    edited 2007-10-05 11:53
    Here is another Parallax link, See application #4.

    http://www.parallax.com/dl/appnt/stamps/bs1Appnotes.pdf

    SJW
  • D FaustD Faust Posts: 608
    edited 2007-10-05 22:03
    Glad to help.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    LOOKDOWN ThisThread, [noparse][[/noparse]Your_?, My_?, Cool_Thing], looknum
    LOOKUP looknum, [noparse][[/noparse]1, 2, 3], subnum
    ON subnum GOTO Hope_this_helps, Thanks!, WOW!!
    END 
    
Sign In or Register to comment.