digital electronics the boe-bot and servo motors
TRANSCRIPT
![Page 1: Digital Electronics The Boe-Bot and Servo Motors](https://reader036.vdocument.in/reader036/viewer/2022062409/5697bfe31a28abf838cb4f13/html5/thumbnails/1.jpg)
Digital Electronics
The Boe-Bot and Servo Motors
![Page 2: Digital Electronics The Boe-Bot and Servo Motors](https://reader036.vdocument.in/reader036/viewer/2022062409/5697bfe31a28abf838cb4f13/html5/thumbnails/2.jpg)
The Boe-Bot and Servo Motors
This presentation will
• Present an overview of the Boe-Bot Assemble.
• Detail how Servo Motors work, and how they are used to control the movement of the Boe-Bot.
2
![Page 3: Digital Electronics The Boe-Bot and Servo Motors](https://reader036.vdocument.in/reader036/viewer/2022062409/5697bfe31a28abf838cb4f13/html5/thumbnails/3.jpg)
The Completed Boe-Bot
3
![Page 4: Digital Electronics The Boe-Bot and Servo Motors](https://reader036.vdocument.in/reader036/viewer/2022062409/5697bfe31a28abf838cb4f13/html5/thumbnails/4.jpg)
Assemble : Chassis (1 of 5)
4
![Page 5: Digital Electronics The Boe-Bot and Servo Motors](https://reader036.vdocument.in/reader036/viewer/2022062409/5697bfe31a28abf838cb4f13/html5/thumbnails/5.jpg)
Assemble : Servo Motors (2 of 5)
5
![Page 6: Digital Electronics The Boe-Bot and Servo Motors](https://reader036.vdocument.in/reader036/viewer/2022062409/5697bfe31a28abf838cb4f13/html5/thumbnails/6.jpg)
Assemble : Battery Pack (3 of 5)
6
![Page 7: Digital Electronics The Boe-Bot and Servo Motors](https://reader036.vdocument.in/reader036/viewer/2022062409/5697bfe31a28abf838cb4f13/html5/thumbnails/7.jpg)
Assemble : Wheels (4 of 5)
7
![Page 8: Digital Electronics The Boe-Bot and Servo Motors](https://reader036.vdocument.in/reader036/viewer/2022062409/5697bfe31a28abf838cb4f13/html5/thumbnails/8.jpg)
Assemble : BOE (5 of 5)
8
![Page 9: Digital Electronics The Boe-Bot and Servo Motors](https://reader036.vdocument.in/reader036/viewer/2022062409/5697bfe31a28abf838cb4f13/html5/thumbnails/9.jpg)
Servo Motor Connections
Servo Motors are connected to…
• P13 – Left Servo• P12 – Right Servo
9
![Page 10: Digital Electronics The Boe-Bot and Servo Motors](https://reader036.vdocument.in/reader036/viewer/2022062409/5697bfe31a28abf838cb4f13/html5/thumbnails/10.jpg)
Vdd / Vin Jumper Setting
• The BOE provides a jumper that allows the Servo Motor to be powered by Vin or Vdd.
• If you are using a 9 v battery or a Wall-wart transformer, the jumper should be in the Vdd position.
• If you are using a 6 v battery pack, either setting will work.
• Since we will be using all three power sources, the jumper should be in the Vdd position. 10
Jumper
![Page 11: Digital Electronics The Boe-Bot and Servo Motors](https://reader036.vdocument.in/reader036/viewer/2022062409/5697bfe31a28abf838cb4f13/html5/thumbnails/11.jpg)
Servo Motor – Power Position
11
Power Switch Positions
0) OFF
1) STAMP
2) STAMP and Servo Motor Connectors X4 & X5.
![Page 12: Digital Electronics The Boe-Bot and Servo Motors](https://reader036.vdocument.in/reader036/viewer/2022062409/5697bfe31a28abf838cb4f13/html5/thumbnails/12.jpg)
PULSOUT Command PULSOUT Pin, Duration
• Pin : Specifies the I/O pin (0- 15) to use.• Duration : Specifies the duration (in 2 µs increments)
of the pulse.
Example:
PULSOUT 12, 400
Sends a pulse of 800 µs (400 x 2 µs) to pin 12.
12
![Page 13: Digital Electronics The Boe-Bot and Servo Motors](https://reader036.vdocument.in/reader036/viewer/2022062409/5697bfe31a28abf838cb4f13/html5/thumbnails/13.jpg)
Controlling The Servo Motors
13
DO PULSOUT 12, 750 PAUSE 20LOOP
750 750 x 2 µs = 1500 µs = 1.5 ms
20 ms
![Page 14: Digital Electronics The Boe-Bot and Servo Motors](https://reader036.vdocument.in/reader036/viewer/2022062409/5697bfe31a28abf838cb4f13/html5/thumbnails/14.jpg)
Controlling The Servo Motors
14
DO PULSOUT 12, 750 PAUSE 20LOOP
DO PULSOUT 12, 650 PAUSE 20LOOP
DO PULSOUT 12, 850 PAUSE 20LOOP
Motor Still
Full SpeedClockwise
Full SpeedCounter-Clockwise
![Page 15: Digital Electronics The Boe-Bot and Servo Motors](https://reader036.vdocument.in/reader036/viewer/2022062409/5697bfe31a28abf838cb4f13/html5/thumbnails/15.jpg)
Servo Motor Test
15
LeftMotor (13)
Right Motor (12)
Spin Right
Spin Left
Reverse
Forward
![Page 16: Digital Electronics The Boe-Bot and Servo Motors](https://reader036.vdocument.in/reader036/viewer/2022062409/5697bfe31a28abf838cb4f13/html5/thumbnails/16.jpg)
Calculating Motor Time
16
The code below will move the Boe-Bot in reverse. Assuming that the code overhead (i.e. the time it take for the microcontroller to execute the code) is 1.6 ms, verify that the code will cause the Boe-Bot to move in reverse for 3 seconds.
sec 3.0012 122 x ms 24.6 : Time Total
ms 24.6 : Loop (1) for Timems 20.0 : 20 PAUSE
ms 1.7 s 2μ x 850 : 850 12, PULSOUTms 1.3 s 2μ x 650 : 650 13, PULSOUTms 1.6 : Overhead Code
![Page 17: Digital Electronics The Boe-Bot and Servo Motors](https://reader036.vdocument.in/reader036/viewer/2022062409/5697bfe31a28abf838cb4f13/html5/thumbnails/17.jpg)
Motor Time Example
17
Calculate the For-Loop-Limit that is required to move the Boe-Bot forward for 4.5 seconds. Again, assume that the code overhead is 1.6 ms.
183 182.9 loop / ms 24.6
sec 4.5 Limit-Loop-For
ms 24.6 : Loop (1) for Timems 20.0 : 20 PAUSE
ms 1.3 s 2μ x 650 : 850 12, PULSOUTms 1.7 s 2μ x 850 : 650 13, PULSOUTms 1.6 : Overhead Code
![Page 18: Digital Electronics The Boe-Bot and Servo Motors](https://reader036.vdocument.in/reader036/viewer/2022062409/5697bfe31a28abf838cb4f13/html5/thumbnails/18.jpg)
ResourcesParallax Inc. (2004). What’s A Microcontroller.
– Retrieved July 15, 2009– fttp://www.parallax.com/tabid/440/Default.aspx