Introduction: Robotic Head Directed to Light. From Recycled and Reused Materials

About: If you want to do people to build ships,... All you need to do them to crave greatness and the vastness of the sea Antoine de Saint-Exupery

If somebody wonders whether robotics can come along with an empty pocket, maybe this instructable can give an answer. Recycled stepper motors from an old printer, used ping pong balls, candles, used balsa, wire from an old hanger, used enameled wire were some of the materials I have used to make this robotic head. I have also used four servo motors, one adafruit motor shield and an arduino UNO. All these were reused from other projects, which they were savaged! All makers know that this is unavoidable in order to save money.

Since there is no robot without interaction with the environement, this one tends to turn towards and look to the brightest spot around. This is made of the cheapest sensors ever: the photocells. They are not the most trustworthy but are trustworthy enough to make something decent.

Step 1: Materials Used

  1. Arduino UNO
  2. Adafruit motor shield V2
  3. servo SG90 X 3
  4. one servo MG995 for turning the neck
  5. stepper motor, I 've used one 20years old it doesn't need to be a high torque motor
  6. breadboard 400 and jumper cables
  7. three photocells and three 1K,1/4W resistors
  8. DC transformer 6V for powering the servos through the breadboard
  9. 3 ping pong balls
  10. foam board
  11. balsa wood
  12. hard wire
  13. plastic and copper tube with diameter so that can fit in one another, in length 20cm are more than enough
  14. 15X15cm wood as a base
  15. two card board tubes from kitchen paper
  16. small iron bars for counterweight

Step 2: Making the Eyeballs

  1. You have to cut a ping pong ball in two semispheres
  2. Lighting a candle over the cut ball you can actually wax it. It takes this way an oily look. I'm not an artist but I think it looks more natural this way.
  3. Then you have to make a disk from a balsa wood 1cm thick, that should fit in the cut ball (hemisphere).
  4. At last drill a case (a shallow hole) for the eye lens. Then you can put there, what is supposed to look like an eye lens.

Step 3: Making the Eye Movement Mechanism

The main idea to design this mechanism is that the eye should be able to turn around two axis at the same time. One vertical and one horizontal. These axis of rotation should be set so that they intercept to the center of the eye ball otherwise the movement could not look natural. So this center mentioned is placed in the center of the balsa disk which is glued in the ping pong hemisphere.

The effort made, had to manage trivial materials to make this happen. The series of photos that follow show the way.

In the pictures you can see a white and a metal tube, that fit well one in the other. The white one used to be a pole to a small flag and the metal is a copper pipe. I chose them because they fit well one in the other and they have only a few mm diameter. The actual size is not important. You could use any other that can do the job!

Step 4: Testing the Movements

Since there were not used any simulation software the only way to find the limits of movements that came from servos is actual physical testing. This way is shown in the pictures for up and down turn of the eyes. Finding the limits is necessary since the rotation of servos have also limits and expectations for the eye movement in order to look as natural as possible sets also limits.

To define a procedure, related to the pictures shown, I could say:

  1. connect the eye with the servo with a wire
  2. turn with your hand the servo lever so that the eye takes its utmost positions (back and forth)
  3. check the position of the servo in order to be possible for the eye to take these positions
  4. make (cut or similar) the place for the servo to take a firm position
  5. after positioning the servo firmly check again if the utmost positions for the eye are still possible..

Step 5: Making of the Eyelids

  1. Measure the distance between the actual eyes.
  2. Plan two semicircles with a diameter equal to the eyes and draw them on a foamboard with a distance between the centers as measured in step1.
  3. Cut out what you've drawn.
  4. Cut a ping pong ball in four.
  5. Glue each cut piece of ping pong ball to one of the two just cut semi-circles.
  6. Cut small pieces of tubes as seen in the last photo and glue them so that they line up. See the last photo for the desired end piece

Step 6: Final View for Eyes and Eyelids Mechanisms

There some obvious inaccuracies but considering the extremely low cost and the "soft" materials I've used the result seems satisfactory to me!

At the photo it can be seen that the servo that turns the eyelids actually makes the move to one direction and leaves the work to a spring for the other!

Step 7: Making the Neck Mechanism

The head should be able to turn left or right, say 90degs in either direction and also up and down not so much as the horizontal rotation, say 30degs up and down.

I have used a stepper that rotates the head horizontally. A small piece of cardboard serves as a low friction platform for the mechanism such as the musk (face). The first picture shows the mechanics. The stepper extends the horizontal rotation after the horizontal eye rotation reaches its upper left or right limit. Then there is also a limit for following steppers rotation.

For the up and down heads rotation I have used a servo as it can be seen in the second picture. The servo's arm acts as a side of flexible parallelogram, where the parallel side to that, acts as a base for the stepper . So when the servo turns the base of the stepper turns equally. The other two sides of that parallelogram are two pieces of hard cable that have vertical direction and stay parallel one to another while moving up and down.

Step 8: Neck Mechanism 2nd Solution

In this step you can see another possible solution to turn the head horizontally and vertically. One step stepper makes the horizontal rotation and the second the vertical one. To make this happen the steppers should be glued as seen in the pictures. On the top of the upper stepper should be fixxed the eye mechanism with the musk.

As a disandvantage of this approach I could point the way the lower stepper is fixxed on wooden vertical plane. This could after some use become unstable.

Step 9: Making the Light Source Location Sensors System

In order to locate a light source in three dimensions you need at least three light sensors. Three LDRs in this case.

Two of them (placed at the same horizontal line to the lower part of the head) should be able to tell the light energy density difference horizontaly and the third one (placed to the upper part of the head) should show us in comparison to the average measurement of the two lower ones the light energy density difference vertically.

The accompaning pdf file shows you the way to find the best inclination of the tubes (straws) containing the LDRs in order to take the more trustworthy information for the location to the light source.

With the given code you can test the light sensing with three LDRs. Each LDR activates a corresponding LED that lights up linearly in relation to the incoming amount of light energy.

For those who want some more sophisticated solutions I'm giving a photo of an experimental device which shows how to find the best inclination (angle φ) for the LDRs tubes so that for the same angle θ of incoming light you get the highest difference in LDRs measurements. I've included a plan to explain the angles. I think this is not the right place for more scientific information. As a result, I have come up to use an inclination of 30degs (45 is better though)!

Step 10: And Some Tips for ... Electronics!

Having 4 servo's makes impossible to power them directly from arduino. So I powered them from a external power supply (I used a trivial tranformer) with 6V.

The stepper was powered and controlled through Adafruit Motorshield V2.

The photocell were controlled from arduino uno. The attached pdf includes more than enough information for that. At the LDR circuit I have used 1K resistors.

Step 11: A Few Words for the Code

The code architecture has as strategy that the the void loop routine contains only a few lines and there are a few routines, one for each task.

Before doing anything the head takes its initial position and waits. Initial position means eyelids closed, eyes lookinh straight ahead under the eyelids and the head's vertical axis is perpendicular to an horizontal plane of the support base.

First the robot should wake up. So while stying still, it receives light measurements waiting for a sudden and large increase (you can decide how much) in order to start moving.

Then it turns first the eyes to the right direction and if they cannot reach the brightest point the head starts moving. There is a limit to every rotation which comes from the physical limits of the mechanisms. So another construction can have other limits depending on constructions (geometry) mechanics.

An extra tip has to do with the reaction speed of the robot. In the video the robot is intentionally slow. You can speed this up easily by deactivating a delay(500); which is placed in the void loop() of the code!

Good luck with making!