Blog - Sketching with Hardware

Team 2 – The Emotional Lamp

Published on: | Author: Leon Müller | Categories: 2017b, Best Projects, Projects, Terms

thelampposerimg_20170912_123835

How we came up with the emotional lamp

We had a lot of ideas at first, but our goal was to take something old, give it new life and make it highly interactive. We we’re both mediainformatic students after all and just had Interaction Design in the last semester – so it just had to be very interactive.

One of the ideas was to use an electrical typewriter and make it type out stories and fairytales when you put an object on top of it – Markus actually had an electrical typewriter at home, but we though just having the typewriter type out something wouldn’t be too new and interactive enough.

Another idea coming from Bernhard was to make a compass that would not show to north, but instead show to somewhere else – like the next all-you-can-eat restaurant – but also that didn’t seem too interactive.

And then we had another idea – why not make something like the pixar lamp (for those that don’t know what I’m talking about – shame on you) but make it interactive and most importantly emotional – make it behave like the student that wants to use it.

So this meant:
Maybe sometimes it just didn’t want to be turned on and rather be left alone, so it would push your hand away before you even got the chance to hit the switch. After all, it had to have at least 8 hours of sleep per night, right? Maybe it just had a long night of drinking yesterday and was still hungover and sleepy from the night before – and as a result it would have a hard time staying awake and fall asleep randomly – and you had to wake it again. Thinking of it, sounds a lot like me… *ahem* Moving on.

Building the lamp – Take #1

team02klein

Anyways, we had to find a lamp we could use – after all we had a lot of servos available and figured it would be pretty trivial to attach them to a lamp and make it move. Right? Wrong.
The first lamp Markus had brought seemed easy enough to use – the arms were easily moved and were balanced nicely. However, it was incredibly hard to actually find a place we could attach the servo to. There was no good way to somehow couple the servo to the joints directly – as they had nothing to screw in and were just held in place by plastic spacers. So we bought a aluminum rod and threaded it so we could screw the servo to it. Well, turns out threading it wasn’t that easy and it was also incredibly easily bended. Also, we still had found no way to connect the aluminum rod to the joints as there was just nothing to screw in.
It was already late so we called it a day. I went home and did some research, and was really lucky to find that we were not the first ones to try this…

Building the lamp – Take #2

tertial-work-lamp-gray__0487643_pe622661_s4

After doing a lot of research – turns out we’re not the only ones doing this. Also turns out, there is a cheap lamp made by IKEA that seems ideal for the job and can and has been easily modded to be controlled with servos. You probably already know which one based on the manual on our poster, but it’s the TERTIAL Lamp – which can be had for 10€ and luckily enough, Markus actually had one at home. But that also meant he’s now out of lamps and his desk is awfully dark. Oh well, the sacrifices you make for SWH, right?

Movement

Also turns out we need much stronger servos than the ones that were available. The ones we used can be found on amazon, have a torque of up to 15kg at 6,4V and were delivered the next day with Morning Express (an extra 5 Euros…).

I found three separate projects using the TERTIAL lamp with varying degrees of macgyvering. The first one and second one were pretty hacky, but they worked well enough (Robot Arm From a Desk Lamp (IKEA Tertial Hack) and The IKEA Robot Lamp).
I didn’t quite like the approach of the second one, as there was not a lot of room for movement – the first one actually had a much better approach which was also used in the last project I will go into detail later on.
The idea of the first and third project is that you mount the servos on the bottom arms and then move those arms by moving the triangular base plate that connects the axes together.

fllwf6ohoufwg06-mediumf5sf9b7houg1mrq-mediumfsakd3phoufwfzd-mediumfqg41mjhoug57p5-medium

We did this exact mounting for the middle servo.

screenshot_3

Now neither the first nor the second project offered much movement for the lamp head itself – which was rather unfortunate. Luckily, the third project had exactly what we needed (and was also really over-engineered – someone had put a LOT of time into this).
It had 3D-printable parts that would allow us to mount and rotate the lamp head up, down, left and right. Awesome! Take a look at this (awesome) project here.

tetriarm

As you can see in the image above, there’s barely anything left of the original lamp. As we already had an okay solution for the middle servo and we didn’t want to rotate the arm, we only used the very top part. Ultimaker 2 to the rescue. Sort of.

img-20170906-wa0025Turns out halfway through the print, the filament got stuck on the roll and the parts didn’t get finished. I had already gone home and no one was at the workshop anymore to restart the print. Bummer.

So I restarted the print the next day and came up every 5 minutes to make sure the filament didn’t get stuck. After I had all the required parts, it was pretty easy to assemble just by following the very nice instructions on instructable.
mount

We didn’t really use bearings since we couldn’t find any in the right size, so again we had to macgyver something with a bunch of washers and nuts. But it worked!

img_20170907_172026

Alright! So as Markus continues to work on controlling the servos, I came up with something on how to make the lamp convey it’s emotions by more than just movements.

The Light and the LEDs

Well, a lamp also has to provide light, right? But I not only wanted the lamp to give light, but I also wanted to be able to control the lights, control the color and even show basic geometric shapes (which would later become the eye of the lamp).
So I used what pretty much every project used – a lot of WS2812B RGB LEDs. So many, that I actually needed a dedicated power supply for it. And I crammed as many LEDs in the shade as I could possibly do, while keeping an even pattern so the leds had the same distance between them horizontally and vertically (which was 1.65cm in this case). I wired them up in a zig-zag shape, so the data wire had the shortest possible path. The power wires just went down the middle, as the +5V and GND are connected along the rows.

img_20170908_165521

The back plate was a MDF plate I had cut in the lasercutter. Now, let’s add a milky acrylic glass in front of it (also cut in the lasercutter)…

img_20170910_152725

And the camera doesn’t really do much justice, but it does look really cool! And also suddenly becomes evil. Scary…

Anyways, we decided our lamp should rather become an one eyed-cyclops like Leela – as that allowed us to focus more on the eye for emotions (like blinking, moving eyes left to right and rolling eyes).

auge2

This was all done by using the NeoMatrix Library from Adafruit and a custom mapping for the LED layout. The shapes were drawn using the Adafruit GFX library.

The Final Result

To finish off we added a couple more things to the lamp: Two joysticks that could be used to align the lamp as you want, as well as an IR sensor to tell when someone had was suspiciously close to the switch of the lamp… An unfortunately, one of the servos died in smoke one hour before the presentation, so we had to sacrifice the middle servo – but that was alright as we

 

Parts, Schematic, Code and lessons learned

As mentioned many times, what we did was a mixture of two projects and also a lot of macgyvering, and as such, making an exact parts list is hard – especially if you ask me what kind of screws we used – we pretty much used everything we could find in the workshop and just try to made it work. If you want to make a proper version of this, feel free to follow the incredibly instructable which uses 3D-printed parts and has an exact BOM.

Parts

  • Arduino Mega 2560
  • 3-4 Servos (link)
  • Adapters from the servos
  • 2 Joysticks (link)
  • Lots of jumper and normal wires
  • Breadboard
  • MDF board
  • Milky Acrylic Glass
  • WS2812B LEDs (link)
  • TERTIAL Lamp (link)
  • 1000µF capacitor (for stabilizing LEDs)
  • 5V 10A power supply (for LEDs)
  • 6.5V 5A power supply (for servos)
  • Lots of screws, nuts and washers
  • Ducttape

Schematic

Note: In the schematic the breadboard also carries power – don’t do that, see my concern below. Use a dedicated thick wire for power. I just did it for making it more neat.

schematic

Code

The code can be found here and should be pretty easy to understand.

Lessons learned

  • WS2812B LEDs and servos don’t work together normally. You need to use the TiCoServo Library. Read more about the issue here.
  • Use wires that are thick enough and are rated to handle the current you need!
    All those LEDs can draw up to 3.9A, and the 4 servos can draw up to 6.4A and those tiny jumper wires will melt and smoke.
  • Add an decoupling capacitor to save the LEDs from damaging themselves and make sure you have enough Ampere available to power all the LEDs!
    Look here for a very good guide.
  • Duct Tape is awesome

 

 

linked categories 2017b, Best Projects, Projects, Terms

|

Write a comment

Comment