Quote:
Originally Posted by gpetilli
One thing that I don't see in your post and that TravSatEE did not mention is that you probably need to add encoders to each pair of wheels. PID loops are closed loop systems where some device measures the error and then the PID values estimate how best to change the drive signal to achieve the desired results. For position control we typically use potentiometers for the feedback device because they have mechanical memory of where "zero" is. For velocity we typically use encoders (can also sense direction) or simpler optical sensors. Encoders mount on a shaft, preferably the same one the wheels are on. Since this may not be possible with your system and because you probably don't need to run both directions you could make a simple encoder by using the spokes of the wheel and optical reflective sensor and counting how many spokes per second you see.
|
My team considered that last part for a rough estimate of RPM. But I think you would need a custom counter circuit, or you'd be trying to poll your sensor constantly and hope you don't miss a changed state.