11.07.2015 Views

Builders guide robot pacman.pdf

Builders guide robot pacman.pdf

Builders guide robot pacman.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6cm11.5 cmFigure 35. Sketch of wheel dimensionsTo make a 90-degree turn, the distance travelled by one wheel wasdetermined. Since the distance between the wheels is 11.5 cm, thedistance travelled by the arc length l when θ is 90 degrees can be⎛π⎞ 23calculated. Therefore, l = rθ= ( 11 .5) ⎜ ⎟ = π cm.⎝ 2 ⎠ 4lθ11.5 cmTo make a stationary turn, the distance l to be travelled is distributedbetween the two wheels as l 2 because each wheel will turn 45 degrees.One wheel will turn 45 degrees forward, and the other will turn 45 degrees23 1 23backward. Therefore, each wheel travels × = π cm.4 2 8To find the number of stepper pulses needed to turn each wheel 45degrees, we calculate the number of pulses as23 1rotation 360°1pulseπ cm × × × = 23 pulses8 6πcm1rotation 7.5°Because our target speed is 20 cm/s, we calculate the number of pulses persecond required as20 cm 1rotation 360°1pulse 51pulses 19.6 ms× × × ≈ =second 6πcm 1rotation 7.5°second pulseTo achieve a speed of 20 cm/s, we need to create a square wave of about51 Hz. That means we need to toggle the stepper output twice every 19.6ms or in other words, generate interrupts to toggle at 19.6 / 2 = 9.817 ms.28

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!