Skip to content

Week 12: Mechanical Design and Machine Design

IN PROGRESS

group assignment: • Design a machine that includes mechanism + actuation + automation + application • Build the mechanical parts and operate it manually • Actuate and automate your machine • Document!!

FAB NODA PRESENTS: BIRDPECK

Video Link: Birdpeck

Bird Peck Slide

Documentation

At Fab NODA, we are made up of two students and we’re both brand new to the world of digital fabrication. So, we decided to make a machine called “BirdPeck” that would be a set of three birds striking a wooden block to produce sound. The machine would play a tune (Mary Had a Little Lamb) and could also operate in a metronome-like capacity through a local Web Server that allows for speed, acceleration, and motion control of each motor.

Team Work Flow

Our team is Castor, angela, and our instructor Will. After meeting together to plan our project, Castor took on mechanical design, laser cutting, 3D printing, and video production whereas angela focused on electronics, programming, automation, actuation, overall documentation, and slidedeck. We worked together on assembly and testing. We had Will’s help and guidance along the way. As new ideas sparked along the way in the process of making, we made sure to communicate together. We worked in parallel and each of our focus aligned well for what needed to work on to complete our final project ideas. We also worked together during key integration steps, like linking up the stepper motor with the pulley system and matching speed/acceleration of motor in a way that aligns with the design evolutions of the striking bird head. We communicated pretty much daily and made use of our shared folder for sharing design files and code.

Machine Design

We originally thought to have a single bird moving in a circular motion to strike notes but we decided to go from a single bird to a modular design with three birds on one axis. Each bird operates independently using the same set-up of a stepper motor, a rack and pinion 3D printed gear mechanism, 3D printed and laser cut plywood side panelling, and other parts like a pulley, bearing, screws, and pins.

Prototyping and Simulation

Here is a manually operated cardboard protoype using 4 pivot points and two linkages:

castor's prototype

Prototype!

Castor began drafting the design on FreeCAD to determine correct gear ratios and motion range

castor's simulation

Rough draft of design on FreeCAD

This short on YouTube shows an example of the rack and pinion mechanism used for this project.

Eventually, we shifted the design to Fusion 360.

fusion 360 design

Screenshot of the bird design

Part Fabrication

We fabricated parts using laser cutter and 3D-printed parts. We went through many different iterations of the design and had to make countless tweaks here and there to get the parts working together. Below are some iterations:

bird

bird

bird

Machine and Mechanism Building

Once we had all of our parts – we worked on assembly.

pic of all our parts

Layout of our parts for assembly

We started assembly by pressing pins in using a Dake Arbor press which we have in the lab. This presses with 2 tons of force by the way! Taking three pins and one of the side panels, we set up everything on 123 blocks which are fixturing blocks with holes that allow for pressing the pins through. This method keeps everything aligned which is very important for correct operation of the mechanism.

After pins are pressed into the plate, next assembled are the bird head, rack and pinon and other components that make up the overall mechanism.

bird mechanism

The basic mechanism of the bird pecker.

Then align the second plate and use the arbor press again to press in the pins to this second plate. This could be done by hand if needed too.

arbor press

Pressing in second plate with arbor press

Next, we can place the wooden side plates of the bird. Pressing it in through the pin, place the bearing screw it down and place pulley head over that.

For fixturing the motors we put mounted the stepper motors on a 3D-printed mount using an M3 screws whcih go ito their face. This is then place on a cardborad tube in between where our birds will be mounted and tightened using a wingnut.

stepper motor mounting

Stepper motors mounted

assembled birds

Assembled birds

After motors were mounted we mounted the birds. Also strung the wooden striking blocks.Ready to test operation!

final back

View from the back of our final bird peck machine

Actuation and Automation

Along the process of machine and mechanism building, we spent time figuring out the electronics, software, and automation that would run the machine.

We used a XIAO ESP32-C3 board placed in a custom made PCB. We used 3 TB6560 stepper motor drivers. We wired to power supply at 24V for the motors and used the USB for logic at 3.3V.

