Introduction: Animatronic LeBron-Bot With Arduino!
I created an Animatronic face of LeBron James that not only tracks movement in its eyes from left to right but also features a touch sensor to simulate jaw movement.
I created this for a class project. I could've chosen any celebrity to create the animatronic from, but I wanted to choose LeBron because he has some funny quotes, and I thought using his face would be funny!
I based my design on another Instructable where the creator made an animatronic Ed from Good Burger.
Supplies
The most troublesome items were the screws, as some screws I purchased would not tighten my 3D print; therefore, be aware of the types of screws you purchase. I found that Stainless steel flat heads were the best ones to use across all lengths and sizes. Also, two items that weren't listed were scotch tape and a mini screwdriver.
Step 1: Supporting Structure
For my supporting structure, I chose to make it out of wood, as it is easily customizable and easy to get. One important note: If you're printing your face from a regular printer as if you're printing out an essay, then the wood only needs to be as long and wide as the paper!
- Obtain 5 pieces of wood, 2 of them can be 11 inches long, and the last three can be 8 inches long.
- Create an L shape using an 11-inch piece and an 8-inch piece by attaching them with wood glue. Once done, repeat the process with the other 11-inch piece.
- Join the L's together using wood glue to make a box.
- Insert the final piece of wood inside the box, as it will serve as the stand for your eyes.
You can use any method to connect this box; it does not have to strictly be with wood glue.
Step 2: Making the Face
The face was made using cardboard, as it's easily attainable and allows for attaching a piece of paper.
- Print out a full page of your chosen face.
- Cut the cardboard so that, using glue (I used wood glue), the paper face can be securely attached to the cardboard.
- Once that is done, cut out the eyes and mouth of the face. Make sure to cut through the cardboard and paper, as you'll want your eyes to be visible behind the face.
I used a knife to cut out the eyes, as I found that scissors were not as reliable for the task.
Step 3: 3D Printing
This step is the most challenging, in my opinion, as it can take a while for the pieces to print if you do not own a 3D printer, depending on your situation. It took on average 2-3 days for my pieces to print, as the process of putting the eyes together was particularly frustrating due to my forks specifically snapping.
The eyes contain multiple linkages that attach to the servos in order to simulate eye movement. For this project, I focused solely on the horizontal movement, allowing the characters to move only left or right. The print settings and materials for these parts can vary. The prints were made out of PLA material. FYI: The eye adaptor is an exact fit into the eye place holder. By exact, I mean that it has little to no space. Trying to put the eye placeholder onto the adapter is how my pieces kept snapping.
Below are the attached files for all of the eye components. If it has "x2" by it, it means that you need 2 copies of that piece, one for each eye. Super glue is helpful if a piece breaks; if time allows, you can also reprint the broken pieces. I'd recommend printing extra copies of the pieces ahead of time in case of breakages.
I had a lot of trouble with the eye connectors, so for the sake of what I succeeded with, I will not be referring to the connectors, the servo block, the Y-arm, or eyelids as those pieces come together to make moving eyelids.
Attachments
Step 4: Putting the Eyes Together
Just try to get the adaptor into the holder; it doesn't have to be all the way in, just enough so that they move as one.
After the parts are printed, we can begin the assembly process. This video link is what I used to help guide my assembly process. It's very useful, and I highly recommend following it!
DISCLAIMER: Step 6 can be done then or whenever is more convenient for you. I chose to put it there because you can do this before the assembly gets crowded, as it was more frustrating for me when done later. I also recommend getting a mini drill tip to attach your servo arm to the eyes; you'll need to widen the holes enough to fit an M2 screw.
- Connect your main and sub bases using 6mm or 8mm M3 bolts. Be sure to screw in from the inside of the sub base, as if you screw into the sub base, the screw will later impede your eye movement. Do not use screws that are too long.
- Place your servo motor into the sub base
- Connect your forks to your eye adaptors using 6mm or 8mm M3 bolts. For this step, I would like to note that at times, M2 screws have also been effective here. I personally found M3 to be more reliable, as they're larger, making for a more precise and snug fit.
- Connect your Three Point connector to the forks using 6mm M2 or M3 bolts, whichever fits you better.
- Connect the eye holder to the forks by sliding the left and right holes underneath the forks in the adapter, and then slot an 8mm or 10mm screw into the hole. Note: M2 or M3 works here, just don't expect the screw to pierce through the bottom.
- Fit the eye placeholder onto the eye adapter. Be ready to use, try to wiggle it around to get it on, but be careful as the forks are weak at the holes connecting it to the adaptor. It can VERY easily snap if too much force is applied.
- Attach a servo arm to the three-point connector using a 6mm M2 screw. Note: Refer to the disclaimer above regarding the widening of the servo arm holes.
- Attach the servo arm to the servo motor. Using a 4mm or 6mm M2 screw, screw the arm into the motor so that when the eye is moving, the arm will not come loose.
- Test that everything is connected properly by moving the servo arm left and right to see if the eyes move with it consistently.
Step 5: Jaw Mechanism
The jaw mechanism will utilize the other servo you need, along with hot glue and Scotch Tape.
- Take the servo you'll be using and attach its arm.
- Use hot glue to attach the servo to the back of the cardboard piece, which will serve as your jaw/mouth.
- Once the arm and cardboard are firmly glued together, tape your servo to the back of the face, wherever you decide to have your jaw move from.
While doing this step, I accidentally cut my jaw a bit longer than originally planned, which explains why my cutout looks so funny! It's a good laugh, and it still worked as intended, just has a funny look to it.
Step 6: Wiring for Jaw and Eye
The wiring for this is fairly straightforward, although the Digital pins are free to be changed to whichever you feel comfortable. The figures above show the wiring for the jaw, eyes, and ultrasonic sensors.
I connected the Arduino ground and 5V power source to one side of the breadboard, and then connected all the components to that side to facilitate simpler connections. I also connected the 3.3V power source from the Arduino to the opposite side, allowing me to power the other ultrasonic sensor.
I chose to keep my sensors on the same breadboard; however, if you separate them, you can eliminate potential interference between them. The sensors being close to each other makes it easy for them both to be triggered at the same time, resulting in the eyes not tracking properly. To deal with this, I would always back up until I was out of range of the sensors, and then use only two fingers to trigger them.
I connected the Left Ultra Sensor to the 5v output from the Arduino and ground. The trigger should be connected to Digital Pin 3, and the echo should be connected to Digital Pin 4.
The Eye servo should be connected to the 5v output from the Arduino and ground. The signal should be connected to Digital Pin 9.
The Jaw wiring is simpler, since all you have to do is attach the jaw servo and Touch sensor to the 5v power source and ground. The signal for the servo should be connected to Digital Pin 7, and the signal for the Touch Sensor should be connected to Digital Pin 10.
With that, your circuit should be ready!
Step 7: Programming
Eye Mechanism
To make the eyes follow someone naturally, the code starts by including the Servo library and creating two servo objects. One of these controls the horizontal movement of the eyes. After that, the pins for this servo are set, along with the pins for the two ultrasonic sensors that detect whether a person is standing on the left or right side. Each sensor has a trig pin and an echo pin, and the code uses a distance threshold to decide when something is close enough for the eyes to react.
In the setup section, the eye servo is attached to its pin and moved to the center so it starts from a neutral position. The ultrasonic pins are also set up so the sensors are ready to take readings as soon as the program starts running.
To keep things organized, there’s a separate function that handles the ultrasonic distance measurements. It sends out a pulse, listens for the echo, and then calculates the distance to the object. If the sensor doesn’t detect anything, it returns a negative number. Having this process in its own function keeps the main code cleaner and easier to understand.
For the actual eye movement, there’s another function that slowly adjusts the servo’s angle instead of jumping straight to the new position. This makes the eye motion look smooth and less robotic. Inside the main loop, the code constantly checks both sensors. If something is close on the left, the servo turns the eyes to the left; if something appears on the right, the eyes turn to the right. When nothing is detected, the eyes move back to the center. Overall, this creates a simple but convincing tracking effect where the eyes appear to follow the user around.
Jaw Mechanism
The second servo is used for the jaw, and it only moves when the user activates the touch sensor. At the top of the code, the pin for the jaw servo is set along with the pin for the touch sensor, plus the minimum and maximum angles the jaw is allowed to move between. There’s also a timing variable that creates a cooldown, preventing the jaw from triggering repeatedly if the sensor is touched repeatedly.
In the setup section, the jaw servo is attached to its pin and moved to its default closed position. The touch sensor is set as an input, allowing the program to detect whether it’s being touched. This sensor essentially functions like a simple on/off switch, producing either a high or low signal depending on whether the user interacts with it.
Within the main loop, the code continuously reads the touch sensor and checks whether the cooldown time has elapsed. If the user touches the sensor and the cooldown has elapsed, the jaw animation begins. The servo slowly moves from the closed position to the open position, waits for a moment, and then returns to its original position. The motion is performed in small steps, allowing the jaw to move smoothly instead of snapping open and shut.
To keep things from activating too often or jittering, the program won’t let the jaw trigger again until the cooldown has finished. Throughout this process, the code also prints small debug messages, allowing you to see when the jaw starts moving and when it finishes.
Step 8: Final Assembly
Once you have your sensors wired up properly and the supporting structure is finished, you can assemble it!
- Using wood glue, attach your face to the wooden support structure. Ensure it's positioned so that your eyes can align behind the cut-out eye holes. Note: Ideally, your eyes would be positioned on one of the wooden pieces so that it's resting behind the holes.
- Place your eyes directly behind the aforementioned eye holes. Note: For convenience, tape the eye base to the wooden platform it's on so that it does not fall off when the structure is being transported.
- Place your breadboard in front of your structure, and use jumper wires to connect your Eye servo to the Arduino.
- Connect your Jaw servo to the Arduino.
- Connect your touch sensor to the Arduino.
- Ensure your Ultrasonic Sensors are facing away from your structure.
Once this is all done, supply power to the circuit, and you'll have your own LeBron animatronic! I powered my Arduino using my computer, and used both the 5V and 3.3V outputs to power the system. Enjoy your animatronic!
I've included a link to a demo of my animatronic here.
Step 9: Suggestions and Lessons Learned
First Lesson: Originally, I planned to have moving eyelids; however, I encountered several issues with the eyelids, specifically because I tried to complete them first. The eyelids should be the last thing you work on since they aren't essential to the system, but are an added feature to add a little more interaction to your animatronic. Something to keep in mind, however, is that by adding the eyelids, you would also need to add four servo motors, each independently operating the top and bottom eyelids of both eyes. As such, you would either need a second Arduino to help power the system or any other power source, such as a 9V battery.
Second Lesson: Looking back, I should've had more patience with the assembly of the eyes. I broke quite a few pieces because I had gotten frustrated with things not going how I'd expected. As such, this led me to use more force than necessary and snap key pieces, which resulted in a delay as I couldn't find the missing pieces. This meant I'd have to wait for them to be reprinted, consuming a significant amount of time.
Suggestion: Remember that this is supposed to be fun! I had forgotten until it was all finished that at the end of the day, it's a cool project I can look back on and show people! I mean, since when does LeBron have blue eyes?
Improvement: One area I can improve on is the coding for the touch sensor. Since it was a last-minute addition, the code wasn't turning out as I wanted. My sensor would activate at the slightest touch, meaning that if you accidentally nudged it, the motion would start. I would modify the code so that it requires multiple and consistent readings before triggering.
Another aspect I could improve on would be centered on my code. For instance, when my touch sensor was activated, the Ultrasonic Sensor wouldn't trigger. Figuring out the cause behind the issue and adjusting the code so that even while the jaw is in motion, the eyes can still track.
The final improvement would be figuring out the audio. I wanted to have audio play from my laptop in two situations: when LeBron is idle for a certain period of time, and when the touch sensor is activated. However, to achieve this, I needed to be a little more familiar with Python so that it could extract the audio file from my laptop, and then Arduino could read that file, causing it to play.

















