go_away

Author Topic: Servo control with button  (Read 1900 times)

0 Members and 1 Guest are viewing this topic.

Offline ogcyborgTopic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Servo control with button
« on: August 31, 2009, 03:01:22 PM »
Hi,

I am totally new at this stuff.  I would like to have a servo rotate 90 degrees with a button push, then when pushed again, it will return to it's original position.  How do I do this? I know there are controller boards and software.

I did purchase a servo controller that will do this, I plug in a batter pack and the servo, turn the dial and the servo operates how I want but it is not a button just a potentiometer.  I purchased a small board, a 555 timer chip, a 5k potentiometer, resistor, capacitor, to try to build the simple controller (for learning).

Any help or advice would be great.

Thanks,
Brian

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Servo control with button
« Reply #1 on: August 31, 2009, 03:38:08 PM »
this is a very simple task, what controller are you using, and what language?
Howdy

Offline ogcyborgTopic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: Servo control with button
« Reply #2 on: September 01, 2009, 11:18:30 AM »
It is a brand new Futaba Digital Servo S3152 (FUTM0311)

As far as software I don't have any in particular.  However, I am a programmer so i can program in C, C++, and many more.  I'm so new to this so I don't know.  I've seen a lot of stuff but don't know if I need stuff like the Anduit or PIC, etc.

I was reading online doing a google search on serve controller that the white wire receives a pulse of some duration and that is what controls it.  I don't know if I can do this with a 555 chip and hardware or if I need both.

Thank you for your help :-)

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,702
  • Helpful? 173
    • Society of Robots
Re: Servo control with button
« Reply #3 on: September 01, 2009, 01:25:46 PM »
I'd recommend ditching the 555 and learning microcontrollers :P

(start with the $50 Robot)

Offline ogcyborgTopic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: Servo control with button
« Reply #4 on: September 02, 2009, 10:16:33 AM »
Thanks, I'm reading the $50 robot now.  I mainly use a Mac on OS X, do you know if I can just Xcode or GCC without something like WinAVR or does WinAVR give me all the libraries I need?

Thanks for the help  ;D

Offline GearMotion

  • Supreme Robot
  • *****
  • Posts: 489
  • Helpful? 24
  • Two decades+ of Embedded Design
    • CircuitGizmos
Re: Servo control with button
« Reply #5 on: September 02, 2009, 10:36:29 AM »
You could use the Arduino IDE for code development as it runs on a Mac: http://arduino.googlecode.com/files/arduino-0017.dmg

And then use an Arduino, a BareBonesBoard (http://www.circuitgizmos.com/products/cgbbb/cgbbb.shtml) or the SOR parts kit (http://www.circuitgizmos.com/products/cgsorkit1/cgsorkit1.shtml) for an AVR with a bootloader in it (compatible with the Arduino IDE) for programming. You might also need a USB to TTL serial cable.

Offline Finnik

  • Full Member
  • ***
  • Posts: 59
  • Helpful? 4
Re: Servo control with button
« Reply #6 on: September 02, 2009, 11:05:29 AM »
You should be able to code and program on OS X if you've got the right software and packages, although I don't have any experience with OS X. I run Ubuntu Linux as my main operating system and after installing the right packages all is a breeze. Just try searching Google for "avr programming on OS X" or the like.
The libraries that come with WinAVR can also be downloaded and used separately.
« Last Edit: September 02, 2009, 11:06:59 AM by Finnik »
Think outside the box... inside is to crowded.

Offline ogcyborgTopic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: Servo control with button
« Reply #7 on: September 03, 2009, 08:34:17 AM »
I have Ubuntu running on my Power Mac so I can use that too.  I'll have to check out both options.  If I'm successful on the OS X stuff, is that worth posting my results? Or has it been covered a lot?

Thanks  8)

Offline GearMotion

  • Supreme Robot
  • *****
  • Posts: 489
  • Helpful? 24
  • Two decades+ of Embedded Design
    • CircuitGizmos
Re: Servo control with button
« Reply #8 on: September 03, 2009, 09:47:34 AM »
You SHOULD share. Even make a tutorial for others. It will be appreciated.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Servo control with button
« Reply #9 on: September 03, 2009, 06:31:38 PM »
Hi,

I am totally new at this stuff.  I would like to have a servo rotate 90 degrees with a button push, then when pushed again, it will return to it's original position.  How do I do this? I know there are controller boards and software.
I see now, that I missed that you wanted only one button when I drew this: http://That.Homepage.dk/PDF/Pushbutton_Servo_Control.pdf, which is with separate buttons for each position.
Could be modified of course.

If you allready were programming controllers and had the equipment, I'd recommend a PIC10F22xx for the job, but if you just want the job done, this is quicker.


Another way would be to modify the controller you allready have.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

 


Get Your Ad Here