Build a Timed Servo with Basic Knowledge | PF

  • Thread starter Zenox
  • Start date
  • Tags
    Servo
In summary, Dion is looking for a tutorial or program for programming a microcontroller to do the job of a timed servo. He is also interested in the Picaxe range of chips. There are several options for him to consider, including using a servo motor, using a DC motor and relays, or using a Basic Stamp II with servo programming.
  • #1
Zenox
2
0
Hey PF.

I just joined, and I got a question. I want to make this 'timed' servo, making it go from -25 to 25 degrees angle spread over 1 or 2 seconds, and then go back and repeat. I know this might be difficult, but if you can help me, please do!

I think I'll have to program a microcontroller for this. Since I haven't done this before, I would like a link to a good tutorial. I can do some coding/scripting, so that will be OK...

Also, if possible, just a little quick scheme... I don't need a PCB design yet, just the scheme :D

Regards

-Dion
 
Engineering news on Phys.org
  • #2
Zenox said:
Hey PF.

I just joined, and I got a question. I want to make this 'timed' servo, making it go from -25 to 25 degrees angle spread over 1 or 2 seconds, and then go back and repeat. I know this might be difficult, but if you can help me, please do!

I think I'll have to program a microcontroller for this. Since I haven't done this before, I would like a link to a good tutorial. I can do some coding/scripting, so that will be OK...

Also, if possible, just a little quick scheme... I don't need a PCB design yet, just the scheme :D

Regards

-Dion

Welcome to the PF, Dion. There are several ways you can do this. Are you sure you need a servo motor? Could you just use a DC motor and relays to control direction?

You can also just control it from your PC, and script something on the PC to talk to a USB or serial motor control widget. I think National Instruments has some things that you could use:

http://search.ni.com/nisearch/app/main/p/q/motor/

Omega also has some motor resources:

http://www.omega.com/search/esearch...ort=rank&search=MOTOR&submit=Search&ori=motor

If a DC motor would work for you (or a geared-down DC motor), you could just put limit switches on the system to stop the drive at the end of each travel.
 
  • #3
Good to hear you are willing to try a Micro to do this.

You might like to try the Picaxe range.
All the chips can do servo commands.
There is a summary of other commands in this link:

https://www.physicsforums.com/showthread.php?t=331073

The Servo command can run in the background while you do other things.

So, you might send a command for the servo to take a certain position and the background command will keep sending the right pulses to keep it there.
You then do a delay of perhaps 100 mS, then tell the servo to go somewhere else. These delays are the way you control the speed of movement.

The command for the 100 mS delay is
pause 100

The command for the servo is like this:
servo 4,75 ‘ initialise servo
main: servopos 4,75 ‘ move servo to one end
pause 2000 ‘ wait 2 seconds
servopos 4,225 ‘ move servo to other end
pause 2000 ‘ wait 2 seconds
goto main ‘ loop back to start


This is an example from the Picaxe manual 2 which is included in the following download.

You can get the programming editor for this at:
http://www.rev-ed.co.uk/picaxe/
It is a 38 MB download but updates are smaller.
 
  • #4
The Basic Stamp II would also be a good choice for this. If you buy Parallax's "What is a microcontroller?" you get a basic stamp, servo, some components, and a book that tells you exactly how to do this. You can find these at your local Radio Shack too.
 
  • #5
I would use the basic stamp. When I got one the first thing I did was use it to control servos, they made it very easy to do. Radio shack has the stamps as a kit with a few other parts including a servo. They also include a book that gives you some sample code, programming cable, and software. There is a step command in Basic that allows you to program it to move a servo from one position or another slowly or quickly.
 
  • #6
These are some prices on Basic Stamps
BS1... $29
BS2...$49
BS2E...$54
BS2P...$79

Here are some prices on Picaxe chips
8M...$2.65
14M...$3.45
18M...$3.75
20M...$3.45
18X... $7.95
28X1...$9.95
40X1...$9.95

I can understand people suggesting what they have used themselves, but you would need a good reason to ignore the message in those prices.
 
  • #7
Sorry for the very late responce...

Thanks for all your tips! I will sure try everything that's needed! Thanks a lot!

-Dion
 

1. What is a timed servo?

A timed servo is a type of motor that can be programmed to rotate to a specific angle for a set amount of time. This allows for precise control and movement in various robotic and mechanical applications.

2. What is PF in relation to building a timed servo?

PF stands for "Power Functions," which is a system used by LEGO to control and power their motors and servos. It includes a battery box, receiver, and remote control, which are necessary for building a timed servo with basic knowledge.

3. Do I need any prior knowledge to build a timed servo with basic knowledge?

No, you do not need any prior knowledge or experience to build a timed servo with basic knowledge. However, having a basic understanding of electronics and programming may be helpful.

4. What materials do I need to build a timed servo?

To build a timed servo, you will need a servo motor, a PF receiver, a PF remote control, a battery box, and a few LEGO bricks and connectors. You may also need a microcontroller and some basic programming skills, depending on the complexity of your project.

5. How do I program a timed servo?

To program a timed servo, you will need to use a microcontroller such as an Arduino and write a code that specifies the angle and duration of the servo's movement. Alternatively, you can use the PF remote control to manually set the angle and duration. There are also various online tutorials and resources available to help you with programming a timed servo.

Similar threads

  • Electrical Engineering
Replies
3
Views
1K
  • Electrical Engineering
Replies
14
Views
809
  • Electrical Engineering
Replies
3
Views
801
  • Electrical Engineering
Replies
4
Views
2K
Replies
2
Views
1K
  • DIY Projects
Replies
21
Views
3K
Replies
10
Views
2K
Replies
13
Views
4K
  • Mechanical Engineering
Replies
4
Views
1K
  • Feedback and Announcements
Replies
3
Views
1K
Back
Top