Is there a way to program a robot with python (ex, an electric motor, control it's speed, etc)

Hendrik van Rooyen mail at microcorp.co.za
Mon Jul 9 08:47:58 CEST 2007


 <socialanxiety at ......com> wrote:

> i hope someone here can help me.
> 
> basically, me and my friend have a summer project.
> 
> in this project, we need something that would basically function as a
> blender. we know we'll need to buy a motor that spins, but what we're
> having trouble with is figuring out how to program it. we want to be
> able to control the speed of the motor. how would we accomplish this?
> 
> i'm new to all of this, so i'm having a hard time wrapping my mind
> around how it'd be possible to program one of those things :\
> 
> ex: what if i want the motor to turn for 10 seconds. stop for 5. then
> turn the other direction.
> 
> would you program it the same way you would on a personal computer
> (via c, python, etc)?

It needs a bit more than just the motor - you need to organise some i/o
(lines that the computer can control) and some kind of interface to control
the power, and you have to put it all together - can you solder?

It may be easier to forget about the computer stuff and just use relay logic
for direction control - given that it is a DC motor that would turn the other
way, and not a universal motor (like the one in a drill, that turns the same 
way given either AC or DC).

Speed control for a small motor can be accomplished by a heavy rheostat
in series with the motor.

And that should be good enough for a summer project.

On the other hand, if you (or your parents) have pots of money then
you can buy digital to analog hardware that can be used to tell a powerful
DC coupled amplifier what to do, and have a stab at programming the
resultant combination.

But if I were you, I would do the first kind of thing, and use the rest of the 
summer to soak up the sun, instead of breathing solder fumes in a basement,
or crouching over a keyboard ruining your eyes watching a screen...


HTH  - Hendrik






More information about the Python-list mailing list