We also had a local web server from the ESP32 which controlled speed, acceleration, and motor motion. In this way, the machine could act in a metronome-like capacity. We wired a push-button on the side of the machine which automated the machine to play “Mary Had a Little Lamb” on the blocks.

Stepper Motor Operation

After many hours of testing various DC motors, encoders, and motor driver boards, we ended up using a stepper motor with the TB6560 Stepper Motor Driver board. Here is a tutorial on TB6560 Stepper Motor Driver boards referenced . Also, Will shared this library by MobaTools made for model railroader enthusiasts which had code for stepper motors.

Web Server Interface

We learned how to control a stepper motor through a web server via the ESP32 chip. Eventually, Will shared more code from the MobaTools library that had an ESP32-Web example. It took some German to English translation but this was the basis of code used for hosting the webserver which proved extremely helpful for operating each motor during testing.

Video of operating a stepper motor hooked up to bird pecker using a slow and fast speed. Very cool that you can interface on the web!!

late night coding this bird thing!

Making progress in the weeds of late night coding. At this point, I figured out how to add a second set of inputs for a second motor and separated it so that the top inputs apply to motor 1 and the bottom apply to motor 2. After a little more testing, I’ll apply the same logic to create a third set of inputs for the final motor

web server

Motor set up using web server after updating code to include third motor

Automation

After the stepper motors were reliably running with the web server interace, we next added to the void loop a function for playing the “Mary Had a Little Lamb” tune when a button is pressed. After testing different functions and timing using delay and speed/ramp length times, we found a good code.

three motor steppers mary had a little lamb

Three motors set up to Web Server and with button. Running motors to the tune of Mary Had a Little Lamb

Electronics Production and Wire Management

Designed and made a circuit board for mounting the Ziao and wiring motors. Theres just enough pins to wire all three stepper motors and have I2C lines open (though for this assignment we’ll just wire a button on one of those pins). After milling and soldering, we rewired the stepper motor drivers and button.

We used power supply equipment for motor drivers supply at 24V and a USB cable to power the XIAO board. To access these cords we needed to cut a hole in the base box to feed the wires through.

We also had this push button switch with screw terminals in the lab which is used in places like elevators. You can wire it by simply placing the wire underneath the screw before tightening it.

After wiring everything up, all the motors ran smoothly on the first attempt. Eventually, I got some zip ties an tape for managing wires and fixutred the motors and PCB board into place.

power wiring

Creating an access hole for wires

button

Fastronix Momentary Push Button Switch. Wired to the ground pins and pin D5 on the XIAO board.

wiring under the hood

A look under the hood. Tidied up the wires

Troubleshooting and Problem-Solving

Below are some of the problems we ran into as a team and how we solved them:

Mechanism Breakdown

After our first round of assembly, for first attempt to run the machine only one of the birds worked smoothly. We decided to switch out the plastic gears on the stepper motors for metal ones and we greased the gears inside the bird with with silicone grease. We also just used the Web Server Interface to run the motors so the parts could wear in.

greasing up the birds

Adding in grease to the gears

After making these changes the bird ran much more smoothly.

Screws falling out! During one of our early build iterations, the screws started falling out of the bird side panels while angela was testing code and motor operation once assembled. This was because the earlier iteration of the side panels was not long enough for the bearing to be drilled in on both sides. To fix this Castor redesigned the side panels to be longer, and used his artistic skills to make it look more like a goose. This worked perfectly to drill in both ends of bearings.

DC motor + Encoder struggles When testing with DC motors, we learned a lot, but ran into struggles with getting them to the precision of speed and motion control desired. We tried using an encoder which worked within certain ranges but eventually we decided to move to stepper motors for easier control of position and acceleration.

Possible Improvements

Some possible improvements for our machine include:

  • We could test using different striking blocks or other material for producing different kinds of sounds
  • We could simplify the design of the mechanism by translating the motion more directly

Design Files

Find a link to our design files here