Saturday, January 5, 2013

Princess Wands

A few days ago, my daughter who is having her 5th birthday party this weekend comes up with her sweet little eyes and asks “Daddy, what special thing are we doing at my party like we did at [her brother’s].”  Of course, she was referring to the Birthday Badges that I designed and they assembled.  With less than a week until the party there certainly wasn’t time to design a PCB, have it fabbed and delivered in time without paying outrageously high costs. 

So, it was time to scramble and see what I could come up with using parts that I had on hand and could get at local stores.  Her party has a Cinderella theme.  I had a stock of blinking RGB LEDs left over from the Red Bull Fish Detector project that are a lot of fun and require only a resistor and battery to make work.  So, that sounded like a good basis for the project.  When I think of the Cinderella story, the fairy godmother and her magic come to mind.  So, the idea of a magical princess wand was born.

To build the wand, you will need a soldering iron, hot glue gun, wire cutters, box cutter or sharp knife, drill (or just good box cutter skilz) and the following components.

2013-01-02 23.29.35

QUANTITY

ITEM

COST

1

Blinking RGB LED

$0.10/each on eBay in qty of 100

1

56 Ohm 1/4W Resistor

$0.02/each on eBay in qty of 100

1

3V Coin Battery

$0.10/each on eBay.  I used CR2032’s because I had them.  Smaller ones would be better.

1

Rubber Band

Free.  Ask your mailman for some…

1

Plastic Balloon Stick

$0.20

1

Ping Pong Ball

$0.07

1

Feather or Other Decoration

$0.01

With a little planning and sourcing your parts on eBay and Amazon.com, you can build these for less than $1 per wand.  That’s a lot of magic for a buck!

You can assemble all or part of the wand before the party and have the kids do part of the assembly during the event depending on their age.  Because we had several other events planned, I chose to solder the resistors to the LEDs and drill & cut the ping pong balls prior to the event and then I quickly did the assembly of the rest of the parts during the party so they could learn how they worked.

Begin by soldering the resistor to the LED.

2013-01-04 23.02.45

Next, use a box cutter or sharp knife to split one end of the plastic balloon stick about 1.5” long.  Do not make the cut longer than the diameter of your ping pong ball.

2013-01-02 23.31.55

CAUTION: Never cut towards your fingers!  Always cut away from all body parts.  I’m not wearing that blue tape band-aid because it’s fashionable.  Even Boy Scouts need an occasional reminder… :(

2013-01-05 00.34.50.b 2013-01-05 00.35.44.b

Then determine how your battery and LED need to be connected.  This is easiest by experimentation.  One wire goes on one side of the battery and the other goes on the other side.  If it doesn’t work, reverse them.  If you’ve followed my example then the longer side of the LED will go on the positive side of the battery.  Then sandwich the battery and LED into the split tube.  You should have at least 1/4” of extra tube beyond the battery when it’s all squeezed together.  If not, then split your tube some more.

2013-01-02 23.36.48

To hold all of this together, we will use the rubber band.  Begin by looping the rubber band around the top of the tube then twist the rubber band 180 degrees and folding it back over the stick and repeating three times.  Make sure this is done tightly since this is primarily what’s holding our circuit together.

2013-01-02 23.38.03

Continue the twisting and wrapping on the other side of the battery a few times and then finish by looping the rubber band back up to the top of the stick.  If you have any loose wire ends, fold them back onto their side of the battery.  IMPORTANT:  Do not let any wire contact both sides of the battery at the same time.  Really bad things can happen.

 2013-01-02 23.39.52

Now drill or cut a hole in one end of your ping pong ball.  The hole should be a fairly snug fit with your balloon stick.  Also, use the box cutter to cut slits on each side of the hole slightly wider than the width of your battery.

2013-01-02 23.41.16

Next, push the stick, LED, & battery through the hole and into the ping pong ball.  Be careful not to split the ball farther.  You may have to pull the stick back out a little bit to help re-shape the ball once it’s inserted.  Push the stick all the way into the ball so that the end is firm against the opposite end of the ball and apply a liberal amount of hot glue where the stick and ball meet at the hole.  Hold this all together firm and steady while blowing the glue until it is cool and rigid.

2013-01-02 23.47.56

The final step is to cover up our cuts and hot glue with a little bling.  I had a feather laying around.  So, I added a little hot glue and wrapped the feather around the rod but you can get creative here.  Maybe some tinsel, cotton, rat tails…whatever fits the party you’re planning.  This is where the kids can participate in customizing their wand.

2013-01-02 23.56.45

Have fun and be sure to leave some comments to let me know how you improved on my design!

IMG_2434

HackADayLogo


1/15/2013 – W00t!  Princess Wands was featured on Hack-a-Day!

Quick Tip – Soldering Resistors to LEDs

In a project this week, I had a need to solder a resistor directly to an LED.  Due to the human limit of only having two arms, this turns out to be a little more difficult than it should be.  Normally, I’d use my “extra hands” tool for this type of task but I had a lot of them to make and I needed a more efficient process.  Here’s what I came up with…

2013-01-04 23.40.21

First, cut the short (cathode) lead of the LED so that there is only about 1/4” remaining.  Do the same on one end of your resistor.

2013-01-04 22.53.52

Since we still want our resistor to indicate that it’s the cathode side by being the shorter leg, I also snipped a little off the other side of the resistor so that it will be about 1/8” shorter than the anode lead of the LED after the short wires are overlapped.

2013-01-04 22.57.26

Instead of the “extra hands”, we’re going to use an extra solderless breadboard to hold everything in place.  Begin by inserting the long end of the resistor into an empty hole in the breadboard.  Push it all the way in until it hits the bottom and then pull it back up about 1/4”.  Then insert the resistor into the hole next to the resistor and push it down until it aligns with the top of the resistor and they are overlapping.  They should be touching so that we can get a good solder.

2013-01-04 22.59.50

Solder!  Do this as quickly as possible to avoid damaging the components but be sure to use enough heat that you get a good solder joint.  I set my iron at about 330 C.

2013-01-04 23.12.57

2013-01-04 23.02.45

After doing a couple, you will have the exact places to cut memorized and should be about to finish one in 30-45 seconds.

Got any ideas on how to improve this type of soldering?  Did this tip help you with your project?  Leave comments and tell me about it!

Saturday, December 8, 2012

Using a Gadgeteer Camera Module as a Webcam

CameraModuleOccasionally, I do something really stupid.  Well, maybe more than just occasionally…  For example, when the GHI Hydra Gadgeteer mainboard was first released I rushed out and bought one and also picked up a Camera module because I was excited to try out some imaging projects I’d had in mind for a while but didn’t have the horsepower to attempt with previous microcontrollers.

Much to my disappointment, once the Camera module arrived I realized that in my haste I had totally forgotten to check what socket type it required.  Long story short…you can’t use a Camera module with a Hydra mainboard (or any other boards that I own). 

2012-12-08 00.03.35So, I’ve had a $35 paperweight just thrown in a cubby hole for the past year or more hoping that one day a new mainboard would come out that would be compatible or another module would be introduced that would add support for it.  No such luck.

Tonight I learned that this module may not be such a useless piece of junk!  Did you know that if you simply connect an SP or DP USB power module directly to the camera module and then connect a USB cable connected to your computer that you can use it as a webcam?

2012-12-08 00.13.36Yes, you can!  It really is that simple.  Connect the modules together using a Gadgeteer cable, then plug in your USB cable and watch Windows start loading up the drivers.  It may take a few minutes for Windows to located and download the drivers but for me I didn’t have to do anything but wait. This test was performed on Windows 7 Ultimate 64-bit.

Once the drivers have finished loading, you can pull up your favorite software that supports generic attached webcams and start playing.  I’m using the Microsoft Live Movie Maker software for this test.  Remember that you can adjust the focus simply by twisting the lens of the Camera module.

I find it very cool that this module can perform double duty as a PC webcam and as a Gadgeteer module.  I’ve been planning to get a webcam for NashMicro to stream our meetings over the internet.  Now I’ve got an even cooler option!  Of course, it wouldn’t be complete without turning that into an even more pimped out microcontroller project.  But, I’ll save that for a later post.  Check back soon!

Saturday, November 10, 2012

Birthday Badges

“Never pass up a teachable moment.”  As a Boy Scout leader of many years, this has become one of my many mottos.  Any time you have the opportunity to grab a child’s attention and focus that attention on something more educational than the latest video game then grab it and have fun.  My son’s 6th birthday party recently became one of those moments.

2012-11-10 22.38.55

My wife (aka social planner) told me we were having a circus themed party with lots of different game stations (ring toss, face painting, a balloon artist, clown, etc.) and asked what I wanted to do.  First thing that came to mind was a soldering session.  Sadly, I don’t recall ever going to a kids birthday party that included something educational.  So, I was breaking new ground here among our friends.

To make things a little more interesting, I decided to not just have them solder a few things and move on but instead I wanted them to build something fun they could take home with them.  The idea for a “birthday badge” was born.

The idea was to create a badge that would encourage interactions among the kids at the party but would also be fun once they got home.  Because I expected 20+ kids at the party, it also needed to be fairly cheap to build.

After stirring around a few ideas, I finally decided on a design for a badge that would create interactions by having the badges detect other badges within close proximity.  This would give the kids the opportunity to get up close and force some conversation.

Each badge has both an infrared (IR) transmitter and an IR receiver.  The IR transmitter uses an IR LED that operates as half of an astable multivibrator circuit.  The other half is a red LED.  So, it appears that only the red LED is blinking.  The IR & red LEDs alternate at about a 2Hz blink rate.

image

The Eagle CAD files can be downloaded here.

The receiver uses a phototransistor in a Darlington pair configuration with a transistor to detect and illuminated another red LED when IR light is detected.  The phototransistor will also detect some ambient light which is why you see the LED dimly illuminated when in a lit room or outside.

After finalizing the design, it was time to go to the breadboard.

2012-11-09 21.49.15

During breadboarding, I found that my calculated blink rate wasn’t quite what I was getting in reality.  I played with different values for R2 & R3 until I finally got the blink rate I wanted (about 4Hz).  I then built a second transmitter on a different breadboard just so I could test the power output of the transmitter and the sensitivity of the receiver.

I didn’t quite get the range I was hoping for but since I was limited to a single 3V coin cell battery, I decided a range of 6-8” would be sufficient.

Now, it was time to design the actual PCB board.  I decided that I was going to model the PCB after a clown’s mouth to stick with the circus theme.  After several nights of routing & tweaking the design, I finally ended with this…

BirthdayBadgeBoard

This was my first PCB to have manufactured.  So, I called on some friends for advice on where to have it done.  Pete Brown recommended DFRobot.com and I went with them.  DFRobot has a really good step-by-step guide for producing the files needed from Eagle to provide them with.  A couple hours later and the files were uploaded.  Time to wait…

A few days after I submitted the files, I got an email back with a picture from DFRobot warning me that the silk screen on my “open hardware” logo was striped on some of the boards but they were otherwise perfectly functional.  They went ahead and shipped them but told me to let them know if they needed to do anything to make it right.

I expected about 20 kids at the party.  Unfortunately, you can only order PCBs from DFRobot in quantities of 10, 50, 100, or 200.  It really wasn’t much more expensive to order 50 than 20 so I went with that option and decided I would use the extras to teach a soldering class at NashMicro.  Because of this buffer, I wasn’t at all concerned about the bad silkscreened logos on some.

Eleven days later, I had the PCBs in hand!  If you order from DFRobot, be sure and choose the DHL option.  It’s only a few dollars more than parcel post is much faster than the usual three weeks delivery from China via parcel post.

The boards were in perfect condition minus the screen print problem I had already been warned about by DFRobot.  Overall, I was very pleased with my experience with DFRobot and I will definitely use them again in the future and highly recommend them to others.

Oh, the best part…the PCBs ended up costing me $1.80 each.  Unfortunately, I had to pay for the 10cm x 10cm size although they’re actually only 5cm x 10cm because they don’t offer 5cm x 10cm as an option.  I also paid a little more for red PCBs and the DHL shipping.  If you had more time then I did and didn’t care about the color, you could definitely get the boards made cheaper.

2012-10-16 23.17.58

While I was waiting on the boards to arrive, I went shopping for the parts.  Since these were basically disposable projects, I didn’t really have to worry about quality.  As long as they blinked for a few hours during the party, I would be satisfied.  I found as many of the parts in bulk on eBay as possible.  Here’s the parts list and sources.

Part

Qty

Unit Price*

Cost

20mm Coin Cell Battery Holder

1

$0.38

$0.38

PCB

1

$1.80

$1.80

Red LED

2

$0.04

$0.08

Phototransistor

1

$0.12

$0.12

IR LED

1

$0.08

$0.08

2N2222 Transistor

3

$0.28

$0.84

1K Ohm 1/4W Resistor

2

$0.02

$0.04

51K Ohm 1/4W Resistor

2

$0.02

$0.02

56 Ohm 1/4W Resistor

1

$0.02

$0.02

22 uF Ceramic Capacitor (SMD)

2

$0.13

$0.26

CR2032 3V Coin Battery

1

$0.14

$0.14

Plastic Pin Back

1

$0.28

$0.28

TOTAL    

$4.08

Now with all the parts in hand, we were ready to party!  Because I knew it would take too long for the kids to assemble all the parts and I didn’t have the patience to teach SMT soldering to 5 year olds, I did all the assembly except the resistors before the party. 

Me & my oldest son, Ian Jr., had a little soldering party of our own the night before the kiddos arrived.  In retrospective, if I were doing this again I probably would make all the parts to be assembled beforehand as SMT and used an oven to reflow rather than hand soldering all those thru-hole parts.

2012-11-02 22.48.18

(yep, in our pajamas…)

Here’s what’s involved in constructing a Birthday Badge.  A demonstration of it’s operation is at the end.

Birthday Badge Assembly

The day of the party was a huge success.  We had 20 or so badges floating around on both kids & a few adults before the day was up.  I heard from one of the kids today (a week later) that her badge is still blinking!  I haven’t discovered yet how long one will blink but I’m going to start that test.  I suspect that it will go for a month or better.  I’ll update when I have scientific evidence.

We only had one badge that didn’t work properly the first time after assembly.  I believe it had a bad red LED but the kid didn’t want to stick around and fix it since the blinky (transmitter) side of the circuit worked fine and mom was ready to leave.

It was a great day and I’ve heard from more than one parent that their kid’s favorite activity was building the badge.  Mission accomplished.  Maybe a few new engineering careers were inspired.

IMG_0655

IMG_0629  IMG_0632  Ian&Hannah

521694_4873261277471_1013595214_n

Testing communications between two badges.
Testing communications using an IR remote

 

HackADayLogo11/21/2012 – W00t!  Birthday Badge made Hack A Day!

Tuesday, August 21, 2012

Use a MakeWire Module to Create an Ad-Hoc Temperature Sensor Module

2012-08-20 22.44.36I recently put out a request to a fellow Gadgeteer enthusiast, Eric Hall (aka ransomhall), to help me out with a simple module that I needed to help make some temporary breadboard modules I have been testing a little more permanent.  Eric responded with a very professionally designed module that I anticipate using to make several projects I have in the works look much more polished and take a lot less space on my desk.

I’ve been experimenting with a DS18B20 temperature sensor that operates through an OneWire protocol.  The only other component necessary to make it work is a 4.7K Ohm pull-up resistor.  Since I want to connect it to my Gadgeteer boards and there does not yet exist a module that serves this purpose, I had to make my own.  So, using a MakeBread module (Eric's version of the Extender module) and the 4.7K Ohm resistor I was up and running in minutes (see above picture).  However, as you can see this is not a very convenient way to keep the module for the long run.

2012-08-20 22.08.19

Another more permanent option would have been to just solder everything directly to the Extender module.  I didn’t want to do this because that would have meant keeping all the solder joints exposed with no good way to protect them.  Since this temperature probe will be mobile, I needed a better solution.

I wanted a module that would serve the same purpose as the Extender module – basically would be a way to connect a few wires to a Gadgeteer socket – but it also had to be slim enough that the solder joints could be protected with shrink wrap.

I spent a few minutes in Paint and made up a sketch.  Hours later, Eric produced an Eagle schematic that could be sent off for PCB production and a few days later the boards were in hand.

MakeWireSchematic

2012-08-20 21.44.17

My Sketch

Schematic

Final Product

2012-08-20 21.50.24Now it was time to try them out.  Since I only had three wires and the one resistor that had to be connected to the MakeWire module, I was able to solder everything directly to the board without any problems.

I started by soldering the ground wire on.  Next, I soldered the 4.7K ohm resistor and the data wire into the same hole at pin #4.

2012-08-20 21.58.19

Next, I soldered the other end of the resistor and the +5V wire both into the 5V hole in the module.  Before soldering, I stripped a small piece of wire insulator off some jumper wire and put it over the wire coming from the resistor.  I did this because I knew I was going to have to fold the resistor down onto the board and I wanted to be sure it didn’t make contact anywhere I didn’t want it to.

2012-08-20 22.03.12

All that was left was to cover it in shrink wrap.

2012-08-20 22.05.27 2012-08-20 22.07.21

Now to hook it up to a Cerberus mainboard and test it out.

GadgeteerConnections

To test the sensor, I used godefroi’s DS18B20 driver with this simple test code to display the measured temperature (in Celsius) to the Debug output window.

   1:  public partial class Program
   2:      {
   3:          private DS18B20 thermometer;
   4:   
   5:          // This method is run when the mainboard is powered up or reset.   
   6:          void ProgramStarted()
   7:          {
   8:             Debug.Print("Program Started");
   9:   
  10:             GT.Socket thermoSocket = GT.Socket.GetSocket(thermoExtender.ExtenderSocketNumber, true, thermoExtender, null);
  11:             thermometer = new DS18B20(thermoSocket.CpuPins[4]);
  12:   
  13:             var thermoTimer = new GT.Timer(1000);
  14:             thermoTimer.Tick += timer => Debug.Print(thermometer.ConvertAndReadTemperature().ToString());
  15:             thermoTimer.Start();
  16:          }
  17:      }

Full source code can be found here:
https://github.com/ianlee74/Gadgeteer/tree/master/DS18B20%20Thermometer%20Test


And here’s the output!


DebugOutput


Eric did a great job with the module and I plan to include it in several more projects that are in the works.  If you have a need for a custom Gadgeteer module, contact Eric or one of the other pros over at the tinyclr.com Gadgeteer forum.

Thanks for reading.