Thursday, February 13, 2014

Final competition (blog #13)

After a lot of testing, it finally got to the final competition. Our robot was able to put out the fire in room 1 and room 3 on the first and second trials. And it also supported the go home function that earned some extra points. We were lucky to get to the 4th place and here is the actual competition video link..

http://www.youtube.com/watch?v=yTC9OoxM0WA&feature=youtu.be 

Me and my parter Hong..

We got the 4th place..

We were really happy about our result and proud of ourselves. There are still things that could be improved on our robot and our goal is to get a better result on the next competition in April.

Day 12

Today we built our ultrasonic sensor, which looked like that...


It is using the same idea of sona that emit sound and receive the and use the time difference to determine the distance between the sensor and the object in front of it.

The ultrasonic sensor was the last part we needed to navigate the maze, and after we finished our sensor, we started our testing of the actual maze.

Finally, we put our fan onto the robot to put out the fire. In order to power the fan(rated at 12V), we use two 9V batteries and a TIP 120 transistor.


Day 11

Today we made our line sensor and flame sensor.
The idea of the line sensor is that the sensor will emit some sort of light and if it hit on the white surface, most of the light would be reflected and the receiver on the sensor will get some higher value, whereas the black surface would absorb most of the light and the receiver would get some lower value.

Line sensor
The flame sensor is just sensing the infrared light and gives a value to the robotic program, so we can based on the value to determine if there is any fire in front of the flame sensor.

Flame sensor


We also had a mini competition that uses the line sensor and flame sensor to find the flame and stop right in front of the flame.

Day 10

In day 10, we built encoders which allows us to have more accurate turns and moving distance because we are now measuring how many ticks has the encoder been turned instead of using delay to control the movement. We still had a mini competition at the end of the class. Even though none of us finished the maze like last time, our result was so much better and we thought we could make it if we have more time to test the turns and distance.

Here is how our robot looks like with the encoder

We tried to connected the encoder wires to the arduino board

Day 9

Today we started our final project- fire fighter robot.
Our first job was to build the vexduino.

We soldered all components on the PCB board and plug that onto the arduino board.



Then, we plugged all the motors wires and battery into the board, there is also a USB port that can be used to connect to the computer for programing. We use that port and the  robotc program to control our robot.

After we have our hardware and software ready, we started a mini competition that runs in a simple maze, but none of us can complete the maze because it was so hard to control the moving distance and the turns.

Day 7

Today we learn about the LDR (light dependent resistor) and I tried to put it on my bunny.
A LDR is very similar to a pot but instead of turning the rod to change the resistance, the resistance is changed by the light it received.

The resistance is pretty low (around 200 ohms) under the normal light condition 


The resistance gets very high we I blocked the LDR with my hand, and you can see that the resistance is big enough to turn off the LED.


I tried to use the LDR to control the toy's motor moving speed.
I plug a signal wire to the arduino board to get the LDR data and write a code that changes the motor speed based on the LDR value.

Day 6

Today we learned about transistors and Darlington.
A transistor is basically a current amplifier that increase the current.
For example, the christmas tree light requires more current and the arduino board can provide, so we use a transistor to increase the current and light it up.

Using two transistor to amplify the current twice is called Darlington, which can also be achieved by using a TIP 120 transistor. An important thing to notice is that the order of base, collector, and emitter is different on a TIP 120 transistor.


Day 5

In day 5, we learned about micro-controller and how to use Arduino software to control it. Then, we started to tear our toys apart.

The Arduino board
 
The Arduino software to control the board

Tear apart my rabbit

Day 4

In day 4, we completed our square bot that will be used for our final project. And we tested it to drive around. One of the motor on my square bot has some gear problem and it runs much slower than the other motor. I think I will change that motor on the next day.


Day 3

In day 3, we learn about switches and relay to turn on and off our device.
A switch is basically open and close the circuit. And a relay is kind of like a electrical switch. There is a coil and a little magnet in the relay, so when we apply current to that coil, a magnetic field will be  created. And that B-field will force the magnet to go up or down which acting like a physical switch to open and close the circuit.

Here is some pictures of the switch and relay...

regular switch

push bottom switch and relay
(the push bottom switch control the current goes in the relay, and the current will make a B-field that acts like another switch)


RED on
 GREEN on

Wednesday, February 12, 2014

Day 2

What we did in day 2 was pretty much learning how to use a multimeter. I have used a multimeter many times in physics 4b, engineering 44, and physics 4c so it's kind of like a review for me.
I also have my own multimeter which looks like that..


It is a MASTECH MS826 digital multimeter, and I like it very much.

Another thing we did today was to test the brightness of LED with different value of resistors.
Here is a picture...(100, 1K, 10K ohm)
We found out that the lower the resistance, the brighter the LED.

Wednesday, January 22, 2014

(Day 8) First Project - The Curious Bunny



The Story of the bunny
    The bunny was originally an normal rabbit toy. There was nothing special before it was hacked. It could move when the power was turned on and that's it. My goal was to reengineer this toy and make it to what it was not supposed to do. The bunny is very curious and excited about "light." So the more light it sees, the faster it runs! The bunny also follows the command of the owner. It runs faster, slower, and stop depends on what the owner says!

Objective
    1. Let user to send command from the laptop to control the running speed of the bunny.
        The keywords are: "time for dinner!" (fast mode), "time to shower!" (normal mode), "go to bed"                        
        (stop mode), and "follow the light!" (automatic mode)

    2. When the bunny is on automatic mode, the movement speed is depended on the light received
        from the LDR. The more light it receives, the faster it runs.
Tearing It Apart


Ways to Tackle the Problem
    After I cut all the wires and get to the motor wires, I tried to connect the motor directly to the Arduino. However, the current was not large enough to run the motor. So I decided to use the TIP 120 transistor to amplify the current. I also have the LDR connected to A0 port on the Arduino, so it can collect the light data. There are also two LEDs on the breadboard. When the bunny is moving, the green LED would be on. And when it stops, the red LED is on. Finally, I have my program written. It basically reads the user input. Depending on the keywords input, I set the delay time of the motor to LOW, MED, or HIGH. There is also an automatic mode that runs based how the receiving light.(default to be auto)

Sample Videos


From stop mode to normal mode


From normal mode to speed mode

From speed mode to stop mode

Auto mode (Depend on LDR)

Tuesday, January 7, 2014

Day 1

On the first day of Electronics 10, we practice some soldering technique,  and play with the breadboard, resistors, and LEDs.


Here is a practice board that I used to practice how to solder.


I tried to solder to three wires together.


Here is a power supply to breadboard connector I made.

I connected the power supply with a 1K resistor and a LED.
Everything is working fine! : )