share awesome hardware AlphaBot User Manual AlphaBot User Manual Feb. 2017 V1.
share awesome hardware AlphaBot User Manual To the Reader Selection Guide Note: Accessories may be different in different product package. This manual describes all the compatible accessories but perhaps the product you bought doesn’t contain some of them.
share awesome hardware AlphaBot User Manual Recommendation Reading this document can be a challenge for a freshman. We advise that the reader need to have some knowledge of the programming in Raspberry Pi Python or Arduino, which can be helpful for understanding the programming fundamentals. Due to space constraint, only a few of the programming fundamentals can be explored here. If you want to have a thorough understand of them, please check the source code.
share awesome hardware AlphaBot User Manual Contents AlphaBot User Manual 1 To the Reader 2 Recommendation 3 How to get data 3 Contents 4 Product description 6 Introduction 6 Functions 6 Features 6 Audience 7 On-board resource 9 Module functions 10 Main control module 10 Motor driver module 11 Power supply 13 AD sampling chip 13 Obstacle avoidance module 15 Speed testing module 16 Infrared remote control 17 Ultrasonic distance measurement module 19 4
share awesome hardware AlphaBot User Manual Servo 22 Tracker module 24 NRF24L01+wireless control 26 Bluetooth control 28 ZigBee control 30 Wifi video monitoring 31 Example programs 32 Arduino example program 32 Raspberry Pi example program 38 Arduino and raspberry Pi combined control 50 Safety Precautions 53 Notice Please reserve the following information for future use.
share awesome hardware AlphaBot User Manual Product description Introduction Mobile robot development platform, compatible with Raspberry Pi/Arduino Functions AlphaBot is a robotic development platform compatible with Raspberry Pi and Arduino. It consists of the AlphaBot mainboard, the mobile chassis, and everything required to get it moving.
share awesome hardware AlphaBot User Manual Arduino extend header, supports Arduino shields Modular design, plug-and-play modules like line tracking, obstacle avoidance, speed measuring, etc. eliminating the trouble of connecting mess wires.
share awesome hardware AlphaBot User Manual this paper. If you have any question, please don’t hesitate to visit Waveshare site http://www.waveshare.com and leave your message.
share awesome hardware AlphaBot User Manual On-board resource 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21.
share awesome hardware AlphaBot User Manual 22. Raspberry Pi/Arduino selection: select the Raspberry Pi or Arduino to control the robot peripherals Module functions Main control module The main control module is the key part of the smart robot. AlphaBot provides Arduino and Raspberry Pi interfaces. Configuration can be one of two options, or both of them work together. By taking fully use of the hardware and software of both boards, the smart robot can be applied to much more application scenarios.
share awesome hardware AlphaBot User Manual Motor driver module Moter driver module is one of the most important parts of the smart robot. AlphaBot use the L298P driver chip from ST, which is a high voltage, big current motor driver chip.
share awesome hardware AlphaBot User Manual Interface definition of driver module: Interfaces Raspberry Pi Arudino IN1 P12 A0 IN2 P13 A1 ENA P6 D5 IN3 P20 A2 IN4 P21 A3 ENB P26 D6 IN1 and IN2 are connected to the left motor, while IN3 and IN4 are connected to the right motor. ENA and ENB are output enable pins, active high enable. When they are driven to High level, the PWM pulse will be outputted from IN1, IN2, IN3 and IN4, so as to control the speed of the motor robot.
share awesome hardware AlphaBot User Manual Power supply The smart robot employs two series 18650 batteries for power supply with input voltage of 7.4V. The input voltage will be deal with the LM2596 regulator, and send out to Arduino, Raspberry Pi and sensors. ! For using external power supply, the input voltage should not beyond 12V.
share awesome hardware AlphaBot User Manual 14
share awesome hardware AlphaBot User Manual Obstacle avoidance module Obstacle avoidance module consists of an infrared transceiver and a comparator. The infrared transmitter has an infrared LED array as a luminophor. When there is an obstacle (reflector) on the detection direction, the Infrared light will be reflected, and received by the infrared receiver, which is a semiconductor with a PN junction made of a special material as its core part.
share awesome hardware AlphaBot User Manual Speed testing module The speed testing module contains a coded disc and a WYC-H206 photoelectric sensor. WYC-H206 photoelectric sensor has an infrared transmitter and an infrared receiver. When the infrared receiver is obscured, unable to receive infrared light, the sensor will output a high level voltage. The high level voltage passes the inverting schmitt trigger and becomes a low level voltage. At this point, the relative indicator lights up.
share awesome hardware AlphaBot User Manual Infrared remote control The smart robot applies LFN0038K receiver to receive infrared signal. The infrared remote controller provided with the application complies with kit, the standard NEC encoding protocol. When the infrared receiver receives the infrared signal, it will output the relative pulses to the main control chip. Then, the main control part decode the signal to the key code, so as to control the corresponding motor.
share awesome hardware AlphaBot User Manual Infrared control protocol: The 32-bit binary code made up of logical “0” and logical“1” should be secondary modulated with a 38kHz robotrier frequency, in order to enhance the transmitting efficiency and reduce the power consumption. The secondary modulated code will be transmitted in the form of infrared light by a infrared transmitter, as the figure shows below.
share awesome hardware AlphaBot User Manual Ultrasonic distance measurement module The ultrasonic distance measurement module has 4 pins, they are VCC, GND, TRIG (transmitting pin) and ECHO (receive pin). Control theory: Here is the principle of ultrasonic distance measurement. When the ultrasonic wave meets a object, it will be reflected back and received by the receiver. You can get the distance of the object from the sensor by measuring the interval from transmitting signal to receiving the echo.
share awesome hardware AlphaBot User Manual The timing diagram above shows the control principle of ultrasonic distance measurement. When the module is working, it sends out a high level signal at least for 10us to control the pin TRIG to trigger distance measurement. Then, the module transmits 8 serial of 40kHz square wave automatically, to check whether there is echo signal. If there is, the module outputs a high level voltage from the pin ECHO.
share awesome hardware AlphaBot User Manual 5V operating current Vcc=5V 2.8 mA 3.3V operating current Vcc=3.3V 2.2 mA 5V minimum detection distance Vcc=5V 2 3 cm 3.3V minimum detection distance Vcc=3.3V 2 3 cm 5V maximum detection distance Vcc=5V 400 450 600 cm 3.3V maximum detection distance Vcc=3.
share awesome hardware AlphaBot User Manual Servo Servo is a auto-control system with a DC motor, a reduction gear set, a sensor and a control circuit. The servo can control the rotation angle of the output axis by transmitting control signal. It has 3 control lines, the red one is the positive power line (5V), the orange one is signal line (IO) and the brown one is power ground (GND). ☺The control signal will be sent to the signal modulating chip via the receiver, and generates the DC bias current.
share awesome hardware AlphaBot User Manual control as an example, the relationship between the pulse and the rotation angle is showed as the table below. Pulse width Rotation angle 0.5ms 0 degree 1.0ms 45 degree 1.5ms 90 degree 2.0ms 135 degree 2.
share awesome hardware AlphaBot User Manual Tracker module The working principle of the tracker module is similar to the infrared obstacle module. module avoidance The tracker has an ITR20001/T infrared reflection sensor, of which the infrared transmitter can transmit the infrared light all the time. When the infrared light is reflected back by the obstacle, it will be received by the infrared receiver. And the sensor will output the relative analog value.
share awesome hardware AlphaBot User Manual 25
share awesome hardware AlphaBot User Manual NRF24L01+wireless control AlphaBot has a SPI interface which can connect with the NRF24L01 module, a new RF transceiver. The NRF24L01 has built-in frequency synthesizer, a power amplifier, a crystal oscillator and a modulator. With enhanced ShockBurst technology integrated, its address, output power and communication channel can be configured by program, suitable for multiple machine communication.
share awesome hardware AlphaBot User Manual declares the number of bit occupied by the address in the RF data package, enabling the NRF24L01+ to make a distinction between the data and the address; Receive channel, receive the address of data, the address from channel 0 to channel 5; CRC checking, NRF24L01+ can generate CRC code and perform decoding; Working frequency, configurable between 2.4GHz to 2.
share awesome hardware AlphaBot User Manual Bluetooth control AlphaBot has a UART interface, which can connect with a Bluetooth module 2.0 directly, or connect with dual Bluetooth module via the Accessory Shield module. Since the Bluetooth module is controlled via serial port, user do not need to know much about the Bluetooth protocol. When connected with the Bluetooth module , you can control your smart robot via your mobile phone.
share awesome hardware AlphaBot User Manual interface is not provide in our application kit.
share awesome hardware AlphaBot User Manual ZigBee control AlphaBot can connect with the Core2530 (B) module via Accessory Shield, to perform ZigBee control. In this configuration, the PC should be connected to the CC2530 Eval Kit (B) via a USB cable. Here is the PC software for controlling the smart robot.
share awesome hardware AlphaBot User Manual Wifi video monitoring In AlphaBot application, when raspberry Pi works as the main control part, you can use your mobile phone or PC to perform wifi video monitoring via website control. The webiopi can help you to perform the remote control, and the mjpg-streamer software can realtime display the image captured by the camera. Webiopi, a web framework orient to Internet of Things (IoT), can control the GPIOs of raspberry Pi.
share awesome hardware AlphaBot User Manual Example programs We provide the control programs of Arduino and Raspberry Pi, enabling to implement tracking line, obstacle avoidance, remote control and video monitoring. The following example programs are available from Waveshare WIKI., Copy the library file under the directory of Arduino to the libraries folder under the installation directory of Arduino IDE.
share awesome hardware AlphaBot User Manual Click File -> Example -> AlphaBot -> E02_Infrared_Obstacle_Avoidance to open the project. Compile and download the program to the Arduino development board. Install the Infrared Proximity Sensors to the left side and the right side of the smart robot. Connect the jumper of motor in A area to the Arduino, and the jumpers DL and DR of E area to D7 and D8, respectively.
share awesome hardware AlphaBot User Manual Click File -> Example -> AlphaBot -> E04 Infrared_Remote_Control to open the project. Compile and download the program to the Arduino development board. Connect the jumper of motor in A area to the Arduino, and the jumper of the Infrared receiver IR in G area to the jumper D4 on Arduino. Expectation result: When pressed the key on the Infrared remote controller, you can control the smart robot.
share awesome hardware AlphaBot User Manual board. Install the steering gear and Ultrasonic module to the smart robot. Connect the jumpers TRIG, ECHO of Ultrasonic unit in D area to the pins D11 and D12 on the Arduino. Turn on the power adapter, the smart cat can perform ultrasonic obstacle avoidance. When there is obstacle in front of the robot, it will move to the side that far away from the obstacle.
share awesome hardware AlphaBot User Manual project. Compile and download the program to the Arduino development board. Install the Tracker Sensor to the smart robot. Connect the jumper of motor in A area to the Arduino, and the jumpers CLK, ADDR, DOUT and CS of F area to D13, D12, D11 and D10, respectively. (The servo in C area and the ultrasonic unit in D area will use these pins as well, so please remove the corresponding jumpers, avoiding interruption).
share awesome hardware AlphaBot User Manual Accessory Shield module to the smart robot via the Arduino interface, and the Bluetooth module to the Accessory Shield module via the XBeeinterface. Turn on the power adapter, and download and install the Bluetooth control software to your mobile phone. Run the software and connect with the Bluetooth, then you can control the motion of smart robot with the direction keys. OLED can display the command string that you sent.
share awesome hardware AlphaBot User Manual Raspberry Pi example program Extract the AlphaBot.tar.gz, and place it under the directory of /home/pi in the raspbian. Before using this extension board, we should install a python library to the Raspberry Pi. For more information about the Raspberry Pi library installation and configuration, please refer to the document Install necessary libraries to Raspberry Pi.
share awesome hardware AlphaBot User Manual Install the Infrared Proximity Sensors to the left side and the right side of the smart robot. Connect the jumpers IN1, IN2, ENA, ENB, IN3 and IN4 of motor in A area to the pins P12, P13, P6, P26, P20 and P21 of the Raspberry Pi, respectively. And connect the jumpers DL and DR of the infrared unit in E area to the pins P19 and P16. Enter the Linux terminal, and input the following lines: cd ~/AlphaBot/python sudo python Infrared_Obstacle_Avoidance.
share awesome hardware AlphaBot User Manual Infrared remote control program Connect the jumper of motor in A area to the Raspberry Pi, and the jumper of the Infrared receiver IR in G area to the pin P18. Enter the Linux terminal, and input the following lines: cd ~/AlphaBot/python sudo python Infrared_Remote_Control.py Expectation result: When pressed the key on the Infrared remote controller, you can control the smart robot.
share awesome hardware AlphaBot User Manual obstacle. Ultrasonic Ranging program Install the steering gear and Ultrasonic module to the smart robot. Connect the jumpers TRIG, ECHO of Ultrasonic unit in D area to the pins P17 and P5 on the Raspberry Pi. Enter the Linux terminal, and input the following lines: cd ~/AlphaBot/python sudo python Ultrasonic_Ranging.py Expectation result: The screen will show the distance measured by the Ultrasonic unit currently.
share awesome hardware AlphaBot User Manual respectively. Then, it will move to the side that far away from the obstacle. WiFi control video program This test demonstrates how to remote control the robot via webiopi, and real-time display the image captured by the camera with the software mjpg-streamer. For some browser may be unable to display the image correctly, we recommend you to use the Chrome browser or the Firefox browser. Step 1. Install webiopi cd ~/AlphaBotmjpg-AlphaBot/WebIOPi-0.7.
share awesome hardware AlphaBot User Manual Check the installation: run the command webiopi –h. When the library is installed successfully, you can see the following information as the figure shown below.
share awesome hardware AlphaBot User Manual Enter the terminal, and input the line below: sudo webiopi -d -c /etc/webiopi/config Then, open the browser on your PC or cell phone, and enter the IP address of RPi and the port number: 8000 into the address bar. For example, input http://192.168.1.16:8000 (the address can be changeable according to your actual condition). To login the website, you should enter your account and password.
share awesome hardware AlphaBot User Manual a) Run the command raspi-config to start up the camera before using it: sudo raspi-config Then, select the option Enable Camera. b) For the camera with CSI interface, the system may be unable to find out the device under the directory of /dev/video0. In this case, you should add a line, bcm2835-v4l2, into the file /etc/modules.
share awesome hardware AlphaBot User Manual g) Start up mjpg-streamer: sudo ./start.sh Then, open the browser, and enter the IP address of RPi and the port number: 8080 into the address bar. (Notices: the port number here is 8080, other than 8000 what we used before.) The website will show the information about the M-JPEG streamer. Click the option Stream, it will real-time display the image captured by the camera.
share awesome hardware AlphaBot User Manual Under the terminal, pressing the keys Ctrl + C can end the program. However, it should be kept running, since we still need it in the following operations. Step 3. Run the robot program Open another terminal; don’t end the program in the step 2.
share awesome hardware AlphaBot User Manual Enter the directory of magpi-cambot, which contains the source code for controlling the robot. cd ~/AlphaBot/mjpg-AlphaBot/mjpg-AlphaBot Modify the file index.html: sudo nano index.html You should modify the html tag according to the IP of Raspberry Pi in used.
In here, “src” is followed by the IP address of RPi: 192.168.1.
share awesome hardware AlphaBot User Manual If you cannot enter this webpage, we recommend you to use the Chrome browser or the Firefox browser. Furthermore, please make sure the current directory of Raspberry Pi is ~/AlphaBot/mjpg-AlphaBot/mjpg-AlphaBot and there should be a file index.html under this directory. And then, input the code sudo webiopi -c config to enter the index.html. Or else, you will go to the WebIOPi Main Menu webpage.
share awesome hardware AlphaBot User Manual Automatically start settings Replace the configuration file cd ~/AlphaBot/mjpg-AlphaBot/mjpg-AlphaBot sudo cp config /etc/webiopi/config This starts the webiopi script when system boot up. sudo update-rc.d webiopi defaults Edit the /etc/local file: sudo vi /etc/rc.local Append the following lines after the comment lines and you must make sure the “exit 0” line is the last statement. Then save and exit. cd /home/pi/AlphaBot/mjpg-AlphaBot/mjpg-streamer sudo .
share awesome hardware AlphaBot User Manual the smart robot. In this case, the robot speed adjustment is controlled by the analog PWM, which may occupy CPU resource. And the output of the PWM is not stable. To have a better result, we recommends using Arduino and Raspberry Pi together to control the smart robot. In this way, Arduino controls the motor and servo, and Raspberry Pi handles the video transmission and the website control. Arduino and Raspberry Pi apply serial communication. 1.
share awesome hardware AlphaBot User Manual the browser bar to control the smart robot. ! In assembling, Arduino and Raspberry Pi should not touch each other.
share awesome hardware AlphaBot User Manual Safety Precautions Product name: Smart robot extension development kit, contains AlphaBot base board, and smart robot base board. Support Arduino and Raspberry Pi development boards. Notice Please reserve the following information for future use. Caution To prevent AlphaBot, a precision device, from breaking down or being damaged, please follow the requirement listed below.
share awesome hardware AlphaBot User Manual Installing the incompatible device to the chassis may cause damage and void the warranty. The product should not expose to water and moisture, or not be placed on conductive surface, in the course of any operations.