"To learn to be a maker, building a multifunctional robot from a suite is an effective method, because it provides an opportunity to learn knowledge in many related fields, including microcontroller, sensor, motor, software development, etc. Moreover, whether for beginners or experienced makers, there are a large number of robot kits, plug-ins and online help for them to choose from.
This paper discusses some practical steps, problems and possible upgrades that should be considered when building a robot on the Devastator tank platform based on DF robot (Fig. 1).
Why Devastator? It is rugged, aluminum construction, and has two metal gear brush DC motors. It can handle loads up to 3 kg, has multiple mounting holes for installing sensors, servo mechanisms, robot hands and other accessories, and is compatible with all popular microcontroller boards suitable for makers.
Build a complete robot system
The robot comes with a base, wheels, tracks and two motors. The choice of other components depends on the designer. A complete system requires a microcontroller board, a motor driver board and a method of inputting commands. Optional plug-ins may include components such as robot hands, cameras, or anti-collision systems designed to provide a degree of autonomous operation.
Select microcontroller platform
Devastator robots are compatible with a variety of popular microcontroller platforms. Arduino open source development platform came out in Italy in 2003 and is widely used by beginners and professional designers. Arduino uno (Figure 2) uses the atmega328p 8-bit RISC microcontroller of microchip technology (formerly ATMEL).
Other standard features include a USB port controlled by a pre programmed atmega16u2 microcontroller, multiple digital inputs and outputs, an analog input port, and an online serial programming (ICSP) port for software updates. The updated Arduino due upgrades the kernel to a 32-bit arm ® Cortex ®- M3。 This kernel is also used in the dfrobot controller board discussed below, which has both Arduino compatibility and motor driver.
Raspberry PI single board computer was originally used in basic computer science teaching in schools, but now it has become extremely popular in the maker community. The latest raspberry PI 3 is based on Broadcom 64 bit quad core CPU running at 1.2 GHz. It includes 802.11n Wireless LAN, Bluetooth 4.1 and low power Bluetooth (ble). It also includes 1 GB ram, a micro SD card slot, 4 USB ports, multiple HDMI and Ethernet ports, a camera interface, 40 GPIO pins, and other dedicated interfaces.
Windows experts who want to use their existing experience can start with the Devastator compatible lattepanda controller board, which comes with the full version of windows 10 installed and activated. The board uses a quad core CPU running at 1.8 GHz and bundled with a coprocessor. It also uses microchip's 8-bit atmega32u4 to achieve Arduino compatibility.
Lattepanda comes with 2 GB ddr3l ram and up to 32 GB storage, one USB 3.0 and two USB 2.0 ports, Wi Fi, Bluetooth 4.0, a coprocessor, and a total of 22 gpios divided between the two processors.
Control motor
After determining the microcontroller core, the next step is to select the motor control board. The Devastator consists of two 6 volt (V) motors operating at 160 RPM (no load). The maximum output torque of each motor is 0.8 kgf.cm (0.058 ft lb.) and the maximum stall current is 2.8 A (a).
Raspberry PI requires a plug-in expansion board to realize the specific functions of the robot, but dfrobot's dfr0398 Romeo ble Quad board provides Arduino enthusiasts with a single board option containing both microcontroller and motor driver (Figure 3). The board provides a more powerful kernel than uno derivatives, but still maintains Arduino software compatibility.
The microcontroller is stm32f103ret6 of STMicroelectronics: this device uses arm operating at 72 MHz frequency ® Cortex ®- M3 32-bit core and contains 512 KB flash memory, a motor control pulse width modulation (PWM) module, 16 12 bit analog-to-digital conversion (ADC) channels, and two 12 bit analog-to-digital conversion (DAC) channels.
The motor driver is implemented by two MICROSEMI hr8833 devices. Each MOSFET Driver contains two H-bridge drivers for bidirectional control of the Devastator motor. Romeo ble Quad includes four encoder interfaces and integrates the cc2540 RF transceiver of Texas Instruments for Bluetooth 4.0 wireless connection.
Add power
The microcontroller board itself operates with a universal USB connector at 5 volts, but the motor requires a portable (i.e. battery) power supply with higher voltage and current. Many makers use cheap rechargeable battery packs originally used in radio remote control (RC) vehicles. These battery packs typically have a voltage of 7 volts or higher and a capacity of more than 5000 milliampere hours (MAH) and can easily replace the original connectors. The Romeo ble Quad servo power port can accept 7 to 10 volts DC.
Microcontroller board programming
Installing software on the microcontroller board is very simple. Maker oriented suppliers provide step-by-step instructions on their website.
When determining the operating system (OS), the selection varies by platform. The lattepanda board comes with installed windows. Raspberry PI provides a variety of options, including windows IOT core and various Linux versions. Raspbian is a variant of open source Debian Linux OS and the most common choice in the maker community.
On the other hand, Arduino does not use the traditional operating system; The Arduino platform uses a loop execution program that iterates through a sequence of code. Developers write and install code using the open source Arduino integrated development environment (IDE). It is written in Java and is suitable for cross platform applications on windows, Mac OS X and Linux hosts. In the Arduino environment, several projects have their own terminology. For example, the Arduino compatible plug-in board is called the "shield board", and the software module is called the "sketch".
Programming with Romeo ble Quad
Since the Romeo ble Quad board is a single board robot solution containing advanced peripherals, it will be used in the following discussion.
First, select the preferred operating system for the host and download the corresponding ide from the Arduino website. Although DF Romeo ble Quad does not use the same atmega328 processor as the standard Arduino hardware, the software development process is similar because the board is compatible with the Arduino ide.
The IDE supports more than 25 development boards from multiple manufacturers, but Romeo ble quad is not among them. Romeo ble quad is a version of another dfrobot board, bluno m3, and adds a motor driver. To configure the IDE, you must first download the bluno m3 file from the open source GitHub website.
To install this file:
Open the Arduino IDE and go to file - > preferences. Copy the GitHub link to the additional boards manager URLs box and click OK.
Go to tools - > board - > board manager, enter "bluno m3" in the search box and click "Install". The configuration file is downloaded.
Select the bluno m3 board from the tools - > board menu.
The system is now ready for application development. The standard ide supports C and C + + programming and contains multiple code examples. Developers use a text editor to write sketches (programs) (Figure 4).
Then ide debugs the code, cross compiles, and uploads the results to the microcontroller board through the online serial programming (ICSP) port. Romeo ble Quad can also be programmed through its Bluetooth port.
The text editor starts with a new program that contains two preloaded necessary functions and is ready to add code: setup () is used to configure the initial conditions and execute them only once, and then run loop () continuously.
Two Arduino libraries must be downloaded and installed to run the Devastator motor using Romeo ble Quad: motor. H and PID_ v1.h。
The motor code first requests the two libraries as header files through an include statement, defines I / O pins and some initial constants, and then configures the motor in the setup () section.
The setup () and loop () sections are used to configure and control four motor channels. Since the Devastator chassis requires only two motors, spare parts can be used for accessories such as robot hands discussed below.
Control the robot wirelessly
You can plug a USB cable into the control board and manipulate the robot to move around, but it is undoubtedly much more convenient to use a smartphone, tablet or computer to control it wirelessly through Wi Fi or Bluetooth. As mentioned earlier, Romeo ble Quad contains the same Bluetooth 4.0 module as the bluno platform. GitHub provides open source applications for IOS 7.0 + and Android 4.3 +. Using these applications, designers can remotely control the robot and upload new sketches.
Upgrade basic design
After assembling the basic design, the next step is usually to add accessories to enable the robot to perform some useful tasks (Figure 5). Here are some upgrade attempts.
Detecting and avoiding obstacles is a required function of mobile robot. Dfrobot urm37 v4.0 ultrasonic sensor outputs a voltage proportional to distance and is compatible with Arduino and raspberry PI. The sensor can detect the presence of objects or walls, and then the code performs random steering, and the robot continues to move in a new direction.
Upgrading the robot to a mobile camera is another popular upgrade. The adafruit 397 camera module can capture video or still pictures. The camera and its CMOS image sensor can capture 640 x 480 pixel images at 30 frames per second (FPS), and has motion detection function.
Consider installing a camera on the robot hand (such as the df05bb tilt / translation assembly shown in Figure 6). The kit contains two brackets and two df05 servo motors, suitable for horizontal installation.
All assembled together
The complete Devastator robot includes chassis, controller board, expansion board and ultrasonic sensor (Fig. 7). For convenience, two plates are located on the upper part of the platform, but if a top mounted removable camera is required, there is also a lower mounting platform.
summary
Dfrobot is an excellent platform based on maker, which is suitable for designers and makers to explore software development, microcontroller functions, sensor options and motor control in an interesting and well supported environment.
In addition, many resources are also available on digi key's website. For example, click here to learn more about Arduino platform programming. Digi key also provides help for raspberry PI programming using python, the most popular PI language. All products discussed above have extensive documentation, application instructions, and tutorials.
After you finish this project, you can try many other projects. Maker.io is committed to the maker movement and provides a large number of featured projects, resources, funding sources and other support“
Our other product: