Tuesday, 27 December 2011

ArduFlake: Turn your Arduino into the best gift of all!


Please vote for me in the Holiday Gift contest and the Make it Glow contest!

First, this started out as a gift, and not an instructable. So please excuse some hand waving here and there as I do not have any pictures of the etching and drilling portions.

Second, this is for my dear dear wife. Yep, I got lucky enough to have a wife who likes to solder. We found out this summer when out of the blue she asked me if she could solder my RockSat PC board. We also are huge fans of snow flakes. We even had a snow flake themed wedding! Finally, this our 6th year of marriage, so what could be better than a 6 pointed snow flake!

Ok, so get ready, get set, Lets make one together!
 

Step 1Get ready!

Lets gather our supplies.

Software: Parts Supplies Tools
  • Soldering iron
  • Clothes iron
  • Something to cut the PCB (I used a bandsaw)
  • Something to drill the PCB (I used a drill press)
  • Scissors

Step 2Design snowflake

NOTE!!

If you like my original design you can skip this step and go straight to etching. I would like to guilt trip you a tad and remind you that every snow flake is unique. Copying violates that, but if you can live with it, so can I :)

Ok, so this process is more something that a graphics artist would be familiar with. For simplicity sake I spliced together a video that shows the process.

In short...
  • Export PCB in eagle to clipboard
  • Open paint.net and insert
  • Find and open snowflake in Paint.Net
  • Resize snow flake appropriately
  • Create a new image with 3 layers, the black flake, traces in black, traces in white.
  • Layers should go flake, white traces, black traces.
  • Use a blur function to widen the white layer.
  • Use magic wand to select widened traces.
  • Use paint bucket to thicken up those traces.
  • Save as bitmap!
Confused? Try the video.

multi.pdf212 KB
 

Step 3Etch the board.

  • IMG_7446.jpg
  • IMG_7449.jpg
  • IMG_7452-1.JPG
Ok, ok. Get your design file out. If you are using mine, I suggest the PDF.

This is the first time I have etched a PCB, so rather than lead you down the wrong path, let me refer you to a GOOD instructable on this.

I liked this one:http://www.instructables.com/id/Mostly-easy-PCB-manufacture/?ALLSTEPS 

There are many good ones online.

Basically:
  1. Clean board with steel wool.
  2. Print on special paper (Used avery label paper worked for me).
  3. Iron the design onto the  board. Consult this video if you want to see it in action http://www.youtube.com/watch?v=QQupRXEqOz4
  4. Soak in water to remove the paper.
  5. Clean board again with acetone (I actually had to use steel wool again!)
  6. Place board in etchant
  7. Wait patiently.

Step 4Cut and drill the board.

I'll admit, I cheated. One of my friends had a shop with drill press and band saw. I used these to cut my boards and drill the holes. My next attempt will use a dremel.

A few notes as I drilled. The little hole inside the copper really does a good job guiding the bits. I ended up giving up on the presses x-y axis and z axis. I just ended up holding the board and pressing it into the press. Probably will do the same with a dremel when I do that.

Step 5Build snow flake

  • IMG_7460-1.JPG
  • IMG_7463-1.JPG
  • IMG_7464-1.JPG
  • IMG_7466.JPG
  • IMG_7470-1.JPG
Now the fun part! Warm up the iron, get your parts and start soldering.
  1. Solder headers
  2. Insert resistors (if you are clever, you will make the colors go int he same direction).
  3. Twist center resistors together.
  4. Solder large blob of solder onto giant center pad.
  5. After the solder has cooled, bridge the large blob to the resistor. The holes for the resistors were drilled to big. 
  6. Now solder the other sides of the LED's. Get the trace hot and put some solder on it then bridge to the resistor. Smaller holes would have been better!
  7. Place some solder on the twister pair at the bottom for good measure.
  8. Trim resistor leads.
  9. Place an LED barely in a hole. Long lead goes to the long trace.
  10. While holding the long end of the LED that sticks out, bend the LED.
  11. Align the LED to radiate and follow the traces and solder it in place.
  12. Repeat 5 more times.

