Thursday, February 17, 2011

Day 17: Presentations

Today we had to do our presentations on our robots we made. I was nervous all day. I got to school at 2:30pm to meet up with my partner to finalize our powerpoint. There were 8 groups; we were the 5th one. Somehow I managed to keep my cool for the most part during our presentation. On retrospect, I did forget to mention a few things, but I can't change that. It was essentially our last day of actual class. Tomorrow is just reorganizing and putting things away. Below is our Powerpoint






 I've put the footage at the end of these slides.



And this here is the video footage of our robot at the competition. I would like to remind you that the robot became stuck in a loop due to a small error in the programming.

Wednesday, February 16, 2011

Day 16: Pre-Presentation Presentation

Apparently, there are no more classes involving new material. Today the teacher discussed, in full detail, everything there is to know about presentations. Well, actually just the presentations that we are all going to have to do tomorrow. It would be easy except that it needs to be at least 10 minutes long. To the right is the Rubric. We spent the class brainstorming and creating our powerpoint presentations.

Saturday: Robot Competition

Today we were to have our competition. I showed up at 10:30am roughly, and my partner was already there. He had added to our code the previous night and was doing more troubleshooting before the competition started. It was a continuation of Thursday and Friday, what with the sensors all being on the fritz. When the competition time came, we had to keep our fingers crossed. Unfortunately, that wasn't good enough, and our bot just went in circles. We tried to do an emergency reprogramming, and managed to do so, but it still wasn't good enough. We couldn't get the properly colored can. On the other hand though, almost all of the other teams shared our fate, save for one, which by some miracle, actually did what it was supposed to. Here's what our bot did.

Tuesday, February 15, 2011

Day 15 & 1/2: Troubleshooting Sonar, Line Sensor, and Color Sensor

Today was more hurry up and wait. We were getting close to perfecting our bot when we discovered that the color sensor no longer registered efficiently at all. Its range was reduced  to less than an inch plus it had trouble recognizing the color red. Most of the day was spent trying to get it to work, but our efforts were wasted. The sonar was acting up as well, with the range also reduced. More interesting, my line sensor was acting up too. I checked the emitter and it seemed just as bright, yet the debugger showed that the sensor was getting poor values. We returned the next day with the intention of fixing these problems, and spent that day continuing the troubleshooting. We had to make compromises and were unsuccessful in restoring the sensors' former reliability.

Thursday, February 10, 2011

Day 14: Continuing Adjustments with Sonar Programming


Today was what the title stated, more adjustments with the Sonar tracking the can. Also, we decided to just use the sonar to trigger when the hand should get the can. I'm apparently not very adept with the programming as it took me a great deal of time to write a very very simple code without errors. I was trying to program the bot to move forward until it sensed the can and then would then stop, grab it, move back, let go, and move back again. Trust me, it's supposed to be easy, but I kept getting errors for not having everything perfectly set. Anyways, once it was all finished, my partner incorporated it into his programming. This is the result below. It is somewhat successful, but still has some issues with scanning.

Wednesday, February 9, 2011

Day 13: Continuing Work on Sonar and a Completed Hand/ Switch


Today was mainly troubleshooting. We're getting close to having the bot track and locate the can, but there's still some issues. The main one is that the bot seems to pick up sonar reflections of objects that aren't there. The 2nd one is that the bot sometimes doesn't sense the can at all. My partner had to leave early, so that gave me time enough to get started on the hand to grab the colored cans with. I added a switch so that the bot would know to close the grabber when the can is in place. I just barely finished by the end of class, and hopefully the switch is sensitive that it won't just push the can along with it.

Tuesday, February 8, 2011

Day 12: Vex Bot Sensor Adjustments

Today was pretty slow. We worked on getting the sensors rigged to the Vex Bot, and to see if they were working properly. My partner managed to finish his color sensor too, so we hooked that up as well. Today was mostly troubleshooting, and nothing very notable happened except that somehow the programming I'd made had gotten all messed up. Nothing had changed in the code, but the bot wasn't operating properly. I wasn't able to figure out why.

Thursday, February 3, 2011

