Sunday, 11 November 2012

Plot Bot








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.

Saturday, 20 October 2012

Balloon Battle Bots


    


Purpose:
The purpose of this project was to work with gear motors to achieve the desired speed and strength for our bot. Because DC motors alone have an rpm that is not practical for driving wheels forward and backward, we needed to use gear motors to reduce the rpm. It was also to relate our last project to a real application. Because we built a gear-box last week we knew what was going on inside the gear motors and were able to apply them correctly.

Procedure:
We first looked at the project from pages 22-27 in the 30 Arduino Projects for the Evil Genius then we were told the final goal of the project was to battle our bots against each other. We then decided what we wanted to use as the body of the car. Once we settled on the decision to use a VHS case as the body we were given 2 wheels, 2 motors, 1 or 2 caster wheels, 2 DPDT switches, 3 hat pins , 1 piece of acrylic and a 6v battery pack that could hold 4 AA batteries. Once we finished the basic project we thought it would be more fun if we each added a modification to the project. Everyones modification was a different type of weapon, which is what made the battle so much fun. The most time consuming part of this project was making the controller. The idea to heat and bend the sides of the acrylic was fantastic. However finding a way to clamp the acrylic to the PVC pipe was difficult. After we bent both sides of the acrylic we had to place, cut out and mount our DPDT switches so that they would be able to be pressure fit into the controller. Finally, the last step was to wire the controller. The use of female spade connectors was very helpful. They allowed for quick changes and kept the amount of soldering to a minimum.

Parts List:


Quantity
Part
Description
1
Acrylic

2
Wheels

2
Switches
DPDT (Mom-Off-Mom)
2
Gear Motors
1
DC Motor
4.5V, 32000 rpm
1
Toggle Switch
On-Off
1
Battery Pack

4
AA batteries
Eneloop
1
Propeller
3-blade plastic
3
Hat Pins



Links to Battles:

Battle 1



Conclusion:
In conclusion this was the best project I have ever done. It may not have been the most complex but it was the most fun and allowed each of us to show our creativity. If I had to do it again the only thing I would change would be adding a stationary back-up pin on the front of my car. I would do this so that if my fan ever came off like it did in the second battle I would still be able to compete instead of just running away. After completing this project so early in the year I have never been more excited to see what projects we will do in the future.

Monday, 8 October 2012

Gear Box





Purpose:
The purpose of this project was to introduce us to the different types of gears and the different way they can be used. It was also to prepare us for our upcoming project "Battle Bots". To create a successful battle bot we will need to know how to use gears effectively and which gears to use.

Procedure:
We started by reading about the different types of gears and how they are used. We then learned how to calculate gear ratios. After calculating the gear ratios for each setup of the gearbox we leaned that there is an error on the box. The box reversed the build for the 47.6:1 gear ratio with the build for the 61.7 gear ratio. At that point we set off and built our own gear box the kit.

Types of Gear Systems:

-Gear Trains: two or more toothed gears that mesh with each other. Ex/ Gear box
-Worm Gears: a screw-like "worm"
-Rack and Pinion: An "unrolled" gear powered by a gear or gear train to convert circular motion into linear motion
-Bevel Gears: Gears with teeth cut on an angle which allow them to convert vertical motion into horizontal motion

Saturday, 22 September 2012

Propeller-Powered Car




Purpose:
The purpose of this project was to give a gental introduction to mechatronics. Mechatronics is the combination of mechanical and electrical engineering. For an introduction to mechatronics there couldn't be a better thing to make than a car. Because we didn't know much about mechatronics the car design was simplified by using a fan to power the car rather than a gear box.

Procedure:
We were first told the parts that we would be supplied with. It was up to us to decide what to use for the chasis, wheels, axis and how we were going to adhere both the parts and the circuit. The thing that effect my car the most was my chasis decision. My original Idea was to cut a piece of acrylic but after comparing it to my other chasis idea (a small project box) I decided that the piece of acrylic was too heavy. The thing that I did not consider however was the center of gravity of my car. Even though I made my car lighter by choosing a small project box I focused almost all of the car's weight on one point therefore the car required more power to move such a condensed weight. Because of this the other cars that weighed more than mine went faster than mine because they had better weight distribution.

Circuit Description:
The two main components of my circuit were the LDR and the TIP122. The Light Dependant Resistor either creates more resistance if there is low light for less resistance if there is a lot of light. The TIP122 is two transistors in a darlington pair. The typical role of a transistor is to amplify the current running through it. In this case we need a lot of current to power the fan so we used the TIP122. The TIP122 is special because it has two transistors in a Darlington pair. This means that instead of the current getting amplified once it is now getting amplified twice. Therefore the total current gain is the two individual gains multiplied together. For more information click here.

Realizations and Goals:
After racing my car it was obvious what I had done wrong. I had put all of my car's weight on one area. Because of my car's mass distribution it was unable to accelerate as intended and never maintained speed. Acceleration is affected by the mass distribution. The more condensed the mass the more force required to move the object. If I had have used the acrylic for the chasis of my car I think that it would have been faster. The one correct choice I made however was in regards to my wheels. Without thinking much of it I chose the smallest wheels. At the time I chose them because they suited my car the best but they actually had a positive affect on my car. Because the wheels were so small they had a smaller moment of inertia. Moment of inertia describes how difficult it is to change the angular motion of the axis. It is not just based on how much mass the object has overall, but how far each bit of mass is from the axis. The further out the object's mass is, the more rotational inertia the object has, and the more rotational force (torque, the force multiplied by its distance from the axis of rotation) is required to change its rotation rate. Because I used those small wheels it allowed the fan to move my car. If I had have used bigger wheels I am doubtful my car would have moved at all. For the next project I will be more aware of my weight distribution but use the same wheels I used for this project. 

Parts List:
Parts given:

Quantity
Part
Description
1
DC Motor
4.5V, 32000 rpm
1
Propeller
4-blade plastic
4
AA Battery

1
Battery Holder

1
LDR

1
Resistor
1M Ω, 1/4W
1
TIP122
NPN Darlington Pair



Chosen parts: 

Quantity
Part
Link
1
Project Box
4
Metal axel
4
Wheels








Wednesday, 9 May 2012

Tune Player

Click the icons below:





Purpose:

The purpose of this project was to try our hand at producing audio through Arduino. After spending the majority of the year on temperature we decided that looking into sound would be a great way to finish the year on a high. As we got deeper into the project it became less about trying to produce sound as to trying to improve the somewhat weak code that we were provided. The project then became a problem solving assignment as well as a test of our creativity based on what we wanted/were determined to add. 


Procedure:

We first looked at the circuit design that was in 30 Projects for the evil Genius and after getting a general understanding we built it. Then we looked at the Tune Player code from 30 Projects for the Evil Genius to get a sense of how the sounds were created and the method in which the author used to play songs. After we had a better understanding of the code that was provided we uploaded the sketch and ran it. We noticed right away that the tune player was not what we expected to hear. We thought about ways to improve it such as adding sharps, multiple octaves, and different note durations. After completing all the improvements we ran the new sketch and the difference was amazing. 



*IMPORTANT*
The array sin16[.......] in my Arduino sketch is VERY important. It simulates a sin wave. Because we are using a 4 bit amplifier we can only get a maximum of 16 points on our sin wave. 7 being the middle, 15 being the maximum and 0 being the lowest (0-->15 = 16....dont be off by one). The matrix toneDurations[3]12]{...} determines the rate at which we run through the sin wave, hence the name toneDurations. It does not produce the sin wave but instead determine the frequency of the wave, therefore producing the pitch.

Parts List:
1 100nF non-polarized capacitor
1 100uF, 16v electrolytic capacitor
5 10k ohm resistors
3 4.7k ohm resistors
1 1M ohm resistor
1 100k ohm resistor
1 TDA7052 1W audio amplifier
Miniature 8 ohm loudspeaker

Check out R2R Digital to Analog converter overview 


Wednesday, 7 March 2012

ATtiny85 Port

Click the icons below:



Purpose:
The purpose of this project was to start us using the ATtiny85 so that we are familier with it when we use it in the greenhouse. Also the project introduced us to using the Arduino as a programmer, which will allow us to program many other chips for many other projects.

Procedure:
We first learned how to use the Arduino as a programmer. After uploading the ArduinoISP sketch and connecting the appropriate wires we then burned our LM35DZ sketch onto our ATtiny85. After troubleshooting for a while we found that adding an if statement was the best option instead of setting values.

Parts List:
ATtiny85
Any Transistor
MOSFET
LM35DZ
Fan
12v Power Supply

Circuit Picture: