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.