Keywish Beetle-Bot Manuel utilisateur

1
Beetle-Bot
Instruction Manual
V.1.3
Github https://github.com/keywish/keywish-beetle-bot

2
Revision History
日期
版本号
描述
作者
2018-11-19
V.1.0
Create a document
Ken
2019-2-12
V.1.1
Optimize servo installation steps
Abbott.chen
2019-2-13
V.1.2
Change wire
Carl
2019-2-28
V.1.3
Fixed picture
Abbott.chen

3
Table Of Contents
Revision History ........................................................................................................................................2
Chapter1 Introduction........................................................................................................................................4
1.1 Writing Purpose............................................................................................................................4
1.2 Product Introduction .....................................................................................................................4
Chapter2 Preparations........................................................................................................................................7
2.1 Development environment Arduino IDE.....................................................................................8
Chapter3 Experiments......................................................................................................................................17
3.1Beetle Bot Assembly...........................................................................................................................17
3.1.1 Base board universal wheel installation..................................................................................17
3.1.2 Install motor and wheel...........................................................................................................18
3.1.3 Motor Driver Board Installation .............................................................................................20
3.1.4 Tracing module and copper column installation.....................................................................23
3.1.5 Battery box and Keywish Uno R3 motherboard installation..................................................25
3.1.6 Installation of the Servo and ultrasonic ..................................................................................29
3.1.7 Infrared obstacle avoidance module installation.....................................................................35
3.1.8 Voltage display module installation........................................................................................37
3.1.9 Welding power cord................................................................................................................39
3.1.10 Whole Assembly...................................................................................................................40
3.1.11 Expansion board wiring diagram..........................................................................................42
3.2 Beetle Bot Module experiment..........................................................................................................46
3.2.1 Walking Principle of the Car ..................................................................................................46
3.2.2 Infrared Obstacle Avoidance ..................................................................................................53
3.2.3 Infrared Tracing ......................................................................................................................64
3.2.4 Ultrasonic Obstacle Avoidance...............................................................................................75
3.2.5 Infrared Remote Control.........................................................................................................88
3.2.6 Mobile Phone Bluetooth Control............................................................................................97
3.2.7 PS2 Handle (Optional)..........................................................................................................106

4
Chapter1 Introduction
1.1 Writing Purpose
The purpose of this manual is to create a fast, practical and convenient development learning platform
for the vast number of electronic enthusiasts and let them grasp the Arduino and its extended system design
methods and design principles, as well as the corresponding hardware debugging methods.
This manual will lead you to learn every function of "Beetle-Bot" step by step and open a new "Beetle-
Bot" journey for you. It is divided into two parts:
1, Preparation chapter, which mainly introduces the use of common Arduino development software and
some downloading and debugging skills.
2, Experiment chapter, which contains hardware and software, the former mainly introduces the
function and principle of each module; the latter mainly introduces each part of the program and leads you to
understand and grasp the principle of Arduino and the car development through written examples step by
step.
This manual is a specifications for "Beetle-Bot" , the file whose format is PDF which is in the CD along
with our product requires the corresponding software to open. It contains detailed schematic diagrams and
complete source codes for all instances, the codes won't have any mistake under our strict test. In addition,
the library files used in the source codes are put into the corresponding path, you only need to see
corresponding phenomenon of the car and personally experience the process of experiment by downloading
the source codes to Arduino via the serial port emulator.
This manual is very suitable for students and electronic enthusiasts to learn, all course videos will be
synchronized to https://github.com/keywish/keywish-beetle-bot,please real-time synchronization of the
latest information
1.2 Product Introduction
"Beetle-Bot" is a multifunctional car based on the Arduino UNO and L298N motor. Compared with the
traditional car, "Beetle-Bot" is also equipped with wireless control (Bluetooth, infrared, WIFI and so on);
ultrasonic; infrared. It can trace and avoid obstacles automatically, of course, makers can also automatically
control the car with wireless and make full use of each module, as well as integrate all kinds of related
sensors to make the car more intelligent, which is more challenging. "Beetle-Bot" has various types of
information, technical manuals, routines, etc., which can teach you step by step. Each electronic fan can use
it easily to achieve their desired function.
Product Features
◆Three groups of black line infrared tracing module

5
◆Two groups of infrared obstacle avoidance module
◆Ultrasonic obstacle avoidance
◆Four DC motor drive
◆Two 1865mZh, 3.7V rechargeable lithium battery with longer endurance
◆Remaining capacity of battery real-time detection
◆Infrared remote control
◆Bluetooth app control
◆PS2 handle control (optional)
◆Support handle control of nRF24L01(optional)

