Thursday, January 31, 2013

Day Eleven, Adding Sensors and Programming


Picture of the square bot with added sensors. Sonic, flame, and light sensor added. Writing code is fun and hard. Adjusting right values to initiate commands can be frustrating but rewarding once it works.

Wednesday, January 30, 2013

Day Project, Bird


Picture of the gutted bird. I think I broke the connection that control the movement of the wings. Or lost the piece. I will take better note and care when disassemble a toy.



Picture of bird put back together. The goal of my project was to have to movement be controlled by the press of the tongue but was unable to do so. The movement is now controlled by the micro controller in set time intervals. The motor runs clockwise, stops, and then counter clockwise.


Video of the Bird in action. Movement is controlled by micro controller. It moves in time intervals that can be change with the PC. The wings are suppose to move with the movement of the head but they do not. More debugging and more attention to detail when taking the bird apart would of safeguarded against breaking the wing movement. But the motor at least does controll the head movement. The project was fun and rewarding.

Code for Bird project:

void setup ()
{
  pinMode (6,OUTPUT);  // input for relayswitch

  pinMode (7,OUTPUT); // input for relayswitch
}

void loop ()
{
  digitalWrite (6, HIGH); // inputs high to motor
  digitalWrite (7,HIGH);  // inputs high to motor
  delay (5000);           // duration of movement
  digitalWrite (7,LOW);   // inputs low to motor
  delay (1000);           // stops movement for 1 second
  digitalWrite (6,LOW);   // reverse movement for motor
  delay (2000);           // duration of movement
}

Day Ten, Building Sensors for Robot


Picture of the square bot pointing towards the candle light. The picture shows the encoders on the back wheels. The flame sensor is in front. The goal for the day was to write code that would tell the square bot to turn clockwise in till the flame sensor finds the flame then tells the square bot to move forward a given amount controlled by the encoder. It was very rewarding to have the square bot function as attended.

Day Nine, Vex Programming

This day we input code and encoder wheels onto the square bot to navigate a maze. No video or picture were taken this day. The first trial was done using time as a variable and it was very hard to adjust code to small changes that were needed. The second trial was done using the encoder on the wheels as a variable. Using the encoder as a variable made applying changes much easier than the time variable.

Day Eight, Bi-directional Motor Control

Picture of motor of my toy being controlled with a relay switch setup. The motor turns clockwise and counter clockwise.


Picture of the motor being powered by a darlington transistor.


Wednesday, January 23, 2013

Day Seven, Cont. LDR and Driving Motor's


Picture of LDR controlling the LED's. 4 States were programmed, bright light, medium light, low light, and no light. Finding the right value that the LDR operated was time consuming even though programming logic was correct.


 

Picture of the microcontroller controlling the signal lamp. A transistor was used to pull up the current needed to turn up the lamp. Changing the resistance in the base of the transistor changes he brightness of the lamp.

 
Video of the signal lamp turning off and on.

Day Six, Micro Controller LED

Picture of a switch that controls the digital input of the micro controller that turns on the LED.


Picture of Light Depended Resistor (LDR) controlling the micro controller analog input to turn on the LED's.

Thursday, January 17, 2013

Day Five, Micro Controllers

Picture of LEDs connect to the Micro Controller.

Video of Yellow LED blinking on and off by simple code uploaded from a computer. One second intervals between each blink.

Video of a LEDs turning on and off. They blink from right to left then left to right. Writing of code was longer harder than the single blinking LED.


Day Four, Square Bot and Transistor

Picture of a Square Bot half finished. A trick to know while building the Square Bot is to use gravity to aid the construction of it, not impede it.

Picture of a completed Square Bot. Wired up and ready to go.


Video of Square Bot in motion.

Video of transistor circuit. Pressing my fingers on the wires makes the circuit complete and lights up the LED.

Day Three, Switches and Relays


Picture of switches that I soldered wires onto to connect to the breadboard.

Picture of a circuit using a relay to alternate the green and yellow LED with the push of a button.

Tuesday, January 15, 2013

Day Two, 5 V Power supply

A ring of wires composed of alternating colors that are soldered together and then wrapped with heat shrink.


Picture of a 5 V power supply of a phone that has been modified to have 2 pin plugs. They were soldered on and then wrapped with heat shrink to protect them from shorting each other out.

Thursday, January 10, 2013

Day one, Elec 10 - 5 V power supply.

1st assignment was to place and solder parts onto PCB. Getting perfect cones and correct amount of solder was important. After a couple of tries it became easier.

Top picture of PCB. It was important to get the component as close and flush with the PCB.