Skip to content

Machine Week: Tyler, Andrew, and Zaina

Person Tyler Andrew Zaina
Work Electronics, coding, design, documentation and construction Electronics, coding, design, documentation, and construction Construction and documentation

Overview

We decided to create an anamatronic of Neil who tells fortunes and gives advice to struggling Fab Students.

Initial planning

We first came up and designed our idea around the carnival attraction of Zoltar but decided to use Neil as our fortune teller. We first picked out which features we wanted like where it would move, how it would move, speaking, the input for it.

Electronics and Programming Overview

The electronics system brings Neil to life by enabling interactive voice, movement, and object detection. It integrates three major components:

  • Voice playback using AI-generated speech
  • Movement via stepper motors

  • Object detection using an IR sensor


Voice Generation and Speaker

To give Neil a voice, I used an AI voice cloning tool instead of manually clipping together clips from real recordings. I sourced a 30-second audio sample from a TED Talk and uploaded it to the voice cloner. After training, the tool allowed me to type custom phrases that would be spoken back in Neil’s cloned voice.

DFPlayer Mini

  • Generated 7 custom voice lines
  • Exported them as MP3 files: 0001.mp3 to 0007.mp3
  • Stored the files on an SD card
  • Used a DFPlayer Mini to read and play the audio

Initially, the DFPlayer was connected directly to a small speaker, but the volume was too low and the sound quality was poor.

Audio Amplification

TO DO

To improve sound output, I connected the DFPlayer to a lm386 Audio Amplifier which:

  • Gave greater control with a physical volume knob
  • Output was much louder and clearer
  • Connected two speakers for louder affect

Object Detection with IR Sensor

Originally, I tried to use a touch sensor to detect objects put into Neil’s container through a hatch. However, it was super sensitive and unreliable for our needs.

IR Sensor Solution

With Mr. Dubick’s help, I switched to using an infrared (IR) beam sensor:

  • Detects when an object breaks the beam between sender and receiver
  • Used in combination with a swinging trapdoor: pushing the door breaks the beam and activates the system

Integration

  • Used example code from Adafruit to configure the IR sensor
  • Connected it to trigger other components via Arduino Uno at first and then later the ESP3232 S3

Transition from Arduino to ESP32-S3

The initial setup used an Arduino Uno, since most tutorials and DFPlayer examples were built around it. However, the final version needed to use the ESP32-S3 Xiao.

Problems

  • Encountered issues transferring code to ESP32-S3
  • Ruled out UART and ESP32 hardware problems
  • Eventually discovered the DFPlayer Mini was faulty
  • Ordered and tested new DFPlayers and they worked

Motor Control and Movement

To control Neil’s physical movement, we used stepper motors for precise control. This included movement for:

  • Arms
  • Base/center turning (X-axis)
  • Arm motion (Y-axis)

Andrew helped with identifying the correct motor drivers and shields. We began with an Arduino-compatible motor shield but it seems it is impossible to use with an ESP-32 S3 Xiao. This meant I would need to program two different micro controllers and have the ESP-32 send a trigger signal to the Arduino to start the motors when the senor was activated.

Final Setup

  • Two stepper motors connected to the Arduino
  • Triggered by the IR sensor
  • Supported by a stepper driver/shield
  • Custom code for X and Y axis control

Summary

This system successfully combines:

  • AI-generated voice playback
  • Real-time object detection via IR
  • Precise stepper motor movement

This project took a very long time to complete. My advice is to think simple not cool.

PCB

I decided to create a power rail and ground rail as we had many components that needed these power sources from the ESP32. I also included a port for the sensor to connect to as well as a trigger port for the Arduino uno. I also included a spot for the DFPlayer Mini where its TX and RX connects to the UART ports on the ESP-32 S3 xiao. The DAC_l and DAC_r connect the audion amplifier.

Click here for the code for the Arduino and ESP32-S3 Xiao

Motion

I was assigned to make the automata bits of the model since I was the most experienced with Fusion 360 in our group. I found this form of motion to be an interesting challenge. I wish I had more time to refine some of the parts but it ended up working in the end.

Torso Rotation

This first contraption turns the whole doll from side to side. I originally started with just a sketch and played around with it until I got the motion I wanted.

I then made the sketch 3d, this model ended up being super janky and I didn’t work when I tried to add joints to it.

I decided it was best to start completly from scratch. I was able to get the motion links to work. I was pleased with the design and the motion it gave to I started again to make a completly new design.

When I made this version I thought that I could shrink the design by removing one of the components. I didn’t realise this at the time, but I made a quick return mechanism. This meant that the motion went from smooth to janky. I didn’t notice this until it was too late. As I only tested this model without anythign large to show the movement clearly. It looked good in Fusion and in real life so I stuck with the design, which I now regret.

This final model is what went in the project. The only thing that I didn’t change from the previous design was the gears. Everything else was planned and created to be a much better, more fleshed out version. This was also my first time making a print in place part that I actually cared about which took a few attempts to make. Other notable features are screw holes to mount the machine and a mount for a Nema 17 stepper motor.

With the mount I made for it:

Arms

For the arms I didn’t want to use a simple pulley. I wanted to challenge myself a little bit and look for a simple, yet interesting mechanism to control Neil’s arms. After scowering the web I eventually found a really outdated website with cool videos on mechanical mechanisms.

I used this linear motion to pull on some fishing line that connected to his hands, like a puppet.

The website has recently gone down, so I’ve linked the youtube channel instead.

Box

To create the final box design, all members of the group came together to sketch out and decide on the features they wanted to include.

  • On the left side, there will be a small 6in x 5.5 box at the corner where all the devices will be collected.
  • The front includes a slot where the player inputs a devices that will then start the machine and a holes where the speaker will be. In the sketch there is one place for the speaker, but in the final design we decided to add two speakers.
  • On the right and back side, there was no need to add anything.

Once the box sketch was finalized, I designed it in Fusion 360.

This is the final Fusion 360 design. it includes 2-inch tabs around the box to allow for easier assembly.Once the design was complete, we decided that plywood would be the best material to use. I then used the laser cutter to print and cut the design.

Box Assembly

Once the box was put together, Andrew designed small joints to be placed on the inside and outside corners of the box, allowing each piece to be connected securely and providing areas for screws.

Other Parts

Some other things I made was a cover for the fan moung on the arduino cnc sheild case.

I also made brackets for securing the walls of the box

For the parts bin I made guide rails to keep the box in place.

I also made a mount for the speaker, but this ended up not working as well as mounting the speaker straight to the box.

Files

Neil Head

To make Niel’s head we used makerworld.


Last update: June 4, 2025