65
analogWrite
(
M1
,
0
);
analogWrite
(
E1
,
val
);
//the speed value of motorA is val
analogWrite
(
E2
,
0
);
analogWrite
(
M2
,
val
);
//the speed value of motorB is val
}
if
((
right1
<=
8
)&&(
centre
<=
8
)&&(
left1
<=
8
))
/ * The value collected to judge, if
the center <= 8, left1 <= 8 and right1 <= 8 are greater than 8, indicating 3 sensors
have detected a black line, then the car has reached the "ten" intersection, because We
have only 3 sensors, no way to make more sophisticated judgments, so only let the car
choose to go straight. * /
{
int
val
=
130
;
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
}
}
3.2.4 Ultrasonic Obstacle Avoidance
In this product, we will integrate the ultrasonic module and steering engine together and make the two
part working at the same time, which greatly increases the effectiveness of the data and the flexibility of the
car, the main working flow: When the power is on, steering engine will automatically rotates to 90 degrees,
the MCU will read data from the reflected ultrasonic. If the data is greater than the security value, the car
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 steering engine rotates 180
degrees to the left, then reading data again, the steering engine rotate 90 degrees, the MCU will contrast the
two detected data, if the left data is greater than the right data, the car will turn left, otherwise turn right, if
the two data are both less than the safety value, the car will turn around.
3.2.4.1 Suite Introduction
1. The steering gear
The steering gear is also called servo motor which is originally used in ships, since it can control the
angle continuously through the program, so it has been widely used in intelligent steering robot to achieve
all kinds of joint movement, the characteristics steering gear are small volume, large torque, high stability,
simple external mechanical design. Either in hardware or software design, the design of steering engine is an
important part of car controlling, the steering gear is mainly composed of the following parts in general,
steering wheels, gear group, position feedback potentiometer, DC motor and control circuit(shown in
Fig.3.2.22, Fig.3.2.23). Fig.3.2.24 shows the most commonly used 9G steering gear now.
Summary of Contents for Hummer-Bot
Page 1: ...Hummer Bot Instruction Manual Github https github com keywish keywish hummer bot...
Page 7: ...4...
Page 8: ...5...
Page 9: ...6...
Page 10: ...7...
Page 13: ...10 Fig 2 2 Several commonly usedArduino...
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 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 24: ...21 Fig 3 1 10 Diagram of Wheel Installation Fig 3 1 10 Diagram of Wheel Screw Fixation...
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 32: ...29 First install the screws on the UNO After the completion as shown...
Page 43: ...40 Fig 3 1 33 Diagram of Wires Arrangement Fig3 1 34 the Effect of Whole Assembly...
Page 56: ...53 Fig 3 2 11 Diagram of Data with Obstacles Fig 3 2 12 Diagram of Data without Obstacles...
Page 69: ...66 Fig 3 2 22 Diagram of Steering Gear Fig 3 2 23 Composition of Steering Gear...
Page 93: ...90 Fig 3 2 42 Receiving Head Position Fig 2 3 43 Installation of Receiving Head...