Week 2

This week, the two groups are working on projects to further study and solve problems left over from last week. For car group, the code of the car is basically completed, and the car is roughly shaped. For glove group, since flex sensors are still not available, the focus of work is still on communication, including Bluetooth matching.

Working details

Motor Group:

 After discussing, we found that the motors placed at the same side of the car can not rotate in different direction, and a L293D chip have four outputs. Consequently, we can use one chip the drive four motors.

In the morning, we try to use the codes written last week to test the chip and motor. However, there is some problem of the arduino which makes the program can not be uploaded. We try to solve it, but it is too difficult for us. Consequently, we change it to a new arduino, and it spent us a lot of time.

After changing a new arduino, we have tested the programs of employing L298N chip to control one motor, and it was successful. Therefore, as it shown in Figure 1 and the video below, a circuit which employ L293D chip to control four motors was completed, and the codes which are shown in Figure 2 was uploaded to arduino to test each functions of the motors.
Figure 1: Four motors test
Video of test for motor

Figure 2: Four motors test codes

After testing, there all codes and motors are working, so the codes were decided to be the basic codes for us to write the library files. In the next step, simple files were completed, but there are too much bugs in it. Due to the time limitation we have to stop today’s work. In conclusion, the work in this week is not very difficulty, and we feel happy about the working. 

Flex Sensor Group:

In the morning, we continue to try to solve last week's problems that Bluetooth can't accept signals and it disconnected whenever we send signals on our mobile phones. After several hours of searching for information, we found that the reason for this problem is that we did not reset arduino after uploading data to Bluetooth. After we reset the device, Bluetooth can work properly and receive instructions. As the picture shown in Figure 3 and Figure 4, we connected Bluetooth and our phones, when we input '1', the LED light turn on and when we input '0', the LED light turn off.
Figure 3. Input '1', LED light on

Figure 4. Input '0', LED light off

Then we focused on the signal transmission between two Bluetooth devices. To achieve the transmission between two Bluetooth devices, we need one Bluetooth as master and the other as slave. We have two kinds of Bluetooth, one has a button and the other has no button. After searching for information, we think the one has a button is HC05 Bluetooth and the other is HC06. HC05 can be either master or slave and HC06 can only be slave, therefore, we choose the HC05 Bluetooth to communicate.

In the afternoon, to use two Bluetooth for communication, we need to know the name, password and location of each Bluetooth. However, when we tested Bluetooth, a big problem arose.The Bluetooth can regular work and enter AT mode, but when it enters AT mode, it cannot respond to our instructions. In this situation we cannot obtain the position of HC05 Bluetooth and unable to match the Bluetooth. Both two Bluetooth with buttons which we thought are HC05 had this problem.

We changed the Bluetooth with the one without button which we thought is HC06 and we found that it can regular work and respond well to the instructions. However, HC06 can only be slave, so we must use HC05 to communicate. We tried to find the cause of the problem, but we got nothing.

At the end of the lab, we searched the information and suddenly found that we had a mistake that the Bluetooth without buttons was also HC05! We can use Bluetooth without buttons to communicate. Then we test the roles of two HC05 without buttons, one is master and the other is slave. We can use these to communicate in the next lab.

评论

此博客中的热门博文

Week 1

Week 4