Day 11: Line Sensor Integration and a Completed Color sensor

Today I tested and added on the line sensor to the Vex Bot while my partner finished working on his color sensor. Luckily I didn't solder anything incorrectly and the sensor worked just as it did on the breadboard. Eventually I had the sensor hooked up to the Bot albeit it was temporary. Professor Mason wrote a program for me to test the sensor while it was hooked to the Bot. The sensor worked great, and the different values can be used to tell the Bot when it has hit a line.

I tried to get the Sonar Sensor to work, but I had trouble and couldn't get the Bot to move, and I haven't figured out why yet. The Sonar Sensor emits sound waves which we cannot hear. The sounds bounce off of objects, and when those sounds return to the sensor, it caculates the distance based on how long it took for the sounds to return.


Sometime shortly after my failure with the Sonar, my partner returned with his finished Color Sensor. The Color Sensor works by emitting 3 different lights. When those lights hit a colored paper, floor, or wall, if the color and the light are the same, then the light will be absorbed by it while the other colors reflect back to the sensor. So the LED shines red, blue, and green, and there's a red paper in front of it, then the red will be absorbed while the two other colors are reflected back. Then the sensor will judge which color is in front of it. At least that's my understanding of it.

Wednesday, February 2, 2011

Day 10: Building a Line Sensor for Vex Bot


Today I was tasked with building a line sensor for the Vex bot my partner and I are working on. It was a simple task which somehow lasted the whole day. It works by having a emitter and a phototransistor. The emitter shines a infrared light which would reflect off of a surface to be picked up by the phototransistor. The voltages will be higher the less infrared light is detected, and from there, the microcontroller can be programmed to react depending on that value. I managed to test and assemble the Line Sensor with minutes to spare.















I have yet to test if I properly soldered everything correctly.

Thursday, January 27, 2011

Day 9: Basic SquareBot Programming

Today we were tasked with programming our squarebots to navigate a simple duct tape maze by themselves.
The programming itself didn't take too long to figure out, but perfecting the bots' movement did. The bots have 2 motors that drive 2 wheels each. It basically works like a tank. Problems arose from the fact that the 2 motors didn't each turn perfectly the same, or possibly that the bots' frame itself was ever so slightly crooked. We had to adjust for this by changing the speed of one motor to balance it all out. Also, we had to be sure that the bots would travel the correct distance before turning. Mine ultimately failed because it turned both too little and too much at different points.

The other objective of the day was to team up and prepare a squarebot for the maze again; this time with the help of wheel encoders. The wheel encoders' purpose is to measure the distance a wheel turns while the  squarebot moves. After recording some promising measurements, the bot was put to the test and ultimately ended up driving into the wall because of bad turning; most people had similar results too.

Wednesday, January 26, 2011

Day 8: 555 Timer, Oscilloscopes, Servos, and Combinations of Them

Today we were introduced to the 555 Timer. It's the same size as our 08M microcontroller except that it specializes in timing.


Our first circuit with it was to have an LED turn on and off.

Then we added in a potentiometer to control how often the light flashed, and following that, we replaced the light with a small speaker.



Then we switched over to the Oscilloscope. Its purpose is to show an image of the levels of voltage. It can be adjusted to show the voltage at different speeds and size.

 Afterwards, I just barely managed to complete the next task of controlling a servo motor with a pot.

Day 7: Working on Hacking a Toy

Well, today was tiresome. I was having difficulty understanding how to properly control the remote to my toy robot. Irritating situations kept arising, such as: the circuitry not being set up right, the remote not responding as it should, and bad programming on my part. I added a few wires which were linked to the individual controls: forwards, backwards, left, and right.

Unfortunately, one of the "situations that came about was that the remote would signal constantly if more than one control was hooked up to the microcontroller.

Eventually, it was decided that I should have just one input hooked to the microcontroller, and that it would be activated with a LDR (Light Dependent Resistor). It was supposed to work like this; when the LDR detected a decreased level of light, the microcontroller would switch to a simple command to drop the voltage in the controller which would activate it and make it send the code that would tell the robot to go forwards.

