Purpose:
This project was to incorporate our new 5v relays into a project as well as have our first group project of the year. The obvious project was to use the 5v relays to achieve the same output as the DPDT switches from last weeks project. However thinking more of robots, they are often associated with autonomous control. So just like last weeks project we are manipulating the motion of gear-motors to achieve our desired output but introducing the Arduino into our project for the first time this year. Adding the Arduino to the project will allow our thought of making an autonomous robot a reality. The goal was for the robot to draw a perfect square along the pre-made lines of a pice giant graph paper autonomously.
Procedure:
We were first told what the ideal end result should be. We were then given a robot kit (for what I saw as a reward for last weeks project) and told that would need to write code for the Arduino, wire the circuit, assemble the robot, mount a pen on the robot, and figure out a way to power it. Since this was a team project we each got to choose our roles. The role I chose was to think of a circuit design and wire it. The design I chose was based off of this great tutorial for 5v relay motor control. After wiring one, it seemed obvious to simply wire a second one and join them in parallel. This would allow each wheel to have a relay therefore allowing it to go forwards and backwards. We used one mini-breadboard for each wheel's circuit. After checking the circuits we uploaded the code that one of my classmates developed. Because we only had three classes to complete the project we had little time to perfect the code and all find all the discrepancies of the parts. The end result was somewhat of a square being drawn, however because of the lack of testing the turn angles were a bit off as well as the uncertainty of the degree of wheel traction and the angle the wheels were sitting at.
Parts List:
Quantity
|
Part
|
Description
|
1
|
Robot Kit
|
|
1
|
Felt Tip Pen
|
|
2
|
5v Relays
|
|
2
|
TIP120
|
|
2
|
2N3904
|
|
4
|
1k Resistors
|
|
∞
|
Zip Ties
|
Easy + Removable Mounting
|
Videos:
Plot 1
Gallery:
View from Underneath
View from Front
View from Top
View of Circuits
Circuit Description:
Circuit Example
|
||||
TIP120
|
2N3904
|
TIP120
|
2N3904
|
Robot State
|
On
|
Off
|
On
|
Off
|
Forwards
|
On
|
On
|
On
|
On
|
Backwards
|
On
|
Off
|
On
|
On
|
Turn Right
|
On
|
On
|
On
|
Off
|
Turn Left
|
I wanted to talk a little about how the circuit actually works. If you look at the circuit schematic here, you will notice the use of a TIP120, 2N3904, and the 5v relay. The TIP120's job is to decide if the entire circuit is on or off. We use the TIP120 to turn the circuit on and off because it is able to handle the motor currents without being damaged. The 2N3904 is used to determine the direction of the motor. The way the circuit works is that if the TIP120 is off, the car is off. If the TIP120 is on but the 2N3904 is off then the car will drive forwards. Lastly if the TIP120 is on and the 2N3904 is on, the current will reverse direction and drive backwards. The 5v relay acts the same as the DPDT switches we used last week, however the only difference is that the 5v relay has eight pins instead of six. The first set of pins are the NO (normally open) pins. These will be connected when only the TIP120 is on. The second set of pins are the C (Collector) is used to so that if there is enough current on the collector it will jump to the third set of pins, the NC (normally closed) pins. The 2N3904 will have to be on for the collector to connect the NC pins, therefore making the car drive backwards.
Conclusion:
In conclusion doing a project in a short amount of time was fun. It allowed us to get a basic grasp of the concepts while not forcing us to go into deep detail. That being said there were downfalls to doing a project in a short amount of time. One of these problems was work level. When a project is supposed to be completed in a short amount of time everyone should expect to put it extra work. I found that few people were ready to make that commitment which left the people who were doing most of the work. That problem leads into another. The other problem being group work. I realize that our group work skills are still a little underdeveloped but I feel that we still could have done better. People need to realize that when you are done your role you are not done. You must help out the rest of your group so that you can finish on time and complete a successful project. Also in groups you are assigned to a role. In this case we got to choose our roles (if you chose it fast enough). If you didn't choose your role you should be ready to accept the role you are given. If you do not understand the role you are given, then ask another member of the group. Waiting around for something magical to happen is useless and if forces another member of the group to do your role as well as theirs. Lastly because the project was done in such a short amount of time there was little time for testing and modifications. This lead to somewhat of a poor end result and left me wondering if everyone could have done more. The answer is yes. If everyone put in a little bit extra time, we would have been able to finish the project early and had time to test it. Then we would have been able to find the correct corner angle, how the wheels were sitting, and if the traction of the wheels was a problem instead of guessing at problems afterwards. In conclusion doing a project in a short amount of time is fun. It prepares us for the 24 hour labs we will face next year as well as develop our time management skills further. The issue with this project was the group aspect. We will all have to make a greater effort to complete the next group project as well as be aware of our roles and others.