Week 2
10/02/2022
Attendance:
Yuang Du
Zhenhe Gao
Shibo Wang
Zhongning Wang
Dengwei Sun
Erxing Ren
Alessandro Pausilli
Process of Project
Testing (individual)
Motor and Motor Driver
We used the written code and Arduino to test the operation of motors as Figure 1 shows. The motors can run normally as the code required.
Figure 1. Testing the motors
Battery Box
The battery boxes we ordered turned out to be out of stock, so we have been using the power supply in the lab so far. However, we eventually found two battery boxes after searching through three boxes filled with old components. One of them can hold 4 AA 1.5V batteries and another can hold 3 AAA batteries. We found the batteries needed and connected the battery boxes in series as Figure 2 shows. We tested the output voltage is 12.33 V by the voltmeter, which is high enough to support our car. The reading of the voltmeter is as shown in Figure 3.
Figure 2. Battery boxes connected in series.
Figure 3. The reading of the
voltmeter.
Servo Motor and Ultrasonic Sensor
After a whole morning coding, we successfully combined the code of the servo motor with that of the distance sensor. When the distance of the objects is less than 30cm, the servo motor will be activated, turning left and right at an angle of 90 degrees and obtaining the sum of the distance of the next 5 measurements. During the test of the ultrasonic sensor, we found that the measured value will occasionally jump to an abnormal value over 1000. We managed to solve the problem by deleting the distance bigger than 1000 before adding them up. “Turn left” or “Turn right” will be printed out after comparing the corresponding added distance. The circuit is shown in Figure 4. The screenshot of the serial monitor is shown in Figure 5.
Figure 4. The test circuit of the servo motor
and distance sensor
Figure 5. The screenshot of the
serial monitor
Gyroscope
We have reordered a gyroscope, which has arrived today since the ones we tested last week did not work. We ran the tests with the code we have had last week and the gyroscope worked well. Figure 6 shows the test circuit of the gyroscope and Figure 7 shows the screenshot of the serial monitor.
Figure 7. The screenshot of the serial monitor
Hardware Assemble
Since the stripboards have arrived, we start thinking of the way of allocating components on the stripboard. It’s a waste of material to make it 4WD since we can realize the same function with only two motors, but the chassis will not be horizontal without motors equipped on the front wheels. We managed to find a ball in the lab box, which will replace the front wheels while perfectly supporting the chassis horizontal, provided that the motors are placed on the stripboard instead of under it as Figure 7 shows.
Figure 7. the chassis of the car
The horizontal of the car
sacrificed the space of the stripboard. Therefore, we decided to build a second
floor on the car to hold the Arduino board, battery boxes, and receiver. Other
parts such as the motor driver, servo motor, and ultrasonic sensor will be placed on
the first floor. The prototype of the car is shown in Figure 8.
Figure 8. Prototype of the car.
Testing (Combined)
The motion of the car
We connected the motors, motor driver, and the battery boxes with the Arduino and tried to use the code of the motor to control rotation for two wheels as Video 1 shows. A problem occurred that although we can make the wheels rotate in the right directions we want, the speed of the two wheels is not consistent. The right wheel turned faster than the left one even if the input value of speed is identical. We tried to change motors and output pins on Arduino, but the problem remains.
评论
发表评论