Showing posts with label suit. Show all posts
Showing posts with label suit. Show all posts

Wednesday, September 1, 2010

iPhone Controlled LED Suit -- Part 2

The Controller / PCB

In the interest of time, and seeing how well my Lantronix breakout board came out on the CNC mill, I decided to CNC my own PCB for the entire suit.  I knew it would be fairly simple since most of the components are built on to the Arduino Pro Mini.  I still haven't found a decent way to design a PCB to be milled.  I use Altium for my circuit design, but this time I had to put my nerves to the test by taking the design into SolidWorks.

First, I started by drawing the overall board shape.  Then I extruded a .002" layer of copper on top of the board as a separate body.  Then I made a sketch containing all of the drilled through-holes for every component.  This took a lot of time because it involved looking up every component (luckily there weren't very many) and creating the footprint in the 2D sketch.  In the next feature I extruded away the excess copper, leaving only the rings around the holes I drilled.  This is accomplished by offsetting all of the entities in the previous sketch by a certain amount that I varied accordingly for each component.  Each piece of copper is a separate body in Solidworks at this point.


  

Next I began drawing traces.  Thankfully Solidworks lets me draw a single line, then extrude it in two directions to create a trace of the same height as the copper layer and with a thickness I choose.  Unfortunately it won't let me create multiple traces in one sketch and extrude them all at once.  So for now I am stuck drawing each trace in its own sketch and extruding them over and over again.  It was a very slow and painful process, but once I got used to it I knocked it out in a few hours.  


Most PCB design software, including my favorite one, Altium, lets you design a PCB by viewing from the top, but while drawing traces on the top or bottom layer.  Unfortunately I forgot about this when getting started with the PCB in Solidworks, but that was easily fixed with a Body Move/Copy to flip the copper to the other side without mirroring it.  Then I performed the same steps on the other side for a few more traces.  To check my sanity, I drew up the larger components and placed them to check for interference.



I chose a right-angle slider switch for the power, and screw terminals (not pictured) for attaching the wires on the right side.  I knew it would be a heavy toll for a 3.3v linear regulator powering the Lantronix module (~250mA) from approximately 12 volt supply voltage.  That is a lot of heat to burn off.  I found this awesome little 1 amp 3.3v switching regulator that is a drop-in replacement for the TO-220 style linear regulators, but it is way more efficient.

Being the impatient person I am, I didn't want to spend any more time on the design.  It was time to start milling right now!  First, all the tools were set up in the tool changer and indicated.  Then a piece of double-sided copper-clad FR4 PCB material was taped down to a 1/4" aluminum plate and clamped in the mill vise.  The first operation involved drilling the different sized holes, and then the traces were routed out with a .020" endmill.






After the traces got routed out and the operations for one side were complete, I cleaned up the burrs and the finish with a Scotchbrite pad.  With some acetone, the tape's adhesive broke down and I removed the board from the aluminum plate.  Then, using the holes that were just drilled, the aluminum plate was tapped for #4-40 screws, and I flipped the board over and mounted it back to the aluminum plate to perform the operations on the other side.  Then with a razor blade under a microscope, the excess copper was separated then peeled away from the board with pliers, leaving just the traces.



Since the Lantronix module was not cheap (around $65) I knew I wanted to make it removable in case this PCB turned into a disaster.  I had some 2mm headers from Sparkfun, but they needed a little work to fit properly.  The ends of the headers had extra material, which kept me from placing them in line with each other.  I took care of this in a few minutes on a manual mill.



I was ready to start soldering the components.  I used a DIP socket for easy Arduino removal as well.  Because the board is double-sided but the through-holes are not plated, I purposely designed some through-holes just to insert pieces of wire to transfer traces from one side to another.  Cool, everything fits!




Now it was back to Solidworks to design an enclosure.  When you have access to a FDM printer, it is fun to reminisce about all the adventures you've had with radio shack project boxes, but it's so nice to move on.  My friend Alex taught me all the tricks to plastic enclosure design in Solidworks:  Lip & Groove, Snap Hooks, and good practices in general.




And seriously, no lie, I pressed "PRINT" and it appeared a few hours later.  I had picked up a 2.4ghz antenna, and added a right-angle male header to my Arduino Mini for easy programming using the FTDI Basic Breakout.






That wraps up the controller for the most part.  I added a tactile pushbutton switch and a LAN activity LED after I took these pictures, but that is what those little holes in the top are for.  Now it's time to get on to more important things, like coding this shenanigans...

Tuesday, August 31, 2010

iPhone Controlled LED Suit -- Part 1

