Introduction: Arduino Dollhouse

A fun project for learning basic Arduino programming, 3D printing, PCB construction, component soldering, wiring - all guaranteed to let you enjoy yourself AT LEAST as much as your child:)

Step 1: What You'll Need

Your needs may vary according to dollhouse size, LED type, screw mount, available 3D printer etc., but this is what I used for my dollhouse:

  • An Arduino Uno Board
  • A custom-designed circuit board (PCB)
    • Gerber files suitable for shipping to a PCB manufacturer are included in the instructable, if you do not wish to design your own
  • 6 3D printed lampshades
    • If you wish to build your own lampshade from scratch, instructions for doing so in SolidWorks are included
    • If you just wish to modify my design, the SolidWorks file used to design the lampshades shown in the images is also included
    • Should you wish to use my design as is, an STL file is included, ready to ship to a 3D printing service
  • 12 (6x2) super bright LEDs. I used some with a specification of 13.200 mCa, 3.6 forward current and 20 mA forward voltage. You will need to know these values in order to specify the resistor values below - instructions for calculating the necessary resistance is included in the instructable
  • 12 (6x2) resistors - with the LEDs specified above, these should be around 85 ohms
  • 6 10 kOhms resistors for correctly mounting the switches to the Arduino Uno
  • 12 two-input screw terminals for PCB mounting
    • The attached PCB design is for screw terminals with a pin spacing of 0.2 inches (0.508mm)
    • If you cannot find screw terminals of this size, you will need to edit the PCB design. I have included the original Fritzing design file if this is the case
  • Pinheaders corresponding to the Arduino Uno Shield holes: 2x8 pins, 1x6 pins, and 1x10 pins
  • A 5V power supply with a minimum of 0.5A
  • 6 microswitches - any type will do. I used 4 pin switches, mainly for mechanical stability - only two pins are needed
  • Wires - lots of wires - it's amazing the amount of wiring needed:)
  • A felt marker
  • Tape for marking the wires
  • Double sided bonding tape for mounting the lamps to the ceiling of the dollhouse

Step 2: Designing and Printing the Lampshades

The lampshades were designed in SolidWorks. My SolidWorks file and corresponding STL file ready for slicing and printing using your favorite 3D printing software are also attached if you want to use my design as is. Should you wish to construct your own lampshades, a description of the steps I used in SolidWorks follows:

Creating the initial shape:

  1. Select a plane to begin sketching (I chose the Top Plane) and select "Sketch"
  2. Draw an ellipse, beginning from the central "Origo" point. Never mind the dimensions - these will fixed later on.
  3. Draw a horisontal line from the Origo to the right side of your ellipse, and a vertical line from the Origo to the top of your ellipse (press Esc between iterations to get two separate lines).
  4. Choose the "Trim Entities" tool and draw across the ellipse lines of the 3/4 of the circle we do not need (see the first image above)
  5. Select the "Smart Dimension" tool, click on each of the lines and select your dimensions - I chose 17.5 mm for my radius, and 10 mm for my height
  6. Click "Exit sketch" and choose "Revolved Boss/Base" from the "Features" tab
  7. If the tool does not select the vertical line as the "Axis of Revolution", select this and hit OK (the check mark)

Hollowing out the initial shape

  1. Choose the "Shell" operation in the "Features" tab
  2. Click on the bottom (flat) face, select the thickness of your shell (in my version it is 1mm thick)
  3. Click OK (the checkmark)

Creating an embossed design on the lampshade

  1. Create an offset plane by choosing the "Reference Geometry -> Plane" option on the "Features" tab
  2. Click on the plus (+) sign immediately to the right of the Plane specifications and select the Front Plane
  3. Choose the distance in the "First Reference" part of the panel and set it above your model height (as I chose 10mm height, I have set this distance to 12mm)
  4. Click OK (the checkmark)
  5. Select the newly created Plane 1, and select "Sketch"
  6. Here you can draw whatever design you wish - since I wanted a spiraled design I initially created two circles, one corresponding to the inner surface of the shell, the other with a radius of 3 mm. I then drew two points in the middle, to the right of the origo, and specified the dimensions shown in image 5. I then drew curves using the "Spline" tool along each point. Next, the "Trim Entities" tool was used to remove all but the enclosed spoke of the design. Finally, a "Circular Sketch Pattern" was used to create 16 spokes along the design
  7. Choose "Exit Sketch" and choose "Extruded Cut" in the "Features" tab
  8. In the "From" section, choose the curved surface of your initial shell, and set the depth to 0.5 mm using a "Blind" approach.
  9. Click OK (the checkmark)

