Thursday, February 13, 2014

See-saw

not much going on here I must agree with you. To the naked eye, it might look like a button, a resistor, the led twins and the capacitor dancing over Dr.Takamisawa. Okay maybe not. basically, the button is to release some charge into the capacitor, which causes some sort of magical relay between all the components. The two LEDs would then flash back and forth, much like the blinkers on an automobile.    


I CAN SEE DUH LIGHT

you see that little weird looking thing there? that thing with the wiggling lines? that brown thing that's pretending to be a flower? yes that. that is a photoresistor. Sadly, it doesn't take photos, nor does it record 1080p videos at 60fps. WHAT DOES IT DO?! you might ask. well for one thing, I think it acts like a resistor. it is a light-controlled resistor. the amount of light it senses will determine the amount of resisting. This could be a direct relationship, or indirect. It all depends on how it is set up and what kind of photoresistor we are dealing with here.  

Static Shock


Boy oh boy I miss that cartoon show from Kids WB. Static Shock is able to produce over 9000 volts at 6 kilo amps, instantly vaporizing his victims into ashes. Okay maybe not that harsh. The transistor shown here, is rather sensitive! even with less than 100 millivolts, the transistor was able to detect the electricity,therefore allowing the emitter and collector to say hello. 

Knight Industries Three Thousand

Not exactly the KITT from Knight Rider, but this does the trick in regards to programming an Arduino board. The LEDs would flash from right to left, then left to right, much like the LEDs under KITT's hood. A great sense of accomplishment was awarded when the code goes according to plan <3

Let There Be Light

Here is the line sensor for our fire bot. It is basically an IR led and a receiver. The LED would shine onto a surface and the receiver would calculate the amount of light that bounced back. Sounds pretty simple and it certainly is. Even though the one I made didn't really work for some odd reason, Ashuai quickly made another one just in time to get checked off. This sensor is to be mounted onto the front of the robot, telling the robot that it has passed a line (E-tape). This can be quite useful when it comes to localization. Too bad mine was messed up, otherwise, having two line sensors would be pretty useful...I think.


Robot Maze

Today we are modifying our SquareBot to run a maze. The SquareBot is a simple machine that is outfitted with four wheels and two motors. Nothing fancy as of now, so we added a happy face to the front of the robot for the appearance purpose. Ashuai did a great job tinkering with the programming. The robot was able to make perfect 90 degree turns and reach the end of the maze with aplomb.
The official VEX maze. skillfully set up with premium electrical tape. 


I Got the Power

Mason also gave each of us some good 'ol cellphone chargers to modify. We stripped off the ends of the power supply and soldered two pins onto the positive and negative rails. Within just a short moments, everyone in class made their own little 5V power supply that's pushing out almost .75A and is also breadboard friendly! To me, this was a great solution to powering some electronics that requires little power. Before, I had to jump a full size PC power supply if I needed to power up some led strips. 


Wednesday, February 12, 2014

First Day of Class

Today is the first day of class. My expectations, same for every other class, assumed an easy pace for the students to get comfortable. Amazingly, we started soldering the first day! yay! I had little experience with cheapo soldering irons, so using the school's higher-end soldering iron immediately spoiled my standards. The soldering iron heats up almost instantly and I was able to make intricate solders. Here as you can see, Mason had us solder random pieces of resistors and some other random stuff onto this board. This would've been almost impossible with the soldering iron I have at home.   

not only did we get to solder random piece of stuff onto a pcb, but we also get to make friendship bracelets!Again, with the help of an ACTUAL soldering iron, I was able to make this awesome looking bracelet without swearing under my breath.

Tuesday, February 11, 2014

It was a dark and humid night.

Today is the day. The day I've been waiting for. The day I've been dreaming about. 999 is my favorite number. Intro to Mechatronics will engrave a significant mark on my life. Guided by professor Mason, the class teaches students the essentials to building a robot. like the robots NASA and the CIA use. I was extremely thrilled and hungry when I found out that there's sufficient space in the classroom.

cheese


