background image

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-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.1-raspi2 
sudo ./setup.sh 

 

Summary of Contents for AlphaBot

Page 1: ...AlphaBot User Manual 1 share awesome hardware AlphaBot User Manual Feb 2017 V1 2...

Page 2: ...rrupter Sensor speed measuring module 2pcs Infrared Proximity Sensor obstacle avoidance module 2pcs IR remote controller remotely control the robot SG90 servo Ultrasonic sensor ultrasonic obstacle avo...

Page 3: ...actical experience of smart robot development Raspberry Pi tutorial http www waveshare com wiki Raspberry_Pi_Tutorial_Series Due to the electrical characteristic limitation user should be more robotef...

Page 4: ...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 ch...

Page 5: ...s 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...

Page 6: ...tart your robotic exploration line tracking obstacle avoidance video monitoring WiFi Bluetooth ZigBee Infrared remote control etc AlphaBot can perceive its environment and perform relative response It...

Page 7: ...ded by Waveshare you can quickly study the smart robot including the structural framework the basic principle and the external modules In this document we will take the example of Waveshare AlphaBot 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: ...ower supply 10 Arduino expansion header for connecting Arduino shields 11 UART interface for connecting Bluetooth module to control the robot remotely via Bluetooth 12 SPI interface for connecting NRF...

Page 10: ...dule 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 fu...

Page 11: ...l 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...

Page 12: ...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 Control theory IN1 IN2 IN3 IN4 Descriptions 1 0 0 1 When the...

Page 13: ...e 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 AD sampling chip Since t...

Page 14: ...AlphaBot User Manual 14 share awesome hardware...

Page 15: ...iconductor with a PN junction made of a special material as its core part As the intensity of the infrared light enhances more current can be generated and the analog signal increases LM393 comparator...

Page 16: ...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 Wh...

Page 17: ...eceiver 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 I...

Page 18: ...ix minus one complement of user ID Op code Radix minus one complement of op code Firstly a 9ms high level pulse is transmitted and a 4 5ms low level pulse is followed Later coming are a 8bit address c...

Page 19: ...e 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 recei...

Page 20: ...ts 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 The time duration of the high level voltage i...

Page 21: ...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 3V 350...

Page 22: ...erence circuit which can generate the reference signal in the cycle of 20ms and the width of 1 5ms The generated DC bias current is compared with the voltage of the potentiometer and you get the volta...

Page 23: ...esome 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...

Page 24: ...back by the obstacle it will be received by the infrared receiver And the sensor will output the relative analog value The outputted data are affected by the distance and the color of the detected ob...

Page 25: ...AlphaBot User Manual 25 share awesome hardware...

Page 26: ...only 9mA and the working current of its receiver is only 12 3mA The NRF24L01 module also provides low power working modes such as power down mode and idle mode When using SPI interface to configure t...

Page 27: ...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 4...

Page 28: ...luetooth 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...

Page 29: ...AlphaBot User Manual 29 share awesome hardware interface is not provide in our application kit...

Page 30: ...ee 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...

Page 31: ...ra Webiopi a web framework orient to Internet of Things IoT can control the GPIOs of raspberry Pi This project is hosted in Google its source code can be downloaded form the website sourceforg Webiopi...

Page 32: ...vo If there are the library has been exported successfully Extract the Raspberry Pi program from the package and place it under the directory of home pi in the Raspbian Arduino example program Smart r...

Page 33: ...by potentiometer When the left sensor detects the obstacle the smart robot will turn to right When the right sensor detects the obstacle the smart robot will turn to left Infrared tracking program Cl...

Page 34: ...d remote controller You can modify the program as required Ultrasonic distance measurement program Click File Example AlphaBot E05_Ultrasonic_Ranging to open the project Compile and download the progr...

Page 35: ...ent board Install the servo 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 Connect the jumpers S1 and S2C of...

Page 36: ...obot tracking line scenario The dark background color will reduce the capability of the smart robot on the tracking line Turn on the power adapter and hold the robot in the middle of the black line an...

Page 37: ...ote control program Click File Example AlphaBot E10_Zigbee_Control to open the project Compile and download the program to the Arduino development board Install the Accessory Shield module to the smar...

Page 38: ...d 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...

Page 39: ...n to right When the right sensor detects the obstacle the smart robot will turn to left Infrared tracking program Install the Infrared Proximity Sensors to the left side and the right side of the smar...

Page 40: ...ifferent Infrared remote controller You can modify the program as required Infrared tracking line program Connect the jumpers of the motor in A area to the Raspberry Pi and the pins CLK ADDR DOUT and...

Page 41: ...d 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 Connect the jumpers S1 and S2C of servo in C area to the pi...

Page 42: ...t 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 co...

Page 43: ...lphaBot 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 belo...

Page 44: ...ctual condition To login the website you should enter your account and password The default account name is webiopi and the original password is raspberry When finished the steps above if you can ente...

Page 45: ...stored in this file and find out the device video0 under the directory of dev Please take a notice that the letter l in the command bcm2835 v4l2 is the lower case of L d Install dependent libraries s...

Page 46: ...wser 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...

Page 47: ...dware 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 ter...

Page 48: ...168 1 16 8080 action stream In here src is followed by the IP address of RPi 192 168 1 16 and the port number 8080 This port is used for transmitting stream Start up the cambot program cd AlphaBot mjp...

Page 49: ...owser 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 t...

Page 50: ...ines 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 start sh Connect the Motor jumpers IN1 IN2 ENA ENB IN3 IN4 in...

Page 51: ...o cp config etc webiopi config Select AdvancedOptions Serial No to disable the serial port debugging function Open the file boot config txt and find out the following configuration line to enable the...

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: ...ly with input voltage of 7 4V When working with Arduino and Raspberry Pi at a same time the external power supply should be applied Any external power supply has to obey to the regulations and standar...

Page 54: ...of any operations AlphaBot should not touch any heat source to make sure reliability service under normal room temperature environment Protect the printed circuit board and the components on it from...

Page 55: ...Mouser Electronics Authorized Distributor Click to View Pricing Inventory Delivery Lifecycle Information Seeed Studio 110090141 110090142 110090144 110090145 110090143...

Reviews: