background image

 

Hummer-Bot Instruction 

Manual 

 

 

Github https://github.com/keywish/keywish-hummer-bot 

Summary of Contents for Hummer-Bot

Page 1: ...Hummer Bot Instruction Manual Github https github com keywish keywish hummer bot...

Page 2: ...V 1 1 modify Ken chen 2017 10 18 V 1 2 Review Ken chen 2017 11 15 V 1 3 Review Zach zhou 2017 12 8 V 1 4 Review Baron li 2018 3 11 V 1 5 Modify ir blutooth module Ken chen 2018 4 20 V 1 6 Add device i...

Page 3: ...ents 11 3 1 Assembly of the Car 11 3 1 1 Bottom Mounting of the Car 11 3 1 2 Surface Mounting of the Car 28 3 2 Development of the Car 42 3 2 1 Walking Principle of the Car 42 3 2 2 Infrared Obstacle...

Page 4: ...petition through wireless control this is not only a test of endurance and confidence for enthusiasts but also a training to their response The core of the car walking is motor control a good motor an...

Page 5: ...ased on the Arduino UNO and L298N motor Compared with the traditional car Hummer Bot is also equipped with wireless control Bluetooth infrared WIFI and so on ultrasonic infrared It can trace and avoid...

Page 6: ...3 Product component invento Note Please refer to the following table for instructions for use of each accessory device...

Page 7: ...4...

Page 8: ...5...

Page 9: ...6...

Page 10: ...7...

Page 11: ...ocessing Projects based on Arduino can either only contain Arduino or contain Arduino and some other software on the PC they can communicate via such as Flash Processing MaxMSP You can do it yourself...

Page 12: ...arned how to use Processing programming environment then they will feel familiar when using the Arduino development environment 4 Open source software and extensible Arduino software is open source ex...

Page 13: ...10 Fig 2 2 Several commonly usedArduino...

Page 14: ...Bottom Mounting of the Car First we open the box take out the car body two black acrylic screwdriver M4x12 screws six angle coupling and matching set screws four black red welding wires and four motor...

Page 15: ...12 After the completion as shown...

Page 16: ...13 The second step is to Welding wire on the motor...

Page 17: ...14 After the completion as shown...

Page 18: ...t face is shown in Fig 3 1 4 and the back is shown in Fig 3 1 5 Note the screws in Fig 3 1 5 should not be screwed too tight otherwise the wheels adjustment will be affected The screw of the motor hol...

Page 19: ...16 Fig 3 1 3 Diagram of Aluminum Alloy Bracket Installation...

Page 20: ...17 Fig 3 1 4 Diagram of Motor Installation Fig 3 1 5 Fixing Screw for Motor...

Page 21: ...necting shaft and the set screws first screwing the screws into the connecting shaft not too tight otherwise the motor transmission shaft cannot be inserted into the connecting shaft Then insert the s...

Page 22: ...19 Fig 3 1 7 Diagram of Connecting Shaft Installation Fig 3 1 8 After Installation set screws must be stuck in the smooth side...

Page 23: ...wheels Hummer Bot uses racing wheels which grip stronger less friction more stable than the traditional wheels The wheel mounting method is relatively simple Then inserting the connecting shafts into...

Page 24: ...21 Fig 3 1 10 Diagram of Wheel Installation Fig 3 1 10 Diagram of Wheel Screw Fixation...

Page 25: ...Fig 3 1 11 the installed wheels would have some tilt then we need to adjust the motor by hand gently until the wheels and the acrylic become parallel then tighten the screws Fig 3 1 11 Adjusting Wheel...

Page 26: ...23 First fix the screw on the motor driver board as shown below Then install the motor driver board on the acrylic board as shown below Fig 3 1 12 Diagram of Motor Drive Installation...

