Title: Ch
1Ch2Robotics With The Boe Bot
2Prepare Power Supply
- Put 9V battery in your kit box!!
- Find 6 V battery pack and add 4 AA batteries
- Set Jumper position to V in
3Connect Continuous Servo Motors and Battery Pack
- Connect Servos to headers 12 and 13
- Connect battery back as shown
4Continuous rotation Servo Control
- The pulse width defines the direction and speed
of the servo motor. - 850 Maximum speed counterclockwise
- 750 Stopped
- 650 Maximum speed clockwise
- Pulses are still separated by 20ms
- Use the servo center programs on the next slide
to ensure servo is stopped at 750.
5Centering Servos-Run programs below and adjust
servo with parallax screw driver
6Testing individual Servos(Subsystem Test)
- Servo full speed (50 60 RPM)
- 1.3 ms or 650 2us (clockwise)
- 1.7 ms or 8502us (counterclockwise)
- Run Program
- Now change pin argument to 13 instead of 12
- Make both rotate full speed clockwise at same
time.
- 4 Now make both servos rotate counterclockwise
at full speed at the same time
7Controlling Robot Direction
- Run program to right
- Imagine Servos as wheels on opposite sides of
your robot - Think about why this would make the robot go
forward - Now modify so Robot would move backward
Try holding servos back to back when doing this!
8Adjusting speed and direction
- Fill out the description column in table 2write
some code and test your thoughts - The behavior column will be filled out when the
boe-bot is fully assembled
9Controlling Servo Run Time
- One time through loop
- 1.7 ms
- 20 ms
- 1.3 ms (code overhead)
- ______________
- 23 ms X 100 2.3 sec
- RUN VERIFY WITH STOP WATCH
Use reset to begin timing
10Servo Run Time Contd
- The code to the right should make the servo run
twice as long - Do the math
- Verify with stop watch
11Run time of both servos moving robot forward at
top speed
- P13 servo 8502us
- P12 servo 6502us
- Pause
- Code Overhead
-
- 1.7 ms
- 1.3 ms
- 20 ms
- 1.6 ms
- _______
- 24.6 ms
12Run time Calculations
- RUN TIME (Pulses) (.0246sec)
- How many pulses required to run robot full speed
for 3 seconds? - 3 sec (Pulses) (.0246sec)
- Pulses 122
- Enter code to rightthis should make both servos
go in opposite directions for 3 seconds then
reverse for 3 seconds...RUN VERIFY WITH
STOPWATCH - USE RESET TO START TIMING!
RESULTING CODE