In this class, we were also expected to be able to build a robot. To the naked eye, this little RC-like car may not appear to be much, but it is in fact a fire fighting robot that is capable of searching up to 4 rooms on a pre-determined course. This robot, started its humble life as an ordinary VEX SquareBot. After careful consideration, we realized that the robot has room for improvement. We tore apart the SquareBot and reconfigured the encoder and motor's location, making it more compact than ever. The two main support brackets have been moved upwards,shortening the length, as well as the width of the body by almost 2 inches all around. Having a compact robot is very important in this competition, because that means less chance of bumping/scraping into walls and higher chance of entering a room unscathed. From the picture above, you can see that the robot has been built upwards, while providing plenty of room for the Arduino board, batteries, voltage regulator and a full size bread board.  The newly built robot, in which we named it Better Than Snuffy, or BTS, is then outfitted with sonars, line sensors, encoders and flame sensors to help the robot sense the arena. There are plenty of ways of putting out a fire, but we went with the good 'ol fan method as it's able to provide a consistent result throughout the tests. Initially, we considered using vinegar and baking soda to produce carbon dioxide to starve out the flame, but even with a fan duct to concentrate the gas, experiments showed no improvement over the simple fan-only design. We retired  the fan from a dusty pc power supply and upped the voltage to give it more oomph. Once the robot finds the flame/candle, it'll extinguish the candle with its fan.The robot itself works surprisingly well, when the code doesn't send the robot crashing into walls that is. Ashuai and I have spent countless hours working on this robot, but both the hardware and the software gave us the red lights. As pro as it may look, BTS can only enter the first room at a rather high success rate, when compared to the other three rooms.

Wednesday, January 22, 2014

What the Duck?!



Hello. I have a duck. His name is Goose. Goose is just not like any other duck. He likes to walk along the shore early in the morning, work out his calves at his local gym and lip sync, especially to Rick Astley's Never Gonna Give You Up. This plastic duck has 3 individual motors, but after the critical surgery, only two motors are active. The motor that is not connected is the neck motor. it is a bi-directional motor and I have yet to find a solution to wire up a transistor/relay to invert the polarity of the electricity flow. As of now, he can only wiggle his tail and open and close his mouth like a dying fish gasping for air. During the days of modifying and coding this toy, I've learned quite a bit about the toy itself, as well as my own level of expertise. first of all, immediately after opening the toy, I've noticed that this duck from Toy's "R" us is definitely not worth 30 dollars. The materials and the physical construction could've been hacked together by a drunk 8 year old. parts were glued and slapped together in a low level fashion. Making the toy move upon command should, in theory, be easy, since it is more mechanical than electrical. However, I was amazed by what I am able to do with this toy. Turns out, not much actually.
as you can clearly see, wiring up those motors require quite a bit of extensive wiring and surgeon-like hands. (Figure 1b. 200 miles of colorful wires rule the surface of this bread board.)
The Two transistors control the two motors independently. Through using the TI120 and the 3904 transistors, both NPN, I was able to have the Arduino control those motors on command.

               Here is a video of the duck in action. Please excuse the poor quality of the video. I tried to capture what it can offer within a short amount of time. 
                                         
Here is the code that brings this duck to life.

#define motorPin6 6
#define motorPin11 11


void setup()
{
  pinMode(motorPin6, OUTPUT);
  pinMode(motorPin11, OUTPUT);
}

void loop()
{
  for(int counter = 0; counter < 31; counter=counter+1)
  {
    digitalWrite(motorPin6,HIGH);
    delay(300);
    digitalWrite(motorPin6,LOW);
    delay(300);
 
  }
  for(int counter = 0; counter < 523; counter=counter+1)
  {
   digitalWrite(motorPin11,HIGH);
    delay(100);
    digitalWrite(motorPin11,LOW);
    delay(300);
    digitalWrite(motorPin6,HIGH);
    delay(100);
    digitalWrite(motorPin6,LOW);
    delay(300);
  }
    for(int counter = 0; counter < 40; counter=counter+1)
  {
    digitalWrite(motorPin6,HIGH);
    delay(300);
    digitalWrite(motorPin6,LOW);
    delay(300);
 
  }
    for(int counter = 0; counter < 454; counter=counter+1)
  {
    digitalWrite(motorPin6,HIGH);
    delay(300);
    digitalWrite(motorPin6,LOW);
    delay(300);
 
  }
     for(int counter = 0; counter < 50; counter=counter+1)
  {
    digitalWrite(motorPin6,HIGH);
    delay(300);
    digitalWrite(motorPin6,LOW);
    delay(300);
 
  }
     for(int counter = 0; counter < 378; counter=counter+1)
  {
    digitalWrite(motorPin6,HIGH);
    delay(300);
    digitalWrite(motorPin6,LOW);
    delay(300);
 
  }
  while (true);
}