This head is a reading lamp which can be adjusted for direction of lighting, and dimmed as required.

This Instructable combines Arduino programming, some simple electronics, carving with hand and power tools, mechanical control and a bit of woodwork. Apart from the Arduino and a few components it is mostly made from reclaimed materials.

I am rather pleased with it.

What's in this instructable

I have included the main circuit and controlling Arduino programme (the sketch), and issues that arose, but I have also tried as much detail of the other (physical) making processes involved, so hopefully some of that stuff may be useful if you are building something in a  similar way.

This project includes:
  • the Arduino details, such as type of board, file type, the full Arduino sketch that controls the head, etc., and acknowledgement of included code such as the servo.h library.  
  • how the eyeballs and sockets were developed using prototypes, their construction from roll-on deodorants and the mechanism that controls them
  • how the wooden head was developed using crude rapid-prototyping in polystyrene laminate sheets and how they were then used as templates to transfer the 3-d design to MDF boards and create the final casing
  • the carving methods using hand and domestic power tools
  • some discussion of the use of domestic materials such as garden wire and recycled objects to save on costs
  • testing various LEDs for eyeball lamps and overcoming the power limitations of Arduino outputs using a simple transistor amplifier circuit 
  • more detailed discussion of the Arduino code and how it works to manipulate and translate analog inputs to the positioning servos and eyeball lamps
  • details of the construction of the wooden base unit and controls, some simple boxmaking and woodturning without a lathe
  • how a plastic power supply was converted into a wooden supply
  • handy tips that might be worth considering in similar projects

 There is also a lot of further information about this and other things on my blog: "Making weird stuff"

Step 1: Arduino Topics Covered in This Instructable (inc. the Arduino Sketch)

I used an UNO board on this project. 

I have tried to include the nitty-gritty issues that arose in practice. This project addressed two main Arduino challenges:
  • Servo control - how to use Arduino scripts to convert a physical input into something that will mechanically control the position of a physical object in 2 dimensions (eyeballs!)
  • A simple lamp circuit - how to get Arduino to convert the signal from an input and make it turn a light on and adjust its brightness (dimming)      
The Arduino community is immense (both in size and in helpfulness!). This project acknowledges all the people that give to it.

The servo scripting is based upon 'Servo.h - interrupt-driven Servo library for Arduino using 16 bit timers- Version 2'
by Michael Margolis.  Respect!


The complete Arduino sketch is included here for reference. It went through 10 versions to get to this.
There is nothing very sophisticated. The script comments explain what it's doing. 

In later steps in this Instructable, I have added extra  expanded comments about the code within the context of specific steps (e.g. for the servo controls for the eyeballs) 

This is an ".ino" sketch. This is a later Arduino format. It started out as a ".pde" 

Lamp head  - arduino sketch to control a remote control reading lamp head
Andrew Lewis January 2012
This code is in the public domain.
The servo scripting is based upon Servo.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2 by Michael Margolis.  Respect!

// http://code.google.com/p/arduino/source/browse/trunk/libraries/Servo/Servo.h?r=1088

Version 10
This version uses three potentiometers (pots) as inputs wired across the voltage rails (varying from 0 to 5V).
The variable output voltage of each seperately controlling 2 servos and 2 LEDs (operating as a pair) 
The voltage is read by the arduino by 3 analog inputs (1 per pot)
The outputs from the Arduino to the servos are from digital pins, which use pulse modulation to control the voltage output.
The power supply is a standard 5V, 2A unit. It needs to have this amount of current to power the servos and high-power LEDs  

// @@@@@@@ DEFINE LAMPS @@@@@@@

// set Lamp pin numbers
const int lampPin = 5; // declares the ANALOG INPUT pin number for signal - IN
const int ledPinEyes =  3;      // the number of the LED OUTPUT pin for the eyeball LEDs - OUT
int valLamp=0; // variable to read analog input from switch to set off lights

// @@@@@@@ END LAMPS @@@@@@@

// @@@@@@@ DEFINE SERVOS @@@@@@@

#include <Servo.h> // includes standard arduino servo class
int delay_val = 5;  // assigns the servo increment lag (delay between applying values) for both servos

// @@@@ SERVO 1 @@@@
Servo myservo;  // create servo object to control a servo
const int potPin1 = 0;  // declares which analog pin is used to connect the analogue variable voltage output from potentiometer 1 (controls servo 1)
int valPot1;    // variable to read the value from the analog pin for servo 1

