Week 1
In recent years, people have a lot of research and development on remote control vehicles. We want to do more research and change in this field of remote control vehicles to make it more convenient, so our aim this time is to do a project that can directly control the small car through gestures.
Figure 9. AT test code
This
project is called Gesture Controlled Car which can directly control the
direction and route of the car by people’s gesture. After wearing the
corresponding sensing glove, people can send instructions to the car by bending
different fingers to make the car act according to the instructions. In our initial vision, we can achieve the communication between car and glove through media settings such as radio frequency, Bluetooth or WiFi, and Arduino
is used to import the corresponding communication code into Bluetooth.
Figure 1. Two
parts of the project
As it can be seen in Figure 1, the whole project was divided
into parts, so the team was also divided into two groups. One responsible
for the flex sensor part and most work of transmitter, the other one complete
the motors control part and some receiver part.
Working process
Motors Group:
In
the morning, we are planned to assemble the car base. However, we forgot to
take the screwdrivers to the lab. Therefore, one of us had to go back to his
home to take the screwdrivers. In addition, at that time, we employed DC power
supply to test the motors one by one to make sure every motor worked.
After
we got the screwdrivers, we start to assemble the car base. At the beginning,
we found that four motors are the same, which means if the same voltage was
applied to four motors, the wheels on the left side and right will rotate in
different direction. As it shown in Figure 2 below, if we apply same voltage to
four motors, the motors on the left hand side will rotate clockwise, and the
motors on the right hand side will rotate anticlockwise. In summary, it will
confuse us when we control the input voltages.
Figure 2. Rotation
direction of motors
Consequently,
we change the assemble direction for the motors on different sides of the car
to avoid this problem. However, as it show in Figure 3 and Figure 4, the
rotating part is on one side of the motor, and it will result in a small
distance between two forward wheels, and also for back wheels. In addition, it
will cause the car always run will a small angel. Therefore, we have to dismantle
and assemble direction for the four motors in the same direction, and it makes
us tired.
Figure 3. DC motor
Figure 4. Rotation
diagram
After
that, we completed the assemble work for the car base, the top side and bottom
side of the car base are shown Figure 5 and Figure 6.
Figure 5: Top side
of car base
Figure 6: Bottom
side of car base
In
the afternoon, we try to control the motor by arduino. In the plan, in order to protect arduino and control the rotation direction
of the motors L298N chips was chosen as motor driver, so it was studied. However, when we
try to order L298N chips, it was told that the L293D chips have the same
function with L298N chips, and they can supply them right new. Consequently, we
decide to employ L298N chips, and more time was spent in studied the principle
of L293D chip.
As it can be seen in Figure 7, inside
L293D, there are some invert gates to avoid the reverse current, which can
protect arduino. Therefore, we can connect the two outputs of chip to the two
inputs of the motors, and simply control the rotation direction of motors by
changing the ‘high’ and ‘low’ of the input digital signal.
Figure 7: Logic diagram of L293D
After learning, we write a simple code
which is shown Figure 8 to test whether the chip works. In this code, the motor
will rotate clockwise for five seconds, and it will rotate anticclockwise for
five seconds. However, the lab would close at that day, and we have to stop the
work.
Figure 8: Simple
codes of test chip and motor
Flex sensor Group:
Our main device flex sensor didn't arrive, so we had to start with the communication element. After searching the Internet for information and comparing several communication devices, we decided to use Bluetooth communication. Our main task this week is to test each Bluetooth's work, that is , whether they can enter the AT mode successfully. Connect Bluetooth to our phones and upload the Arduino test code into Bluetooth, the red light on Bluetooth flashes every two seconds. It confirm that our Bluetooth enter the AT mode successfully and work. The AT test code is shown in Figure 9.Figure 9. AT test code
problem
Although our Bluetooth enter AT mode successfully, a large
problem is Bluetooth can't accept signals and it disconnected whenever we send
signals on our mobile phones. We changed the circuit, data wire, Arduino and
Bluetooth but the problem still existed. We didn't solve the problem and the lab closed that day, so we decided to find out the reason next time.
评论
发表评论