6
Product device list:

7
Chapter2 Preparations
About Arduino uno r3
In "Beetle-Bot", we used the Arduino uno r3 as the main control board, which has 14 digital input/output
pins (6 of which can be used as PWM output), 6 analog inputs, and a 16 MHz ceramic resonator, 1 USB
connection, 1 power socket, 1 ICSP head and 1 reset button. It contains everything that supports the
microcontroller; You just need to connect it to a computer via a USB cable or start with an AC-DC adapter
or battery.
Technical specifications:
Working voltage: 5V
Input voltage: USB powered or external 7V~12V DC input
Output voltage: 5V DC output and 3.3V DC output and external power input
Microprocessor: ATmega328 (Chip data sheet is in the documentation)
Bootloader:Arduino Uno
Clock frequency: 16 MHz
Support USB interface protocol and power supply (without external power supply)
Support ISP download function
Digital I/O port: 14 (4 PWM output ports)
Analog input port: 6
DC Current I/O Port: 40mA
DC Current 3.3V Port: 50mA
Flash memory: 32 KB (ATmega328) (0.5 KB for bootloader)
SRAM :2 KB (ATmega328)
EEPROM:1 KB (ATmega328)
Size:75x55x15mm

8
2.1 Development environment Arduino IDE
2.1.1 Install the IDE
AduinoIDE is an open source software and hardware tool written by open source software such as Java,
Processing, and avr-gcc. It is an integrated development environment that runs on a computer. It can write
and transfer programs to the board. The major feature of the IDE is cross-platform compatibility for
Windows, MaxOSX, and Linux. Only a simple code base is needed, and the creators can create personalized
home internet solutions through the platform, such as remote home monitoring and constant temperature
control and so on.
In this tutorial, we use the version is 1.6.0, download address
is:https://www.arduino.cc/en/Main/OldSoftwareReleases#previous,After opening the link, we can see the
interface as shown in Figure 2.1.1. In this interface, we can see the different versions of the IDE and
different operating environments. Everyone can download according to their own computer system, of
course, There will be a downloaded installation package on our companion CD, but only the Windows
version, because this tutorial is all running under Windows system.
Figure 2.1.1 ArduinoIDE download interface
After the downloading, we will get a compressed package as shown in Figure 2.1.2. The compressed
package will be decompressed. After decompression, the files in Figure 2.1.3 are extracted. The “drivers” is
the driver software. When the “Arduino.exe” is installed, it will be Install the driver automatically. Because
the installation of "arduino.exe" is very simple, it will not be explained here. It is recommended to exit the

9
anti-virus software during the installation process, otherwise it may affect the installation of the IDE. After
the installation is complete, click "arduino.exe" again to enter the IDE programming interface.
Figure 2.1.2 Arduino IDE Installation Package
Figure 2.1.3 Extracted files
When finish the installation of the IDE,connect to the Arduino motherboard,click“My Computer”→
“Properties” →“Device Manager” →“Viewing Ports (COM and LTP)”,If you can see as the
Figure 2.1.4
Figure 2.1.4 Driver installation success interface

10
that indicates the driver has been installed successfully,At this time we open the IDE, select the
corresponding development board model and port in the toolbar to use normally. If you see Figure 2.1.5, it
means that the computer does not recognize the development board and you need to install the driver
yourself.
Figure 2.1.5 Driver is not successfully installed interface
Notice:
1)If you connect the controller board to the computer, the computer does not respond. Right-click "My
Computer" and select Open Device Manager then find viewing port (com & lpt). If there is no com or lpt, or
only an unknown device, there is a problem with the controller board or the USB cable.
2)Right-click "My Computer" and select Device Manager, find the viewing ports (COM and LPT). If there
is a yellow Arduino UNO exclamation point, this means you need to install the driver yourself.
3)If you install the driver again and again, it eventually fails. Please uninstall the driver and re-install>
install the driver automatically> restart the computer.
2.1.2 Install Driver
If your computer is a Windows 7 system
1)Right-click on "My Computer" and open the Device Manager, find viewing the ports (COM and LPT).
At this point you will see a "USB Serial Port", right-click "USB Serial Port" and select the "Update Driver
Software" option.
Table des matières
Autres manuels Keywish Jouet


