// @@@@ END SERVO 1 @@@@

// @@@@ SERVO 2 @@@@
Servo myservo2; // create second servo object to control a second servo
const int potPin2 = 1;  // declares which analog pin is used to connect the analogue variable voltage output from potentiometer 2 (controls servo 2)
int valPot2;    // variable to read the value from the analog pin for servo 2
// @@@@ END SERVO 1 @@@@

// @@@@@@@ SERVOS @@@@@@@
void setup() {
  //pinMode (lampPin,INPUT);  // sets up digital pin as an input for ON/OFF LED input signal (for eyes)
  pinMode (ledPinEyes, OUTPUT);// this is the output that turns the lamps on or off

  // attach servos
  myservo.attach(5);  // attaches the servo on pin 5 to the servo object
  myservo2.attach(9); // attaches second servo to pin 9 to second servo object

void loop(){
  lampCheck();// check lamp INPUT and adjust brightness
  servoCheck(); // check for servo inputs and adjust position accordingly

void servoCheck() {
  // servo controls @@@@@@@@@@@@@@@@@@@@@

  // Servo 1 -------------
  valPot1 = analogRead(potPin1);            // reads the value of the potentiometer (value between 0 and 1023)
  //  digitalWrite (ledPinJoystick,HIGH);

    valPot1 = map(valPot1, 50, 1000, 0, 179);     // scale it to use it with the servo (value between 0 and 180)
    myservo.write(valPot1);                  // sets the servo position according to the scaled value
   // delay(delay_val);     

  // ------------ servo 1 end
  // servo 2 ------------------------
  valPot2 = analogRead(potPin2);            // reads the value of the potentiometer (value between 0 and 1023)

   // digitalWrite (ledPinJoystick,HIGH);
    valPot2 = map(valPot2, 50, 1000, 179, 0);     // scale it to use it with the servo (value between 0 and 180)
    myservo2.write(valPot2);               // sets the servo position according to the scaled value
   // delay(delay_val);   
// ------------ servo 2 end
  // end servo controls  @@@@@@@@@@@@@@@@@@@@@@ */
// lamp functions  @@@@@@@@@@@@@@@@@@@@@@ */
void lampCheck() {
  valLamp = map(valLamp, 20, 1023, 0, 255);     // scale it to use it with the servo (value between 0 and 180)
  valLamp = constrain (valLamp, 0,255);
  analogWrite (ledPinEyes,valLamp);

<p>Great post indeed...May I ask you how much hours you spend to do it? it would be useful to compare to others..please comment ?</p>
<p>Hi. thnaks.</p><p>To be honest, I can't remember exactly. Quite a lot. </p><p>I think I made it over a few months, but doing a few hours here are there.</p>
Very nice. Thanks for sharing it!
Thanks. I've had great feedback on here. Glad you like, and feel free to reuse any ideas, etc :)
creepiest thing ever
Thanks. It does have a creepy charm. though this one may be creepier... <br>https://www.instructables.com/id/How-to-make-a-remote-control-sentient-web-puppet-b/
OMG. you've made Putin! ;D <br>great project:]]]
Thanks, and actually, you're right. It does look a tad like Putin.
ok superrrrrr
This whole project seems amazing. Except for the wooden power adapter. Thats just downright dangerous.
Thanks. It was fun. I learnt a lot! <br> <br>What is your concern about the power adapter being dangerous?
Rarely but occasionally when something is plugged in it creates a visible spark. Now its unlikely that this would ignite the wood but if it had gotten hot prior to that (say its running and there is a power surge that causes a spark) it could ignite. Basically it seems like a fire hazard to me but I could be wrong
Hi, <br> <br>your right to think about the risks when hacking kit, but I think we're safe here. <br> <br>I'm pretty relaxed that the wood won't catch fire. The plug is oak, and that wouldn't easily catch from a lit match, let alone a spark. <br> <br>The sawdust on the cable might appear more risky - sawdust can smoulder and catch if it gets a decent spark on it. However, here it is encased in latex, and is not actually exposed to the air, nor any spark diectly, so it is protected. <br> <br>Effectively, the sawdust is sealed off from the risk of any spark and latex doesn't catch fire from a spark. <br> <br>So, I think there is no more risk of this catching from a spark than the original plastic (which actually can burn but doesn't catch from a spark). <br> <br>Having said all that, you are right to check and glad you liked it. I had such a laugh making it!
congrats on the arduino challenge
hey thanks. liked your animatronic doll. the video in the park is awesome. could have a lot of fun freaking passers-by with that!
thanks :) I just recently started playing youtube videos of chucky talking through the bluetooth speaker in the doll's back pack. I need to take it out to test it on people soon :)
ha ha ha - excellent. I'm sure that it would be rather freaky to find a moving doll speaking in a psychotic voice, whilst skipping happily through the park!
Couple mistakes on your units and math.<br>It doesn't look like you're using a switching step-down converter to power your LED, so the voltage across the LED should be around 3.3v rather than 5v in your power/current calculations.<br>you state resistance = voltage/power, should be resistance = voltage/current<br>then your units are wrong in the next line. Should be 5V/0.6A not 5V/0.6V.
aha - you are indeed right about the units. It should have read A.6A - In fact I also put resistance = voltage/power, which is even worse - it should have read voltage/current - yipes!<br>Thanks for spotting this. <br><br>You are undoubtedly right about the LED. I have to say, it's 25 years since I studied electronics. I have also not accounted for the small voltage drop across an LED either. <br><br>I have to say, I generally go for as close as I can to accurate, and if it works, just get happy like a dog with a bone. Not very scientific I concede :)<br><br>Anyway, thanks again for this. I have amended the unit typo accordingly
I just looked at it a little more carefully.. Your current is actually going to be (5v-vdrop)/r. Vdrop for white LED's is at least 3v generally, plus there will be some drop across the transistor, so you're really looking at more like 150-200mA total, or 75-100mA each.<br>Also, specifically when dealing with LED's (especially power,) you should run each of them with a series resistor, rather than one for the pair. Running well below their rated current it doesn't matter so much, but if you wanted to push these, you'd be best off using a power transistor or FET with the emitter/source tied to ground, then two resistors (about 2 ohms each) to the collector/drain, then connect one LED cathode to each resistor and the anodes to +5v. The LED's would need sizeable heatsinks, and you'd need to use 2+ watt resistors in this configuration though.
You can make a head using this instructable: https://www.instructables.com/id/Making-a-cardboard-head-with-a-secret-hiding-spot/ <br> <br>It seems to be perfect for this...
Wow - that is an awesome job they have done on the cardboard. Really impressive.<br><br>I toyed with doing thinner layers, but didn't have the laser cutting kit, so it would have had to have been by hand. I also like the carving process so I deliberately only used the layer sample as a general aide/guide, not a definitive copy. I like the idea that in theory I could make anothercopy from the original templates, but it would be subtly different, because it is then hand finished. <br><br>I'm off now to patch them for that. It's really great. It deserves credit<br>Thanks for sending the link
Yup. We all dont have access to a laser cutter. And most of the awesomest instructables coming out require that...
what brand of roll on did you use? im planning on replicating your eye mechanism and your mechanical control idea is really brilliant all the other techniques i have seen use some sort of gimbal this is exactly what i am looking for thanks so much and do you have any better images of the attachment points for the servos between the control rods and the brake wire?
Hi.<br><br>glad it was helpful. I struggled with this in a few prototypes, so if you don't have too, then that's a bonus.<br><br>The make of deodorant probably doesn't matter too much. i suspect they are all made by one big factory with different labels. I tried several (just because I had a few I had collected over time) and they all worked the same. I suspect, just cheapest supermarket own brand is fine. Just use two of the same make, so they match.<br><br>Photos are here: <br>http://www.flickr.com/photos/rosemarybeetle/sets/72157627007433214/<br><br>some are already in Step 8 of this instructable but there are a few extra ones. For the wire and servo, think of an old steam train wheel with the drive rod, but in reverse - It needs to transfer the rotary action to up/down:<br><br>http://www.flickr.com/photos/rosemarybeetle/6133065281/in/set-72157627007433214<br><br>Hope it all goes well
i would have used a skull and red leds that would be epic
Or make something like Crypt Keeper from Tales From The Crypt - http://www.youtube.com/watch?v=m-e8ATuFpIc<br><br>The eyes would go well in something like this http://www.youtube.com/watch?NR=1&amp;feature=endscreen&amp;v=Q0lecWPcMU4
That coud work. I have to say, that I quite liked making it look like a (fairly) normal head though. It's more unsettling :)
More accurately a wooden head with animatronic eyes... yes? When I saw he title, I had so hoped the head/face would move, especially when I saw the slices.<br><br>Maybe next time.
Hi. <br>I guess that's a fair point! Sorry to dissapoint. This was a first attempt, so I deliberately tried not to push it to far. <br><br>Since completing this one, I have had been pondering mouth controls - some sort of sound to motion controls which move the lips etc based on sound. I've done it with Flash before, but not physically.<br>. For outputs, it would need the basic mouth shapes to be worked out and then made possible with controls, and for the inputs, I was wondering if it could be driven by the audio out from any iPod/mp3 player, etc. It would be funny to have a head that detected the voice part of a song, and &quot;sang along&quot;. It would, of course need to do so in a slightly bizarre and unsettling way :)<br><br>I need to lie down and rest before I start that one though!<br><br>
You would probably get some great ideas from this video which has prostatic singing heads. Not my <a href="http://steampunkwayoflife.blogspot.com.au/2012/02/beautiful-prosthetic-singing-heads.html" rel="nofollow">creation</a> but I wish it was!
That is awesome. Thanks, The heads don't actually move - it is projected video, but it looks amazing. I have done this with multiple over lapping unsynced super 8 projector loops (yes film, I am that ancient!), and it is really surprising how effective it is.<br><br>A shot of how that was set up showing retro-tech (even in the 1990s, this was way old kit!!)<br>
Now my bubble is burst! I should have noticed that! The best one I have seen is a face projected onto a tree at night and only the eyes were moving!
They are still amazing though. It took me several views to work it out, and I bet they scared the proverbial out of anyone who turned up!
The link would be useful - here it is<br>http://www.flickr.com/photos/rosemarybeetle/3293092574/
That's quite a gallery you've got there. You got me at fries and strawberries. You've nailed Punch! Love giant bird and the gargoyle chair is awesome! Did you make all of these? Was that a picture of you in the seventies with long hair?
Hi. thanks. I'm flattered.<br><br>Yes I did. The chips tasted even better than they look - yum<br><br>and, yes - that is me with long hair sticking out of half a very large bird. It was the nineties though, not seventies<br><br>
Great build! I've emailed my partner about this, hopefully she'll let me create one for us!
Thanks - the links you sent below were great too. The steampunk blog was amazing
now place it in a corn field with radio control and freak people out =D<br>it's an alien invasion.<br>nice build!
Ha! Yes radio control is a great idea. I had alo an idea to have a remote control text- to-speech mouth operation. Ths was actually just too much to complete, but the idea was that you could type sentences and send to the head which would speak them. That would be freaky
since it is a (freaky) reading lamp, you could have it read your book. for people with a loss of vision, (with a usb stick and a laptop or other thingies)<br><br>personally, I have one eye which is almost blind and the other compensates it by being close to perfect. If I would only be able to see with my bad eye, I could still defy a talking head with glowing eyes (and a talking mouth), which is always fun to watch, so I would buy it ;-)
Yes, text to speech of a USB would be amusing. It would need an unnecessarily dark vocal tone. Something like batman in Batman Begins!
Putin is very similar. :-)))<br>http://en.wikipedia.org/wiki/Vladimir_Putin
Blindly. You're not wrong there! That's uncanny. Image me laugh!<br>Thanks
@Rosemarybeetle; Tweeted! Love the timelapse effect in the video. Cheers : ) Site
Thanks.<br> I'm glad you like the vid. I thought it was the fastest to give an idea of the entire process (even though I does miss out a few bits!)<br><br>Tweeting very much appreciated. Thanks you
I really like this. Weird, wonderful, and a great detailed blog of the build. Enjoy ! I will have to have a go at a weird head!

About This Instructable




Bio: I like making all sorts of stuff, out of found materials: furniture, wild food, whatever! I've learnt loads from generous people out there, so ... More »
More by rosemarybeetle:Freaky Gargoyle Chair Built From All-reclaimed Wood and Leather Personalised homemade exploding head Christmas crackers How to Build a Bespoke Summerhouse From Reclaimed Wood and Save Hundreds! 
Add instructable to: