In the lab section of this week, the research group decided to test the main functions of the car including LED test, movement mode and sonar distance sensor.
The second test is the motor test. In this test, the smart car should be able to move according to the orders given by the keyboard. The user could use the direction keys to control the moving direction to make it go straight, go left, go right and go backwards.
The third part is to test the sonar distance sensor. In the test, we set the response time to 0.5 seconds and return the value of the distance information. The maximum detection range is 1700 cm and minimum range is 1 cm. By using this sonar distance sensor, we could achieve the distance between the sensor and the closest object in front of the car. However, in the test, we fond that the sensor is partly damaged and only one of the two sensors could work normally. As is shown in figure 1, the return value of the second sensor is always the maximum value, which means that the sonar detector in the sensor is damaged.
In the first test, the research group used the test file to test the LEDs in the front of the car. By using the LED, we could know the situation of the car when running the program. For example, when the running situations are normal and it is safe to allow the user to control the car, the LED turns green. If the sensors should discover barriers in the moving routine of the car, the LED could turn red and make the user know it might take charge of the car instead of the user. In the test, the LED will turn red, blue, white, green in the turn. The demo is shown in the video.
In the first trial, the motor cannot move when we give a command to the by the keyboard. Then we checked the codes in the library. The function was defined when the user press 'w' or up key, the motor on both sides will rotate to the front at the speed of 60. When the order of turning direction is given, one side motor will rotate slowly and the other side will rotate faster. The logic of the motor is correct. Then the research group began to think whether it is a hardware problem. In this way, we dug into the board of the smart car and found that the power to activate the car is provided by the battery cells on the top of the car. However, when we measure the voltage of the battery cells, it turns out that the voltage is among 2.1 volts to 2.4 volts, which is far below the suitable voltage 7.2 V. Having noticed the problem, the only thing to do is to recharge the battery. Demo details are given in the video.
![]() |
| Figure1: Sonar distance sensor |

Comments
Post a Comment