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! : )