Word2wiki bal gsq
From Terasic Wiki
Line 1: | Line 1: | ||
[[Image:图像1.png]]y94 | [[Image:图像1.png]]y94 | ||
- | |||
+ | <div style="text-align:right;margin-left:3.171cm;margin-right:0cm;"><span style="color:#000080;">'''''CONTENTS'''''</span></div> | ||
- | + | [[#RefHeadingToc512004885|Chapter 1]][[#RefHeadingToc512004885|]][[#RefHeadingToc512004885| Introduction]][[#RefHeadingToc512004885|1]] | |
+ | :[[#RefHeadingToc512004886|1.1 Package Contents]][[#RefHeadingToc512004886|1]] | ||
+ | |||
+ | [[#RefHeadingToc512004887|Chapter 2]][[#RefHeadingToc512004887|]][[#RefHeadingToc512004887| Components and Functions]][[#RefHeadingToc512004887|3]] | ||
+ | |||
+ | :[[#RefHeadingToc512004888|2.1 Parts and Functions]][[#RefHeadingToc512004888|3]] | ||
+ | |||
+ | :[[#RefHeadingToc512004889|2.2 DE10-Nano Kit and Motor Driver Board]][[#RefHeadingToc512004889|6]] | ||
+ | |||
+ | [[#RefHeadingToc512004890|Chapter 3]][[#RefHeadingToc512004890|]][[#RefHeadingToc512004890| Setup Elements]][[#RefHeadingToc512004890|1]] | ||
+ | |||
+ | :[[#RefHeadingToc512004891|3.1 Configuration Mode Switches]][[#RefHeadingToc512004891|1]] | ||
+ | |||
+ | :[[#RefHeadingToc512004892|3.2 Operation Mode Switches]][[#RefHeadingToc512004892|2]] | ||
+ | |||
+ | :[[#RefHeadingToc512004893|3.3 LEDs on the Motor Driver Board]][[#RefHeadingToc512004893|3]] | ||
+ | |||
+ | :[[#RefHeadingToc512004894|3.4 LEDs on DE10-Nano Board]][[#RefHeadingToc512004894|4]] | ||
+ | |||
+ | [[#RefHeadingToc512004895|Chapter 4]][[#RefHeadingToc512004895|]][[#RefHeadingToc512004895| Basic Operations]][[#RefHeadingToc512004895|6]] | ||
+ | |||
+ | :[[#RefHeadingToc512004896|4.1 Connect Power Port]][[#RefHeadingToc512004896|6]] | ||
+ | |||
+ | :[[#RefHeadingToc512004897|4.2 Power on the Robot]][[#RefHeadingToc512004897|7]] | ||
+ | |||
+ | :[[#RefHeadingToc512004898|4.3 Keep a Balanced State]][[#RefHeadingToc512004898|8]] | ||
+ | |||
+ | :[[#RefHeadingToc512004899|4.4 Attitude Control]][[#RefHeadingToc512004899|8]] | ||
+ | |||
+ | [[#RefHeadingToc512004900|Chapter 5]][[#RefHeadingToc512004900|]][[#RefHeadingToc512004900| Advanced Features Demonstration]][[#RefHeadingToc512004900|9]] | ||
+ | |||
+ | :[[#RefHeadingToc512004901|5.1 Obstacle avoidance demonstrate]][[#RefHeadingToc512004901|9]] | ||
+ | |||
+ | :[[#RefHeadingToc512004902|5.2 Smartphone APP Control]][[#RefHeadingToc512004902|10]] | ||
+ | |||
+ | :[[#RefHeadingToc512004910|5.3 IR Remote Control]][[#RefHeadingToc512004910|19]] | ||
+ | |||
+ | [[#RefHeadingToc512004911|Chapter 6]][[#RefHeadingToc512004911|]][[#RefHeadingToc512004911| Charging the battery]][[#RefHeadingToc512004911|21]] | ||
+ | |||
+ | [[#RefHeadingToc512004912|Chapter 7]][[#RefHeadingToc512004912|]][[#RefHeadingToc512004912| Restore Factory Setting]][[#RefHeadingToc512004912|23]] | ||
+ | |||
+ | :[[#RefHeadingToc512004913|7.1 ARM Version Restoring]][[#RefHeadingToc512004913|23]] | ||
+ | |||
+ | :[[#RefHeadingToc512004914|7.2 NIOS Version Restoring]][[#RefHeadingToc512004914|25]] | ||
+ | |||
+ | 1 | ||
+ | |||
+ | |||
+ | 1 | ||
<span style="color:#666699;">'''Figure 1 -1'''</span>shows the package contents of the Self-Balancing Robot kit | <span style="color:#666699;">'''Figure 1 -1'''</span>shows the package contents of the Self-Balancing Robot kit | ||
<div style="text-align:center;color:#000000;">[[Image:图片 2.png|top]]</div> | <div style="text-align:center;color:#000000;">[[Image:图片 2.png|top]]</div> | ||
- | + | 1 | |
- | + | ||
The Self-Balancing Robot kit package contents: | The Self-Balancing Robot kit package contents: | ||
Line 26: | Line 73: | ||
⑥ Micro USB Cable | ⑥ Micro USB Cable | ||
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
This chapter will describe the robot’s components and the functions of the components, such as the ultrasonic module, motors, wheels and driving board power interface. Figure 2 -2, Figure 2 -3, Figure 2 -4and Figure 2 -5show all the components and specify their function. | This chapter will describe the robot’s components and the functions of the components, such as the ultrasonic module, motors, wheels and driving board power interface. Figure 2 -2, Figure 2 -3, Figure 2 -4and Figure 2 -5show all the components and specify their function. | ||
<div style="text-align:center;color:#000000;">[[Image:图片 1.png|top]]</div> | <div style="text-align:center;color:#000000;">[[Image:图片 1.png|top]]</div> | ||
- | + | 1 | |
- | + | ||
⑴ Ultrasonic module:implements obstacle avoidance. | ⑴ Ultrasonic module:implements obstacle avoidance. | ||
Line 46: | Line 90: | ||
<div style="text-align:center;color:#000000;">[[Image:图片 3.png|top]]</div> | <div style="text-align:center;color:#000000;">[[Image:图片 3.png|top]]</div> | ||
- | + | 1 | |
- | + | ||
⑸ Ethernet port:implements connecting to the ethernet when users develop their own designs on the Self-Balancing robot. | ⑸ Ethernet port:implements connecting to the ethernet when users develop their own designs on the Self-Balancing robot. | ||
Line 56: | Line 99: | ||
<div style="text-align:center;color:#000000;">[[Image:图片 4.png|top]]</div> | <div style="text-align:center;color:#000000;">[[Image:图片 4.png|top]]</div> | ||
- | + | 1 | |
- | + | ||
⑻ DE10-Nano Development Board power supply jack:5V power supply port. | ⑻ DE10-Nano Development Board power supply jack:5V power supply port. | ||
Line 70: | Line 112: | ||
⒀ Battery power output plug:connect to motor driver board power port. | ⒀ Battery power output plug:connect to motor driver board power port. | ||
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
⒁ Battery charging jack:connects the charger to charge the battery. | ⒁ Battery charging jack:connects the charger to charge the battery. | ||
Line 81: | Line 121: | ||
- | + | 1 | |
- | + | ||
The Self-Balancing Robot control system consist two boards, Terasic DE10-Nano FPGA board and Motor Driver board (BAL board) as shown in Figure 2 -6. The FPGA on the DE10-Nano is responsible for all the functions of the balance and control system. The motor driver board receives the control signal from the de10-nano to control the motor rotation. There are also some sensors and communication devices on the motor driver board. These devices can provide the status data of the robot and external communication interface to FPGA. For detailed hardware information, please refer to 03_Hardware_Manual.pdf which can be found in the CD package. | The Self-Balancing Robot control system consist two boards, Terasic DE10-Nano FPGA board and Motor Driver board (BAL board) as shown in Figure 2 -6. The FPGA on the DE10-Nano is responsible for all the functions of the balance and control system. The motor driver board receives the control signal from the de10-nano to control the motor rotation. There are also some sensors and communication devices on the motor driver board. These devices can provide the status data of the robot and external communication interface to FPGA. For detailed hardware information, please refer to 03_Hardware_Manual.pdf which can be found in the CD package. | ||
<div style="text-align:center;color:#ff0000;">[[Image:SNAGHTML299ca13.png|top]]</div> | <div style="text-align:center;color:#ff0000;">[[Image:SNAGHTML299ca13.png|top]]</div> | ||
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
The Self-Balancing Robot equips a Cyclone SoC FPGA, which means that the ARM processor is embedded in the FPGA. Therefore, there are two processor options available to control the Robot. One is to use the ARM processor and the other is implement a NIOS II processor in the FPGA. The kit provides the factory code for both processor. To switch between these two processor modes, user need to select via the mode select switch(MSEL[4:0]). | The Self-Balancing Robot equips a Cyclone SoC FPGA, which means that the ARM processor is embedded in the FPGA. Therefore, there are two processor options available to control the Robot. One is to use the ARM processor and the other is implement a NIOS II processor in the FPGA. The kit provides the factory code for both processor. To switch between these two processor modes, user need to select via the mode select switch(MSEL[4:0]). | ||
- | + | 1 | |
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
- | + | ||
When MSEL[4:0] is set to "10010", as shown in Figure 3 -8.The FPGA will boot from the configuration device(EPCS). Then, after FPGA is configured, the NIOS II processor will control the robot. For users who is beginners to learn FPGA, using NIOS II processor will be easier than deal with the ARM processor. | When MSEL[4:0] is set to "10010", as shown in Figure 3 -8.The FPGA will boot from the configuration device(EPCS). Then, after FPGA is configured, the NIOS II processor will control the robot. For users who is beginners to learn FPGA, using NIOS II processor will be easier than deal with the ARM processor. | ||
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
Figure 3 -9shows the SW0 and SW1 on the DE10-Nano board, Table 3 -1describes the corresponding modes and functions when SW0 and SW1 are set to different positions. | Figure 3 -9shows the SW0 and SW1 on the DE10-Nano board, Table 3 -1describes the corresponding modes and functions when SW0 and SW1 are set to different positions. | ||
<div style="text-align:center;color:#ff0000;">[[Image:图片 6.png|top]]</div> | <div style="text-align:center;color:#ff0000;">[[Image:图片 6.png|top]]</div> | ||
- | + | 1 | |
- | + | ||
- | + | ||
- | + | ||
+ | 1 | ||
{| align="center" style="border-spacing:0;width:14.762cm;" | {| align="center" style="border-spacing:0;width:14.762cm;" | ||
Line 141: | Line 171: | ||
|- | |- | ||
|} | |} | ||
- | + | 1 | |
- | + | ||
Figure 3 -10shows the LED1 and LED2 on the motor driver board, Table 3 -2describes the functions of LED1 and LED2. | Figure 3 -10shows the LED1 and LED2 on the motor driver board, Table 3 -2describes the functions of LED1 and LED2. | ||
<div style="text-align:center;color:#ff0000;"><span style="color:#000000;">[[Image:图片 7.png|top]]</span><span style="color:#000000;"></span></div> | <div style="text-align:center;color:#ff0000;"><span style="color:#000000;">[[Image:图片 7.png|top]]</span><span style="color:#000000;"></span></div> | ||
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
{| align="center" style="border-spacing:0;width:14.651cm;" | {| align="center" style="border-spacing:0;width:14.651cm;" | ||
Line 164: | Line 191: | ||
|- | |- | ||
|} | |} | ||
- | + | 1 | |
- | + | ||
- | + | ||
Figure 3 -11shows the 3.3V power LED, CONF_D LED and other LEDS on the DE10-Nano board, Table 3 -3describes the LEDs functions. | Figure 3 -11shows the 3.3V power LED, CONF_D LED and other LEDS on the DE10-Nano board, Table 3 -3describes the LEDs functions. | ||
- | + | 1 | |
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
- | + | ||
{| style="border-spacing:0;width:15.512cm;" | {| style="border-spacing:0;width:15.512cm;" | ||
Line 225: | Line 247: | ||
|- | |- | ||
|} | |} | ||
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
Remove the red protective cap from the output plug of the battery power, as shown in Figure 4 -12. | Remove the red protective cap from the output plug of the battery power, as shown in Figure 4 -12. | ||
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
Insert the output plug of battery power into the input port of the motor driver board, as shown in Figure 4 -13. | Insert the output plug of battery power into the input port of the motor driver board, as shown in Figure 4 -13. | ||
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
Place the robot on the plane, keep it in a horizontal state, then set the power switch of the motor driver board to ON position, as shown in Figure 4 -14<span style="color:#666699;"><span style="color:#000000;">.</span></span> | Place the robot on the plane, keep it in a horizontal state, then set the power switch of the motor driver board to ON position, as shown in Figure 4 -14<span style="color:#666699;"><span style="color:#000000;">.</span></span> | ||
- | + | 1 | |
+ | 1 | ||
- | + | 1 | |
+ | 1 | ||
+ | 1 | ||
+ | 1 | ||
+ | 1 | ||
- | + | 1 | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
Once the ultrasonic module is assembled on the robot, object following and obstacle avoidance can be implemented with the module. | Once the ultrasonic module is assembled on the robot, object following and obstacle avoidance can be implemented with the module. | ||
When the robot is in default mode and obstacle avoidance is on (SW[1:0] is on “10” position, as shown in Table 3 -1), if the ultrasonic sensor detects the obstacle is in front of the robot and the distance is within 10 cm, the robot will stop automatically, which will implement the obstacle avoidance function, as shown in Figure 5 -16. | When the robot is in default mode and obstacle avoidance is on (SW[1:0] is on “10” position, as shown in Table 3 -1), if the ultrasonic sensor detects the obstacle is in front of the robot and the distance is within 10 cm, the robot will stop automatically, which will implement the obstacle avoidance function, as shown in Figure 5 -16. | ||
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
When the robot is in object following and obstacle avoidance mode (SW[10] is on “01” position, as shown in Table 3 -1), and if the ultrasonic sensor detects the object is in front of the robot and the distance is within 10 cm, the robot will automatically move backward to avoiding object. When an object is in front of the ultrasonic module and moves slowly and the distance is within 10 cm~20 cm, the robot will continue to move along with the object, which will implement the object following function, as shown in Figure 5 -17. | When the robot is in object following and obstacle avoidance mode (SW[10] is on “01” position, as shown in Table 3 -1), and if the ultrasonic sensor detects the object is in front of the robot and the distance is within 10 cm, the robot will automatically move backward to avoiding object. When an object is in front of the ultrasonic module and moves slowly and the distance is within 10 cm~20 cm, the robot will continue to move along with the object, which will implement the object following function, as shown in Figure 5 -17. | ||
- | + | 1 | |
- | + | 1 | |
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
Line 292: | Line 292: | ||
After the installation is completed, the APP icon is shown as Figure 5 -19, | After the installation is completed, the APP icon is shown as Figure 5 -19, | ||
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
<div style="text-align:center;color:#000000;">[[Image:图片 10.png|top]]</div> | <div style="text-align:center;color:#000000;">[[Image:图片 10.png|top]]</div> | ||
- | + | 1 | |
- | + | 1 | |
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
Turn on phone Bluetooth switch, scan for available devices, normally the robot Bluetooth device name begins with “30”, as shown in Figure 5 -21. | Turn on phone Bluetooth switch, scan for available devices, normally the robot Bluetooth device name begins with “30”, as shown in Figure 5 -21. | ||
<div style="text-align:center;">[[Image:图像4.png|top]]</div> | <div style="text-align:center;">[[Image:图像4.png|top]]</div> | ||
- | + | 1 | |
- | + | ||
Click the “'''30:...'''”available device to pair the robot, after they are paired successfully, the phone will show the actual name of the Bluetooth device, such as “Terasic Bal-Car 0XX”, as shown in Figure 5 -22. | Click the “'''30:...'''”available device to pair the robot, after they are paired successfully, the phone will show the actual name of the Bluetooth device, such as “Terasic Bal-Car 0XX”, as shown in Figure 5 -22. | ||
<div style="text-align:center;">[[Image:图像5.png|top]]</div> | <div style="text-align:center;">[[Image:图像5.png|top]]</div> | ||
- | + | 1 | |
- | + | ||
Run the robot APP, click the search icon on the upper right corner of the APP GUI, as shown in Figure 5 -23. | Run the robot APP, click the search icon on the upper right corner of the APP GUI, as shown in Figure 5 -23. | ||
<div style="text-align:center;">[[Image:图像6.png|top]]</div> | <div style="text-align:center;">[[Image:图像6.png|top]]</div> | ||
- | + | 1 | |
- | + | ||
When the actual robot device name appears, select it as the device to connect, as shown in Figure 5 -24. | When the actual robot device name appears, select it as the device to connect, as shown in Figure 5 -24. | ||
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
After connecting to the robot successfully, it will display connection status "connected to Terasic Bal-Car 0XX" at the top left corner of the APP, as shown in Figure 5 -25. | After connecting to the robot successfully, it will display connection status "connected to Terasic Bal-Car 0XX" at the top left corner of the APP, as shown in Figure 5 -25. | ||
<div style="text-align:center;">[[Image:图像8.png|top]]</div> | <div style="text-align:center;">[[Image:图像8.png|top]]</div> | ||
- | + | 1 | |
- | + | ||
Line 344: | Line 332: | ||
<div style="text-align:center;">[[Image:图像9.png|top]]</div> | <div style="text-align:center;">[[Image:图像9.png|top]]</div> | ||
- | + | 1* Backward:robot moves backward | |
- | * Backward:robot moves backward | + | |
* Turn left:robot turns left | * Turn left:robot turns left | ||
* Turn right:robot turns right | * Turn right:robot turns right | ||
Line 358: | Line 345: | ||
- | + | 1 | |
- | + | ||
<div style="text-align:center;">[[Image:图像10.png|top]]</div> | <div style="text-align:center;">[[Image:图像10.png|top]]</div> | ||
- | + | 1 | |
- | + | ||
Line 370: | Line 355: | ||
<div style="text-align:center;margin-left:0.85cm;margin-right:0cm;">[[Image:图像11.png|top]]</div> | <div style="text-align:center;margin-left:0.85cm;margin-right:0cm;">[[Image:图像11.png|top]]</div> | ||
- | + | 1 | |
- | + | ||
Power on the robot, set SW0~3 of the DE10-Nano to Down position, as shown in Figure 5 -20<span style="color:#666699;">'''.'''</span> | Power on the robot, set SW0~3 of the DE10-Nano to Down position, as shown in Figure 5 -20<span style="color:#666699;">'''.'''</span> | ||
Line 378: | Line 362: | ||
<div style="text-align:center;">[[Image:图像12.png|top]]</div> | <div style="text-align:center;">[[Image:图像12.png|top]]</div> | ||
- | + | 1 | |
- | + | ||
Click the Bluetooth device (BAL_CAR_XX), the APP will connect to the robot and shows the interactive interface for robot control, as shown in Figure 5 -30'''.''' | Click the Bluetooth device (BAL_CAR_XX), the APP will connect to the robot and shows the interactive interface for robot control, as shown in Figure 5 -30'''.''' | ||
<div style="text-align:center;">[[Image:图像13.png|top]]</div> | <div style="text-align:center;">[[Image:图像13.png|top]]</div> | ||
- | + | 1 | |
- | + | ||
Line 392: | Line 374: | ||
<div style="text-align:center;">[[Image:图像14.png|top]]</div> | <div style="text-align:center;">[[Image:图像14.png|top]]</div> | ||
- | + | 1* Backward:robot moves backward | |
- | * Backward:robot moves backward | + | |
* Turn left:robot turns left | * Turn left:robot turns left | ||
* Turn right:robot turns right | * Turn right:robot turns right | ||
Line 399: | Line 380: | ||
* Ultrasonic On/Off: Enable/Disable ultrasonic module for '''obstacle avoidance''' function | * Ultrasonic On/Off: Enable/Disable ultrasonic module for '''obstacle avoidance''' function | ||
- | + | 1 | |
- | + | ||
<span style="color:#666699;">'''Figure 5 -32'''</span>shows the remote control for the robot, point IR remote control to the robot, the robot will move forward when users press key 2, the robot will stop moving when user press key 5. The key 8 is used to move the robot backward, key 4 is used to turn the robot to the left, and key 6 is used to turn the robot to the right. Table 5 -4shows the functions of each key number on the controls. | <span style="color:#666699;">'''Figure 5 -32'''</span>shows the remote control for the robot, point IR remote control to the robot, the robot will move forward when users press key 2, the robot will stop moving when user press key 5. The key 8 is used to move the robot backward, key 4 is used to turn the robot to the left, and key 6 is used to turn the robot to the right. Table 5 -4shows the functions of each key number on the controls. | ||
- | + | 1 | |
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
- | + | ||
{| align="center" style="border-spacing:0;width:8.451cm;" | {| align="center" style="border-spacing:0;width:8.451cm;" | ||
Line 431: | Line 408: | ||
|- | |- | ||
|} | |} | ||
- | + | 1 | |
- | + | ||
The robot is powered by a three-section of lithium battery (the specific parameters of the battery can be seen outside the battery package). When the power is less than 10V, the LED4 on DE10-Nano board will light up, indicating that the battery needs to be charged in time; and the APP will also show the battery power level. If the lithium battery starts charging after it is completely drained and is completely unable to supply power to the robot, it will take up to 2 hours the battery to be fully charged. The battery charging steps are as follows: | The robot is powered by a three-section of lithium battery (the specific parameters of the battery can be seen outside the battery package). When the power is less than 10V, the LED4 on DE10-Nano board will light up, indicating that the battery needs to be charged in time; and the APP will also show the battery power level. If the lithium battery starts charging after it is completely drained and is completely unable to supply power to the robot, it will take up to 2 hours the battery to be fully charged. The battery charging steps are as follows: | ||
Line 439: | Line 415: | ||
<div style="text-align:center;color:#000000;">[[Image:图片 24.png|top]]</div> | <div style="text-align:center;color:#000000;">[[Image:图片 24.png|top]]</div> | ||
- | + | 1 | |
- | + | ||
As shown in Figure 6 -34, connect the charger to battery connector. | As shown in Figure 6 -34, connect the charger to battery connector. | ||
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
As shown in Figure 6 -35, plug the charger into the AC 220V or 110V power outlets, after the power is fully charged, the LED on the charger will light up green, then unplug the charger. | As shown in Figure 6 -35, plug the charger into the AC 220V or 110V power outlets, after the power is fully charged, the LED on the charger will light up green, then unplug the charger. | ||
<div style="text-align:center;color:#000000;">[[Image:图片 26.png|top]]</div> | <div style="text-align:center;color:#000000;">[[Image:图片 26.png|top]]</div> | ||
- | + | 1 | |
- | + | ||
<div style="text-align:center;"></div> | <div style="text-align:center;"></div> | ||
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
- | + | ||
- | |||
- | + | 1 | |
- | + | 11** Micro SD Card: 8GB minimum | |
- | ** Micro SD Card: 8GB minimum | + | |
** Micro SD Card reader: Write the SD Micro SD card | ** Micro SD Card reader: Write the SD Micro SD card | ||
- | + | 1** Win32DiskImager.zip: the tool which is used to write image file to Micro SD Card, it’s located at CD\Tool\ | |
- | ** Win32DiskImager.zip: the tool which is used to write image file to Micro SD Card, it’s located at CD\Tool\ | + | |
** ''de10_nano_balance_car.zip'': the compressed demo image file for ARM version robot, it’s located at [http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&No=1096&PartNo=4 http://www.terasic.com.tw/cgi-bin/page/archive.pl?][http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&No=1096&PartNo=4 Language=English&No=1096&PartNo=4] | ** ''de10_nano_balance_car.zip'': the compressed demo image file for ARM version robot, it’s located at [http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&No=1096&PartNo=4 http://www.terasic.com.tw/cgi-bin/page/archive.pl?][http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&No=1096&PartNo=4 Language=English&No=1096&PartNo=4] | ||
Line 485: | Line 451: | ||
- | + | 1 | |
- | + | 1** Choose the drive disk of Micro SD card for Device. | |
- | + | ||
- | ** Choose the drive disk of Micro SD card for Device. | + | |
** Click “write” to start writing the image file to the microSD card. Wait until the image is written successfully. | ** Click “write” to start writing the image file to the microSD card. Wait until the image is written successfully. | ||
** As shown in Figure 7 -37, insert the Micro SD card into the robot. And set the mode switch(SW10) MSEL[4:0] to "01010", as shown in Figure 7 -38. | ** As shown in Figure 7 -37, insert the Micro SD card into the robot. And set the mode switch(SW10) MSEL[4:0] to "01010", as shown in Figure 7 -38. | ||
Line 496: | Line 460: | ||
<div style="text-align:center;color:#4a4a4a;">[[Image:图像16.png|top]]</div> | <div style="text-align:center;color:#4a4a4a;">[[Image:图像16.png|top]]</div> | ||
- | + | 1** Power on the robot then start using it. | |
- | ** Power on the robot then start using it. | + | |
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
The factory code of NIOS version is stored in the ECPS device. The following will describe how to restore factory code in the EPCS.* <div style="margin-left:0.847cm;margin-right:0cm;">'''Required Equipment: '''</div> | The factory code of NIOS version is stored in the ECPS device. The following will describe how to restore factory code in the EPCS.* <div style="margin-left:0.847cm;margin-right:0cm;">'''Required Equipment: '''</div> | ||
** PC: configuring the jic file to EPCS device on the robot | ** PC: configuring the jic file to EPCS device on the robot | ||
Line 524: | Line 485: | ||
<div style="text-align:center;color:#4a4a4a;">[[Image:图像18.png|top]]</div> | <div style="text-align:center;color:#4a4a4a;">[[Image:图像18.png|top]]</div> | ||
- | + | 1** As shown in Figure 7 -40, set the mode switch (SW10) MSEL[4:0] to "10010". | |
- | ** As shown in Figure 7 -40, set the mode switch (SW10) MSEL[4:0] to "10010". | + | |
Line 531: | Line 491: | ||
<div style="text-align:center;color:#4a4a4a;">[[Image:图像19.png|top]]</div> | <div style="text-align:center;color:#4a4a4a;">[[Image:图像19.png|top]]</div> | ||
- | + | 1** Copy demo_batch_jic.zip to PC and unzip it to get demo_batch_jic folder. | |
- | ** Copy demo_batch_jic.zip to PC and unzip it to get demo_batch_jic folder. | + | |
** As shown in Figure 7 -41, input number 3 in the pop-up command window and click Enter key, it will start to configure the .jic file to EPCS device. | ** As shown in Figure 7 -41, input number 3 in the pop-up command window and click Enter key, it will start to configure the .jic file to EPCS device. | ||
** After the configuration is completed, remove the USB cable. Power on the robot and verify if the code is written right. | ** After the configuration is completed, remove the USB cable. Power on the robot and verify if the code is written right. | ||
Line 542: | Line 501: | ||
<div style="text-align:center;color:#4a4a4a;">[[Image:图像20.png|top]]</div> | <div style="text-align:center;color:#4a4a4a;">[[Image:图像20.png|top]]</div> | ||
- | + | 1 | |
- | + | 1 | |
- | + | ||
- | + | ||
Line 611: | Line 568: | ||
- | + | 1 |
Revision as of 00:30, 5 June 2018
File:图像1.pngy94
Chapter 1[[#RefHeadingToc512004885|]] Introduction1
Chapter 2[[#RefHeadingToc512004887|]] Components and Functions3
Chapter 3[[#RefHeadingToc512004890|]] Setup Elements1
Chapter 4[[#RefHeadingToc512004895|]] Basic Operations6
Chapter 5[[#RefHeadingToc512004900|]] Advanced Features Demonstration9
Chapter 6[[#RefHeadingToc512004911|]] Charging the battery21
Chapter 7[[#RefHeadingToc512004912|]] Restore Factory Setting23
1
1
Figure 1 -1shows the package contents of the Self-Balancing Robot kit
1 The Self-Balancing Robot kit package contents:
① Self-Balancing Robot
② Lithium Battery
③ Lithium Battery Charger
④ IR Remote Control
⑤ Mini USB Cable
⑥ Micro USB Cable
1 1 This chapter will describe the robot’s components and the functions of the components, such as the ultrasonic module, motors, wheels and driving board power interface. Figure 2 -2, Figure 2 -3, Figure 2 -4and Figure 2 -5show all the components and specify their function.
1 ⑴ Ultrasonic module:implements obstacle avoidance.
⑵ Battery package:helps to protect the batteries and avoid bumping and damaging the battery.
⑶ Motors:drive the Self-Balancing robot wheels.
⑷ Wheels:implements the Self-Balancing robot’s movement.
1 ⑸ Ethernet port:implements connecting to the ethernet when users develop their own designs on the Self-Balancing robot.
⑹ OTG port:implements Host or Device mode when users develop their own design on the Self-Balancing robot.
⑺ UART serial port:implement the communication between the board and PC when users develop their own design on the Self-Balancing robot.
1 ⑻ DE10-Nano Development Board power supply jack:5V power supply port.
⑼ HDMI TX port:users can connect the Displayer to HDMI interface when they make image processing designs.
⑽ USB Blaster II port:users can download their own programs to the board through the connector.
⑾ Motor driver board power jack:connects to the battery power supply port and provides power for the Self-Balancing robot.
⑿ Main power Switch:power on or power off the Self-Balancing robot.
⒀ Battery power output plug:connect to motor driver board power port.
1 1 ⒁ Battery charging jack:connects the charger to charge the battery.
⒂ Battery:the Self-Balancing robot’s power source.
1
The Self-Balancing Robot control system consist two boards, Terasic DE10-Nano FPGA board and Motor Driver board (BAL board) as shown in Figure 2 -6. The FPGA on the DE10-Nano is responsible for all the functions of the balance and control system. The motor driver board receives the control signal from the de10-nano to control the motor rotation. There are also some sensors and communication devices on the motor driver board. These devices can provide the status data of the robot and external communication interface to FPGA. For detailed hardware information, please refer to 03_Hardware_Manual.pdf which can be found in the CD package.
1
1
The Self-Balancing Robot equips a Cyclone SoC FPGA, which means that the ARM processor is embedded in the FPGA. Therefore, there are two processor options available to control the Robot. One is to use the ARM processor and the other is implement a NIOS II processor in the FPGA. The kit provides the factory code for both processor. To switch between these two processor modes, user need to select via the mode select switch(MSEL[4:0]).
1 1 1
When MSEL[4:0] is set to "10010", as shown in Figure 3 -8.The FPGA will boot from the configuration device(EPCS). Then, after FPGA is configured, the NIOS II processor will control the robot. For users who is beginners to learn FPGA, using NIOS II processor will be easier than deal with the ARM processor.
1 1 Figure 3 -9shows the SW0 and SW1 on the DE10-Nano board, Table 3 -1describes the corresponding modes and functions when SW0 and SW1 are set to different positions.
1
1
SW[1:0] Setting | Robot mode and function | Description |
00 | Default mode (Bluetooth and IR mode) | The robot can be controlled by smartphone APP and IR remote control |
10 | Default mode and Obstacle Avoidance | The robot can be controlled by a smartphone’s APP and IR remote control, it implements the obstacle avoidance function |
01 | Object following and obstacle avoidance | The robot implements the object following and obstacle avoidance (In this mode, the robot will not be controlled by smartphone APP and IR remote control) |
11 | Debug mode | Only supports ARM version robot, the control program will stop running, users need to reboot the robot or run the program again to control the robot. Normally it is used to debug the robot. |
1 Figure 3 -10shows the LED1 and LED2 on the motor driver board, Table 3 -2describes the functions of LED1 and LED2.
1 1
LED name | Description |
LED1 | Indicates the power supply status to motor driver board |
LED2 | Indicates the motor driver board provides 5V power to the DE10-Nano board |
1 Figure 3 -11shows the 3.3V power LED, CONF_D LED and other LEDS on the DE10-Nano board, Table 3 -3describes the LEDs functions.
1 1 1
LED name | LED status | Description |
3.3V power LED | Light On | Power the DE10-Nano board with 3.3V from the GPIO interface |
CONF_D | Light On | DE10-Nano board Configuration done |
LED7 | Light On | Robot is keeping balanced status |
LED6~5 | 0--Light On
1--Light off
| 00--robot is in default mode (Bluetooth & IR control)
01--robot is in default mode and implements obstacle avoidance function
10--robot implements object following function
|
LED4 | Light On | Battery power supply voltage is lower than 10V |
LED3 | Light On | Robot is turning right |
LED2 | Light On | Robot is turning left |
LED1 | Light On | Robot is moving backward |
LED0 | Light On | Robot is moving forward |
1
1
Remove the red protective cap from the output plug of the battery power, as shown in Figure 4 -12.
1 1 Insert the output plug of battery power into the input port of the motor driver board, as shown in Figure 4 -13.
1 1 Place the robot on the plane, keep it in a horizontal state, then set the power switch of the motor driver board to ON position, as shown in Figure 4 -14.
1 1
1 1 1 1 1
1
Once the ultrasonic module is assembled on the robot, object following and obstacle avoidance can be implemented with the module.
When the robot is in default mode and obstacle avoidance is on (SW[1:0] is on “10” position, as shown in Table 3 -1), if the ultrasonic sensor detects the obstacle is in front of the robot and the distance is within 10 cm, the robot will stop automatically, which will implement the obstacle avoidance function, as shown in Figure 5 -16.
1 1 When the robot is in object following and obstacle avoidance mode (SW[10] is on “01” position, as shown in Table 3 -1), and if the ultrasonic sensor detects the object is in front of the robot and the distance is within 10 cm, the robot will automatically move backward to avoiding object. When an object is in front of the ultrasonic module and moves slowly and the distance is within 10 cm~20 cm, the robot will continue to move along with the object, which will implement the object following function, as shown in Figure 5 -17.
1 1 1 1
Users can download and install the Android Smartphone APP by scanning the QR code below (See Figure 5 -18) or download the APP file from the link:
http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=238&No=1096&PartNo=4
After the installation is completed, the APP icon is shown as Figure 5 -19,
1 1
1
1
1
1
Turn on phone Bluetooth switch, scan for available devices, normally the robot Bluetooth device name begins with “30”, as shown in Figure 5 -21.
1 Click the “30:...”available device to pair the robot, after they are paired successfully, the phone will show the actual name of the Bluetooth device, such as “Terasic Bal-Car 0XX”, as shown in Figure 5 -22.
1 Run the robot APP, click the search icon on the upper right corner of the APP GUI, as shown in Figure 5 -23.
1 When the actual robot device name appears, select it as the device to connect, as shown in Figure 5 -24.
1 1 After connecting to the robot successfully, it will display connection status "connected to Terasic Bal-Car 0XX" at the top left corner of the APP, as shown in Figure 5 -25.
1
Now users can click the yellow direction keys, STOP key and DEMO key to control the robot, Figure 5 -26shows the direction keys functions.
1* Backward:robot moves backward
- Turn left:robot turns left
- Turn right:robot turns right
- STOP:robot stops moving
- Ultrasonic On/Off: Enable/Disable ultrasonic module for obstacle avoidance function
- DEMO mode:when clicking the DEMO button, the robot will perform the scheduled action. After finishing the action, it will exit the DEMO mode automatically; if you click DEMO button again or click Stop button during DEMO mode, the robot will exit the DEMO mode automatically and keep balance where it is; if you click Forward/Backward/Left/Right button during the DEMO mode, the robot will exit the DEMO mode immediately, and perform the action according to the button
iOS APP Control
- Install the APP
1
1
Turn on phone Bluetooth switch then run the APP, the initial APP GUI is shown as Figure 5 -28.
1 Power on the robot, set SW0~3 of the DE10-Nano to Down position, as shown in Figure 5 -20.
As shown in Figure 5 -28, click the refresh icon on the top right corner of the APP GUI, the APP can detect the robot Bluetooth device, it is shown as Figure 5 -29.
1 Click the Bluetooth device (BAL_CAR_XX), the APP will connect to the robot and shows the interactive interface for robot control, as shown in Figure 5 -30.
1
Now users can click the yellow direction keys, STOP key to control the robot (The latest iOS version APP hasn’t DEMO key temporary), Figure 5 -31shows all the keys functions.
1* Backward:robot moves backward
- Turn left:robot turns left
- Turn right:robot turns right
- STOP:robot stops moving
- Ultrasonic On/Off: Enable/Disable ultrasonic module for obstacle avoidance function
1 Figure 5 -32shows the remote control for the robot, point IR remote control to the robot, the robot will move forward when users press key 2, the robot will stop moving when user press key 5. The key 8 is used to move the robot backward, key 4 is used to turn the robot to the left, and key 6 is used to turn the robot to the right. Table 5 -4shows the functions of each key number on the controls.
1 1 1
Key numbers | Function |
2 | Forward |
5 | Stop |
8 | Backward |
4 | Turn left |
6 | Turn right |
1 The robot is powered by a three-section of lithium battery (the specific parameters of the battery can be seen outside the battery package). When the power is less than 10V, the LED4 on DE10-Nano board will light up, indicating that the battery needs to be charged in time; and the APP will also show the battery power level. If the lithium battery starts charging after it is completely drained and is completely unable to supply power to the robot, it will take up to 2 hours the battery to be fully charged. The battery charging steps are as follows:
Power off the robot, pull out the power cable, and take the battery out of the robot’s onboard battery storage space, as shown in Figure 6 -33.
1 As shown in Figure 6 -34, connect the charger to battery connector.
1 1 As shown in Figure 6 -35, plug the charger into the AC 220V or 110V power outlets, after the power is fully charged, the LED on the charger will light up green, then unplug the charger.
1
1 1
1
11** Micro SD Card: 8GB minimum
- Micro SD Card reader: Write the SD Micro SD card
1** Win32DiskImager.zip: the tool which is used to write image file to Micro SD Card, it’s located at CD\Tool\
- de10_nano_balance_car.zip: the compressed demo image file for ARM version robot, it’s located at http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&No=1096&PartNo=4
- Copy the de10_nano_balance_car.zip to PC and unzip it to get balance_car.img file.
- Insert the Micro SD card into SD card reader and connect the card reader to PC USB port.
- Copy Win32DiskImager.zip to PC and unzip it, execute Win32DiskImager.exe in the unzipped Win32DiskImager folder.
- As shown in Figure 7 -36, choose de10_nano_balance_car.img for Image File.
1 1** Choose the drive disk of Micro SD card for Device.
- Click “write” to start writing the image file to the microSD card. Wait until the image is written successfully.
- As shown in Figure 7 -37, insert the Micro SD card into the robot. And set the mode switch(SW10) MSEL[4:0] to "01010", as shown in Figure 7 -38.
1** Power on the robot then start using it.
1 1
The factory code of NIOS version is stored in the ECPS device. The following will describe how to restore factory code in the EPCS.*- PC: configuring the jic file to EPCS device on the robot
- Mini USB Cable x 1: Connect robot to PC for configuring the file
- Ensure the Intel Quartus tools is installed properly.
- The compressed .jic file for Nios version robot, it’s located at CD\Demonstration\factory\nios\
- As shown in Figure 7 -39, Connect a USB cable to the USB Blaster II connector on the robot and the PC.
1** As shown in Figure 7 -40, set the mode switch (SW10) MSEL[4:0] to "10010".
1** Copy demo_batch_jic.zip to PC and unzip it to get demo_batch_jic folder.
- As shown in Figure 7 -41, input number 3 in the pop-up command window and click Enter key, it will start to configure the .jic file to EPCS device.
- After the configuration is completed, remove the USB cable. Power on the robot and verify if the code is written right.
1 1
Getting Help
Here is the contact information where you can get help if you encounter problems:*
- Terasic Technologies9F, No.176, Sec.2, Gongdao 5th Rd, East Dist, Hsinchu City, Taiwan 300-70Email : support@terasic.comWeb : www.terasic.com
Revision History
Date | Version | Changes |
2018.03.16 | First publication | |
1