This page explains how to construct wooden box that opens and closes with a solenoid and that houses an RGB LED. I plan to use the boxes as percussive, visual instruments in a composition for various handmade electronic instruments.


CREATE CIRCUIT
I chose to isolate the power used to activate the solenoid from the control source (the Arduino and computer) by making an optoisolated DC switch. I modified the schematic found at THIS website which contains a great explanation for how the optoisolator works.

I added the resistors and connection for the RGB LED on the board as well. Here is the schematic for the RGB LED circuit (found in the comment by todbot on THIS page, the RadioShack LED I used and the finished board (I’m also including the pictures of the breadboard layout).


I cut the lead all the same length so they would fit in the solderless socket I put in the board (I included the socket, which is really an 8 pin IC scoket [RadioShack 276-1995], instead of soldering the LED in the board just in case I gave it too much power and burned it out during the experiementing stage of the project).



BUILD THE WOODEN BOX

I cut the 1/2inch thick MDF board for a four inch tall six inch square box (4x6x6) – so that is =
(2)5×4
(2)6×4
(1)5×5
(1)6×8

cut the box where the ethernet cable jack (RJ45) will be mounted (I used ethernet cable because I had a need for 8 wires – I would like to make all my electronic instruments using ethernet cable to keep things consistent)


drill pilot holes for the screws before gluing (the first box I did I did not use any screws, I used dowel rods and glue instead – this meant a great deal of time had to be set aside for the box to dry while being clamped; with screws no clamps were needed and I could continue working on the project)



the box all glued and screwed together

add hinges and top

cut out a piece to hold the ethernet jack secure in the box(as seen below)


glue a piece of wood inside the box (using dowel rods) to mount the electronics on


make sure the dowel rods and screw lay flat with the bottom

mount the electronic board with a screw; cut a hole in the back wall, feed the wires form the solenoid through the hole and connect them to the blue socket

drill holes in the back wall at an angle for the solenoid mount

add bolts, add a drop of Locktight and add washers and nuts

add solenoid mount and solenoid (I used a very powerful Guardian solenoid = LT8X16-I-12VDC)

drill holes in the top and connect solenoid piston with insolated wire (I put a rubber washer where seen in order to keep the top from hitting the metal of the piston and making extra noise)

because I did so much experimenting to find out what works the best, I needed to fill the holes with wood filler before painting

painted completed box

ethernet cable plugged in

this is how I routed everything to ethernet cable – I would like to find an easier way to get ethernet to a breadboard

here is the setup plugged into my computer (I ended up having to use two power sources (one for each of the two boxes I made) because I didn’t have a high enough amperage DC source

Things I changed about the final product:

I first tried to mount the solenoid on the inside of the box with a spring on the outside so that the solenoid pulled the box closed rather than open


this didn’t work for a number of reasons – 1) the solenoid would burn up if I wanted an especailly long moment with the boxes closed, 2) it is difficult getting the box to pull closed perfectly and not pull too far or not quite enough, 3) the spring is not consistant – the resistance of the spring differs when open and closed, 4) the spring makes noise
Max/MSP
I hooked the boxes up to my Axiom49 through Max/MSP using THIS patch (you must also have THIS arduino.pat object in the same folder before opening the patch) and loading Pd_firmware.pde on the Arduino from THIS website. By doing this I can control the brightness and color of the LEDs with sliders and the box opening and closing with the assignable buttons below the sliders.
