Wednesday, January 26, 2011

The end for the fish

so all day yesterday we worked on our project
here's the code that i used: (in red is the code and in blue is the explanation)
main:
        readadc 4,b0                                      'get data from analog receiver"        if b0 > 210 then dying                          'if there is light live (do the codes for slow)        if b0 < 200 and b0 >160 then struggle  
'if the recieved number is
                                                                    between 160 and 200 do the codes for struggle if b0 < 160 then dead                                  'if the value of b0 is less than 160 do the codes for deadgoto main        'go back to main
dying:
 high 1       'fish heads move up
 high 2      'the fissh moth opens
 pause 1000      'wait 1 second
 low 1       'the head falls down
 low 2       'mouth closes
 pause 1000     
goto main

struggle:       'if the value of b0 is between 160 or 200
 high 1       'i make the motors to work faster
 high 2
 pause 90
 low 1
 low 2
 pause 90
goto main

dead:        'if the receiver does not receive enough light
 low 1       '- i shut down all the motors
 low 2
goto main

The toy project, still!!!

so the main focus again in class was working on our toy project but to do so we had to learn a bit more about transistors and the micro controller so we did another experiment with our bread board.
we had to use a 2N3904 transistor to light a 200 mA incandescent bulb.
we cannot light the bulb directly since it would cause the processor to overload and consequently shut down.  But still the 2N3904 transistor cannot handle high mA currents required to light the bulb and it gets hot so instead we used a TIP41 which handles currents up to 6mA.
the codethat i used to light the bulb was
main:
         high 1
         pause 500
         low 1
         pause 500
goto main

(sorry my dear fans but i forgot to take a picture)
then i messed with my toy some more and i got the motors under my control.
and with this code:
main:
         high 1
         pause 100
         low 1
         pause 100
goto main

here's what it does:

Thursday, January 20, 2011

Micro controllers and how it enhances your playing time with your toy :D

ok so i really liked this last class meeting since we finally, after successfully building our own serial connection, got to do something with computers which i know a lot more than i do know about circuits and electronic boards :D
so we built a circuit diagram with micro controller and a LED and wrote a program with programing editor v5.3.2 to make the LED flash periodically.

and here is the code line that we used
main:
         high 1
         pause 1000
         low 1
         pause 1000
goto main

these lines of codes just shows how simple and straight forward it is to work with this program ( maybe not!!! we'll see :D)
high means to turn the 1 which here is the LED light on
and pause 1000 means wait 1 second and low means to turn the LED off
after this we did a little bit more complicated program with loops and an analog sensor and one extra LED on the board here is the result


 what happens here is the analog sensor senses the change in lightness and darkness of the suronding environment and as it senses more darkness it tells the micro controller to let less current flow into the LEDs

Transistors and logic probe and me

so for last class meeting we learned about transistors and how to use them in our breadboards
what transistors do is that they control the flow of electricity so to understand them better we created the following board

the LED is receiving voltage from two path but first path is blocked by the transistor but when the button is pushed it tells the transistor to let the current pass and then the LED lights
After this we incorporated the same idea again but instead of a switch we used our finger tips to allow the transistor's base pin to let the current pass through the collector and emitting pins
the next mission was to built our own logic probe which one of the most useful troubleshooting devices like a multimeter.
since i ran a little bit of time even though i finished my logic probe i did not take a picture from it but the next class meeting i will take a picture and post for all of u my devoted fans :D

Tuesday, January 18, 2011

Getting to serious Stuff yaaaay

ok so last class meeting we did a lot of electronic stuff and played with switches, LEDs, relays and boards
first we made a simple board with switches and LEDs just to learn how to connect a LED to a switch and here is the result of my attempt
after mastering the first assignment we used a relay and a switch to light one LED and then the other when when the button on the switch was pushed and there is the result


then the goal was to learn how to use relays and a switch to make two LEDs flash on and off periodically. I accomplished the mission successfully as you can see in the following picture:

and finally after doing one more setup with the board and the relay to see what happens when the relay oscillate very fast (if we pushed the switch button it made the relay to oscillate real fast which produced a buzzing sound) we finally got to build a robot.
we built the robot however from a guide just to get familiar with the concept but it was exciting to know that we are getting closer to the serious materials.

Wednesday, January 12, 2011

My second Xperiment in ELECT 10

so we hit the second day
i still havent given up lol :D
so today we learned a lot about  continuity testing, voltage testing, resistance testing and after mastering those we did all those test on our modified adaptors.
and then after making sure that there was no continuity on our adaptor and that our adaptor passes 5V
we connected it to a breadboard with a LED and a resistor on it and here is the beautiful result :D
and then to see the result of higher or lower resistance on the brightness of a LED i made this board on which each LED has a different resistor behind it and the furthest has the least resistance and here is the result
clearly the higher the resistance the dimmer the LED will be.
and then we calculated the least possible amount of resistance that we can put on the way of A LED
using the V=R*I
and finally we received our very amazing magic box to build our very own robot yaaaaaaaaay

Tuesday, January 11, 2011

My first Xperiment in ELECT 10

Hey
how's everybody
well at least I know you will see this Professor Mason
so I'm not writing to myself :D
for the experiment the clueless me was told how to solder circuits and other stuff to a board and also how to solder two wire together after stripping them.


After doing the practice with soldering i took a picture of my board and the two wires that i soldered.
Then i took a AC adapter and i chopped off the little plug at the end of its wire
then i soldered wires to both positive and negative ends of the adapter wire