Page 27: ...as shown in Fig 3 1 13 then connecting the two wires on battery box to the motor drive 12v red and GND black and leading a wire from 5V to 3 or 4 in the figure IN1 IN2 is a motor set IN3 IN4 is anothe...

Page 28: ...module to the acrylic board according to the Fig 3 1 15 First screwing the screws to the tracing module Use two nuts here as shown in Fig 3 1 16 and then connecting the 3Pin wire to the 1 in Fig 3 1 1...

Page 29: ...26 Fig 3 1 15 Diagram of Tracing Module Installation...

Page 30: ...27 Fig 3 1 16 Diagram of Screw Brackets Fig 3 1 17 The Back of Complete Installation...

Page 31: ...tep is to install the battery box and the Arduino mainboard this step is quite simple install the corresponding package to 3 and 2 in Fig 3 1 19 the complete installation is shown in Fig 3 1 20 Fig 3...

Page 32: ...29 First install the screws on the UNO After the completion as shown...

Page 33: ...30 Then install UNO on acrylic plates Fig 3 1 20 Diagram of Arduino Mainboard and Battery Box Installation...

Page 34: ...to connect two piece acrylic board In Fig 3 1 19 we can see the 1 logo where there are 6 holes these are the screw fixing holes The installation is shown in Fig 3 1 21and the complete installation is...

Page 35: ...et In Fig 3 1 19 the 4 logo is the actuator mounting position The device used as shown The complete installation is shown in Fig 3 1 23 First install the servo fixing bracket that is install the brack...

Page 36: ...33 Step 2 Install the servo install it as shown in the figure The third step use two screws to fix the servo Fig 3 1 23 Diagram of Steering Gear Installation...

Page 37: ...ng gear to the 13 IO port on Arduino After the servo rotates to 90 we can install the servo bracket on the servo and after the installation we can fix it with screws the installation is shown in Fig 3...

Page 38: ...1 24 Diagram of Steering Gear Angle Adjustment The fifth step is to install ultrasonic bracket fix the bracket on the steering gear as shown in Fig 3 1 25 Fig 3 1 25 Diagram of Ultrasonic Bracket Inst...

Page 39: ...36 The sixth step is to install infrared obstacle avoidance module in the two holes marked as 6 in Fig 3 1 19 as shown in Fig 3 1 26 Fig 3 1 26 Diagram of Infrared Obstacle Avoidance Installation...

Page 40: ...ection Fig 3 1 27 Diagram of Infrared Remote Control Receiving Head Installation The eighth step is to install the voltage display module in the back of battery box to logo A marked in Fig 3 1 28 and...

Page 41: ...e as the wires used by the motor one red and one black and connect the two cables to the DC power head The DC power connector is shown in Figure 3 1 29 The rubber ring marked as 1 can be removed to op...

Page 42: ...cting two wires of the battery box and the voltage display module DC power head to the 12V red and GND black on the motor drive board And the other end of the wire in the ninth step is here At last al...

Page 43: ...40 Fig 3 1 33 Diagram of Wires Arrangement Fig3 1 34 the Effect of Whole Assembly...

Page 44: ...function and some modules through a short period of time then you can achieve the corresponding functions only by downloading the program to the development board each function has a corresponding pro...

Page 45: ...rner in of our lives the motor is widely used in their respective posts It is a kind of electromagnetic device which can achieve energy conversion or transfer according to electromagnetic induction it...

Page 46: ...motor solenoid valve and so on The chip with two enable control terminals uses the standard logic level to control signals allows or prohibits the device to work when the input signal is not interfere...

Page 47: ...overcurrent protection Controlling of two motors separately Controlling the stepper motor The speed control with PWM pulse width Positive and negative rotation Fig 3 2 2 Logic Function Chart Fig 3 2...

Page 48: ...backward stop flexible steering of the car so we use PWM to control the speed of the motor Note PWM is a way to simulate the simulation output via square waves with different duty cycles Arduino PWM...

