Tuesday, April 9, 2013

Arduino Printer Part 2

Please see part one here. 

Now that I got my new K'nex in, I've been able to expand the full printing size of the printer. I've also replaced the wire with rubber bands and hot glue that have been very crudely assembled. Hopefully I can find a better alternative to this method. (Or maybe I won't because I'm lazy ha) I purchased a power supply to power the motors since the Arduino itself is not strong enough to do it, however I used it in another project and it broke so I'm getting a new power supply shipped now. I started doing the coding but can't test without it so for now the project is on hold. 


Here is the first line I "printed." ...Something about one small step for man...


K'Nex arrived!

For 20 bucks I got enough supplies to last me for many Arduino projects. 


Friday, April 5, 2013

Broken Variable Resistor

had a broken variable resistor among a bunch of them and I couldn't remember which one it was. I could have just set up a very basic circuit and tested each one but that'd be too easy. Instead I set up three variable resistors to an RGB LED to control all of the potential colors of light it could produce. Also, I found the broken variable resistor.


Wednesday, April 3, 2013

Arduino Printer

This is my newest project that I just started. I've finally gotten to the point where I think I know the coding well enough that I decided the more challenging task for this project was designing the K'Nex system to support it all. I setup what you can see in the pictures below. 

The first picture shows my first mock up design of the system. A pen goes vertically into the green block which can slide along the two parallel red rods in the x-direction. Those rods are then connected to another pair of parallel rods which can move in the y-direction. The pen will be continuously connected to the paper. I may in the future add the ability for the pen to raise and lower, but for now we'll stay at this. The combined x and y motions will allow for "printing".


The second picture shows an updated version of the first picture with consideration for how the motors would be positioned. There are two motors, one positioned at each green disk. The yellow wire which runs from each green disk to each gray wheel will control motion in each direction. 


From here, I have to make some redesigns to how the pen mount and the green wheels and then I will have to find a piece of wood to mount everything to. From there, the coding will begin!

The Messy Work Station

I've wanted an "action shot" of my work space for awhile. Here it is.


Progression of a Design

Some time ago, I posted about my successful coding and wiring of the control system followed by the case I planned to put it into. After almost 3 hours I've just about finished converting all the wiring from a messy ball to an almost completed wired system ready to be screwed into its casing. I'm happy with my success for the night but dam did that take forever.

Converted the temperature sensors to clip ins or whatever these are called so I don't have to yank them out of the breakboard and they can be nicely attached to the wall of the case I'm making. 

So many less wires. 

Tuesday, March 26, 2013

Senior Design Control System

Yesterday I 3D printed the two halves of the case that will house the components for the control system I am designing. Managed to print the wrong version of one of the halves and had to reprint it, wasting almost an hour of time. I popped in the components to see how they fit. I'll have to enlarge some of the holes for the Arduino ports since it's a tight fit. Next step, which I can't say I'm looking forward to is all the wiring and soldering that will come from converting everything seen here into the little box shown below. A quick note, I didn't tolerance the holes for the ports correctly so that's why the side looks crappy. I also printed a really thin shell so that the print time was faster. Will make it nicer once I print the final model.





Making a Game Part 3

I'm done.. I'm done... I'm done! I can't believe I've finished my first serious goal for a project. At some point I want to add different difficulty levels and fix it so there's an "introduction" light sequence. For now, I'm going to leave it. Code is after the break. I added comments so that you may understand it. if you have any questions feel free to email me.




Sunday, March 24, 2013

Making a Game Part 2

Made some progress with the game. Thought I was almost done with the coding but I'm stuck and will seek help with it. Current progress is after the break. Decided to start commenting my coding as well so I don't forget everything if I try to look at something later.

Control System

Started getting to work on the control system for my senior design project. It looks pretty cluttered right now. Going to use the 3D printer at work to design a case and then solder everything together into a nice little package. The code will also be cleaned up soon with some comments. Thanks to Arduino.cc and http://bildr.org/2011/07/ds18b20-arduino/ for most of the code.

 Cluttered wire mess.


The wires bundled at the right are the temperature sensors. These correspond to three different readings of W1, W2, and P, which are shown below. 



Monday, March 11, 2013

Making a Game Part 1

Decided to make something interesting so I decided on a simple game. The goal of the game will eventually be to keep the light within the row of lights. This is achieved by pushing the light back into the direction from which it came. It's basically a balancing game in which you don't want to have the light "fall over". Created a simple introduction for the game and worked on the basic mechanics. Will upload a finished product soon. Current code can be viewed after the break.





Joystick Intro

