loading

Being an engineer myself I could not resist adding remote control to this manually expandable lamp I saw at IKEA, no matter the cost. In this project I've replaced the pull string with M3 threaded rod and DC motor, added a micro-controller to drive it and after a bit of soldering, cutting, drilling... it moves by itself. The lamp can be controlled two ways. First of all, as you would expect, the light can be switched on, off and dimmed using standard wall switch. In addition to that, there is an Infra-Red remote control for more precise and programmable movement. In fact, it allows to save 3 positions and remembers the last position when switched on.

Sadly, at the time of building it, I didn't plan to make detailed instructions. Consequently, most of the pictures posted here are of the finished assembly. Hopefully, my description will be detailed enough for you to be able to achieve similar result.

<p>Great Instructable, I'm in the process of putting it all together but I've had problems with the feedback 10k pot. I've mounted it as close to how you've done it but I don't seem to get any reaction from it. I've used a single turn 10k, approximately how much does yours turn? And do I need to change anything in the code to adjust its limits and sensitivity?</p>
<p>Hi, I'm pleased to hear that you are making progress. Assuming you've wired potentiometer correctly, you should be able to read the position value on POSITION_PIN. In fact, there is a commented out line in the GetPosition() that when uncommented would show position in the Serial Monitor. Most likely that value will be slightly different then mine so you will need to calibrate it. To do that, move the lamp to the top position (open) and set constant TOP_POSITION value to whatever is on POSITION_PIN + 1. Then move the lamp to the bottom position and set constant BOTTOM_POSITION value to POSITION_PIN - 1. Its important that the top value would be less that the bottom value. If that is not the case you will need to change the polarity on the potentiometer. Please note that +1 and -1 are the offset values to make sure that the lamp doesn't hit the max position as it could get stuck. This offset might need to be increased if position reading is not stable. Hope this helps and I would be definitely interested to see your final result.</p>
<p>Extremely helpful, its all working now, thank you very much. I just need to tidy up the mechanics to make it all repeatable and try and fit it all in the space! I had 200 for the top position and 310 for the bottom but that the way I've aligned the pot.</p><p>I'm still in the prototyping stage so once I've refined some of the parts I will post some pics.</p><p>I've pretty much followed your purchase list accept for the LM317, I went for a off the shelf module that handles 2A. </p>
<p>Very great tutorial!!!</p><p>I'm approaching to realize it with little changes (Wi-Fi control instead IR)... But I really don't get how the potentiometer works to give me the position of the lamp!</p><p>How can I know the position of the lamp using it? Where do I have to connect it in the circuit? Directly to driver board or to the microcontroller?</p>
<p>Great idea and implementation! How did You connect the M3 rod with the hard drive bearing?</p>
<p>Hello, great project! I have all parts here, but have problems understanding the circuit board. Can u upload your fritzing file? The circuit boards shows 2 potentiometers, 10k and 5k. </p>
If you turn off the light, how can there be power for the motor to close the lamp?
<p>Electronics are constantly on power. I had to rewire wall switch (S2 in the diagram) to one of the micro-controller's inputs. Having it powered on all the time also allows me to switch the lamp on via remote control.</p>
<p>Hello,</p><p>I try to program the board only the board u use is not available any more.</p><p>and im not from the us so i have to order the genuine micro. only i get the following errors with load the program u write.</p><p>In file included from Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:144:0,</p><p> from Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h:88,</p><p> from Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:28,</p><p> from sketch/FI1436DILV8CJXX.ino.cpp:1:</p><p>FI1436DILV8CJXX:41: error: expected unqualified-id before numeric constant</p><p> const int SPEED = 255;</p><p> ^</p><p>exit status 1</p><p>expected unqualified-id before numeric constant</p><p>and if i block that line i get this error.</p><p>Arduino.app/Contents/Java/libraries/RobotIRremote/src/IRremoteTools.cpp:5:16: error: 'TKDS' was not declared in this scope</p><p> int RECV_PIN = TKDS; // the pin the IR receiver is connected to</p><p> ^</p><p>exit status 1</p><p>Error compiling for board Arduino/Genuino Micro.</p><p>Many u can help me with it.</p><p>Thanks</p>
<p>This is great!</p><p>I am also automating one PS2014 pendant for a couple of weeks now. I am using an RC servo with continuous rotation for movement and using two small infrared interrupters at the upper and lower limits to stop the motion.</p><p>Being able to continuously know the position is way better though. Is it possible for you to post a better picture/schematic on how to attach the potentiometer with the structure?</p><p>Thanks</p>
<p>Sorry, but I'm unable to take any better pictures as it would require disassembly of sort. But it is fairly straight forward - where two green parts hinge, I took out the pin and made holes on both parts slightly larger so that the potentiometer could go through. Then I secured the shaft with a little screw by making an M2.5 threaded hole on the edge (as seen in the third photo). On the other side, to stop the potentiometer itself from rotating, I soldered a little PCB to it. Again, using M2.5 screw I fastened that PCB to the green part. So now, one green part is secured to the potentiometer and the other to the shaft, hinging like before but now with potentiometer giving a feedback.</p><p>P.S. I have not worked with RC servos, but from what I've seen on Youtube, they seem to be bulky and quite loud, too loud for a bedroom light if you ask me. However I have to admit there is a small buzzing sound in my lamp as well.</p>
<p>Thank you for replying Audrius,<br><br>My intention was to make as little modifications as possible (not breaking anything) so I could be able to re-assemble the original piece without mods.<br><br>The potentiometers I could find on local electronic stores had a slightly large chaft (~6mm) and a big body, or a thin chaft (~3mm) and a small enough body. And after all I would like not to enlarge the holes that make the hinge...<br><br>So, after some iterations I fixed the potentiometer with a plastic strip and the shaft with a small screw to one of the green parts.<br><br>I've already managed to put the mechanical part together and it is working great.<br>You're right about servos, they do make a little noise, but I am making it turn very slowly so it is very subtle while moving.<br>I think the best part is that servos can control a moving part with an Arduino very easy and without the need of additional motor driver, gears/rods or the support for the long threaded rod.<br>I'm using a standard size servo (half height), but I think a small servo (9g) can handle the weight of the lamp.<br><br>Once more thank you for replaying and making such a great project available here. <br><br>P.S.: I had a very old (~20 yr) Creative Sound Blaster Infra Red remote control (pretty similar to the one you've used) that is also working like a charm with this project ;-)</p>
<p>Looking great! I just got approval (!) from my wife to install two of these. Have one question though.. do you have the approx. length of the M3 rod you are using? I'm trying to find a lead screw that would fit.</p>
<p>Wow! Two of these... your wife is very kind. The rod is about 12cm. Let me know if you find a lead screw of similar size, just in case the rod fails.</p><p>Have fun.</p>
<p>Well, I live in IKEAland (Sweden), so what can I say ;) ?! I've found some M5 and M6, but they are a bit too expensive at about $25/30cm. It seams like M8 is more or less the de-facto standard, but that is perhaps too thick? You can get them with different pitch angle.</p><p>http://goo.gl/ZjvNxI</p>
<p>Yeah, I looked at those. They are good for hobby CNCs, but way too big for this lamp. In addition, you would need a bigger motor to drive it. </p><p>Where did you find M5 lead screw if you don't mind me asking?</p>
<p>I found these from the same dealer at Aliexpress..</p><p>* 2pcs 5mm lead screw + 2pcs nut = $10 (<a href="http://goo.gl/sscpH4" rel="nofollow">http://goo.gl/sscpH4</a>)<br>* 10pcs 2mm to 5mm shaft coupler =$7.20 (http://goo.gl/bQZ8OO)</p>
<p>This is awesome.</p><p>This plus Philips Hue (or some other color-changing lamp) would be AMAZING!</p><p>I would like to try this out, but I would probably struggle to get the &quot;cup&quot; in place with all the electronics in it. I could barely get it in place with the lamp-cable itself inside of it. Hehe.</p>
I'm happy you like it. It was definately a struggle to hide all electronics, but well worth it. Of course I had to shorten the cable it came with.
I love that lamp and this makes me love it more. Any chance you could post a video of it moving? Great job!
The very first image is actually an embedded video. You can also see it here https://youtu.be/03p3kui5NIQ
I saw this in the Ikea store and knew someone would do this hack. Great job!
<p>I can't wait to see what you share next! I love this! </p>

About This Instructable

37,491views

189favorites

License:

More by AudriusA1:Remote Controlled IKEA Death-Star Lamp 
Add instructable to: