Wednesday, February 12, 2014

day 12 maze




Competition day  at Long Beach

While the Arena was being set up, my team had a few hours to calibrate and fix any last minute issues.
While testing everything seemed normal turns where off like they are every fifteen minutes as we already expected. But something unexpected occurred, our turns stop working.  I contemplated forfeiting the competition.  The motor speed of the turn was set at 80, so we thought there was a problem with the motors. We ended up not being about to figure fix it and set the motor speed to 120. The video below shows our best trail.

day 11 ultrasonic






Ultrasonic Sensor
The Ultrasonic Sensor is a transducer, it can send and receive signals. By sending a signal it can count how long it takes for the signal to come back. The time it takes for the signal to come back multiplied by the speed of sound is the distance.




To enhance the robot I am now able to stop a curtain distance from the walls instead of hitting them. Here is an example of such code.

day 10 encoders

Encoders
Encoder have ticks, while the wheel spins the tick values on the encoders increase. In stead of moving our robot with delays, we can set a tick value for how much it will move. For example, until 100 tick occur move forward. 

To build further on this we can calculate how many tick values moves forward an inch. Once we have that tick value to move forward 12 inches, you only need to multiply that tick value by 12.


day 9 maze

Maze with encoders.
Going through this maze a second time but with encoders. The encoders made the code shorter, by having a function that drives forward based on tick values and turns with preset tick values, all i had to do in the main task was call the function and type the parameter.

day 8 flame sensor and vexduino

Flame Sensor 
The flame sensor is able to see infrared, meaning if there is a flame around it will be about to detect it.
Using Serial begin command on the Arduino, we are able to see the infrared values in real time. By first comparing the ambient room temperature  number to putting a flame in front of it, you can dial in on a number to sense when it is in front of the flame.




Now that i know when the robot can see the flame i can set a step of commands on how to extinguish it.




day 7 sensors using arduino



Using the Arduinos' serial debug, external input can be extrapolated as data.
In this image a LDR is pluged in as a analog input to the arduino. The LDR's voltage is changing depending on how much light is around it. The higher the light the less the resistance, thus the arduino is reading a higher number.

The Arduino has a Serial begin   command that allows you to see the data it is reading in real time. Depending on the voltage it receives it gives a number between 0 and 1023.


Tuesday, February 11, 2014

day 5

Hacking a toy. The chosen toy has a motor that is activated  by an external input. 
In order to use the arduino I cut the wires  from the old micro controller. 



 Once the old controller was out i had to extend the wires in order to have enough room to connect onto the arduino board.

day 6



Tip 120
The Tip 120 is a transistor with a built in Darlington.
1. Gain of 1000            
2. Peak current 8 Amps


In this image, the base is connected to a digital pin on the arduino, the collector is connected to the power supply to the light, the emitter is going to ground.

day 4


 NPN transistors acts like a switch directing the flow of electricity while amplifying the current. The amount of amplification is referred to as the gain. So by using the transistor the output is a higher current causing the light to be brighter.

Wednesday, January 22, 2014

Project 1



To complete this project I had to cut out the micro controller from my Santa toy and in its place use the Arduino.  The first step after cutting out the old micro controller was to find out which wires controlled the motor. Once I knew which wires controlled what parts of the toy, it was time to reassemble it using the Arduino and breadboard. I decided to use a LDR to control the speed of the motor with a few modes, and a transistor to turn the motor on and off.

Tuesday, January 14, 2014

day 3

In this image, I had two leds. Led-1 (red) is connected to the second positive prong of the relay, while led-2 (green) is connected to the forth positive prong of the relay. The relay's third prong is connected to power and looped to the second prong in the relay, giving power to the red led. When 9 volts goes through the coil of the relay prong 3 will be looped to prong 4 inside the relay lighting up the green led. So first, the red led comes on, then i press the button, giving power to the coil and power gets cut off to the red led and lights up the green one.
This next image is a modified version of the previous circuit. In this version, the third prong gets power at the same time as the capacitor. In the beginning, when the button is pressed the led connected to prong two will light up and the capacitor will charge. When the capacitor is charged it will dissipate its power making a circuit of its own going through the coil of the relay. When the coil gets charged prong 3 will be connected to prong 4, and the led connected to prong 4 will light up. Also when the coil is charged power will not run through the capacitor because it will no longer be connected to the loop.  When the capacitor runs low on power, the coil will no longer be charged and the relay will go back to its original state: prong 3 connected to prong 2. This will cause the led connoted to prong 2 to light up and the capacitor will be charged and the cycle will repeat.

day 2


                                            I used a multimeter to test voltage output in AC voltage.
In this image a circuit with a pot and risistor was used to control the current. Increasing the resistance on pot led to a dinner LED while lowering the resistance increased the brightness of the LED.


Wednesday, January 8, 2014

Day 1

We practice soldering components. First I pulled the leads of the component through the correct hole, then added flux to insure proper heat conduction. Last we used a solder iron and solder to fill the hole, this insured the component stay in place .

Using a breadboard, I made a simple circuit. I used a charger to give positive and ground current. Next, I placed a resister and led in such a way that the flow of current will go from positive current to the resister and end up with the led touching ground.