Since I just created this blog a few days ago, I will have to go back in time a few weeks to talk about starting this other project.  The helmet is in Alex's hands getting prepped for painting.  The circuitry is not done, but in at a good stopping point.  Maybe I can work on them during my lunch breaks throughout the week.  Anyway...


My friends had been trying to convince me to attend Dragon Con for the last 5 years or so.  I myself am not a huge sci-fi fan or anything, but I am a nerd and I do like building cool stuff.  That the same idea some of my friends have too.  I attended my first Dragon*Con last year with nothing in hand and no idea what to expect, but I left with some crazy ideas.  After a while though, those ideas got put on the back burner and other projects took priority.  But with DC 2010 looming on the horizon, I got inspired to make an interesting outfit.  I thought it would be neat to have a full-body suit of LEDs that I could control to any color or pattern I wanted.  


One of my friends and fellow DC attendee, Chris Williamson, decided to build a mobile dance floor this year.  He showed me some LED modules he bought from Bliptronics.  They are individually controllable, over 31,000 color combinations, and they looked pretty rugged.  Check out some pics of Chris's dance floor and his installation of the LED modules below.  The whole thing is motorized and fitted with a sound system.  And notice the stripper pole in the middle - hanging out with our crowd will be interesting this year...


  


The LEDs looked great though.  I bought 40 of them to try out.  I soon realized that in order to make an entire suit light up evenly, I was going to need both some good diffusion and A LOT of LEDs.  I also finally caved in and bought an Arduino.  Until this point I have used PICs for most of my projects.   But Sparkfun sells the Arduino Mini which is small enough to use on the suit.  Since Ben from Bliptronics had published source code for the LED modules, the easiest way to test them out was to hook them up to an Arduino.  Just a side-note about my gratitude toward Sparkfun:  Not only are they a wildly successful company and a great resource to the maker community, but they are the reason why a young renegade web developer could ever be respected as a real electrical engineer building medical devices.  Thanks guys!


I couldn't come up with a good idea for an outer suit, so I decided to keep the nerd-factor down and just wear some white dress clothes.  Below is a picture of my preliminary test to see how 40 LEDs looked under a white shirt.  





The outcome was pretty cool, but 40 LEDs were quickly used up.  I went back to Bliptronics, this time ordering another 160 LED modules.  At $4 apiece, you can do the math.  When I come up with a project, I tend to go a little overboard.  Ben was nice enough to give me a discount on the modules.  Thanks Ben.  I started sewing LEDs onto an old shirt I had.  With the white button-up shirt over it, this is how it looked.  The video makes it look brighter than reality.  It didn't have the effect I was going for -- it needed more diffusion.  





I also didn't know how I was going to control so many LEDs.  But being a true iPhone user my first thought was "Oh man, it would be sweet to have an app for that...".  If you've been following my links so far, you might have noticed that I have a good reason to be tight with the iPhone.  However, there was one small problem.  I didn't know how to write apps, and I didn't even own a Mac!  The last time I bought a Mac was around the time when the App Store was first launched.  I bought a Mac Mini and I thought I was going to start writing iPhone apps overnight.   I sold it on eBay a few weeks later after a lot of frustration.  Well I found myself back at the Apple Store again, this time making an even bigger purchase.


Being familiar with the iPhone and its limitations, and having done it before, I knew bluetooth would be a bad option to attempt.  A few weeks ago I had finally received a sample part I had requested from Lantronix almost a year prior.  The MatchPort b/g Pro is a wifi-to-serial embedded module.  Out of the box it is pre-configured to create an ad-hoc network.  No access point required -- perfect for the iPhone.  The module has two rows of 2mm spaced male pins, which made breadboarding difficult.  My solution was to try to CNC mill a breakout board from copper-clad FR4 from Digikey.  






Success!  My first PCB produced by a CNC mill.  Now I could get started evaluating the Lantronix module.  Right off the bat, it powers up and creates the ad-hoc network like it said it would.  I hooked the RX and TX lines straight to a Sparkfun FTDI Breakout.  I own about 5 of these little boards.  They are so handy I typically don't have less than 3 of them hooked to my PC at any given time.  Within a few minutes I had a Windows test app written in VB.NET to open a TCP connection to the Lantronix module and I was able to send data from my laptop to a terminal window on my PC wirelessly.


At some point around this time, the rest of my LEDs arrived from Bliptronics.  I went to town sewing LED modules onto a shirt and pants.  The pants are actually white scrubs, slightly modified to not be so baggy.  The material has to be strong to hold up the extra weight of the LED modules.  This thing is starting to look pretty silly...








There is more progress!  Click here to see Part 2.