Saturday, June 7, 2014

Useless Lamp - Mindstorms EV3

For our final project in one of my classes, we had to create an art piece based on a movement we studied. I picked Dada, and this is my project, Lamp. Here's a video of it in action.

I built the project using two mindstorms large motors and a pressure sensor. There are two halves to the mechanism - the "useless box" half, and the half that controls the lamp. The lamp in particular I used had a wheel switch that I had to to try three different ways of operating, finally taking it apart and reworking it as a button. The box decorations are made of vinyl and fabric I had lying around the house. I'm only going to talk about the mechanisms involved in making your own useless lamp. The rest is up to you.

Note: I used both NXT and EV3 pieces in my project, but you should be able to find all the pieces used in an EV3 kit.

You're going to need:

2 Large Motors
1 Pressure Sensor
5 Blue Crossbar Connecters
5 Blue Long Connecters
XX Black Connecters
5 Length four L pieces
1 Length five L piece
4 Gray Double connecters
1 Length two bar
1 Length two bar
3 Length five bar
1 Length three crossbar
1 Length five crossbar
4 Long Double-Bend
2 Length nine angled bars
1 Length three double sided bar (top left)
1 Computer with Mindstorms software
1 EV3 brain
3 sensor/motor cables
1 USB/Mindstorms cable
1 Lamp with a switch
1 roll of duct tape/gorrilla tape
1 roll of masking tape

Part 1: Building the "Useless Machine"

Final Build:

First, attach the sensor to the motor using the double-bend bars

The long connectors should go through the two rows of bar shown on the motor in the picture and the sensor's bar (beneath it in the picture) so that the sensor is held between the two bars.

The 'switch' should swing freely. It's attached to two length 4 L bars by a long connecter, and the bars are attached to the double bend arms, so that the switch, when pushed forward, presses on the pressure sensor. 

This is the arm that pushes the switch back into position after its been pressed. It's attached to the motor.

Part 2: Controlling the Lamp

This section is specifically for lamps that are controlled by a spinning switch. However, lamps controlled by buttons or flick switches could probably use a similar set up. 
First, use a screwdriver and take out the screw that holds the two halves of your switch together. It should look something like this: 

If you look closely, you will see that there are two small incisions in the cord on the left side, and two protruding metal pieces on the right side. If you plug in the lamp and press the two sides together so the holes and protrusions match up, the circuit is complete and the lamp should light up. Pull them apart, and the lamp turns off. Because I couldn't get the switch to spin consistently, I used this trick to turn the switch into a push button.

Tape down the cord in its half of the switch with thin strips of masking tape. Be careful not to cover the holes for the pegs or the slits in the cord.

Attatch the two long bars to the bottom of the motor using black connecters, and a double gray connecter on each side right behind them.

Then attach a Length 3 bar to a length 5 bar, and the length 5 bar between the others, Like this:

Next, we assemble the 'base' the switch will sit on.

The mechanism has to be pretty solid, so the table should be connected to the top of the motor as well.

 And, finally, the arm that holds the switch in place

And the arm that will press down on the switch

The switch slips into the mechanism like so

Push the two sides together underneath the L bars, but DONT SCREW THEM ON. Instead, use masking tape to attach the power cord to the base to hold it in place and roll up small balls to attach the top of the switch to the pressure arms.

Wrap duct tape around the mechanism to hold the base to the motor. This will keep the pressure arms from breaking apart the legos.

Now for the calibration. The program is relatively simple, but it can take some work to position the switch correctly so that it turns on and off with the motor. Gently squeeze the switch with the pressure arms (while the program isn't running) so that the lamp lights up when plugged in. Adjust the pressure until the lamp only lights up while you're squeezing. This can take some time and effort, so be

Next, you position everything in the box. You can cut holes to feed the lamp's cord wherever you please. Use the duct tape to fasten everything down. You may have to  recalibrate the switch.

IF you want, you can decorate the moving "useless box" arm with tape and paper.

And be sure to add a place for the lever and the arm on the top! I made a flap out of vinyl and card stock.

Then you're done. Decorate and attach your lamp however you like.  ONce you've loaded the program, you should be able to just plug it in, turn it on, check the calibration, and get rolling. My class thought the project was great, and I hope you do too.