Robotic Diaper Cake


Our friends over at J&A Photography came to us with an interesting proposition – a robotic diaper cake. . .we were all ears!

The concept was an “over the top” diaper cake that had fish rotating around it. Later there was some scope creep and we wound up with a bunch of RGB LED’s as well. . .


First, some stats:

  • 13 custom printed circuit boards
  • 2 custom machined drive-wheels
  • 2 geared DC motors with constant tension assemblies
  • 14 RGB LED’s (pulse-width modulated)
  • 1 microcontroller
  • 8 AA batteries
  • rubber bands and hot glue (no duct tape. . .but there was superglue!)

Electronics Overview

Each of the top two tiers has lights on the bottom which are RGB LED’s. Mixing different portions of the primary colors (via PWM) enables us to produce any color we’d like. The firmware was borrowed from an LED mood light project originally done in the UK. It cycles through different, pleasing colors. Using already-available firmware enabled us to concentrate more on the mechanics and electrical hardware – and less on trying to mix colors that made something pleasing to the eye instead of a nasty brown! There are several different modes that can be cycled through, from pleasant fading effects between pastel colors to some really obnoxious blinking patterns that mimic police lights.

{gallery link=diaperCake index=2}diaperCakeLDO SCH{/gallery}


{gallery link=diaperCake index=3}diaperCakeMCU SCH{/gallery}

The electronics hardware includes 1 custom control board and 12 LED carrier boards. The control board consists primarily of a 3.3V LDO, a PIC12F629 micro controller and some transistors to sink current from the 12 RGB LED’s – 8 on the bottom tier and 4 on the top tier. There is also circuitry on-board for an audio amplifier, so you could plug in an ipod, etc. This circuitry was left unpopulated due to IC packaging confusion, a missing speaker, and time-constraints.

We strongly considered adding a second micro-controller, motor control, and changing out the geared DC motors for stepper motors. This was partly because the steppers may have provided smoother motion and quieter operation, but mainly so we could call it a Dual Core Diaper Cake – that just had a certain ring to it. . . probably the double alliteration. . .


Driving RGB LED’s

Being a diaper cake, we didn’t need absolute color accuracy, but we did need it to run from a handful of AA batteries. These two requirements, in addition to the fact that separate RGB anode/cathode LED’s are a little more expensive than ones with a common anode lead us down the path of using common anode RGB LED’s, driven in parallel.

Series vs. Parallel

When driving LED’s and using them for illumination (vs simply hooking up an LED as a simple indicator), light output is important. In most applications, uniform light output is also desirable. In order to have uniform light output across many LED’s, they need to have the same amount fo current flowing through all of them. When translated to RGB LED’s, this means that if you have a slightly different current flowing through the different R, G, and B portions, you’ll wind up with a slightly different color than intended – this is quite common when driving LED’s in parallel, like we’re doing. In some applications, this is detrimental – for us it just doens’t matter that much – after all – we’re just trying to get some cool looking light to shine on some diapers!

3 RGB LED’s in a series would look like this:{gallery link=diaperCake index=4}seriesLEDs{/gallery}

Assuming 3Vf for each of the diodes @ 20mA, each string will require 9V @20mA, for a total of 60mA from a 9V supply.

Pro’s Con’s
Each LED in a string has the same current flowing through it

(same brightness per color==uniform color throughout the string)

Requires higher voltage to drive entire string
Less total current required More drive electronics if lower supply voltage is used (more than one series string per color)



3RGB LED’s in parallel winds up looking like this:{gallery link=diaperCake index=5}parallelLEDS{/gallery}

Again, assuming 3Vf for each of the diodes @ 20mA, each RGB LED requires 3V @ 60mA, for a total of 180mA from a 3V supply.

Pro’s Con’s
Lower voltage required to drive entire string Each LED in a string can have different current flowing through it

(non-uniform colors throughout string)

Only one set of drive electronics per color required Higher current required to drive entire string


Based on experimentation with our geared DC motors, we were already going to have 8AA batteries (in series) on the diaper cake. Standard NiMh batteries output a nominal 1.2V per cell, so we’d have ~9.6V to work with. The least expensive RGB LED’s we could find had a nominal voltage drop of 3.2V (4V max), so we’d only be able to drive 2 (maybe 3) LED’s in series, or use more batteries. Because of the size of the lower tier, we’d need around 8LED’s to light it evenly, plus another 4 for the top tier. So, series LED’s would either require adding batteries in series, or more wiring and more electronics. Since the current requirement for all 12 LED’s (20mA * 12 * 3) was still a fairly modest at around 720mA, so large current wouldn’t be a concern.


Audio Amplifier{gallery link=diaperCake index=6}audioAmp{/gallery}

An audio amplifier circuit based on an LM386 was included (but remains completely untested). The circuit is simply an implementation of one of the reference designs from the datasheet. The circuitry was never populated due to a listing mistake from Mouser – they had a SMD description with a through-hole part. We made the board based on the SMT package, but received a PTH component. Due to time constraints, the PCB wasn’t re-spun.


Mechanical Overview

The mechanics of the moving fish are straight forward – a motor rotates a small wheel which turns a large diameter “belt” that moves around the outer diameter of a tier. The belt is captivated by a groove in the tier, an outer spacer, and a bottom cap. For aesthetics , we wanted to hide as much of the belt as possible, which is why it is inverted (otherwise the cap wouldn’t have been completely necessary since gravity would be helping us out). While all of this sounds fairly straight-forward – fabricating it was more challenging than it should have been.

The materials chosen were hanger strap and some particle board. The particle board was chosen over MDF because it was a bit lighter – in retrospect, MDF should have been used because it has much better machinability than particle board.

The hanger strap was chosen because it was on-hand and initial proof-of-concept tests with it were promising. A timing belt approach was also suggested and considered, but abandoned because of the anticipated cost.


hangingStrap particleBoard
hanger strap particle board

The motors needed some sort of wheel with a large enough diameter that would allow the motor to sit back far enough from the belt to provide clearance for the wires that would be used to mount the fish. The drive wheels were made using a CNC mill. There were also several smaller diameter wheels made to sit opposite the drive wheel. The idea here was to reduce the amount of friction instead of having the drive wheel press the belt into the side of the groove, it would roll between a couple of other wheels.

{gallery link=diaperCake index=26}motorDriveAssembly{/gallery}

As expected, there was a fair amount of tear out with the particle board when the channel was routed. This uneven surface most likely created friction with all of the holes in the hanging strap. As a result, the motion wasn’t nearly as smooth as it could have been. Couple this with the geared DC motor that wasn’t geared down quite enough and we wound up with some fairly undesirable motion. Several variations on the motor drive mechanism were tried, what wound up working the best was simply using a rubber band to maintain tension between the motor drive wheel and the hanger strap.

Putting It All Together

{gallery link=diaperCake index=8}ElectronicsPCBA{/gallery}The electronics etched poorly, but were usable.  The poor etching was primarily due to a very old laser printer that’s printed over half a million pages on the original toner fuser and doesn’t put a thick enough coating of toner on the copper.

The final implementation of the motor mount and drive wound up looking like this.  The string of LED’s underneath the tier are also visible.  The individual LED carrier boards were soldered together with ribbon cable and simply hot glued to the particle board.

{gallery link=diaperCake index=10}MotorMount1{/gallery} {gallery link=diaperCake index=11}MotorMount2{/gallery} {gallery link=diaperCake index=13}




{gallery link=diaperCake index=9}MiddleTeirUnderside{/gallery}Solid copper wires were soldered onto the track and bent to bring the fish closer to the outside of the tiers.  A small length of copper wire was pushed and glued to each fish adn then soldered onto the piece hanging from the track.  This provided a solid way for the fish to ride around the track without spining around swaying enough to get caught on anything (there was only an 1/8″ clearance in some spots).


Overall, things turned out fairly well, but the motion of the fish was a lot rougher than intended – but hey, fish don’t swim the same speed all the time anyway, right!

Here’s a complete gallery of images.  Click on any image to see a larger copy as well as some descriptions of what you’re actually looking at.

{gallery id=diaperCake}diaperCake{/gallery}

Posted in Electronics Tagged with: , , , , , , , , , , , ,
  • Patrick

    Cool – I wish I had a diaper cake – but I imagine it doesn’t taste as good as it looks!

    • bamos

      Definitely wouldn’t taste (or smell) very good – I’m just glad they didn’t put the diapers on until it left my house 😉