Friday, December 9, 2011

Battery pack for medical device


Any guesses as to what I've been up to?  It certainly looks a lot more dangerous than it really is.  The object on the left is an electronic ambulatory infusion pump used by medics.  The object on the right is a makeshift battery pack I put together to power the pump.

A little while ago a friend of mine came to me with a problem - he was running an in-vivo experiment using one of these pumps to provide a continuous nutrient supply; the problem was that he needed to run the pumps continuously throughout a two week experiment. The pumps only accepted AA batteries and would run out of juice after only 4 hours of use. Having to go to the lab and change batteries every four hours sounds a bit too much like experiencing the sleep debt of having a very young child... So, he asked me if there was a quick and easy way to improve the situation.

Connecting the pumps directly to the mains was out of the question; they needed to remain portable and untethered. So I thought we could add an external battery pack instead which would house larger, D size, batteries to increase the available power supply.

These pumps cost around $800 each, so I wanted to make the least invasive upgrade possible - yes, I'm a scaredy cat. Rather than ripping them open and soldering directly onto the circuit board, I decided to make some fake AA batteries to interface with the internal battery terminals. A couple of screws at the end of correctly sized dowels should do the trick. So, I measured an AA battery (length and diameter) and headed over to OSH to pick up some doweling (I know... I feel like I was cheating on home despot).

I cut two AA sized cylinders and decided on the right length of wire. I attached the wire to the ends of the dowel using a circular crimp terminal and a couple of wood screws. I had to drill a small hole in the pump casing in order to have the wire accessible, I threaded the wire through the hole and attached a mono jack plug to the end. For some reason I have a bag of these plugs and paired sockets sitting on my workbench... I figured they'd make life easier when replacing batteries by allowing the pump and battery pack to be separated and, if needed, I could make a few packs which would allow even quicker battery replacement.

If you've read any of my other posts you won't be surprised to hear that I opted for PVC pipe when making the main body of the battery packs. It turns out that D batteries fit snugly in 1 1/4" PVC piping, which is readily available in Lowe's/OSH/Home Depot.

 I bought some single D battery holders from RadioShack so I could cannibalize the springs (and wire). I dissected them using a proxxon (a dremmel variant gifted to Lin by my PhD buddy Claire) and glued them to a couple of PVC end caps.  If you look at the picture below you can see that one of the end caps consists of two pieces where one slides onto the main body and the other screws onto that piece. I glued the spring onto the inside lip of the larger piece, drilled a hole in the smaller cap to fit the jack plug and soldered it all together.  The connecting wires were passed through small holes drilled in the sides of the cap.  The black tape you can see is to secure the wire that connects the lower terminal with the jack socket.  I thought about passing the wire down the inside of the case, but I figured that having the wire on the outside would make it very obvious how far the wire can be stretched safely.  If it was on the inside someone might pull the cap off too hard/far and damage the battery pack - not good halfway through an experiment!

It turns out that the modified pumps and battery packs worked well.  The D batteries supplied enough juice to run the pumps at full pelt for over 16 hours;  Result!

Wednesday, December 7, 2011

CNC update

I just realised that I haven't posted about the CNC machine for over a year! Judging by the blog, it looks like I failed and let it die a quiet death... but in reality it's been pretty great; it is up and running and working better than I had originally hoped.

Admittedly, it took longer to get into a decent state than I had planned for, but then I never had a lot of time to dedicate to it and I am not "skilled in the art" (oh no, not by a long shot!). One of the main reasons for embarking on the CNC build was to push myself into learning a lot of new skills; with that in mind it's been a huge success :) I picked up more woodworking skills, some metal working skills, knowledge of CAD, CAM, gcode and learned a ton of other random facts and figures along the way. But, best of all, I have this amazing contraption in my garage that can craft things out of wood, plastic, foam and aluminum with speed and precision that I couldn't possibly hope to achieve by hand.

So, what have I done with it so far?  Well, a lot of the things I've made so far have been improvements and additions for the machine itself.  First off, I made some hold downs (thingyverse thing:776) and some knobs to go with them (gcode provided free by solsylva.com, which is where I bought the CNC plans from in the first place).




You can see the new knobs and a couple of the hold downs in use here, holding down some 1/2" MDF with some more hold downs being cut out.

At the start of the year I upgraded the leadscrews from all-thread to ACME rod (the cheap stuff from Enco) which meant that I needed new leadnuts (also from Enco) and leadnut holders - I designed these in CamBam and cut them out on the machine (after a few false starts mostly to do with my understanding of g-code).  I guess I should upload those designs to thingyverse really; though I'm not sure how useful they are to others.




The leadscrew upgrade removed a lot of backlash and resulted in faster and smoother performance.

I noticed that the cutting surface wasn't level so next up was to add some MDF planks and level them using the machine to mill the entire surface flat.  After spending a couple of hours following the router bit with a vacuum hose and still getting myself and everything in the garage covered in a fine layer of MDF dust (not nice) I decided the next upgrade should be a vacuum system - I went with the one described on the Solsylva site with one minor modification.  I had a lot of trouble getting the ring cut from a 2 liter plastic bottle to fit around the vacuum attachment, so I cut it open and attached it with duct tape...  frustrated, moi?  That was a bit unstable (and ugly) and I ended up replacing the tape with a #56 band clamp, which has been working fine so far.  I intend on cutting out a few more in order to have quick change vacuum feet with different length bristles on each of them.




It's not all been machine related production though.  Some of the first things I made were random carvings for the kids.  I carved their names into blocks of wood; made spirals, hearts and shapes for them to colour-in and mess around with; I made a few door signs for bathrooms; name plates for kids friends bedrooms; and a few other random objects.



I've also mocked up a small version of Carys' birthday present and cut it out on the machine.  I can't wait to be able to post about the completed full sized birthday project, but that's going to have to wait until it's finished. I love the fact that the kids birthday presents are always collaborative efforts with my lovely missus - all the projects are so much better when she's involved. Remember the colour conundrum?  That would just have been an ugly cardboard box with wires sticking out if it weren't for her creative talents and influence!



The current crop of unphotographed and unfinished projects include "kids name marble mazes" and rubber band guns.  I've been wondering how hard it would be to make simple versions of star wars ships like the millenium falcon and mill them out.  I guess I wouldn't be able to share the files though (or I'd risk getting sued).  The one thing I haven't really thought about is actually one of the reasons I thought the CNC machine would be ace - PCB milling.  It turns out that getting boards through DorkbotPDX is much simpler than milling your own (unless you're in a rush) and the results are fantastic - you can see a few of my completed boards here.

Tuesday, November 1, 2011

Techliminal PCB design workshop

A while ago, as part of the bay area workshop weekendTechliminal held a 3 hour "introduction to PCB layout" class instructed by Malcolm Knapp.  I'd tried using EAGLE a year ago when I first wanted to produce some schematics for my blog posts, but I found it a bit unintuitive and very frustrating.  I went along to the class hoping it would be a quick and easy way to get to grips with schematic design and board layout.  In short - it was.  Malcolm is a really good teacher and I think everyone in the class got to grips with the software pretty quickly and got a lot out of the session.  This course is being run again this coming weekend; if you're around and want to quickly get to grips with Eagle I strongly recommend signing up (just click here)!

After the class I headed home and immediately created my first schematic and board.  There are a few I want to make but I figured the simplest would be a board for the traffic lights I made for the kids ages ago.  I got a little bit carried away and made designs for a POV writer, an RGB LED night light and for a smaller version of "Dr Boardman's Color Conundrum".  Here's the first schematic for the POV writer:

And here's the board layout:



I was immensely proud to be able to put this together.  I know this is simple stuff for many people, but this isn't the easiest software to work out late at night (the only time I have available).

I submitted my gerber files to the DorkbotPDX PCB order and waited (eagerly).  The boards cost $4 per square inch (for which you get 3 copies of each board) and arrived a couple of weeks later. 

Here they are fresh from the fab:

That's four designs with two boards positioned so you can see the front and back of each (the boards are actually double sided).

I've had a chance to solder parts on to all of these.  Of course I found a couple of mistakes and oversights in these first designs, but that's no surprise really.  This is all a learning process.  They all work though - which is a big shocker!

All in all this has been a great experience.  It's fantastic to go from idea -> design -> PCB -> working device; this is very empowering.  I'll write more about the individual boards later, but for now I just wanted to post something to give a shout out to Malcom and to encourage anyone interested to head over to the workshop.



Wednesday, August 3, 2011

PVC Pipe goal posts

The girls have been going to summer "soccer" practice over at a local gymnasium  They've really been enjoying it and I thought it be fun to set up a goal at home for them to have a play with.  I noticed that the goal posts at the gym are made out of one of my favourite materials: PVC pipe (see herehere and here for more evidence on my apparent obsession).  So, I had a look online to get some inspiration by seeing what designs other people have come up with.  If you perform an image search for "pvc soccer goal" you should get a pretty good overview of the basic designs.

Afer sketching something on our blackboard and making sure the girls were excited by the idea we headed out to OSH to pick up the bits.  We decided on a goal which measured 4' wide, 3' tall and 2' deep and came home with 4 x 8' lengths of 1" pipe, 6 x 90 degree elbows and 4 x Tees.

Here it all is, cut to length all ready to be put together (this took less than 10 mins):


The lengths are: 2x 3'7"; 2 x 3'; 2 x 2'; 4 x 1'6"; and 2 x 1'.  Working out the lengths of the diagonal braces was the first time I've used Pythagoras' theorem in ages.

Here you can see my little helper, 'helping out' midway through the build (she was keen to get playing, bless her):



And here's the final product being put to good use:

I was hoping to find some netting at the same time as the pipes, but we had no joy.  It seems to work well enough without the net for now though (the kids have been enjoying it anyway).

I know things have been a little quiet around here recently.  It's mainly because we've just had a 50% increase in the number of girls in the house (sorry Lin, I'm not counting you).  If you're interested in meeting the latest addition, take a look at Lin's post - here.  Yes, this was from a month ago... as you can tell, Lin is much more on the ball than I am :)

Saturday, May 28, 2011

From Futon to Planter Boxes


When I first moved to the US, I had about 5 cardboard boxes of stuff to my name. None of those boxes contained any furniture and so a very kind young lady lent me her futon so that I'd have something comfy to sleep on. The futon has stayed with us from one move to the next, but it's time has come. It's last incarnation was as part of the kids bed (we merged the futon base with the main body of a kids single bed) but we recently bought a loft bed for them to share and the futon was suddenly in the way.  The mattress is currently a sofa/bed in the kids room which left this lovely source of untreated pine just staring at me wanting to be used.  Rather than put it on craigslist, I gave in to my urges and decided to transform it into something we needed (and would keep for a long time to come). We've been experimenting with growing fruit and veg in our back yard since last year so it seemed like a good use of the wood to make some planter boxes.

The base was kept together with bolts and screws - no glue! which made for a fun half hour with screwdrivers for me and the kids.

Here are the spoils (except the two 2"x2" poles which were bought at Home Despot):


I figured we could make a couple of planters from all this wood.  Lin had the bright idea of using some metal mesh we had left over (from some stacking wire storage cubes) as the base of the planters and it just so happens that the 2"x2" poles fit snugly in the corners after a bit of metal snipping.

After measuring the wood and the wire mesh, it turns out that I could make two planters around 17" tall.  I cut up the 2"x4" planks into smaller pieces each 14 1/4" in length and cut 4 legs from the 2"x2" - each measuring 17".

Here are a few rough sketches I made whilst trying to think it through:


And here are all the bits cut to length and ready to be assembled:


I routed out a 1/4" wide by 1/4" deep dado around 1/2" from the bottom on 4 of the small planks so that the wire mesh fitted snugly.





I routed out a similar channel on two adjacent sides of the legs (higher up though, so that the legs stick out the bottom) and then secured the planks to each other and to the legs with wood screws.


Then it was just a matter of attaching the rest of planks. I went for an alternating spiral like pattern.


To finish off I added a lip by cutting and mitering (45 degrees) some siding from the futon and gluing it on (with yellow wood glue).  The wood already had a groove in the middle which slotted nicely in place on top of the planters.  Then  the kids personalised them with some watered down food colouring.


I put on a couple of coats of polyurethane to protect them from the elements (i.e. the kids).  Lastly, Lin used some black plastic sheeting to line the inside and attached some cheap acrylic felt to the wire mesh to allow drainage.

The green planter already has some sugar snap peas sprouting out and the red one has some pole beans.  Can't wait to start munching on them! Om nom nom!



There's still quite a bit of wood left over (all the thicker pieces and the two widest planks).  I think I'll make those into another type of planter when I get the chance (similar to the one in the bottom left of the above picture).

I must get to posting a few more 'tronics' things...  The CNC machine has been up and running for months (and is an endless source/sink for tinkering/tweaking) and I have a load of things to post about it.  But I think some charlieplexed LEDs should come first since I mentioned them so long ago, built a few prototypes and then went silent.  In my defense, building the CNC machine took a lot of time and effort and we're expecting baby#3 any day now.  There always seems to be lots going on :)  Oh, I found an old Atlas Cabinetmakers saw at a garage sale down the road as well!  I think it was built around 1959 & I've got that up and running too.  Now that I've gotten over my fear of table saws it'll be good to use it for something creative.

Tuesday, March 15, 2011

Kid made go-kart



A few weekends ago we popped into the city to meet up with a blogger friend of Lin's. She was working with Gever Tulley on a tinkering workshop.  We were a little late but caught the tail end of people as things were winding down and being cleared away. Carys was very excited to see that the kids in the workshop had make some go-karts. She immediately wanted to make one of her own and when we got home she drew up some plans at the kitchen table.


I was so impressed with this that, of course, I had to help her build it.  We headed out and picked up a few supplies:
  1. 2' x 4' board of plywood (just about fits in the trunk of our Nissan Dissapointment)
  2. 4 casters (I got ones that were rated up to 80lb)
Everything else we had lying around (some 1" x 2" wood, wood screws, nylon rope).

The base of Carys' car is a big circle, so we first drew out two circles on the plywood (I thought we were going to make two cars, but we've only made one so far).  I wanted Carys to do as much of the building as possible so we drew the circle by hammering a nail at the center of the circle and then tying a pencil to the nail with some string.  I measured out enough string to have the pencil reach the edge of the board - this gave us a 2' diameter circle, plenty big enough for the kids to sit on.


I used a jigsaw to cut out the circle - this was the only step I didn't let Carys do (partly because she couldn't stand the noise and partly because she wouldn't take off her roller-skates).  The kids then sanded down the rough edges.




Time for a quick break :)  It turns out tape measures are also good for pulling people round on roller-skates. Who knew?


Then we cut a couple of lengths of 1' x 2' wood for attaching the casters to the base (this was part of Carys' plan).  Both Carys and Ffion had fun sawing the wood (with a hand saw).  Then I marked out the hole placements for the casters and Carys drilled the pilot holes.


Time to attach the casters. Carys was really steady and accurate with the drill, but she needed a little bit of extra weight (i.e. me pushing down on the back of the drill) when using the screwdriver bit.

Et voilĂ !

The plans also had a rope loop tied to the front to pull the car around with.  I decided to add handles to the side to keep the kids on the car during the inevitable speed racing.  I marked out the positions and Carys drilled the holes using a 1/2" drill bit - this looked comically large with her using it!  I put some scrap/sacrificial wood under the car whilst drilling so that the drill-bit didn't hit concrete on it's way out.

By now it was getting dark and cold so we retired to the kitchen where the kids set about decorating their creation using permanent markers.



Then it was just a matter of adding the rope (2 handles and 1 long line for pulling).

Carys is immensely proud of her car. Doing all the planning, building and decorating has given her an amazing sense of ownership and accomplishment. She's already planning a ton of new projects, unfortunately this includes a death-defying bionic zip line out of the bedroom window to the reclaimed play structure... I wonder if I can persuade her that she wants to build an electric guitar or a laser cutter.