I got a joystick and I started playing around with it. Not sure what I'm going to make yet with it but just to get started I designed the little circuit below without coding. I was thinking of doing a Simon Says kind of thing but the code for that is incredibly long.



Saturday, February 9, 2013

RGB Light Dimmer

Made a light dimmer that will control a multicolored LED through the colors of the rainbow.  I started with concept from this post and expanded it. The code can be seen after the jump break.




Light Dimmer


Thanks to Arduino.cc for the code.

Pictures



Video:


Code:
/*Quick note, dividing by 4.011 is used because the potentiometer can range from 0 to 1023 and the LED brightness can go from 0 to 255 so it wouldn't make sense to give values greater than 255 to the LED so I scaled the poteniometer range to 0 to 255 by dividing by 4.011. */

int analogPin = 3;     // potentiometer wiper (middle terminal) connected to analog pin 3
                       // outside leads to ground and +5V
int val = 0;           // variable to store the value read
int ledPin= 6;
void setup()
{
  Serial.begin(9600);          //  setup serial
}

void loop()
{
  val = analogRead(analogPin)/4.011;    // read the input pin.
  analogWrite(ledPin,val) ;           // debug value
}





Consuming parts for new projects

Combined a battery clip I have today with a power adapter I salvaged from something I took apart to see what was on the inside.


Thursday, January 24, 2013

Stepper Motor

Description:
I was tasked with making a program that could adjust a stepper motor to each individual step for a project. I haven't worked on coding much at all with the Arduino so I started with a bunch of the examples that came preloaded with the software, did a few hours of research, and ended up with a final product. Using the built in serial monitor in the software, I can send positive and negative values to the motor to cause it to rotate. Negative numbers cause it to rotate counterclockwise and vice versa. The magnitude of the number causes the motor to rotate. A stepper motor turns through "steps." This motor has 200 steps so if you send the value of 200 to the motor, it will rotate one full turn clockwise.

Pictures:

I bet you like my super advanced setup for what angle the motor is at.

Video:

Code:
If you're interested in the code, please email me at doitarduino@gmail.com. I'd be happy to share.

Learning to Solder

This week I got all the tools required to learn to solder. With this video: http://www.youtube.com/watch?v=AOdnGUMi7lQ I soldered together my first working circuit board. What you see in the picture is three resistors and three LEDs setup through a potentiometer, which basically acts as a light switch to turn on/of the LEDs. Accidentally destroyed the potentonmeter in the process so I don't have a video to show how COOL my design is. I did however end up just completing the circuit without a switch and you can see my soldering success in the last picture.




Wednesday, January 23, 2013

Color Sensor

The original motivation for starting this project was the motivation to use a color detector to sort gumballs. The link I found was this: http://letsmakerobots.com/node/23768. Since I've got a 3D printer at work I decided to change up the plan a little bit and designed and printed this:


This is a self contained unit which can have the four LEDs and photocell mounted within it. Here are the wires being pulled through.

...Forgot to design for aesthetics.

All wired up and ready.

And finally everything setup ready to go.

Around this point I spent the next half hour troubleshooting everything because my connections weren't just right. Eventually I got everything up and running but realized one LED was much stronger than the others which led to false readings. I'll hopefully revisit this project at a later date and get it to function properly. For now here is a video of the system flashing lights.



Sunday, January 20, 2013

Cannibalizing Electronic Parts

I decided that one of my next projects is to build a flashlight to practice my soldering skills. I realized the LEDs I have aren't bright enough so I decided to take apart my old flashlight (to build a new flash light... I know) Inside I found a motor, capacitor, gears, and an on/off switch. ...No electronic is safe now. Anything that breaks will be taken apart and used for new projects.

Edit: I've now cannibalized a computer mouse and portable speaker system. Got myself a battery pack, DC power adapter, two speakers, a volume knob, aux in, and possibly some bluetooth hookups. Will have to explore the new stuff more in the coming weeks.

Morse Code Part One

Description: Flashes S.O.S. on repeat. You can find more about Morse code here. The image is especially helpful.

Video:

Pictures: 


Code: (Thanks to 30 Arduino Projects for the Evil Genius)
int ledPin = 10;


void setup()
{
  pinMode(ledPin,OUTPUT);
}
void loop()
{
  flash(200); flash(200); flash(200);
  delay(300);
  flash(500);flash(500);flash(500);
  delay(300);
  flash(200); flash(200); flash(200);
  delay(1000);
}

void flash(int duration)
{
  digitalWrite(ledPin , HIGH);
  delay(duration);
  digitalWrite(ledPin,LOW);
  delay(duration);
}