Page 49: ...ce When the DC power supply is added to the load the power supply is on otherwise the power supply is off As long as the bandwidth is enough any analog value can use PWM to encode The output voltage v...

Page 50: ...power power connection is introduced the tenth and eleventh steps in 3 1 2 to observe the wheels rotation if going forward 5s stopping 1s going back 5s stopping 1s turning left 3s stop 1s turning righ...

Page 51: ...logWrite E2 0 delay 5000 back analogWrite M1 0 analogWrite E1 0 the speed value of motorA is 0 analogWrite M2 0 analogWrite E2 0 the speed value of motorB is 0 delay 1000 stop analogWrite M1 0 analogW...

Page 52: ...avoidance and the black white line tracing and many other occasions 3 2 2 2 Working Principle 1 The module output port OUT can be directly connected with the IO port of the microcontroller and directl...

Page 53: ...pped with infrared light source it can detect the location of the object through covering the light source reflection refraction and other optical means Passive infrared detector has no light source a...

Page 54: ...tance counterclockwise will decrease it is shown in Fig 3 2 10 Manual adjustment is shown in the following diagram Fig 3 2 10 Diagram of Distance Detection Adjustment 3 2 2 4 Experimental Procedures 1...

Page 55: ...ote Here we connect the infrared obstacle avoidance signal output port to the analog port on Arduino A0 A5 so the serial port prints out analog value you can connect it to digital port 2 13 and the se...

Page 56: ...53 Fig 3 2 11 Diagram of Data with Obstacles Fig 3 2 12 Diagram of Data without Obstacles...

Page 57: ...rs void setup Serial begin 9600 Set the serial port baud rate to 9600 pinMode leftPin INPUT pinMode rightPin INPUT Set the working mode of two sensor pins namely input delay 1000 void loop dl analogRe...

Page 58: ...e car just can rotate about 90 degrees because the DC motor does not like the steering angle can be precisely controlled so can only give a rough estimate of course different motor speed is not Simila...

Page 59: ...rning around if dl 38 dr 38 If the left sensor is less than or equal to 38 and the right value is greater than or equal to 38 the following program in is executed dl 38 indicating that there is an obs...

Page 60: ...s val Serial print dl Serial print Serial print dr Serial print Serial println go forward In the above program we made comments on some part of the program in order to make you to learn and understand...

Page 61: ...stacle avoidance robot tracing detecting black line in white background and detecting white line in black background which is the necessary sensor for tracing line robot and other occasions The PCB si...

Page 62: ...n in Fig 3 2 16 when the car deviates from the black line If the left X1 detects the black line which can not be detected by the right Y1 and intermediate sensors the the car has shifted to the right...

Page 63: ...r floor is white then you could stick a black tape to form a loop otherwise stick a white tape the shape of track is based on your own desires the best width of the tape is 13 18mm In this manual we u...

Page 64: ...61 Serial print left Serial print left Serial println Fig 3 2 18 Example of the Black Track Fig 3 2 19 The Data When the Sensor Does Not Detect the Black Line...

Page 65: ...e changes in signal at the I O port the corresponding procedure will be implemented the corresponding signal will be sent to the motor so as to correct the status of the car 2 The car tracing flow cha...

Page 66: ...int M2 10 DIRB right Define 4 motor control terminals connected to IN1 IN4 on the motor drive board void setup Serial begin 9600 Set the baud rate to 9600 void loop int left1 centre right1 Define 3 se...

Page 67: ...otherwise the car will shake more in the tracing process analogWrite M1 0 analogWrite E1 val the speed value of motorA is val analogWrite M2 0 analogWrite E2 val the speed value of motorB is val else...

Page 68: ...ar will continue to drive forward otherwise the car will stop then the steering engine will rotate 90 degrees to the right After that the MCU reads data from the reflected ultrasonic again the steerin...

Page 69: ...66 Fig 3 2 22 Diagram of Steering Gear Fig 3 2 23 Composition of Steering Gear...

