Shop OBEX P1 Docs P2 Docs Learn Events
Basic Stamp PID? — Parallax Forums

Basic Stamp PID?

aiiadictaiiadict Posts: 1
edited 2005-03-29 18:18 in BASIC Stamp
I have hbridge connected to BS2
I have encoders connected to motors, one
on each side.

I would like PID source for BasicStamp...
I know this takes many FP calculations,
Perhaps PI controller?· I want something
that will make the motors match RPM's,
and reduce error....

example:

go FORWARD
both motors turned on to PWM 128
read encoders...
left encoder is 100 clicks farther
than right motor

software must:
1)adjust left motor PWM so it matches
right motor encoder clicks
2)the robot has turned slightly to the
right because left motor was running
faster than right...· I want to get
robot back on original course.

This would involve running with right
motor FASTER to get back onto original
straight line, and then adjusting the
PWM so that both motors run at same
speed.

aiiadict@gmail.com

Comments

Sign In or Register to comment.