Skip to content

12. Machine Design- Wire Bending Machine


Overview and Research

Our group — Angel Fang, Noah Smith, Kathryn Wu, and Jenna Chebaro — designed and built a machine capable of bending wire into custom shapes. Mr. Dubick proposed the idea, noting that having a machine in our lab capable of bending wire would be both a practical and engaging addition to our lab.

Our machine is most directly inspired by the wire bending machine by the youtube channel how to mechatronics, but we also used a lot of googling, AI prompts such as this, and a group project of our lab from last year, where they used a very similar mechanism for our feeder.

Slide

3D Designs

For our design, we used a shared project in Fusion 360, where we then used different designs for all of the components. Before starting on these designs, we did standardize some things. The things we agreed on were the diameter of the bearings (25mm) and the diameter of the inner tube (20mm).

We thought it would be efficient for the 3D parts of our machine to be a group design effort, so we partitioned the parts. With those in mind, we designed separately then tweaked in order to put it all together.

Part Member
Z-Axis Gears and servo attachment Kathryn
Bender Gear and rack pin Angel
Pillow Block and Shaft Clamp Jenna
NEMA 17 mount, bearings, copper tube Noah

Z-Axis Gears - Kathryn

In designing the gears, there was a really nice feature that Angel found. Under Utilities -> Add-Ins -> Scripts and Add-Ins -> Spur Gears, there is a window where you can input the metrics for the gear that you want and it can be automatically made.

I used the following settings for the smaller z-axis gear. The larger one will have the same module but differing thickness, teeth number, and diameter.

Noah let me know that the ideal dimensions to get a gear tight on a stepper motor was a hole with a diamter of 5.25 mm and the line that makes it a D-shape being 0.75 mm long.

I extruded a cylinder around the hole as well, because it would give more strength to the hole so that it does not get worn down easily.


Large

For the larger Z-axis, I used the add-in to make the gear then designed an addition to it so that it could be secured on the tube.


Bender and Servo Mount

To design the bender and servo mount I find made the gear that it is added onto. I stayed close to the measurements of the original tutorial’s design, other than changing the design of the hole in the center to accomodate the bearings we have in the Lab.


Bearing Holder - Jenna

I followed the dimensions of the provided stl file, which was a 35mm inner circle with a 27mm lip. It turned out that there were already bearings at the Fab Lab and upon testing the file I printed, the measurements were far too large.

I measured with calipers to find that the bearing was 24mm. I set the diameter to 24.05, considering that 3D printers undersize slightly. I changed the design process and shaping as well.

I printed the new file, testing about halfway through by pausing and inserting the bearing. I was quite distraught as the fit was fairly loose. Noah told me I should still wait to see how the print works out. I tested the fit for the finished print to find that it was no longer loose. In fact, I initially had the opposite problem as the bearing would not fit. I carefully aligned it with the hole until it snapped in with no give whatsoever. This was competely ideal, I printed a second holder and moved on.

However, it turned out that these bearings were not ideal for the wire. I needed to adjust the diameter to 30.05 inches, keeping the extra distance consistent. I 3D printed it with no issues.

I ended up having to re-print due to changed design considerations, making a 30mm circle and eventually thinning out the design.

NEMA Motor Mount - Jenna

I based my measurements here off of the NEMA 17 datasheet, since we would use this motor. I structured the surrounding dimensions around these.

While creating an angle for the corner required trial and error, the other components did not cause any issues.

Clamp - Jenna

The wire clamp design involved creating a 30mm circle in the center and scaling a proportional gap at the top.

Wiring - Angel Fang

For the wiring part, I followed the circuit diagram that the tutorial provides.

Then I create a circuit on the breadboard with only one motor and one servo connected. I took off the switch because we thought it was unnecessary.

After this, Noah Smith (our coding genius) started to code the motor and the servo and made the motor spin like what we want and the servo spin constantly.

PCB - Angel Fang and Noah Smith

Failed PCB - Angel Fang

After Noah successfully made one motor and a servo work, I started to design the PCB board for our project.

This is the schematic diagram.

After Noah checked my wiring, we found out that the foot print may not be the right one for the motor driver. Then Irealized that it was just upside down so it was actually fine.

Then I made the traces in PCB editor.

Then I started milling. However, since it was my first time milling, the PCB was messed up on its back side.

After consulting our expert Cooper Cumbus I managed to mill a double sided PCB board.

Then I started to solder bunch of headers,a 5V regulator, and two capacitors onto the PCB board.

It took me two hours since the headers and the SMD components are really hard to solder on. But I managed to do it. I was also using multimeter to test if the current is flowing correctly everytime I soldered one component on.

Unfortunately, when you see the title, you know the fate of this board. It was not working correctly. It shorted the microcontroller XIAO esp32-c3.

After 1 hour of checking, we assumed that it was the design problem and we sadly gave up on the board.

Noah saw me being so miserable about making the board, so he took my heavy burden. He designed a more simplified PCB which got rid the unnecessary part like the capacitors and the regulators.

This is the board that Noah designed:

After I soldered all the header pins on, we nervously started to test the board.

Here’s the finished board with components on.

The board that Noah designed worked perfectly fine, and we can finally focus on the coding part.

fully 3d printed bearing

clamp that uses flexibility of plastic

feeder inspired by the flywheels in nerf guns

interfaces between the 3d printed bearing and the inner tube

motor holder, made for nema17 with m3 screws