Page 70: ...At present most of the ultrasonic sensors are working using piezoelectric sensors Distance measurement with the ultrasonic is also a hot spot In the Hummer Bot car we use HC SR04 ultrasonic module wh...

Page 71: ...er that the red is power wire the brown is ground wire 2 Ultrasonic wave 1 Working voltage 4 5V 5 5V In particular voltage above 5 5V is not allowed definitely 2 Power consumption current the minimum...

Page 72: ...op rotating When the control circuit receives the control signal the motor will rotate and drive a series of gear sets the signal will move to the output steering wheel when the motor decelerates The...

Page 73: ...e diagram is shown in Fig 3 2 28 The velocity of the ultrasonic in the air is 340m s we can calculate the distance between the transmitting position and the blocking obstacle according to the time t r...

Page 74: ...mitted to the another electrode on ultrasonic transducer this will enhance the ultrasonic emission intensity The output end adopts two parallel inverters in order to improve the driving ability the re...

Page 75: ...smitting and Receiving 3 2 4 4 Experimental Procedures 1 Installing the steering gear ultrasonic module to the car which has been completed in fourth step to the seventh step in 3 1 2 as shown in Fig...

Page 76: ...73 Fig 3 2 31 Installation Diagram of the Steering Gear and Ultrasonic Module Fig 3 2 32 Wiring of the Steering Gear and Ultrasonic Module...

Page 77: ...fine the sensor s 2 control pins to connect to pins 2 and 3 on the Arduino float da float dl float dr Define three variables used to store the servo at 0 90 180 degrees the value collected by the ultr...

Page 78: ...to 2000cm execute the following program in int val 150 When the straight line has a PWM value of 150 if the value is too high the speed of the car will be very fast which may lead to the car can not...

Page 79: ...etween the car and the obstacle has exceeded the safety value So the car stopped forward int val 0 digitalWrite M1 0 analogWrite E1 val the speed value of motorA is 0 digitalWrite M2 0 analogWrite E2...

Page 80: ...nt Serial println Ultrasonic acquisition of the distance between the right side of the car and the obstacle and then assigned to dr and then print the distance on the Serial Monitor head write 80 head...

Page 81: ...E2 0 Serial println Turning left2 delay 200 Special case If the return distance on the right is more than 1000 then the probe is blocked and turn left at this moment else if dr 20 dl 20 digitalWrite M...

Page 82: ...ve 38KHz modulation remote control signal Through the Arduino programming the decoding operation of the remote control signal can be realized so as to produce all kinds of remote control robot and int...

Page 83: ...photoelectric varies with the incident light pulse In the Hummer Bot car the integrated infrared receiving head has three pins including the power supply pin grounding and signal output pin The circu...

Page 84: ...ignore The complete installation is shown in Fig 3 1 26 2 Referring to Fig 3 2 36 and connecting the infrared receiving module to the Arduino board you can choose other IO ports according to your own...

Page 85: ...on the remote control towards the receiving head as shown in Fig 3 2 37 include IRremote h int RECV_PIN 12 Define the IR receiver pin to be 12 IRrecv irrecv RECV_PIN decode_results results void setup...

Page 86: ...folder otherwise the program can not compile int E1 5 PWMA int M1 9 DIRA left int E2 6 PWMB int M2 10 DIRB right int RECV_PIN 12 long expedite1 0xFF6897 Define a long integer expedite1 variable and as...

Page 87: ...peed value of motorB is val irrecv resume if results value expedite2 Judgment on the received value if the value is expedite2 execute the command below here for the acceleration 2 command int val 255...

Page 88: ...the speed value of motorB is 0 analogWrite A1 180 irrecv resume if results value right Judgment on the received value if the value is right execute the command in the following here is the command to...

