You could do PWM with a pause on a "stamp":
x= 10 (rate)
port1 = on
I don't think the Stamp is fast enough to do PWM at
a reasonable frequency though,
and you would certainly need to amplify ttl levels with a
You would probably get the motor turning ON and OFF
with a stamp+stampcode, or jitters, because the frequency isn't
There is some coverage of PWM in the book, but I'm thinking more of a
I am not impressed by many motor amplifiers. The fact that you buy them
doesn't automatically mean they are better than what you could build. Some
I've seen are little more than power transistors, simple control circuit,
and a heat sink. Others are very sophisticated and worth the money. It is
hard to know just by looking at them.
I remember having an argument with an engineer a long time ago about a PWM
control system. I was describing the theory and he just did not get it. He
understood the duty cycle aspect, but he didn't quite grasp why the LC
filter with the reverse polarity clamp diode was important. Coming from a
linear world, his instinct was to dump the power out of the circuit, not
back into it. It took him a little experimentation, but he eventually got
Right now I am actively working on a page, with text, pictures, and C/++
code that shows how to take a PS/2 mouse, rip it apart, and make two motor
encoders and interface it with a PC. I've got all the hardware working, and
I've got the I/O stuff written, I just need to tie it together.
Overall, I'm working on a sub-$500 robot platform. I'm not sure if I want to
sell it or if I want to see if I can publish it, or if I just put a paypal
button on it.
Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here.
All logos and trade names are the property of their respective owners.