Eventually it actually worked, but my camera was dead so I couldn't record it. Adding more stress to the fun, I haven't been able to recreate it at home now that I have a working camera again. My first suspicion is that the batteries in the remote might be drained now, and I honestly don't have any spare button cell batteries laying around the house.

After awhile, I managed to recreate it and got it recorded this time.


I used this code:
main:
 readadc 4,b0
debug
if b0>190 then top
if b0<170 then bot
goto main
top:
 high 1
goto main
bot:
 low 1
goto main

I realize that some of the code is unnecessary, but I'm not knowledgable enough yet to perfect it.

Tuesday, January 25, 2011

Day 6: Finished LDR Circuit, More Microcontroller Experiments, and Began Hacking a Toy

Today, right as class started, I managed to finish my LDR project in just a few minutes.


Then I moved onto a few more tasks involving the microcontroller and some resistors. The first one was to simply turn on and off a christmas light, first with a 2N3904 transistor, and then with a TIP41, which allowed the light to glow more brightly.

After completing those two, I then basically had to replace the light with a motor to show that it can be done. 

From there, it got confusing. Trying to hack the remote to my toy robot wasn't very straightforward to me. The circuit is simple, but I have yet to figure out how to control it properly.

Thursday, January 20, 2011

Day 5: Microcontrollers

Today we learnt how to program and use microcontrollers. We created increasingly complicated circuits.

This was the first circuit/program. Its' purpose was to make the light turn on and off every second.


 This one was made to have the lights turn on and off in series.
 This third one was supposed to turn the light on for a second after pressing the button.









 

Tuesday, January 18, 2011

Day 4: FInished Square Bot, Transistors, and Creating a Logic Probe

Immediately at the start of class I began working towards finishing my square bot, and luckily it didn't take too long to finish it and have it tested.







Then, I had to catch up with the others in learning what a transistor was and how it worked. I made a circuit to show that a transistor is basically a ultra small, solid-state relay.















Following that, we made a breadboard version of a Logic Probe.When the probe touches an area with high voltage, it lets the current flow through the LED, and the opposite occurs with low voltage.








And, from there we went and made permanent versions of the logic probe to be used in later classes.



Sunday, January 16, 2011

Day 3: Switches, Relays, and Square Bot

Today we got acquainted switches and relays.

We made a simple double switch circuit which would allow either switch to turn the LED on or off









Then we learnt how relays worked and made a few circuits which would turn the LEDs on and off separately. We also tried a similar circuit, but with a capacitor so that the LEDs would turn on and off rapidly at the press of a button
















Afterwards, we moved onto our Square Bot projects. We began building our bots, but many of us (myself included) didn't finish building them.










This is as far as I got. It was still missing its power source and

Wednesday, January 12, 2011

Day 2: Breadboad, Ohm's Law, Resistors, Multimeter Instruction, and Inventory Check

Today we started off with multimeters. We checked continuity, voltages and resistances on many things. We searched for continuity on our circuit boards just to understand the concept. Then we moved on to using the multimeters to check the voltage levels being produced by a 1.5V and a 9V battery. We also tested the voltages of two different adapters and a power outlet.

We tested the resistances of a few resistors and a potentiometer too. (A potentiometer can have its resistance changed simply by turning its knob.)










Next we moved onto using breadboards; basically they serve as reusable circuit boards so you can test different types of circuits. We had to make different circuits testing LEDs and how resistors effected their brightness.



After that, we had to read about Ohm's Law and how to use it properly. Our next goal was to decide what resistor would allow our LED to be it's brightest without damaging it. My calculations told me that a 140 Ohm resistor would be best, but I had to improvise with a 180 Ohm resistor.


After all of that, we were given our robotic kits and began our inventory checks.

Tuesday, January 11, 2011

First Day: Class Safety, Soldering Practice, and Attempted Power Supply

We started the class off with some basic and important rules about safety.

Later we went and practiced getting familiar with the steps of soldering.


Immediately after, we began splicing wires which would then be spliced to a 5V power supply






Unfortunately, I didn't finish the final step in class.