(A.K.A as the Annoying IKEA Lamp)
We are proud to introduce you to the SM-1 project (aka the Annoying IKEA lamp), as part of the Toy hacking contest from the SeeedStudio.com friends.
The project consists in modifying an IKEA 5€ lamp and adding it some sensors, lights, sound and movement to make it more fun. (even that we have made a few other hacks to this same lamp as the Iphone photostudio).
Here is a sample diagram of what we have in mind (and hope to be able to make it real!).
So, the first thing that we need is the lamp:
and the Grove Toy Kit from our friends of SeeedStudio.com
The basic idea is to detect if there is movement or not (with the motion detector); if there is movement we start the servo no.2 and play a pre-recorded message. Otherwise, there is working the servo no.1 and a different pre recorded message.
Reading the state of the motion sensor is very simple: we assign and digital input and read the state. The result is a binary data 0 or 1 (quiet or movement). Doing a simple loop and based on this result we start one or another gadgets.
The sound recorder on it´s own, can only play 4 pre-recorded sounds via external signal. To record them there has to change a switch from play to record position and press the desired button (it has 4 buttons, one for each sound) and record it (should be less than 15sec each). Once recorded we change the switch to play position, and access them by the play() function declared on the code.
The servos work in a very simple logic, they have 3 cables: positive, negative and digital data. The first two give the servo the power to move (max 7v) and the third one goes to an digital output where it receives the information on which degree should it be, and the change begins. We are using the sweep tutorial code in this example.
We continue the developing of our SM-1 Lamp Robot, this time we are doing hacks on the lamp to install one servo, the one that will move the lamp head to the sides (as if the lamp looks to each side).
Here is the detail of the lamp head:
Let´s dissarm all of it. Also we should remove all the electrical parts of the original lamp.
We are not going to use a 220v lamp, but instead we are going to need all this space to install some sensors.
This is how it shoul look without the lamp head. See in the background the lamp head allready without the electrical parts:
Now, we are using some spare parts (also from IKEA), from the EXPEDIT furniture. They come with some metal supports in case you are attaching the furniture to the wall (which i never do), and these parts fit perfectly in the lamp and hold perfectly also the servo.
Now, lets drill the lamp head to attach it to the servo arm.
And this is how it looks!!! Looks almost as terminator isn´t it? ;-)
We also added a second servo (later) and improved the installation on the lamp servo as seen on this pictures:
Step 1: Adding light and base
So, we now have a first prototype working, it talks, it moves, it knows when you move, but what is a lamp without a light? and also a lamp has to look nice in your house, so we are making a neat base to show the guts of the lamp, but with style.
For the lamp, we are using the IKEA OLEBY sun powered lamp, (this time we are only using the led lamp, the solar charger we will keep it for another project). This is the lamp (allready without the solar charger base):
we had to modify it a little bit; add a screw for fixing it to the lamp base and extracting the switch system.
The installed switch was digital, and only worked when there was current. If we are controlling this led lamp with our Seeeduino board trough a digital output, when we set the D/O as LOW, there will be no current, and when set back to HIGH, we would have to manually start the lamp with the switch. I guess this system was installed to prevent accidental discharge of the solar powered batteries.
This is the inside of the lamp:
now, we add a resistor (to protect the led, because the original was on the PCB of the switch) and some cable to close up the lamp.
now it´s time to install it on the lamp:
Now, with the lamp light installed, it´s time to make a Base for the lamp, and for this we are using a photo frame… and guess where it´s from? IKEA again!
This is a very simple step, so we are going to show only the results: