Basic Stamp PID?
aiiadict
Posts: 1
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
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA