Cubecube - an open-source hardware project - is a tangible, tactile interface for CAD (computer-aided design.) As open source design platforms continue to emerge, there is an opportunity to explore new possibilities in how we create. The Cubecube project aims to investigate the question: If there were a platform for using your hands to build three-dimensional computer models, what might it look like?
Essentially, I wanted to create a system that married one of my childhood passions - building tiny things with my hands - legos, constructs, etc - and my more recent obsession with creative coding and digital fabrication. So, this is a system that allows you to generate CAD geometry by stacking lego-like blocks!
Cubecube is open source. Source code for firmware and software, along with hardware designs and schematics, are available for free download on the internet. The current prototype is built completely around open-source creative platforms: its hardware is designed in Fritzing and connects with an Arduino Nano; its firmware is written in Arduino; its software is written in Processing. Full build instructions have been published on Instructables.com, which include step-by-step instructions with photos, a bill of materials, necessary files, and useful links to anyone interested in participating in this project.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Concept and Design.
The system behind Cubecube is simple. Its building blocks each contain a tiny resistor, and as they are stacked in parallel over a voltage divider, a change in voltage can be read by a microcontroller. Four analog multiplexers break the Nano’s inputs out into 64 discrete channels. Each channel, arranged into an 8x8 grid, reads a changing voltage determined by the number of cubes in the stack. The current prototype supports up to 640 cubes.
The Cubecube firmware and software, written by Kavinath Laud, was built in Arduino and Processing. The Cubecube Processing app utilizes Marius Watz’s Modelbuilder libraries to facilitate export of STL (stereo lithograrphy) format files. This makes it easy to interface directly with any 3-D printer system, and allows a user to extend Cubecube’s functionality with third party CAD environments.
The back-end of Cubecube is versatile. While designed as a CAD interface, it can be modified for any number of hardware-interface projects or experiments. Because it is designed with accessibility in mind, Cubecube can easily be hacked, iterated, appropriated or otherwise repurposed. The open source framework it was built around gives anyone the tools to make Cubecube their own.
Cubecube makes creating simple 3-D computer models as simple as building with blocks. The simplicity of its front-end allows for anyone who can grasp and stack objects the ability to engage with digital fabrication methodologies, and the accessibility of its back-end provides a starting point for further experimentation in the realm of tactile CAD interfaces. Cubecube offers a different way of thinking about computer-aided design, and provides a strange but familiar platform for creating.
Step 2: Required Tools.
Before we get started, I'd just like to mention that as this project involves potentially dangerous tools, it is important to take appropriate safety measures (use a solder fan, wear safety glasses!) I'm safe. I'm set.
For this project, you will need:
- soldering iron ($22.00 from Adafruit, here)
- solder wick
- tweezers ($2.73 from Amazon, here)
- Small fillips-head screwdriver
- Jeweler's saw ($24.56 from inventables, here)
- M2 tap ($20.03 from Amazon, here)
- Computer capable of running latest version of Processing (see system requirements here)
- "Third hand" soldering stand ($6.00 from Adafruit, here)
Additionally, it may be helpful to own or have access to:
- 3D Printer (ideally with a .4mm or smaller diameter nozzle)
- Laser cutter
- Soldering Flux
If you don't have access to a 3D printer, you might consider ordering prints from an online service. See "Step 6: 3D Printed Parts" for more information.
Step 3: Bill of Materials.
To build Cubecube, you'll first need to aquire the following materials and components:
Electrical (build plate):
- [x64] 1x2 Pin 0.1" Female Header ($0.05 from mdfly, here)
- [x3] 200 ohm 0603 SMD resistors ($0.10 from digikey, here)
- [x64] 499 ohm 0603 SMD resistors ($0.43 from digikey, here)
- [x1] Surface-mount RGB LED ($0.50 from Sparkfun, here)
- [x1] DC Barrel Power Jack ($0.95 from mdfly, here)
- [x1] Slide Switch ($0.75 from Sparkfun, here)
- [x4] SMD 16-Channel Analog Demultiplexer (from Digikey, here)
- [x1] SMD tactile switch ($0.75 from Digikey, here)
- [x1] 5v SMD voltage regulator ($0.74 from Mouser, here)
- [x1] SMD indicator LED ($0.46 from digikey, here)
- [x3] SMD 1x10 Pin 0.1" Female Header ($0.75 from Sparkfun, here)
- [x1] SMD 1uf capacitor ($0.46 from Digikey, here)
- [x1] SMD 10uf capacitor ($0.49 from Digikey, here)
- [x1] Arduino Nano (or compatible) micro controller board ($16.50 from Amazon, here)
- [x1] 12v 1A DC power supply ($5.20 from Amazon, here)
- [x1] Cubecube Circuit Board ($103.00 from Fritzing here - See 'Step 5: Fritzing Printed Circuit Board' for more info)
Electrical (Building Blocks):
- [x1] Cubecube Array Plate
- [x1] Cubecube bottom base plate
- [x?] Cubecube building blocks (however many you wish to make!)
See 'Step 6: 3D Printed Parts' for more information on printed components.
Step 4: Files to Download.
All of the files for Cubecube (designs, schematics, code) are completely free and open source. You'll need them if you'd like to build a Cubecube! You can find links to everything you'll need below:
Cubecube circuit board (made in Fritzing):
Cubecube design files (to be 3D printed and/or laser cut):
Cubecube software and firmware (Processing Source Code):
Step 5: Fritzing Printed Circuit Board
Cubecube was designed in Fritzing, a free and easy-to-use PCB editor. In addition to allowing you to output SVG and Gerber files to fabricate your own boards, Fritzing offers a PCB fabrication service.
While I make a lot of my own prototype PCBs, this one would be tricky as it has very tiny traces and incredibly small vias. So the best route for me was to simply order a board.
The board costs around $100.00 and ships from Germany. It is high quality and arrived in excellent condition in just over a week from the time I placed the order.
To order, simply follow this link:
And click on the "Fabricate This..." option. Fritzing will take you through the rest!
From there you can also download the Fritzing design file, in the event you'd like to check it or modify the design!
Step 6: 3D Printed Parts.
Cubecube is comprised partly of 3D printed parts. These include the array plate (the plate you build upon), the bottom base (though in this build I use a laser cut part for this), and the cubes themselves (the Cubecube building blocks.)
I printed these parts on an Up! 3D printer, as well as on a homebrew Prusa i3 reprap printer. You'll want to make sure your using a .4mm diameter nozzle, as anything larger will most likely fail to yield the resolution you'll need for these tiny parts.
Alternatively, if you do not own or have access to a 3D printer, I suggest trying out a 3D printing service like Shapeways or Ponoko. These services allow you to upload a 3D model, and for a fee it will be printed and shipped to you.
All of the designs and STL files for these parts can be found on thingiverse:
Step 7: Soldering SMD Components.
Most of the electrical components in this build are a surface mount (SMD) package. That means they are tiny, and often tricky to solder. I highly recommend watching this video from Fritzing, where they go over in detail tips and techniques on soldering these tiny and intricate circuits. This video taught me everything I know about SMD soldering... and the host has an awesome German accent to boot.
SMD soldering takes a bit of practice, especially with the really small components, but is definitely something I notice I keep getting better at!
Step 8: The Voltage Regulator Circuit.
The first step of populating the Cubecube circuit board is the voltage regulator circuit.
I started by soldering the slider switch, barrel jack and regulator, then added the capacitors. Take care to make sure the caps are properly placed and oriented, like in the photo here!
For the most part, Cubecube can run directly from the USB port on my laptop. The external power supply is an extra precaution (that I highly recommend) to keep the system from hogging too much of your computer's precious USB power.
The regulator circuit consists of a surface-mount 5v regulator chip, and two electrolytic filtering capacitors (these keep electrical noise around the analog circuitry to a minimum!) A DC barrel jack connects to the power supply (I recommend a 6-9v supply - the one I mention in the Bill of Materials works great!) and the slide switch opens and closes the external power circuit.
Step 9: Tacticle Switch and Indicator LEDs.
Next up: soldering the indicator LED and the (very minimal) button interface.
The indicator LED just confirms that the board is getting power. The RGB led and tactile button are for additional functionality that will be added later as the Cubecube project develops (for example, to toggle different "types" of blocks).
Step 10: Arduino Nano + Headers.
'Making' the headers:
It was tricky to source SMD female headers in the right configuration for the arduino Nano, so I made my own!
I purchased 10-position headers from Sparkfun (see Bill of Materials) and cut them with a Jeweler's saw.
Be sure to cut slowly - it will help you stay steady and means less time trying to clean up your cuts with sandpaper.
Soldering the headers:
Once your headers are cut, and you've made sure they line up properly with the pads labeled "MICRO" on the cubecube board, you are ready to solder.
With the female headers pushed onto the male headers on the Nano, place the Nano over the correct pads on the Cubecube board (see image).
Solder the outside leads, then (carefully) remove the Arduino Nano from the female headers so you can solder the inside traces. When all is soldered, relplace the Arduino, and you're ready to move on!
Step 11: Quick Test Run...
At this point a good portion of the board is complete and you are ready for a test run. Follow the video here. If the indicators on the Cubecube board or the Arduino Nano don't light up, check your solders joints and make sure you didnt forget to solder any leads!
Step 12: Analog Mux Chips
To break the Arduino Nano's pins out to 64 analog inputs, I used four 16-channel surface-mount multiplexor/demultiplexor chips (often referred to as a "mux" or "demux".)
Buildr has a great writeup about these chips - this is where I began my experimentation with them! I highly recommend it:
These can be very tricky to solder, so I recommend following along slowly with the Fritzing video from 'Step 7: Soldering SMD Components'.
Step 13: Voltage Divider Resistors.
This is where the magic happens on the Cubecube board. These resistors create a voltage divider between the blocks and the analog inputs on the Cubecube array. That means that by stacking blocks, which basically add resistors in parallel to the divider, we can read a change in voltage to the analog input. Cubecube takes that information, and maps to to display a changing number of blocks on the computer! Simple, yet precise.
Each spot on the grid needs its own 499 ohm resistor, so you've got 64 of these to solder! By the time you're done you'll be a SMD-soldering pro.
Step 14: Assembling and Soldering the Cubecube Array.
The Cubecube 'array' is very simple to construct. After printing the array plate, simple populate it by inserting the *regular length* two-position female headers into the slots of the plate. See the video here for more information.
Once populated, the leds of the female headers will align perfectly with the holes in the Cubecube circuit board. Simply pop them through and solder!
Step 15: Cubecube Platform: Final Assembly.
We're almost done with the Cubecube platform! It's time for finishing touches. You'll need: The bottom plate, your 16mm m2 standoffs, an m2 tap and some rubber feet.
First, thread the 7 holes in the base plate with your m2 tap.
Next, screw the standoffs' "bolt" sides into each hole.
The Cubecube PCB should perch nicely atop the standoffs. Mount in in place with your m2 bolts.
The last (and my favorite) step is adding your adhesive-backed rubber feet!
Your Cubecube platform is complete! Only thing left now is to make some cubes...
Step 16: Building Cubecubes.
The cubes are tricky, but something you'll get quite good at after making the first handful.
Creating the header:
I was unable to source a two-position stacking female header, so I again decided to make my own.
I instead bought 10-position stacking female headers and two-position "regular" female headers (see Bill of Materials). I simply removed the legs from each using a pliers, and swapped them!
This might seem like a waste - but if you take the time to put the unused legs back into the unused housings, you'll have some spare 10-position "regular" female headers for a future project.
Creating the tiny PCB
Next you'll need to cut a tiny little two-position PCB from your double-sided solder bread board (See Bill of Materials.) I used a Jeweler's saw to cut them apart - they saw through PCB like butter.
Soldering and assembling the cube:
Once the PCB is cut and placed on the female header's legs, you're ready to solder the 2.2k ohm resistors between the leads. I found it is actually easiest to solder the sides of the resistor along with the sides of the header. See the video here for a walk-through.
Step 17: Arduino Firmware.
The firmware for Cubecube was written in - and runs on - Arduino, an open-source hardware platform and framework of libraries for creative coding (see http://arduino.cc for more information).
The arduino software is pretty straight forward - just plug in your Arduino Nano, open the file titled "cubecube_firmware" (from the cubecube_arduino.zip) in Arduino, and upload.
If it uploaded properly the RGB led should hold a steady RED.
Step 18: Processing Software.
The software for Cubecube was written in Processing, an open-source hardware platform and framework of libraries for creative coding (see http://www.processing.org/ for more information).
The processing software uses Marius Wattz' "Modelbuilder" library, so be sure to move it into your processing library directory.
The only other step you'll need to take is to change the port number at the beginning of the processing sketch to the correct number (this will depend on the number of serial devices connected to your machine.) Mine was port 0.
With those two things checked, you're ready to run Cubecube!
Step 19: Output.
To output an STL file, simply press the space bar at any time while the Cubecube Processing sketch is running. A file named "output.stl" will be generated in the Cubecube software's sketch folder.
Watch the video in this step for more information on outputting from Cubecube and extending it's functionality with 3D printers and 3rd party modeling environments!
Step 20: Demonstration!
I always loved building with Legos, and I've more recently found a passion for CAD. I couldnt have guessed how fun it would be to combine the two...
This project is still very much in progress... And I sincerely invite anyone interested to iterate, add to, and/or improve this design!
For more information, visit http://cubecu.be
Thanks for reading, and please vote for this instructable!