mechanism where the bender touches the wire, uses gearing & mechanical advantage

Wiring and PCB

Assembly

Heres where we ran into some conflicting parts of our 3d designs. the main problem was that each part had a different height, but through hasty redesigns or really quick fixes, we got it working by the showing deadline.

Quick Fixes

All these fixes were put in place the day before the slide and the rough outline of this page was due.

Feeder & Tape

This was the more janky of the 2 fixes, as it was simply wrapping a bunch of tape around the feeder until it was thick enough for the wire. This was due to us finding a really good wire the day before this was due, so we pivoted to that and the feeder was the only mechanism really hit. It worked, not well, and will have a more permanent solution in the final.

Long Tube & Epoxy

the machine has a “spine” of a long tube, which contains the wire to be bent inside it. the design we had was strong in that it could be printed in multiple parts and combined to reach just the right height, but weak in that it was bendable and very easy to break. In order to fix this, we used 5 minute epoxy on the tube, which hardened. This actually worked surprisingly well. It allowed for the best of both worlds, a design bigger than a single buildplate of our printer, while also resulting in a rigid tube. We will probably end up using this in the final version of it, as it works for now and it will work for later.

Structural Design and Assembly - Kathryn

Frame

The design of the frame is also largely based off of the How To Mechatronics design. However, a few changes we made include lowering the height and length of the frame, which made it more compact. We found that there was a lot of unnecessary extra space below the wire bending mechanism considering we only needed to make sure it could turn all the way. Because the mechanism we chose to use was also partially different from their design, it did not need to be as long.

This was the first iteration of the base design. We used 0.25 inch plywood.

Originally, we were concerned about whether 0.25 inch plywood would be able to hold the weight of our machine. After this test frame, we decided that it would be fine and we would not need to use 0.5 inch instead. For our final base design, we needed a slit for one of the larger gears, the one that allows the wire bending mechanism to be turned.

This is a sketch of measurements for the final design.

Here it has been printed out, secured using wood glue, and with the components placed to see if they fit properly, which they do.

Ultimately, the components would be secured using screws drilled into the wood.

Wire Bender

The wire bender section included the servo motor that controlled a tube that moves up and down and a stepper motor that controls how the wire bends after being fed through. Below is the servo mount and big gear and the smaller gear.

Because we want the wire bending mechanism to be able to turn around, there needed to be a seperate piece that was nota attached to the larger frame. Here is the sketch of measurements for that piece.

The first version I prined out of that design was rectangular, which I quickly realized would not work when the gear was not able to turn to the extent it should. I realized it was because of the design of the gear, how there was a portion underneath that would get caught in the corner of the rectangular design. To accomodate for that, I rounded the corners of the design in hopes it would be enough for the gear to turn all the way.

However, it was not enough and I needed to carve even more out. This was the design that ultimately worked.

This is the gear mechanism working and turning according to code.

Assembly

As Noah mentioned previously, there were a few quick fixes we turned to for assembly the night before. One of the main lifesavers was epoxy. Below is how the turning mechanism should operate.

However, it was to be expected that when there was something much heavier on the end, the weight would overcome the friction the gear and bearing had on the long tube. It ended up like this.

We were considering adding wider tubes over our long tube to secure the seperate pieces that constitute it, but we were worried that, too, would not be enough. What we ended up going with was epoxy. We used it to connect the smaller tubes and used it in tandem with the wider tubes to make sure seperate parts would not bend.

This method worked and the end was able to turn based on the gear mechansim.

Then there was also the feeder section. We realized that it was best to feed the wire through when it was straight. When it was not, it turned out something like this.

We also faced an issue where the wire would get caught and slide off from the center of the two gears and this led to it eventually not feeding through.

Issue right at the end

Right as we were nearly done with this project, The port for the stepper driver farthest away from the microcontroller stopped working. We think its a ripped trace, which we believed using enough hot glue to completely cover the area and prevent the driver being taken out of its socket also ripping out the copper would be enough, but it simply stopped working. It would cause the motor to vibrate a little, so power was coming, but control signals were not. This was originally connected to the motor that actually bent the wire, but because this was 1 of 2 required motors (the feed and the bend), we had to repurpose the middle motor, which originally rotated the “spine” to operate that wire.

Code - Noah

The intention for the code was some way to communicate with the machine through wifi. After looking at multiple grbl projects with espressif chips, it was decided that those were too advanced for our needs as we had ~~3~~ 2 steppers and a servo that only had to work linearly, so we decided on using a json file instead. The json, an example being seen below, allows us to control when a stepper runs, how long it runs, how fast it runs, and the direction it runs.

{
  "feed": [
    {
      "steps": 500,
      "stepdelay": 4500, 
      "start_delay": 0
    }
  ],
  "z": [
    {
      "steps": 80,
      "dir": 1,
      "stepdelay": 17500,
      "start_delay": 8000
    }
  ],
  "servo": [
    {
      "angle": 170,
      "start_delay": 0
    }
  ]
}

The code itself is a simple webserver that masks use of async functions (multiple can run at once) in order to allow for all of this queueing. Currently, a curl command (the most basic way to send some data on windows) is used to send the json file to the esp, an example of one being below

curl.exe -X POST http://bender.local/bend -H "Content-Type: application/json" --data "@commands.json"

Hero Shot

Motion

Wire Bending

Design Files

All the 3d design files, the wood laser cut, the arduino code, and the example json that was used in the hero shots can be found here


Last update: June 2, 2025