Constructing the base of the lampshade

Next up, we will construct the base of the lampshade. In my design, I have two flat outer surfaces for attaching the lampshade to the ceiling together with a hollow middle section for holding my LEDs, resistors, and wiring together with a small hole for allowing the wires to exit.

Create the inlaid surface for mounting the LEDs

  1. Begin by construction another plane by choosing the "Reference Geometry -> Plane" tool. Click on the flat perimeter of the bottom of the lampshade and choose a distance of 3mm - you may need to flip the offset, if the plane is outside your model
  2. Click OK (the check mark)
  3. Click on the newly create plane, and select "Sketch"
  4. Draw a circle from the origo to the inner surface of the shell and click "Exit Sketch"
  5. Choose "Extruded Boss/Base", set the depth to 1mm and click OK (the checkmark)

Create holes for mounting the LEDs

  1. Click on the inlaid surface, just created above and choose "Sketch"
  2. Create a point on the same vertical position as the origo, with a horisontal distance of 3 mm (see the images above)
  3. Choose the "Circle" operation, click the point, and use the Smart Dimension tool to set the size to 5mm (or whatever the diameter of your LED is).
  4. Choose a Circular Sketch Pattern to copy this circle, set the number to 2 (or higher if you wish more LEDs) and choose the origo as the center point.
  5. Click OK (the checkmark)
  6. Choose the "Extruded Cut" operation, select the sketch just created, and set the depth to 1mm (or the same as the depth of the extruded surface created in the step above) and click OK (the checkmark)

Create wire exit hole

  1. If you chose "Top Plane" as your reference plane in the very first step, choose "Top Plane" again - if not, just choose the plane initially selected. Click "Sketch"
  2. Draw a "Circle" at the bottom of your lampshade, vertically centered under the origo. Set the diameter to 2 mm (or thicker depending on the diameter of the wires you wish to use)
  3. Click "Exit Sketch" and select the "Extruded Cut" tool
  4. Set the "Direction" to be "Through All" instead of "Blind" and click OK (the checkmark)

Create the base

  1. Click on the inlaid surface (the same as chosen when you created surface for the LED holes above) and choose "Sketch"
  2. Draw a "Center Rectangle" centered on the origo - make it large enough vertically to extend outside the model, and set the width be approx. half as wide as the model. Check off the "For construction" option before clicking OK (the checkmark).
  3. Using the "Smart Dimension" tool, set the width of the rectangle to 15mm
  4. Draw a circle corresponding to the inside of the shell
  5. Using the "Trim Entities" tool, remove all the lines in the center leaving two circular lines at each horisontal end. Use the "Line" tool to close each circular line and click "Exit Sketch"
  6. Choose "Extruded Boss/Base", select the "Up to Surface" instead of "Blind" under "Direction" and click on the small flat bottom lip around the periphery of the shell
  7. Click OK (the checkmark)

That's it - you now have a lampshade. If you wish to 3D print it, choose "Save as" and "STL" as the output choice. You may wish to increase the resolution in the "Options" part, if you dislike the slightly angular standard output. In my case, I set it to 0.005 to get very smooth surfaces.

Step 3: Create LED Lamps

Using the previously 3D printed lampshades, it is now time to mount the LEDs.

For my project, I chose two 5mm super bright white LEDs - they have to be very bright in order to light up the dollhouse - the rated brightness was 13800mCd per LED.

Using the wizard created by the LED center, I calculated the correct resistor value for reducing supply current. Using the supplier information for my LEDs, my calculation inputs were as follows:

  • Supply voltage: 5V (from the Arduino)
  • Forward voltage: 3.6V
  • Forward current: 20mA

This yielded the wiring diagram shown in the image above. The necessary resistors were specified as 82 ohm - as I had none of these I ended up using 100 ohm resistors instead. Unfortunately, this yields a reduction in brightness...

Mounting the LEDs

Time to insert the LEDs into the lamp shades:

  1. Insert the LEDs, and bend the legs 90° in opposite directions. Ensure that the legs are parallel to the sides of the recessed hole in the lamp shades. Be very sure to remember to orient the long legs (anodes, +) and short legs (cathodes, -) so they point in the same direction!
  2. Take the LEDs out, apply superglue to the base and reinsert the LEDs - and leave to dry according to the glue specifications
  3. When the glue is dry, shorten the cathode legs using a wire cutter - do NOT cut the anode legs yet
  4. Shorten the legs of the resistors, and solder one end on each LED cathode legs. Twist the other legs together and solder them.
  5. Shorten the anode legs using a wire cutter, twist them so they come together and solder them

Your lamps are now ready for mounting in the dollhouse!

Step 4: Designing the Arduino Uno Shield

Following many failed attempts to create prototype shields, I finally capitulated and created a PCB board to create a custom Arduino Uno shield.

I used Fritzing to create the PCB layout, and have attached the corresponding .fzz file if you wish to modify it. Also attached are Gerber files, suitable for ordering a PCB print online.

L1-6 designated LED outputs, B1-6 are the buttons. I used two-input screw terminals for attaching the wires from the dollhouse to the Arduino Shield with a pin spacing of 5.08 mm (0.2 inches) - should you have different screw terminals, the PCB board layout may have to adjusted. Above each button screw terminal, a 10 kOhm resistor has to be mounted. All the holes along the sides of the board have to be mounted with pin headers - make sure to get the long versions if you wish to avoid snipping the legs of the screw terminals later - the USB plug on the Arduino board is rather tall...

  1. Order a PCB form an online PCB printer
  2. Mount and solder the screw terminals and resistors on the side of the PCB shown in the first image - use this for reference. Mark the LED and Button sides on the PCB board using a felt marker
  3. Since the positive and negative terminals of the LED screw terminals DO matter, mark the negative screws using a black felt marker - the negative terminals are positioned towards the side with the fewest pin header holes
  4. Mount and solder the pin headers on the reverse side

Step 5: Arduino Programming

To program the Arduino Uno, you will need to download the Arduino software from the Arduino Homepage. Install according to instructions.

The Dollhouse LED control code uses a timer library, initially created by Simon Monk. Download this library, and unpack it into the default Arduino folder (Documents -> Libraries on OS X, My Documents -> Libraries on Windows - more information available here).

Once Arduino is installed, download the attached .ino file, containing the code for the Dollhouse LED control.

By default, the LEDs are turned on for a period of 15 seconds. If you wish to change this, edit the ledOnTime variable to suit you. Should you wish to modify the code, you may find it useful to change the debug variable to true in order to be able to monitor the serial output to see the current status of buttons and LEDs.

Step 6: Wire It Up!

Now the time has come for you to wire the dollhouse!

Personally, I began by drilling holes for the switches - since I have a rather sturdy KidCraft dollhouse, this was no problem at all on my end. I used small microswitches with 4 pins to stabilize them - only two diagonal pins were used to attach the wires.

When wiring, I found it easiest to install the buttons first using the following method:

  1. Measure the distance from the spot you wish to place the switch to the Arduino Uno location (along all the necessary twists and turns) and cut two wires. Strip and pre solder each end.
  2. Drill mounting holes for the switch, thread two diagonal holes with the pre soldered wires.
  3. Solder the wires onto the switch
  4. Press the switch into the drill holes.
  5. Drill any necessary holes for exiting the wires and thread the wires through
  6. Mark the wire pairs using tape and a felt marker. Since my dollhouse has three levels, with two rooms per level, I chose a scheme of a letter marking whether the wires belonged to a button (B) or an LED (L). Second I used a numeric designation of the floor (0, 1 or 2) and a final marking of the side (L/R). Thus, my labels read as follows: B2R, L2R, B2L, L2L, B1R, L1R, B1L, L1L, B0R, L0R, B0L, L0L

Next, the LED lamps will be wired and mounted:

  1. Measure the distance from the lamp to the Arduino Uno location (again: accord for necessary twists and turns) and cut a wire twice as long. Strip and pre solder each end of the long wire, but do not divide it yet (the distance from the positive/negative terminal is not equal).
  2. Solder one end onto the twisted resistors (the cathode end) and the other onto the anode end of the lamp.
  3. Cut the wire in the middle, and strip + pre solder the ends.
  4. IMPORTANT: Mark the distant end of the cathode wire (the one from the resistors), so you can find it when you have threaded the wire through the exit hole.
  5. Drill any necessary holes for exiting the wires and thread the wires through
  6. Mark the wire pair using tape and a felt marker using e.g. the scheme outlined above

Finally, use the screw terminals for mounting the wires - remember: Buttons/LEDs are paired - the top left button terminal corresponds to the top left LED terminal and so forth. Also remember to insert the marked cathode (-) wires into the negative screw terminals, you marked earlier.

Supply the Arduino with a 5V power supply and light her up!

Arduino All The Things! Contest

Participated in the
Arduino All The Things! Contest