Waveshare AlphaBot User Manual

Summary of AlphaBot

  • Page 1

    Alphabot user manual 1 share awesome hardware alphabot user manual feb. 2017 v1.2.

  • Page 2: To The Reader

    Alphabot user manual 2 share awesome hardware 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. The figure below shows most the compatibl...

  • Page 3: Recommendation

    Alphabot user manual 3 share awesome hardware 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 t...

  • Page 4: Contents

    Alphabot user manual 4 share awesome hardware 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 pow...

  • Page 5

    Alphabot user manual 5 share awesome hardware 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 pre...

  • Page 6: Product Description

    Alphabot user manual 6 share awesome hardware 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 chas...

  • Page 7: Audience

    Alphabot user manual 7 share awesome hardware 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. L298p motor driver with diode protection circuit, more s...

  • Page 8

    Alphabot user manual 8 share awesome hardware this paper. If you have any question, please don’t hesitate to visit waveshare site http://www.Waveshare.Com and leave your message..

  • Page 9: On-Board Resource

    Alphabot user manual 9 share awesome hardware on-board resource 1. Raspberry pi interface: for connecting raspberry pi 2. Arduino interface: for connecting arduino 3. Motor interface 4. Ultrasonic module interface 5. Servo module interface 6. Obstacle avoidance module interface 7. Speed measuring in...

  • Page 10: Module Functions

    Alphabot user manual 10 share awesome hardware 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 interface...

  • Page 11: Motor Driver Module

    Alphabot user manual 11 share awesome hardware 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..

  • Page 12

    Alphabot user manual 12 share awesome hardware 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 outp...

  • Page 13: Power Supply

    Alphabot user manual 13 share awesome hardware 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, ...

  • Page 14

    Alphabot user manual 14 share awesome hardware.

  • Page 15: Obstacle Avoidance Module

    Alphabot user manual 15 share awesome hardware 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 ...

  • Page 16: Speed Testing Module

    Alphabot user manual 16 share awesome hardware 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 infrar...

  • Page 17: Infrared Remote Control

    Alphabot user manual 17 share awesome hardware infrared remote control the smart robot applies lfn0038k receiver to receive infrared signal. The infrared remote controller provided with the application kit, complies with the standard nec encoding protocol. When the infrared receiver receives the inf...

  • Page 18

    Alphabot user manual 18 share awesome hardware 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 modul...

  • Page 19

    Alphabot user manual 19 share awesome hardware 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 ultrasoni...

  • Page 20

    Alphabot user manual 20 share awesome hardware 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...

  • Page 21

    Alphabot user manual 21 share awesome hardware 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...

  • Page 22: Servo

    Alphabot user manual 22 share awesome hardware 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 p...

  • Page 23

    Alphabot user manual 23 share awesome hardware 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.5ms 180 degree.

  • Page 24: Tracker Module

    Alphabot user manual 24 share awesome hardware tracker module the working principle of the tracker module is similar to the infrared obstacle avoidance module. The tracker module has an itr20001/t infrared reflection sensor, of which the infrared transmitter can transmit the infrared light all the t...

  • Page 25

    Alphabot user manual 25 share awesome hardware.

  • Page 26: Nrf24L01+Wireless Control

    Alphabot user manual 26 share awesome hardware 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 t...

  • Page 27

    Alphabot user manual 27 share awesome hardware 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...

  • Page 28: Bluetooth Control

    Alphabot user manual 28 share awesome hardware 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...

  • Page 29

    Alphabot user manual 29 share awesome hardware interface is not provide in our application kit..

  • Page 30: Zigbee Control

    Alphabot user manual 30 share awesome hardware 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 s...

  • Page 31: Wifi Video Monitoring

    Alphabot user manual 31 share awesome hardware 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 mj...

  • Page 32: Example Programs

    Alphabot user manual 32 share awesome hardware 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 libra...

  • Page 33

    Alphabot user manual 33 share awesome hardware 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. C...

  • Page 34

    Alphabot user manual 34 share awesome hardware 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 ...

  • Page 35

    Alphabot user manual 35 share awesome hardware 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 avoid...

  • Page 36

    Alphabot user manual 36 share awesome hardware 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, r...

  • Page 37

    Alphabot user manual 37 share awesome hardware 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....

  • Page 38

    Alphabot user manual 38 share awesome hardware 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 p...

  • Page 39

    Alphabot user manual 39 share awesome hardware 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 conne...

  • Page 40

    Alphabot user manual 40 share awesome hardware 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 inf...

  • Page 41

    Alphabot user manual 41 share awesome hardware 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 foll...

  • Page 42

    Alphabot user manual 42 share awesome hardware 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-st...

  • Page 43

    Alphabot user manual 43 share awesome hardware 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..

  • Page 44

    Alphabot user manual 44 share awesome hardware 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:...

  • Page 45

    Alphabot user manual 45 share awesome hardware 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...

  • Page 46

    Alphabot user manual 46 share awesome hardware 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 in...

  • Page 47

    Alphabot user manual 47 share awesome hardware 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..

  • Page 48

    Alphabot user manual 48 share awesome hardware 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 ...

  • Page 49

    Alphabot user manual 49 share awesome hardware 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 unde...

  • Page 50

    Alphabot user manual 50 share awesome hardware 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...

  • Page 51

    Alphabot user manual 51 share awesome hardware 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 ...

  • Page 52

    Alphabot user manual 52 share awesome hardware the browser bar to control the smart robot. ! In assembling, arduino and raspberry pi should not touch each other..

  • Page 53: Safety Precautions

    Alphabot user manual 53 share awesome hardware 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. Cautio...

  • Page 54

    Alphabot user manual 54 share awesome hardware 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. Alphabot should not touch any heat so...

  • Page 55: Mouser Electronics

    Mouser electronics authorized distributor click to view pricing, inventory, delivery & lifecycle information: seeed studio : 110090141 110090142 110090144 110090145 110090143.