Step 6Upload code

Now this is definitely fun. We have access to each LED of the flake. Use your imagination or my code.  Use the Arduino IDE to upload to your Arduino like normal. This code randomly fades an LED on or off. There is so much potential. Much of which my wife will be exploring as she learns how to program.
int maxi=1000;
int i=0;
int pins[6] = {
  0, 0,0,0,0,0};
void setup() {                
  pinMode(8, OUTPUT); 
  pinMode(9, OUTPUT); 
  pinMode(10, OUTPUT); 
  pinMode(11, OUTPUT); 
  pinMode(12, OUTPUT); 
  pinMode(13, OUTPUT);     
}

void loop() {
  int r;
  r=random(8,14);
  int state= pins[r-8];
  if(state==1)
  {
    pins[r-8]=0;
    i=0;
    while(i<maxi)
    {

      i++;
      digitalWrite(r, HIGH);   // set the LED on
      delayMicroseconds(maxi-i);
      digitalWrite(r, LOW);   // set the LED on
      delayMicroseconds(i);
    }
  }
  else
  {
    pins[r-8]=1;
    i=0;
    while(i<maxi)
    {
      i++;
      digitalWrite(r, LOW);   // set the LED on
      delayMicroseconds(maxi-i);
      digitalWrite(r, HIGH);   // set the LED on
      delayMicroseconds(i);
    } 
  }

}



RandomOn.pde838 bytes
 

Step 7Wrap/Give/Enjoy!

  • IMG_7525.JPG
  • 390167_264584946937990_100001594613633_766573_1643223852_n (1).jpg
I gave her an assembled one, and completely un assembled one including an un assembled FreeDuino.

She liked it. I might even say she loved it!
 



 

 

LED flashlight with secret switch

With this project you are going to make a cheap DIY LED flashlight with no button on it. You will need a magnet to turn it on.

This project I did on a summer camp with a group of kids. (8 - 12 year olds) Everybody succeeded (some with some help from me) and we had loads of fun with it.
 

Step 1You will need (Parts)

Parts:
  • 1 PVC pipe (We use this in Europe to put electrical wiring in)
  • 2 caps that are used for chair-legs and fit the PVC pipe
  • 2 AA batteries
  • some plastic
  • foam-tape
  • 1 LED
  • 1 resistor
  • 1 reed-switch
  • 2 plan-board-magnets
  • a piece of wire

Tools
  • tape
  • scissors
  • pliers
  • drill (size of your LED: 5mm?)
  • needle
  • sand-paper

Extra
For decorating you can use whatever you like:
  • colored tape
  • stickers
  • markers

Step 2Preperation

  • _DSC3657.JPG
  • _DSC3671.JPG
  • _DSC3658.JPG
  • _DSC3659.JPG
  • _DSC3668.jpg
Prepare:
If you are going to do this with kids, you will need to do some preparations:
  • Cut the PVC-pipe in the right length: just al little shorter than the two batteries and one of the magnets put end to end.
  • Sand off the edges of the pipe, so the end caps will go on easier.
  • Drill a (5mm?) hole in the middle of one of the end caps.
  • Cut a piece of 10 cm wire.

You will need to do this once for every child that is going to make a flashlight.

Step 3Cut the plastic

  • _DSC3672.JPG
  • _DSC3674.JPG
  • _DSC3675.JPG
  • _DSC3676.JPG
Cutting het plastic sheet
The plastic will be a isolator between the anode of the LED and the battery. You can use any kind of plastic sheet you van find. I used a front-sheet that they use at Kinko's.
  • You cut a square that is slidily smaller than the inside of the tube.
  • Next you round it off so that it will fit inside the tube.
  • To finish it, you will need to pinch a hole in the middle with the needle.

Step 4The LED

  • _DSC3679.JPG
  • _DSC3680.JPG
  • _DSC3681.JPG
  • _DSC3682.JPG
Adding the LED
  • The anode (long leg) of the LED will be bent sideways.
  • The cathode (short leg) has to go through the hole in the plastic "isolator" we just made.
  • The anode will be bent 90° at the side of the "isolator" and folded back up. (see picture)
  • The cathode is bent in a spiral that is flattened against the "isolator"

Step 5Adding the reed-switch

  • _DSC3683.JPG
  • _DSC3684.JPG
  • _DSC3686.JPG
The reed-switch
A reed-switch is a switch that is activated by a magnet. They are cheep and small and everything with magnets is fun for kids!
  • Fold both of the leads of the reed-switch in half to make a ring on each side.
  • Hook the ring on one side of the reed-switch in the ring that you made on the anode of the LED.
  • Tape the reed-switch on one of the batteries in a way the the reeds inside it are flat on the battery and the LED will touch the NEGATIVE side of the battery with its (spiral) cathode.

Step 6Add the resistor

  • _DSC3687.JPG
  • _DSC3689.JPG
  • _DSC3690.JPG
  • _DSC3691.JPG
The resistor
Use a resistor that works for your LED with two 1,5 V (= 3 V) batteries. It will probably be a low value.
  • Fold both leads the same way as you did on the reed-switch.
  • Tape the two batteries together in a way that the negative site (-) of the second battery touches the positive (+) side of the first battery.
  • Hook the resistor on the reed switch.
  • Tape the resistor on the second battery.

Step 7Adding wire

  • _DSC3692.JPG
  • _DSC3693.JPG
  • _DSC3694.JPG
  • _DSC3695.JPG
  • _DSC3696.JPG
  • _DSC3697.JPG
  • _DSC3698.JPG
The wire
The lead from the resistor is probably not long enough to reach the positive side (+) of the second battery. We will need to ad a piece of wire to reach it.
  • Fold the end of the piece of wire.
  • Hook the wire to the resistor.
  • Tape the wire to the second battery.
  • Fold the end of the wire around the end of the second battery so it can touch the positive pole (+) of the second battery.
  • Cut of the access wire just past the positive pole (+) of the second battery.
  • Stick the wire to the positive pole (+) of the second battery with a piece of foam-tape.
Does it work?
This is a nice moment to check if everything works. If you push the LED against the battery and you hold a magnet near the reed-swich, the LED should light.

NO

Mine didn't work. I used a broken LED, so I changed it for an other and tested it again.

YES!!!
 

Step 8Inserting in the tube

  • _DSC3699.JPG
  • _DSC3700.JPG
  • _DSC3701.JPG
  • _DSC3702.JPG
  • _DSC3704.JPG
Inserting
  • Push the cap with the hole in it on one side of the PVC-tube.
  • Insert the parts that are taped together in the PVC-tube, LED first.
  • Wiggle it around until the LED pops out of the hole in the end cap. (some kids found this part hard to do)

Step 9Closing up

  • _DSC3705.JPG
  • _DSC3706.JPG
  • _DSC3707.JPG
  • _DSC3708.JPG
The end cap
  • Insert one magnet with the magnet pointing to the back of the flashlight in the tube. (Make sure the two magnets will attract each other. If they don't, you must pry one of the magnets loose and turn it around)
  • Put on the end-cap and push it on really tight.

Step 10Finishing

  • _DSC3710.JPG
  • _DSC3711.JPG
  • _DSC3712.JPG
Finding the switch
The flashlight is finished now, but we will have to find the switch to turn it on.
To find it you go around the flashlight with the second magnet until the LED turns on. If you found it, it might be wise to mark the spot.

Decorating
To really finish it, this is the moment to decorate your flashlight. I gave my group several colors tape, stickers and markers and they made some nice designs. We had some glow in the dark stickers to mark the spot where the magnet had to touch the flashlight to turn it on.
Because there is also a magnet on the inside, you can "store" the magnet on the back of the flashlight.