Thursday, January 26, 2012

!!!!!!!!!!TOY HACKING!!!!!!!

Electronic 10 Project 1: Toy Hacking
Originally I wanted to take my Oral B pulsar tooth brush and convert it into a scaled down torpedo. I choose to make a model torpedo so i can later use the same base for another project; I essentially wanted to kill two birds with one stone and same myself time and effort. Unfortunately my old toothbrush did not have a motor i could have used to make my torpedo :(

So instead i decided to build my torpedo from scratch! I believe by building my circuit from the ground up i will better understand how and why the components are used. I have separated my torpedo toy hacking project into 3 parts.

Part 1: Circuit
Parts list:
(1) PICAXE micro controller
(1) momentary button
(x) necessary resistors
(1) LED
(2) transistors
(1) back EMF suppression diode
(1) D/C motor
Let me give a brief explanation for a few items. the micro controller is necessary because i wish to have an LED allowing me to be able to check the completion of the circuit. The momentary button will be mounted in the tip of the torpedo so when it hit something it will stop the program and motor.
Part 2: Code
symbol motor = 1
main:
readadc 4,b0 sertxd("msg",#b0,cr,lf)
pause 1000
if b0 >100 then motoron
if b0 <100 then killswitch
goto main

motoron:
high motor
goto main

killswitch:
sertxd("kill",#b0,cr,lf)
low motor
end

Above is the code i wrote for my micro controller PICAXE. The logic of the program is to continually have power fed to the circuit until the momentary button is activated. Once the momentary button is activated the micro controller will execute 'killswitch' which kills all circuit protocol and power to the entire system.
Part 3: Mechanics
I havent settled on a tube to mount all my components in yet. Originally i wanted to mount all the components into a cigar tube, however discovering that i will need to have two separate power sources(one for the micro controller and one for the motor) and an added safety measure compartment to keep water away from all the electronics, i had to re-think the final product. Currently I'm leaning towards a fortified piece of plastic pipe, but i'm also investigating other options like different types of metal tubes. I have pictured right now is how i will be attaching the drive shaft to the motor as well as the propeller. My "universal" joint is plastic tubing that fits snugly around the drive shaft and the D/C motor shaft. I also use the same plastic tubing to ensure a tight around my drive shaft propeller. For the portion of the drive shaft that will pass through the hull to water i have obtained a hollow shaft that fits snug around the drive shaft. The fit is almost bearing like so i think with a little grease in side the tube PLUS the safety compartment that will separate the water from the electronic compartment.
******UPDATE******
I have ran into a problem with my circuit which requires my to have two power sources. I have investigated using capacitors in my circuit but considering i'm looking to running my D/C motor with a volt load of at least 5 volts, it's best if i just install a separate power source.

Monday, January 23, 2012

Flame Sensor - hot, Hot, HOT!


For the Fire fighting competition that will be held at the end of this class, I will need to make a infrared sensor. I will an i.rLED and an 180k resistor and since i will be integrating all of this into my VEX square robot that was designed by my partner Pat, I will be also be using a VEX extension cable to plus into the digital port. My i.rLED looks something like this. i choose a high resistance because i wanted to make sure that when i integrated the sensor with the VEX, i wanted to makes sure a value will be read. After I assembled all my parts I shrouded the LED with some heat shrink to make a funnel like contraptions, so pesky extra light from other areas doesnt confuse the light. Here is what the final product looked like.

Sunday, January 22, 2012

LiLo and Sensors (aka Micro controller and Analog sensors)

Thus far LiLo is very useful. I can use her to do automated things like run a program. She can power relatively large output devices. She can even accept analog sensors! Now it's time to see if she can accept a digital sensor. The difference between a digital sensor and an analog sensor is analog supply values of Zero or One. On or Off. Yes or No. Digital sensors supply values in between giving the option of maybe. Here is a picture of a circuit i made with LiLo that has a light sensor connected. As long as the sensor supplies LiLo with a High value of my choice, the Red LED will remain on. When the sensor is covered up, which causes the sensor to supply LiLo with a small or little value, the Red LED will turn off and the Green LED will turn on. Here is a before and after pic of the circuit in the works.

Saturday, January 21, 2012

LiLo and Transistors

Today I learned how to drive a relatively large output device via LiLo. LiLo can drive an LED off one of her pins because she doesnt allow some power to pass through her legs to the device. However, If i wanted to drive a slightly larger output device that require more power I would need to integrate a transistor into the circuit. How I understand to do this is, LiLo gives a very small amount of power off her leg to power a transistor. The transistor then has a gain on it that amplifies the power beyond that point. The power then is enough to supply a D/C motor, or say an incandescent Christmas tree bulb, with the necessary voltage to work. Here is LiLo and a TIP41 transistor working to power said tree blub.

Friday, January 20, 2012

Disect My Toy - Problems Arises :(



For the midterm project for Mechatronics I will have to alter a toy and make it do something else other than what it was intended to do. I searched around on the internet and found a forum where hobbies turned electric toothbrushes into torpedoes. One of my friends had an old CVS Pulsar electric toothbrush he didnt want, so I blessed enough to not have to spend money on that component. Everything else i need to make a torpedo was already given to me from my class, or i had in possession. Here is a snap shot of what I found inside the toothbrush.

There was some pretty neat things that i didn't know about when i opened it up. It cam with a 2.5 volt capacitor, and inductor which allowed charging to happen, and the prize i was really after - motor.

Unfortunately the motor was not what i hoped it to be. The motor was occilating style and did not do full rotation. Right now, my midterm project is a bust and i need to come up with a new plan if i plan to do well in this class, as well as complete my side project for my torpedo.

Thursday, January 19, 2012

PICAXE MicroController - aka LiLo

This little guy is my PICAXE micro controller. Her name is LiLo. As in when it doesnt get programed and doesnt do what i wanted it to do, I say,"Oh, Lilo." She has 8 pins with digital-in's and digital-out's, as well as analog-in's and analog's out's. I used my recently created DB9 to PC connector to help program LiLo. I plan to do great things with LiLo. I expect to integrate her into a side project of mine to create a mini torpedo that will also have a D/C motor, momentary switch, LEDs, and an on and off switch. Further details will follow how well that particular project turns out. In the mean time here is my first trial programming session. I used LiLo to operate three LEDs in a synchronizing fashion. Though it is a picture and not a video, the idea is the the LEDs pass around the signals between one another.

Wednesday, January 18, 2012

Serial Bus

I have been given a PICAXE micro controller but need to program it for my future projects. Luckily I have also been given a DB9 connector to help interface the micro controller to the computer to make the task much easier.

To the left you will find what my DB9 connector looks like( or similar to mine). The connector are found on most computers and some laptops now. I followed this schematic so i know what pins to solder to so i can later program my micro controller.

Here is the final product. I heat shrink-ed the connected points so the pins wouldnt make contact randomly when i'm programming, which would cause problems.

Tuesday, January 17, 2012

Logic Probe

This is the schematic i used to build my very first logic probe. It helped me to better understand how a transistor works. When the probe portion of the probe is idling, the LED is noticeable dim.
When the probe to connected to a point that is low, the LED will shut off completely because no current is found.
When the probe portion finds a point with current greater than 3 volts, the LED will brightly shine.
Probes are pretty handy when debugging a circuit. Since you really can't see where exactly the electricity is flowing, it is difficult to find why some times things don't work when youre assured your circuit is built right. It allows the user the ability to quickly find when the power to flowing though


Here is what my logic probe looks like at the very end. I hot glued the top and not the bottom because i was pretty proud of a soldering and want something always reflect on to do better.

Monday, January 16, 2012

Transistors

Transistors are similar to relays in the sense that when the base pin on the transistors, the circuit between collector and emitter pin is complete. Transistor have two styles, NPN and PNP. NPN allows the circuits to be complete as long as there is a positive charge supplies to the base pin. A PNP allows the circuit to be complete as long as a negative charge to be complete. Here is a picture of two NPN transistors connected. If i would have ground the charge before the signal reached the second transistor, the LED connected to it would have not been lit.

Sunday, January 15, 2012

Relays

Relays are handy little guys. When current is applied to proper side of the
relay, the far side of the relay, which holds the switch, will snap shut allowing the circuit to be complete. Here is a picture of me prototyping a simple circuit with a relay.
I had power flowing in through a switch that when pressed would snap shut and supply power to the other LED connected. This particular relay was too big for my bread board so I had place it in a manner and hold it down so it doesn't pop off the board.
To the left is the same relay and circuit with the addition of a small capacitor. When the momentary switch is unpressed, the capacitor supplies power briefly to the relay keeping the circuit closed for a very short time. I've learned that relays have their advantages. They can be used in both A/C and D/C circuits, handle larger voltages, and can have multiple contacts. The disadvantages of a relay are they require more power to use, quite large for small circuits, and can't switch quickly unlike transistors.

Saturday, January 14, 2012

Schematic

I have learn how to properly read an circuit schematic. Below is a picture of probably my favorite arrangement in thus far. It is called a 'darlington' arrangement named after the electrical engineer Sidney Darlington.
Let me prove I know how to read this schematic. Coming off the positive rail a diode and an output device( d/c motor, LED, etc) are connect in parallel to the collectors of two different transistors. The 2N3904 transistor base pin receives a signal coming from a pin connect to a micro processor maybe through a 1,000 ohm resistor. This transistor then emits to the base pin of a TIP41 transistor which then emits into the ground rain of a circuit. Here is what the circuit looks like on a breadboard.
As I stated earlier, this is my favorite circuit thus far because it gave me such a problem when i started playing with different output devices. I now know how to create a Darlington arrangement without any schematic help!

Friday, January 13, 2012

Multimeter


This is a Dranetz M230H Precision Digital Multimeter. Costs alittle over 1,000$. This is not the multimeter that i got to use during Electronics 10. However, the one i did use most likely had a majority the same functions. Through out my class i use my multimeter to measure voltage drops across resistors, check continuity on relays, and resistance in potentiometers. I've learned that they're usefulness in electronics is never ending.

To the right is a picture of me measure the resistance in a potentiometer i used.
Below is a picture of me measure voltage drop across a resistor.



ps- the photo was possessed and will not upload correctly. i tried 10,000 times, but it just wont.





Thursday, January 12, 2012

Soldering

I've never solder before so the techniques used were quite foreign to me. I've welded and brazed before many times and consider myself almost a professional. Unfortunately a lot of those techniques do not carry over into soldering.
Pictured left is my first attempts in soldering - EVER! The attempts in the center high points were my very first tries. You can see that I burned the board pretty good and couldnt control the solder as well as i thought. I really like this board because you can see my progression technique. The 8 points on the right side of the board are what i'd like to call my ''good ones."
The solder covers up the whole
pad and have the nice dollop shape.
Pictured to the right is the other side of the board. I know I could have just the resistors flat down but since this was my first time soldering,and it was just a practice session, I wanted to make a mini forest of resistor trees :)

Wednesday, January 11, 2012

Breadboards

Breadboards are handy little toys used in the electronic world. They can also be known as Protoboards and Plugboards because of their usage. They make prototyping circuitry easy because components can be easily pushed and removed from them a multitude of times. Below is a general picture of a breadboard.

Usually I like to build down the board, or in this case left to right, using as much room as possible. I accomplish this by using as many possibly jumper wires to across the board. When I'm building a circuit for the first time I try to get all the components on the board, then start consolidating the circuit down to what is necessary. Here is a good example of what I do normally. After i have troubleshoot my my circuit I rearrange it so it is more friendly when i go to solder it later.


Before:
After:
I've learned it may look more busy now, but you must remember that a lot of this stuff wont be seen. So any artistic work i may put into my circuit will only be seen if i have a plexiglass shroud go over it.

Tuesday, January 10, 2012

Resistors

For my first Mechatronics class I got to learn about Resistors and to properly read the resistance.


Resistors have different band codes. On the above pictures you can see one has 4-band color code, the other has a 5-band color code. The 4-band code is read from left to right with the shiny band being the last color. In the the 5-band code the spaced away band is the last one to be read.

If you happen to have an awesome chart like the above one you would know that resistor on the left would read: 150 ohm +/- 5%. The above right resistor would read: 339 ohm +/- 1%.
I have been told usually the more bands on a resistor, the greater the resistance it has. Of course it is not uncommon to come across a two variant band style resistors that have the same resistance.