Page 89: ...f remote control in shown in Fig 3 2 38 Fig 3 2 38 Infrared Remote Control Instructions 3 2 6 PS2 Handle Optional 3 2 6 1 Suite Introduction PS2 handle is SONY game remote control handle SONY series g...

Page 90: ...wered by the Arduino as shown in Fig 3 2 40 in the absence of pairing the green light flashes When the handle switch is opened the handle and receiver will pair automatically and the light will be alw...

Page 91: ...the handle to the host This signal is a serial 8 bit data which is transmitted synchronously to the falling edge of the clock The read of the signal is completed in the process of clock changing from...

Page 92: ...PS host will try another device in about 60 microseconds The ACK port is not used in programming 3 2 6 4 Experimental Procedures 1 The wires are connected to the 1 2 4 5 6 and 7 pins of the receiving...

Page 93: ...90 Fig 3 2 42 Receiving Head Position Fig 2 3 43 Installation of Receiving Head...

Page 94: ...to the hole at 1 in Fig 3 2 44 the connecting the wire to the Aruino extended board with reference to Fig 2 3 45 as shown in Fig 2 3 44 Fig 3 2 44 Physical Map of Wiring Fig 2 3 45 Diagram of Wiring b...

Page 95: ...the receiver head indicator will always be on otherwise the LED lights will flash constantly Finally we open the serial port monitor press any button on the remote controller and we can see the corre...

Page 96: ...is val if ps2x Button PSB_PAD_UP If the received signal is PSB_PAD_UP execute the command in ie forward PSB_PAD_UP is the code returned when the button on the PS2 handle is pressed and through the fo...

Page 97: ...nd in ie turn left The reason why two codes are used here is because we have set two keys on the PS2 handle for turning left Just press one of them to complete the turn left int val 200 analogWrite M1...

Page 98: ...e joystick value and assign this value to the variable kk The joystick range is 0 255 When you press R1 you can toggle the joystick to generate the corresponding value If R1 is not pressed dial rocker...

Page 99: ...is pressed the right joystick will work Mark 4 left joystick Mark 6 control key When L1 is pressed the left joystick will work Mark 5 right joystick Mark 6 left joystick Mark 7 move forward Mark 8 mov...

Page 100: ...is slower than parallel communication The design of the data transmission in this section is only for command transmission the data volume is not large so we will use serial communication to realize...

Page 101: ...05 When HC 05 receives the packets it will transmit them to Arduino through the serial port then Arduino to analyze the data packets and execute the corresponding actions The data format sent by the...

Page 102: ...uzzer and so on The 06 here refers to the transmission speed and the 05 refers to the transmission direction 50 or 0050 is the controlling data 0x50 in hexadecimal is 80 when converted to binary which...

Page 103: ...ker and sliding it allows the car to rotate The I section is a data return area such as the current state speed of the car etc The H section is the data packet for example the data is AA 01 01 06 23 0...

Page 104: ...ded board TXD port is connected to RXD port on the board as shown in Fig 3 2 51 Note Since Arduino UNO has only one serial port the Bluetooth must be disconnected from the serial port when downloading...

Page 105: ...here is a software for Android mobile phone in the CD latter we will launch the IOS version and selecting Bluetooth name in APP and connecting as shown in Fig 3 2 52 You will see that the flashing of...

Page 106: ...onnection is successful sliding green dot marked as 1 in any direction the car will move towards the corresponding direction Switching on the gravity sensor marked in 2 the APP is switched to the grav...

Page 107: ...DIRB right byte readbuff 32 int readlen 0 ST_protocol recv hummerbot hbot E1 M1 E2 M2 13 A0 void setup Serial begin 9600 hbot init void read_data void unsigned char avilable byte p readbuff memset p 0...

Page 108: ...op read_data if protocol_prase readbuff readlen recv switch recv function case E_BATTERY break case E_LED break case E_INFO break case E_ROBOT_CONTROL hbot drive protocol_prase_degree recv break case...

Reviews: