You are on page 1of 83

HOME ARDUINO TUTORIALS HOW IT PROJECTS LEARN 

PROJECTS WORKS

WHAT'S NEW? …
ARDUINO AND MPU6050 ACCELEROMETER AND GYROSCOPE TUTORIAL FOLLOW ME   
 …
HOW TO TRACK ORIENTATION WITH ARDUINO AND ADXL345 ACCELEROMETER

Home  Projects
DIY ARDUINO BASED RC HOVERCRAFT

Arduino 3D Wire Bending Machine


DIY ARDUINO GIMBAL | SELF-STABILIZING PLATFORM

 Dejan  Projects  47

In this tutorial I will show you how I built an Arduino based 3D wire bending
machine. This is actually a typical mechatronic system because it involves
mechanical, electrical and computer engineering. So therefore I believe many
engineering students or anyone who is new into mechatronics found this project L AT E S T
interesting.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


ARD
DIY ARDUINO GIMBAL | SELF- AC
ARDUINO ANT HEXAPOD ROBOT STABILIZING PLATFORM GYR
 Dejan  22  Dejan

Overview
3D Printer Models
Here’s the working principle of this 3D wire bending
Tube Bender machine. So first, the wire goes through a series

Copper Wire rollers, or straighteners. Using a stepper motor the


wire is precisely fed to the wire bending mechanism
Metal Bender which also uses a stepper motor as well as a small
servo for the bending process.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


There’s also another stepper motor, called the Z-axis, which actually enables the
machine to create three dimensional forms. Of course, the brain of the machine
is an Arduino board which along with the other electronics components is
attached on a custom designed PCB.

POPULAR

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Ultrasonic Sensor HC-
SR04 and Arduino
Tutorial

 Dejan  94

As for the program, I made few custom functions for making various shapes, like
a star, a cube and a simple stand, as well as a manual mode where we can make
the wire forms by entering commands through the serial monitor.

DIY 3D Wire Bending Machine 3D Model


As usual, I started by making the project using a 3D modeling software. You can
download and the 3D model below.

Arduino and HC-05 Bluetooth Module


Tutorial
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
 Dejan  34

Arduino TFT LCD Touch


Screen Tutorial

 Dejan  160

Design inspiration: YouTube video

Solidworks:

Arduino 3D Wire Bending Machine Solidworks files 5.04 MB

DOWNLOAD

STEP file:

Arduino 3D Wire Bending Machine STEP file 4.63 MB

DOWNLOAD

STL files for 3D Printing:

Arduino 3D Wire Bending Machine STL files 348.55 KB

DOWNLOAD

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


For some of the parts, like the gears, the bearing pillow blocks and some shaft
couplers I used a 3D printer to make them. The STL files of these parts, which are
used for 3D printing, can be downloaded from the files above.

My new 3D printer, Creality CR-10, did a great job and printed the parts with great
quality. Here’s a link to this 3D printer in case you want to check it out.

Building the Wire Bending Machine


I continued with preparing the other parts, for which I used MDF and plywood. So
once I took all dimensions from the 3D model, using a circular saw, I cut the
pieces to size. I used 8 mm tick MDF and 18 mm tick plywood. Once I got them F O L LO W M E !
ready I started with the assembly. First I made the base out of two MDF plates
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
and 4 plywood columns. For securing them I used a wood glue and some screws. Join My Newsletter!

Get notified when I publish new projects


and tutorials straight to your inbox.

Enter you email

SUBSCRIBE

How To Mechatronics
23,600 likes

Like Page Share

Next on the top panel I attached the 3D printed bearing pillow blocks using some
8 mm bolts and nuts. We can notice here that I added 3 mm tick MDF plates Subscribe to my YouTube channel!
between the top and the pillow blocks so that I get the proper height. Now in
How To Mechatronics
these blocks we can fit the 6202 bearings.
YouTube 252K

C R E AT I V I T Y H E R O
PROJECT

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Their outer diameter is 35 mm and the inner diameter is 15 mm. So now, through
these bearings, we need to insert a 15 mm hollow shaft so that the wire could
pass through it. This shaft is actually the Z-axis, which enables to bending
mechanism to rotate around the wire and in that way make three dimensional
forms. I used a copper tube for that purpose and its length needs to be around 30
cm.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


In between the two bearings I also inserted a 3D printed gear with module of 1.5 SEARCH
and 30 teeth. The gear has custom design slots where we can insert M3 nuts and
then using M3 bolts we can tighten the gear to the shaft.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Next we need install the Z-axis stepper motor. For that purpose I 3D printed a
custom mounting bracket. So I secured the stepper to the bracket using M3 bolts,
and then inserted the 18 teeth gear on the motors shaft. I used the same method
for securing the gear to the shaft as shown earlier.

Then using a 6 mm drill I made two holes on the top on which the mounting
bracket will be secured. We can notice that the bracket instead of holes, has slots
which enables the two gears to be properly paired.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


I moved on with installing the stepper motor for the feeder mechanism. This
motor will be directly mounted on the top plate, so I drilled the appropriate holes
on it. Then using four bolts I secured the stepper to the plate, and in case you
wonder what those nuts do here, they actually act as distance nuts because the
bolts I had were longer and couldn’t fit into the motors threads.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


So now on the shaft of this stepper we need to insert the feeder. For that purpose
I 3D printed a custom shaft coupler on which I inserted a copper tube which will
actually be the contact surface of the feeder.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Then on the opposite side of the motor I inserted a lever, on which I attached a
bearing which will press against the feeder. For getting enough grip so the feeder
could move the wire, I will attach a piece of plywood with a T-nut on it, and then
using a bolt we will be able control the grip of the feeder.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


The next step is making the wire straightening system. Using three M8 bolts I
secured a piece of plywood that I previously drilled according to the 3D model.
Now on top of it I inserted the rollers. I made the rollers out of bearings and 3D
printed grooved outer rings.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Three rollers go on this side, and two rollers on the other side. For the other side
I made a slot in the plywood piece so that the bolts stay flush with the piece. Now
using just two bolts we can pair the two side, and using the nuts we can tighten
the straighteners appropriately.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Once finished with this step, I added two more pieces of plywood in front and
after the straighteners which will serve as wire guides.

Ok, so now we can move on with making the wire bending mechanism. First on a
piece of MDF we need to attach the bender motor. Before I did that, the MDF
piece that I had needed some shaping, so using a handsaw, a coping saw and a
rasp I easily got the desired shape. Then using a 38 mm hole saw I made an
opening for the bigger stepper that we will use for the bending, a NEMA 23
stepper motor. Also I drilled some smaller holes needed for attaching the other
parts.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


I secured the NEMA 23 stepper using M4 bolts and nuts and on its output shaft I
attached a gear with module of 2.5 and 18 teeth. This gear will be paired with
bigger 30 teeth gear which is a custom designed gear with integrated plate for
mounting a MG996R servo. This servo will move a rack and pinion mechanism,
which is actually a pin which will pop out of the gear and it will serve for bending
the wire. Using a 5 minutes epoxy I secured a bearing onto the gear and also
added a piece of copper tube onto the rack which will be the contact surface
when bending the wire.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


After the epoxy dried out, I paired the two gears by securing the bigger gear in
place with a M8 bolt and a nuts. Then I inserted the rack and the servo in placed,
and secured it using the screws provided in the servos package. Then I secured
the pinion gear onto the round horn of the servo using two M3 bolts and nuts.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Finally I attached the horn to the servo and with this the bending mechanism was
completed.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


What’s left to do now is to attach the bender to the Z-axis. I did that using the two
3D printed shaft clamps. First I secured them to the bender plate using M6 bolts
and nuts, and then inserted them into the Z-axis. I inserted the two nuts in place,
and using the bolts I tightened the clamps to the shaft. So now all moving parts
are working properly.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Actually there are two more small details to be added. That’s this 3 mm nozzle on
the shaft where the wire comes out.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


And at the bottom of bender I placed a micro limit switch which will be used for
setting initial position of the bender.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


And that’s it, our 3D wire bending machine is almost done. I say almost, because
now we need to give live to this machine, or connect the electronics components
and program it.

Circuit Diagram
Here’s the circuit diagram of this project.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


So the three stepper motors are controlled using the three DRV8825 stepper
drivers. For powering the steppers and the whole project we will use 12V power
supply with at least 3A of current rate.

For powering the servo, we could use the 5V coming from the Arduino, but the
MG996R servo can be power hungry and the 5V voltage regulator of the Arduino
might not be able to handle it. Therefore, I decided to use a separate 5V voltage
regulator, the LM7805, which is good enough to power the servo for this project.
There is also a limit switch for the bender which has a pull up resistor it’s
connected to a digital pin of the Arduino board.

You can get the components needed for this project from the links below:

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Stepper Motor – NEMA 17……… Amazon / Banggood

Stepper Motor – NEMA 23 …….. Amazon / Banggood

DRV8825 Stepper Driver…….…. Amazon / Banggood

Micro Limit Switch ………..……… Amazon / Banggood

12V 2A Adapter…………………..…. Amazon / Banggood

Power Jack…………….………….…… Amazon / Banggood

Arduino Board ……………………… Amazon / Banggood

*Please note: These are affiliate links. I may make a commission if you buy the
components through these links. I would appreciate your support in this way!

PCB Design
Next, in order to get rid of wiring mess and keep the electronics components
organize I designed a custom PCB using the EasyEDA free online circuit design
software. The circuit has many connection, so I used both the top and the bottom
layers to organize them. I also added pins for selecting the steppers resolution,
added one more limit switch connection and provided additional digital and
analog pins coming from the Arduino in case we need them for something.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Here’s a link to the project files of this PCB design. So once finished with this
design I generated the Gerber file needed for manufacturing the PCB.

Gerber file:

Gerber_Automatic 3D Wire Bending Machine PCB 77.29 KB

DOWNLOAD

Then I ordered the PCB from JLCPCB, which is actually the sponsor of this project.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Here we can simply drag and drop the Gerber file and once uploaded, we can
review our PCB in the Gerber viewer. If everything is all right then we can go on,
select the properties that we want for our PCB, and then we can order our PCB at
a reasonable price. Note that if it’s your first order from JLCPCB, you can get up to
10 PCBs for only $2.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


After several days the PCBs have arrived. The quality of the PCBs is great and
everything is exactly the same as in the design.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


So now we can move on and install the electronics components onto the PCB. I
started by soldering pin headers to the PCB. This enables easier connecting and
disconnecting of the components when needed. As for the smaller components,
like the capacitors, the resistors, the voltage regulator and the terminal blocks I
soldered them directly onto the PCB.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Once finished with this step, now we can insert the stepper drivers and the
Arduino in place. Then we need connect the power plug and the power switch to
the terminal blocks, connect the cables to the stepper motors on one side and
connect them to the PCB on the other side. The servo is connected to digital pin
number 2 and powered with the 5V coming from the LM7805 voltage regulator.
Finally we can select stepper resolution by connecting the resolution pins below
the drivers.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


I decided to use 16th step resolution so we need to connect the right pins instead
of the middle ones as seen on the photo above. So the electronic components
are now ready and we can move on with programming the wire bending machine.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Arduino Code for 3D Wire Bending Machine
Project
As the code is a bit longer, for better understanding, I will post the source code of
the program in sections with description for each section. And at the end of this
article I will post the complete source code.

For controlling the stepper motors I will use the AccelStepper library by Mike
McCauley. So we need to include this library, as well as the servo library for
controlling the servo motor. Then we need to define the pins to which the
steppers are connected and some variables needed for the program below.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


1. #include <AccelStepper.h>
2. #include <Servo.h>
3.
4. #define limitSwitch 11
5.
6. // Define the stepper motors and the pins the will use
7. AccelStepper feederStepper(1, 5, 6); // (Type:driver, STEP, DIR)
8. AccelStepper zAxisStepper(1, 7, 8);
9. AccelStepper benderStepper(1, 9, 10);
10.
11. Servo servo01;
12. String dataIn = "";
13. String manualStatus = "";
14. int count = 0;
15. int dist;

In the setup section we set the initial position of the servo or the bending pin, and
also set the initial position of the bender gear. This is done with the help of the
limit switch. The stepper rotates toward the switch and once it’s pressed the
motor starts counting the steps from zero and position itself to zero degrees,
ready for bending.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


1. void setup() {
2. Serial.begin(9600);
3. pinMode(limitSwitch, INPUT_PULLUP);
4. servo01.attach(2);
5. servo01.write(40); // Initial position, bending pin up
6. // Stepper motors max speed
7. feederStepper.setMaxSpeed(2000);
8. zAxisStepper.setMaxSpeed(2000);
9. benderStepper.setMaxSpeed(2000);
10. // Homing
11. while (digitalRead(limitSwitch) != 0) {
12. benderStepper.setSpeed(1200);
13. benderStepper.runSpeed();
14. benderStepper.setCurrentPosition(0); // When limit switch pressed set
position to 0 steps
15. }
16. delay(40);
17. // Move 1400 steps from the limit switch to starting position
18. while (benderStepper.currentPosition() != -1400) {
19. benderStepper.setSpeed(-1200); // if negative rotates anti-clockwise
20. benderStepper.run();
21. }
22. benderStepper.setCurrentPosition(0);
23. }

Now in the loop section, we wait for commands coming from the serial monitor. If
we type manual, we will enter the manual bending mode or if we type for
example star, the start() custom function will be executed and the machine will
automatic make a star form for us.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


1. void loop() {
2. String mode = Serial.readString();
3. if (mode.startsWith("manual")) {
4. manual();
5. }
6. if (mode.startsWith("star")) {
7. star();
8. }
9. if (mode.startsWith("cube")) {
10. cube();
11. }
12. if (mode.startsWith("stand")) {
13. stand();
14. }
15. }

Let’s take a look at this custom function.

1. void star() {
2. while (count != 5) {
3. int feed = 38; // mm
4. int feedDistance = feed * 48; // 48- constats that map the mm value to
number of steps the stepper show move
5. while (feederStepper.currentPosition() != feedDistance) { // run until
it reaches the distance value
6. feederStepper.setSpeed(1200);
7. feederStepper.run();
8. }
9. feederStepper.setCurrentPosition(0); // reset the current position to 0
10. servo01.write(40); // Set the bender pin up
11. delay(200);
12. int angleConst = 18; // angle constant
13. // Bend the wire 52 degrees
14. while (benderStepper.currentPosition() != -52 * angleConst) {
15. benderStepper.setSpeed(-700);
16. benderStepper.run();
17. }
18. benderStepper.setCurrentPosition(0);
19. delay(100);
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
19. delay(100);
20. // Go back 52 degrees to initial position
21. while (benderStepper.currentPosition() != 52 * angleConst) {
22. benderStepper.setSpeed(1200);
23. benderStepper.run();
24. }
25. benderStepper.setCurrentPosition(0);
26. delay(100);
27. // Feed the same distance again
28. while (feederStepper.currentPosition() != feedDistance) {
29. feederStepper.setSpeed(1200);
30. feederStepper.run();
31. }
32. feederStepper.setCurrentPosition(0);
33. delay(100);
34. servo01.write(130); // Set the bender pin down
35. delay(200);
36. // Set bender to new initial position, for bending in the other
direction
37. while (benderStepper.currentPosition() != -42 * angleConst) {
38. benderStepper.setSpeed(-1200);
39. benderStepper.run();
40. }
41. benderStepper.setCurrentPosition(0);
42. delay(200);
43. servo01.write(40); // Bender pin up
44. delay(200);
45. while (benderStepper.currentPosition() != 105 * angleConst) {
46. benderStepper.setSpeed(700);
47. benderStepper.run();
48. }
49. benderStepper.setCurrentPosition(0);
50. delay(50);
51. while (benderStepper.currentPosition() != -63 * angleConst) {
52. benderStepper.setSpeed(-1200);
53. benderStepper.run();
54. }
55. delay(100);
56. servo01.write(130);
57. benderStepper.setCurrentPosition(0);
58. count++;
59. }
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
59. }
60. }

So here we enter a while loop which is executed 5 times, because obviously the
star has 5 points. We start by setting the feed value, or that’s how much wire will
be feed in millimeters. This value is then multiplied by 48 which translates feed
value into appropriate steps for the stepper motor to move. Then using the run()
function, we rotate the feeder motor with a speed set by the setSpeed() function.
We stops when the above feedDistance value is reached, and right after that we
set the current position value of the stepper zero.

1. int feed = 38; // mm


2. int feedDistance = feed * 48; // 48- constats that map the mm value to
number of steps the stepper show move
3. while (feederStepper.currentPosition() != feedDistance) { // run until
it reaches the distance value
4. feederStepper.setSpeed(1200);
5. feederStepper.run();
6. }
7. feederStepper.setCurrentPosition(0); // reset the current position to 0

In the next step we bend the wire 52 degrees. This is done in similar way as
explained above. Here we also have an angle constant which is multiplied with
the desired angle. Once that value is reached by the motor, the motor stops, reset
its current position to 0, and then runs the same number of steps in the opposite
direction which actually returns the motor to its initial position.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


1. // Bend the wire 52 degrees
2. while (benderStepper.currentPosition() != -52 * angleConst) {
3. benderStepper.setSpeed(-700);
4. benderStepper.run();
5. }
6. benderStepper.setCurrentPosition(0);
7. delay(100);
8. // Go back 52 degrees to initial position
9. while (benderStepper.currentPosition() != 52 * angleConst) {
10. benderStepper.setSpeed(1200);
11. benderStepper.run();
12. }
13. benderStepper.setCurrentPosition(0);
14. delay(100);

Then again we feed the same length of wire and we set the pin down so that the
bender can move to a new initial position which is used for bending in the other
direction. The bender pin is then raised, and so we bend the wire 105 degrees in
the opposite direction. The commands are repeated 5 times and that’s how we
get the star form.

In similar way as explained above we make the cube shape or actually any other
shape we can come up with. As for the manual mode, the working principle of the
commands are the same, except that we have few more lines for reading the
commands coming from the serial monitor. For example for feeding the wire, we
need to type “f”, plus the distance in millimeters, for bending the wire, we need to
type “b”, plus the angle in degrees, and for rotating the Z-axis, we need to type “z”,
plus the angle in degrees.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


1. if (dataIn.startsWith("f")) {
2. dataInS = dataIn.substring(1, dataIn.length()); // reads the feed
value
3. dist = dataInS.toInt();
4. Serial.print("Feed ");
5. Serial.print(dist);
6. Serial.println("mm wire.");
7. dist = dist * 48;
8. while (feederStepper.currentPosition() != dist) {
9. feederStepper.setSpeed(1200);
10. feederStepper.run();
11. }
12. feederStepper.setCurrentPosition(0);
13. delay(100);
14. }

So that’s how the program that I made works, but of course, there are many other
ways this to be coded. Here’s the complete Arduino code for this 3D Wire Bending
Machine:

1. /*
2. Arduino 3D Wire Bending Machine
3. by Dejan Nedelkovski
4. www.HowToMechatronics.com
5. Library - AccelStepper by Mike McCauley:
6. http://www.airspayce.com/mikem/arduino/AccelStepper/index.html
7. */
8.
9. #include <AccelStepper.h>
10. #include <Servo.h>
11.
12. #define limitSwitch 11
13.
14. // Define the stepper motors and the pins the will use
15. AccelStepper feederStepper(1, 5, 6); // (Type:driver, STEP, DIR)
16. AccelStepper zAxisStepper(1, 7, 8);
17. AccelStepper benderStepper(1, 9, 10);
18. Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
18.
19. Servo servo01;
20. String dataIn = "";
21. String manualStatus = "";
22. int count = 0;
23. int dist;
24.
25. void setup() {
26. Serial.begin(9600);
27. pinMode(limitSwitch, INPUT_PULLUP);
28. servo01.attach(2);
29. servo01.write(40); // Initial position, bending pin up
30. // Stepper motors max speed
31. feederStepper.setMaxSpeed(2000);
32. zAxisStepper.setMaxSpeed(2000);
33. benderStepper.setMaxSpeed(2000);
34. // Homing
35. while (digitalRead(limitSwitch) != 0) {
36. benderStepper.setSpeed(1200);
37. benderStepper.runSpeed();
38. benderStepper.setCurrentPosition(0); // When limit switch pressed set
position to 0 steps
39. }
40. delay(40);
41. // Move 1400 steps from the limit switch to starting position
42. while (benderStepper.currentPosition() != -1400) {
43. benderStepper.setSpeed(-1200); // if negative rotates anti-clockwise
44. benderStepper.run();
45. }
46. benderStepper.setCurrentPosition(0);
47. }
48.
49. void loop() {
50. String mode = Serial.readString();
51. if (mode.startsWith("manual")) {
52. manual();
53. }
54. if (mode.startsWith("star")) {
55. star();
56. }
57. if (mode.startsWith("cube")) {
58. cube(); Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
58. cube();
59. }
60. if (mode.startsWith("stand")) {
61. stand();
62. }
63. }
64. void star() {
65. while (count != 5) {
66. int feed = 38; // mm
67. int feedDistance = feed * 48; // 48- constats that map the mm value to
number of steps the stepper show move
68. while (feederStepper.currentPosition() != feedDistance) { // run until
it reaches the distance value
69. feederStepper.setSpeed(1200);
70. feederStepper.run();
71. }
72. feederStepper.setCurrentPosition(0); // reset the current position to 0
73. servo01.write(40); // Set the bender pin up
74. delay(200);
75. int angleConst = 18; // angle constant
76. // Bend the wire 52 degrees
77. while (benderStepper.currentPosition() != -52 * angleConst) {
78. benderStepper.setSpeed(-700);
79. benderStepper.run();
80. }
81. benderStepper.setCurrentPosition(0);
82. delay(100);
83. // Go back 52 degrees to initial position
84. while (benderStepper.currentPosition() != 52 * angleConst) {
85. benderStepper.setSpeed(1200);
86. benderStepper.run();
87. }
88. benderStepper.setCurrentPosition(0);
89. delay(100);
90. // Feed the same distance again
91. while (feederStepper.currentPosition() != feedDistance) {
92. feederStepper.setSpeed(1200);
93. feederStepper.run();
94. }
95. feederStepper.setCurrentPosition(0);
96. delay(100);
97. servo01.write(130); // Set the bender pin down
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
97. servo01.write(130); // Set the bender pin down
98. delay(200);
99. // Set bender to new initial position, for bending in the other
direction
100. while (benderStepper.currentPosition() != -42 * angleConst) {
101. benderStepper.setSpeed(-1200);
102. benderStepper.run();
103. }
104. benderStepper.setCurrentPosition(0);
105. delay(200);
106. servo01.write(40); // Bender pin up
107. delay(200);
108. while (benderStepper.currentPosition() != 105 * angleConst) {
109. benderStepper.setSpeed(700);
110. benderStepper.run();
111. }
112. benderStepper.setCurrentPosition(0);
113. delay(50);
114. while (benderStepper.currentPosition() != -63 * angleConst) {
115. benderStepper.setSpeed(-1200);
116. benderStepper.run();
117. }
118. delay(100);
119. servo01.write(130);
120. benderStepper.setCurrentPosition(0);
121. count++;
122. }
123. }
124.
125. void cube() {
126. int feed = 40; // mm
127. int feedDistance = feed * 48;
128. int angleConst = 16;
129. // Step 1
130. while (count != 3) {
131. while (feederStepper.currentPosition() != feedDistance) {
132. feederStepper.setSpeed(1200);
133. feederStepper.run();
134. }
135. feederStepper.setCurrentPosition(0);
136. delay(100);
137. while (benderStepper.currentPosition() != -90 * angleConst) {
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
137. while (benderStepper.currentPosition() != -90 * angleConst) {
138. benderStepper.setSpeed(-700);
139. benderStepper.run();
140. }
141. benderStepper.setCurrentPosition(0);
142. delay(100);
143. while (benderStepper.currentPosition() != 90 * angleConst) {
144. benderStepper.setSpeed(1200);
145. benderStepper.run();
146. }
147. benderStepper.setCurrentPosition(0);
148. delay(100);
149. count++;
150. }
151. count = 0;
152. // Step 2
153. while (zAxisStepper.currentPosition() != 88 * angleConst) {
154. zAxisStepper.setSpeed(500);
155. zAxisStepper.run();
156. }
157. zAxisStepper.setCurrentPosition(0);
158. delay(100);
159. //Step 3
160. while (count != 2) {
161. while (feederStepper.currentPosition() != feedDistance) {
162. feederStepper.setSpeed(1200);
163. feederStepper.run();
164. }
165. feederStepper.setCurrentPosition(0);
166. delay(100);
167. while (benderStepper.currentPosition() != -90 * angleConst) {
168. benderStepper.setSpeed(-700);
169. benderStepper.run();
170. }
171. benderStepper.setCurrentPosition(0);
172. delay(100);
173. while (benderStepper.currentPosition() != 90 * angleConst) {
174. benderStepper.setSpeed(1200);
175. benderStepper.run();
176. }
177. benderStepper.setCurrentPosition(0);
178. delay(100);
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
178. delay(100);
179. count++;
180. }
181. count = 0;
182. // Step 4
183. while (zAxisStepper.currentPosition() != 85 * angleConst) {
184. zAxisStepper.setSpeed(500);
185. zAxisStepper.run();
186. }
187. zAxisStepper.setCurrentPosition(0);
188. delay(100);
189. // Step 5
190. servo01.write(130);
191. delay(200);
192. while (benderStepper.currentPosition() != -42 * angleConst) {
193. benderStepper.setSpeed(-1200);
194. benderStepper.run();
195. }
196. benderStepper.setCurrentPosition(0);
197. while (count != 3) {
198. delay(100);
199. servo01.write(40);
200. delay(200);
201. // Step 6
202. while (feederStepper.currentPosition() != feedDistance) {
203. feederStepper.setSpeed(1200);
204. feederStepper.run();
205. }
206. feederStepper.setCurrentPosition(0);
207. delay(100);
208. while (benderStepper.currentPosition() != 90 * angleConst) {
209. benderStepper.setSpeed(700);
210. benderStepper.run();
211. }
212. benderStepper.setCurrentPosition(0);
213. delay(100);
214. while (benderStepper.currentPosition() != -90 * angleConst) {
215. benderStepper.setSpeed(-1200);
216. benderStepper.run();
217. }
218. benderStepper.setCurrentPosition(0);
219. delay(100);
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
219. delay(100);
220. count++;
221. }
222. count = 0;
223. }
224.
225. void stand() {
226. int feed = 20; // mm
227. int feedDistance = feed * 48;
228. int angleConst = 16;
229. // Step 1
230. while (feederStepper.currentPosition() != feedDistance) {
231. feederStepper.setSpeed(1200);
232. feederStepper.run();
233. }
234. feederStepper.setCurrentPosition(0);
235. delay(100);
236. while (benderStepper.currentPosition() != -90 * angleConst) {
237. benderStepper.setSpeed(-700);
238. benderStepper.run();
239. }
240. benderStepper.setCurrentPosition(0);
241. delay(100);
242. while (benderStepper.currentPosition() != 90 * angleConst) {
243. benderStepper.setSpeed(1200);
244. benderStepper.run();
245. }
246. benderStepper.setCurrentPosition(0);
247. delay(100);
248.
249. // Step 2
250. while (feederStepper.currentPosition() != feedDistance) {
251. feederStepper.setSpeed(1200);
252. feederStepper.run();
253. }
254. feederStepper.setCurrentPosition(0);
255. delay(100);
256. while (benderStepper.currentPosition() != -70 * angleConst) {
257. benderStepper.setSpeed(-700);
258. benderStepper.run();
259. }
260. benderStepper.setCurrentPosition(0);
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
260. benderStepper.setCurrentPosition(0);
261. delay(100);
262. while (benderStepper.currentPosition() != 70 * angleConst) {
263. benderStepper.setSpeed(1200);
264. benderStepper.run();
265. }
266. benderStepper.setCurrentPosition(0);
267. delay(100);
268.
269. // Step 3
270. feed = 80; // mm
271. feedDistance = feed * 48;
272. while (feederStepper.currentPosition() != feedDistance) {
273. feederStepper.setSpeed(1200);
274. feederStepper.run();
275. }
276. feederStepper.setCurrentPosition(0);
277. delay(100);
278. // Step 4
279. servo01.write(130);
280. delay(200);
281. while (benderStepper.currentPosition() != -42 * angleConst) {
282. benderStepper.setSpeed(-1200);
283. benderStepper.run();
284. }
285. benderStepper.setCurrentPosition(0);
286. delay(100);
287. servo01.write(40);
288. delay(200);
289. while (benderStepper.currentPosition() != 108 * angleConst) {
290. benderStepper.setSpeed(700);
291. benderStepper.run();
292. }
293. benderStepper.setCurrentPosition(0);
294. delay(100);
295. while (benderStepper.currentPosition() != -66 * angleConst) {
296. benderStepper.setSpeed(-1200);
297. benderStepper.run();
298. }
299. benderStepper.setCurrentPosition(0);
300.
301. //Step 5 Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
301. //Step 5
302. servo01.write(130);
303. delay(200);
304. // Step 6
305. feed = 80; // mm
306. feedDistance = feed * 48;
307. while (feederStepper.currentPosition() != feedDistance) {
308. feederStepper.setSpeed(1200);
309. feederStepper.run();
310. }
311. feederStepper.setCurrentPosition(0);
312. servo01.write(40);
313. delay(200);
314. // Step 7
315. while (zAxisStepper.currentPosition() != -90 * angleConst) {
316. zAxisStepper.setSpeed(-500);
317. zAxisStepper.run();
318. }
319. zAxisStepper.setCurrentPosition(0);
320. delay(100);
321.
322. // Step 8
323. while (benderStepper.currentPosition() != -90 * angleConst) {
324. benderStepper.setSpeed(-700);
325. benderStepper.run();
326. }
327. benderStepper.setCurrentPosition(0);
328. delay(100);
329. while (benderStepper.currentPosition() != 90 * angleConst) {
330. benderStepper.setSpeed(1200);
331. benderStepper.run();
332. }
333. benderStepper.setCurrentPosition(0);
334. delay(100);
335. // Step 6
336. feed = 45; // mm
337. feedDistance = feed * 48;
338. while (feederStepper.currentPosition() != feedDistance) {
339. feederStepper.setSpeed(1200);
340. feederStepper.run();
341. }
342. feederStepper.setCurrentPosition(0);
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
342. feederStepper.setCurrentPosition(0);
343. // Step 10
344. while (benderStepper.currentPosition() != -90 * angleConst) {
345. benderStepper.setSpeed(-700);
346. benderStepper.run();
347. }
348. benderStepper.setCurrentPosition(0);
349. delay(100);
350. while (benderStepper.currentPosition() != 48 * angleConst) {
351. benderStepper.setSpeed(1200);
352. benderStepper.run();
353. }
354. benderStepper.setCurrentPosition(0);
355. delay(100);
356.
357. // Step 11
358. while (zAxisStepper.currentPosition() != 90 * angleConst) {
359. zAxisStepper.setSpeed(500);
360. zAxisStepper.run();
361. }
362. zAxisStepper.setCurrentPosition(0);
363. delay(100);
364. feed = 80; // mm
365. feedDistance = feed * 48;
366. while (feederStepper.currentPosition() != feedDistance) {
367. feederStepper.setSpeed(1200);
368. feederStepper.run();
369. }
370. feederStepper.setCurrentPosition(0);
371.
372. // Step 12
373. while (benderStepper.currentPosition() != 110 * angleConst) {
374. benderStepper.setSpeed(700);
375. benderStepper.run();
376. }
377. benderStepper.setCurrentPosition(0);
378. delay(100);
379. while (benderStepper.currentPosition() != -68 * angleConst) {
380. benderStepper.setSpeed(-1200);
381. benderStepper.run();
382. }
383. benderStepper.setCurrentPosition(0);
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
383. benderStepper.setCurrentPosition(0);
384. //Step 13
385. servo01.write(130);
386. delay(200);
387. feed = 80; // mm
388. feedDistance = feed * 48;
389. while (feederStepper.currentPosition() != feedDistance) {
390. feederStepper.setSpeed(1200);
391. feederStepper.run();
392. }
393. feederStepper.setCurrentPosition(0);
394. servo01.write(40);
395. delay(200);
396.
397. // Step 14
398. while (benderStepper.currentPosition() != -70 * angleConst) {
399. benderStepper.setSpeed(-700);
400. benderStepper.run();
401. }
402. benderStepper.setCurrentPosition(0);
403. delay(100);
404. while (benderStepper.currentPosition() != 70 * angleConst) {
405. benderStepper.setSpeed(1200);
406. benderStepper.run();
407. }
408. benderStepper.setCurrentPosition(0);
409. delay(100);
410.
411. //Step 15
412. feed = 25; // mm
413. feedDistance = feed * 48;
414. while (feederStepper.currentPosition() != feedDistance) {
415. feederStepper.setSpeed(1200);
416. feederStepper.run();
417. }
418. feederStepper.setCurrentPosition(0);
419. delay(100);
420. // Step 16
421. while (benderStepper.currentPosition() != -90 * angleConst) {
422. benderStepper.setSpeed(-700);
423. benderStepper.run();
424. } Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
424. }
425. benderStepper.setCurrentPosition(0);
426. delay(100);
427. while (benderStepper.currentPosition() != 90 * angleConst) {
428. benderStepper.setSpeed(1200);
429. benderStepper.run();
430. }
431. benderStepper.setCurrentPosition(0);
432. delay(100);
433.
434. // Step 17
435. while (feederStepper.currentPosition() != feedDistance) {
436. feederStepper.setSpeed(1200);
437. feederStepper.run();
438. }
439. feederStepper.setCurrentPosition(0);
440. }
441.
442. void manual() {
443. int sign;
444. String dataInS;
445. int angle;
446. int angleConst;
447. Serial.println(" // MANUAL MODE //");
448. while (!dataIn.startsWith("end")) {
449. servo01.write(130);
450. delay(200);
451. dataIn = Serial.readString();
452. if (dataIn.startsWith("f")) {
453. dataInS = dataIn.substring(1, dataIn.length()); // reads the feed
value
454. dist = dataInS.toInt();
455. Serial.print("Feed ");
456. Serial.print(dist);
457. Serial.println("mm wire.");
458. dist = dist * 48;
459. while (feederStepper.currentPosition() != dist) {
460. feederStepper.setSpeed(1200);
461. feederStepper.run();
462. }
463. feederStepper.setCurrentPosition(0);
464. delay(100); Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
464. delay(100);
465. }
466. if (dataIn.startsWith("b")) {
467. if (dataIn.charAt(1) == '-') {
468. dataInS = dataIn.substring(2, dataIn.length()); ///reads the angle
value
469. angle = dataInS.toInt();
470. Serial.print("Bend -");
471. Serial.print(angle);
472. Serial.println(" degrees.");
473. angleConst = 16;
474. // Set "negative" bending initial position
475. while (benderStepper.currentPosition() != -43 * angleConst) {
476. benderStepper.setSpeed(-1200);
477. benderStepper.run();
478. }
479. benderStepper.setCurrentPosition(0);
480. delay(100);
481. servo01.write(40);
482. delay(200);
483. // Bend the wire
484. while (benderStepper.currentPosition() != angle * angleConst) {
485. benderStepper.setSpeed(700);
486. benderStepper.run();
487. }
488. benderStepper.setCurrentPosition(0);
489. delay(100);
490. while (benderStepper.currentPosition() != (-1) * angle * angleConst)
{
491. benderStepper.setSpeed(-1200);
492. benderStepper.run();
493. }
494. benderStepper.setCurrentPosition(0);
495. delay(100);
496. servo01.write(130);
497. delay(200);
498. // Get back to original "positive" bending initial poistion
499. while (benderStepper.currentPosition() != 43 * angleConst) {
500. benderStepper.setSpeed(1200);
501. benderStepper.run();
502. }
503. benderStepper.setCurrentPosition(0);
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
503. benderStepper.setCurrentPosition(0);
504. delay(100);
505. }
506. else {
507. dataInS = dataIn.substring(1, dataIn.length());
508. angle = dataInS.toInt();
509. Serial.print("Bend ");
510. Serial.print(angle);
511. Serial.println(" degrees.");
512. angleConst = 16;
513. servo01.write(40);
514. delay(200);
515. while (benderStepper.currentPosition() != (-1) *angle * angleConst)
{
516. benderStepper.setSpeed(-700);
517. benderStepper.run();
518. }
519. benderStepper.setCurrentPosition(0);
520. delay(100);
521. while (benderStepper.currentPosition() != angle * angleConst) {
522. benderStepper.setSpeed(1200);
523. benderStepper.run();
524. }
525. benderStepper.setCurrentPosition(0);
526. delay(100);
527. }
528. dataInS = dataIn.substring(2, dataIn.length());
529. angle = dataInS.toInt();
530. angleConst = 16;
531. while (benderStepper.currentPosition() != sign * angle * angleConst) {
532. benderStepper.setSpeed(-700);
533. benderStepper.run();
534. }
535. benderStepper.setCurrentPosition(0);
536. delay(100);
537. while (benderStepper.currentPosition() != sign * angle * angleConst) {
538. benderStepper.setSpeed(1200);
539. benderStepper.run();
540. }
541. benderStepper.setCurrentPosition(0);
542. delay(100);
543. }
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
543. }
544. // Z-Axis Control
545. if (dataIn.startsWith("z")) {
546. if (dataIn.charAt(1) == '-') {
547. dataInS = dataIn.substring(2, dataIn.length());
548. angle = dataInS.toInt();
549. Serial.print("Move Z-Axis -");
550. Serial.print(angle);
551. Serial.println(" degrees.");
552. angleConst = 16;
553. while (zAxisStepper.currentPosition() != angle * angleConst) {
554. zAxisStepper.setSpeed(500);
555. zAxisStepper.run();
556. }
557. zAxisStepper.setCurrentPosition(0);
558. delay(100);
559. }
560. else {
561. dataInS = dataIn.substring(1, dataIn.length());
562. angle = dataInS.toInt();
563. Serial.print("Move Z-Axis ");
564. Serial.print(angle);
565. Serial.println(" degrees.");
566. angleConst = 16;
567. while (zAxisStepper.currentPosition() != (-1) *angle * angleConst) {
568. zAxisStepper.setSpeed(-500);
569. zAxisStepper.run();
570. }
571. zAxisStepper.setCurrentPosition(0);
572. delay(100);
573. }
574. }
575. manualStatus = dataIn;
576. }
577. }

At the end I would like to point out that the wire straightening system of the wire
bending machine is actually not working like it should work, because if I tighten it
more, the feeder loses grip and the wire doesn’t move.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


For solving this issue you could try to use different, stronger material than the
copper tube or make a different feeder system.

So that’s it. I hope you enjoyed this video and learned something new. Feel free to
ask any question in the comments section below and check my Arduino Projects
Collection.

JLCPCB – Prototype 10 PCBs for $2 (For Any Color)

China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online
Orders Daily

See Why JLCPCB Is So Popular: https://jlcpcb.com

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Stepper Wire
Arduino Machine Project Motor Bending

SHARE
ON: Share 439 Like 439 Save 794

R E L AT E D P O S T S

ARDUINO RADAR PROJECT ARDUINO SECURITY AND ALARM


 Dejan  351 SYSTEM PROJECT
 Dejan  40

DIY MOTORIZED CAMERA SLIDER AUTOMATIC SORTING MACHINE –


WITH PAN AND TILT HEAD – MECHATRONICS STUDENT PROJECT
ARDUINO BASED PROJECT  Dejan  3

 Dejan  77

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


47 RESPONSES

brian alley October 18, 2018

where is the gerber file? i have all the printed parts, and
am cutting the wood now. i have no experience with
designing a pcb, and no idea where to find the gerber file i
am supposed to upload to the pcb maker.
thanks

REPLY

Dejan October 18, 2018

Hey, I updated the article and included the


Gerber file in the PCB design section
above. You can order the PCB just as
explained in the video or in the text.

REPLY

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


David Smith October 20, 2018

Hi Dejan,
what a great project. i can not wait to start building it. i
noticed is your links to part the Arduino link show that
Arduino MEGA but the PCB is made for the Arduino NANO.
did you make a change to design?

Best Regards
David

REPLY

Dejan October 20, 2018

Hey, thanks! Sorry I’ve put wrong links.


Now the part list is updated, the Arduino
Nano is what you need for sure.

REPLY

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Fabricio October 22, 2018

Hi Dejan, great project! did you print the pieces in PLA?


how % infill did you used? Regards,

REPLY

Dejan October 25, 2018

Hey, thanks! Yes, I printed the parts in PLA,


I think with 35 % infill.

REPLY

Dennis October 23, 2018

Hey Dejan,

I love the project! As far as your wire feeder losing grip,


could you perhaps put a small radius wide rubber band on
the copper to increase grip?

REPLY

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Dejan October 25, 2018

Thank you! I thought of it but I’m afraid a


rubber would very quickly tear out.

REPLY

Abok October 24, 2018

Hi,

Great project.

What size ball bearings did you use to make the rollers?

Thanks.
Abok

REPLY

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Dejan October 25, 2018

The ball bearings for the rollers are 608Z,


22mm OD, 8mm ID, 7mm W.

REPLY

Jerome Häckel October 25, 2018

Hi Dejan,
this is a great project! Thanks for sharing this.
Is it possible that you add a complete list of all materials
used to make it easier to recreate this project?
It would be great if you could provide the corresponding
links to Amazon / Banggood too (if possible).
In addition:
The Servo Motor SDLPRT is missing in the rar-file.

Keep on with the good work

REPLY

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Dejan October 25, 2018

Thank you! Well the list of the main


components can be found in the article
above, in the section where the circuit
diagram is. I guess you have seen them
and as for the others they are regular
common components, like the capacitors
and the LM7805 voltage regulator. I
actually added the micro limit switch in the
list.
And thanks for the comment for the
missing part, I added it both in the STEP
and Solidworks file. I’ve just updated the
article.

REPLY

Michel October 26, 2018

Hi Dejan,
This is a great project! I Love it.
Very well explained (not too detailed just right).
Thanks for sharing this.

Cant wait for other stuff from you!


Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
Michel

REPLY

Dejan October 26, 2018

Thanks!

REPLY

Matt October 26, 2018

Your work is really well done! It allows for student for


example to mix different aspects of their teaching. Thanks
a lot for that! If there was a suggestion: a complete list of
material can be interesting to av oid missing a component.

REPLY

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Mark October 26, 2018

Hi Dejan

This wonderful project should be mandatory for all


engineering students.

Covers: Mechanics, electronics, CAD, pcb design,


embedded programming, hand tools and 3d printing.

Would love to see a video/article by you on 3d printing.

Thanks

REPLY

Dejan October 26, 2018

Thank you! Yeah, I will definitely keep


creating content like this, I enjoy making it
and I love when people find it useful and
like it.

REPLY

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Jess R October 31, 2018

In your photos, you have a plastic mount with gear


attached, described as ” This gear will be paired with bigger
30 teeth gear which is a custom designed gear with
integrated plate for mounting a MG996R servo” – I can’t
find this object in the STL files anywhere, is it missing?

REPLY

Dejan November 4, 2018

That’s the file “bender gear modified”.

REPLY

Soni November 9, 2018

hey,Dejan .
I am student on mechanical enng, and I have choosen this
project for thiz semester , could you send me the
solidworks link ,?
If that wont be anything for you//
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
hope to hear soon from you.

REPLY

Dejan November 12, 2018

Hey, the 3D models files are already


provided in the article above, you can
freely download them.

REPLY

Tony November 12, 2018

How did you know what the feed rate was? I was
wondering how you calculated the force needed to send
the wire through the entire assembly.

REPLY

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Dejan November 12, 2018

Well the feed rate depends on the


circumference of the feeder. If it’s 22mm in
diamter, such as in my case, the
circumference is 69.115mm, so full
rotation of the feeder will feed 69.11mm
wire. However, you should simply test it
out and measure what you get with your
feeder.

REPLY

Hans November 16, 2018

Hello, Dejan.
I am a mechanical education student and have also chosen
this project for this semester. Can you convert the
Solidworks files into dwg or dxf?

Thanks in advance
Greeting

REPLY

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Dejan November 17, 2018

Hey, you can use the .STEP file and open it


using Autodesk Fusion 360.

REPLY

Peter Watz December 3, 2018

Hi Dejan.

I’ve built this machine according to your specs, and it’s


useless…
Or I’ve made some serious errors during construction…

It won’t bend a 0,5mm brass wire without stalling at the tip


at some point.
The Z-axis won’t turn above 5 degrees and there’s nothing
keeping the wire from turning (z-axis) on it’s own…
I knew the feeder action was questionable from the start
so I’m not blaming you for that…

Any immediate thoughts on what might be the problem?

Peter
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
PS. I have only used the components specified in your
BOM…

REPLY

Dejan December 5, 2018

Hi Peter,
Actually I had the same problems. The
machine is far from perfect.
Try to increase the stepper drivers current
limit. You can do that using the small
screw on the driver. In that way the
steppers will draw more current and will
have enough power to bend the wire and
turn the Z-axis.
It’s true, the Z-axis motor is on it’s limit of
turning the shaft, even at higher driver
current limit but it still works, as seen on
my video. As for the bender try the same
thing, and also try to increase the distance
from the nozzle to the bending pin, or
shorten the nozzle or the shaft.
It’s also true that the wire tends to turns
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
along with the Z-axis, which eventually
disturbs the form you are making.
Sorry for not pointing all of these things in
the video. But you know, these kind of
videos and tutorials should not be taken
for granted. You will always need to
modify something.

REPLY

Brian C (warhawk8080) December 11, 2018

AWESOME!!!!
I did a little tweak to your design…made the wires a little
bigger for better power and signal…still such a COOL
project!

REPLY

anthony December 19, 2018

I’m about to finish the project. I have a problem with the


wire feeder. if it travels the distance that I write to it but
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
when it is bending the cable it turns unexpectedly on the z
axis. I do not know if you or someone else has a clear idea
that is functional so that the machine works correctly.
because I have to be aware of the cable and that what is
bending does not deviate at the same time

REPLY

Dejan December 20, 2018

Hey, well that’s kind of a problem I was


experiencing too. You need to somehow
make the wire stays straight or don’t rotate
around the z axis. Again it has to do with
the gripper mechanism, it has to be made
better to work properly and don’t allow
the wire to rotate. It’s a bit tricky as the
wire is tin in the first place and can easily
deform.

REPLY

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


furkan December 28, 2018

Hello Dejan,

That coding uses for specific models (like star,cube) as I


understand.
I would like to do complex models (like spline,spring ec.. )
Is possible that to do my draft which is created in
Solidworks with arduino codes ?
For example, CURA is program which is using by 3d printer.
I give STL model in CURA program, it prepares appropriate
codes for 3d printer.
Is there such a program for wire bending ?

REPLY

Dejan December 30, 2018

Hey, the specific models are manually


coded in the Arduino IDE. The program
that I’ve made can only do such a shapes,
manually coded. So no, you cannot make
something in Solidworks or any other
software so the machine would make it
automatically that shape. Of course that’s
possible, but it needs some serious coding
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
to make that possible.

REPLY

Bill E January 1, 2019

This has got to be one of the most impressive and well


documented projects I have ever seen. Wow. It is especially
helpful that you released all the file to build it. I
understand that there is more development work needed
but just the same, really great. Thank you for sharing.

REPLY

Dejan January 2, 2019

Thank you!

REPLY

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Gary January 1, 2019

Very nice prototype. The bearing drag issue can be


corrected by using components from a wire feed
component from a MIG welding machine, I used one from
Aliexpress. They can provide knurled wheels of different
wire sizes, I got 0.045″ and 1/8″ wire sizes. The one I built
based on other youtube videos without as much detail as
you have, and CNC pipe benders I have seen. I had some
various weakness, as well. I had two main issues with
mine, the head was way too weak. The other was
programming, you made it much further than I did. I would
like to use your approach to see if I can take it further, may
not get anywhere but worth looking into. Again, very
impressive work.

REPLY

Dejan January 2, 2019

Thank you! Well I guess it would be easier


for your to make improvements to your
and this design as you already have
experience with this. I’ve noticed people
who tried making thing prototype faced

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


some difficulties, and it’s true, it’s not that
easy to get it working, you need to be
prepared for troubleshooting. After all, it’s
just a prototype or more like an
educational project for learning new skills.
Thanks again for the input!

REPLY

Lucas Kotzie January 22, 2019

Such an awesome project! I’ve been addicted in it for a


while now.. I’ll be trying to do my own based on this on the
next few days. Would you mind posting more info about
the electrical part? I mean, I’m willing to power my system
(which uses 3 NEMA17 of 3.5kgf/cm 1.2A) with a DC 12V 3A
P4 Jack power supply, but I’m wondering how did you
power supplied your system or even how would you plug
this P4 jack on the PCB. Thank you and congrats!

REPLY

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Dejan January 24, 2019

Thanks! Although I have stated so, 3A


power supply might not be enough. Each
stepper can pull 1A or even 1.5A. I mean,
sure you can limit the current with the
drivers, for example to 0.5A each or
something, but then you might not have
enough torque. You can use P4 jack,
simply solder it to the PCB using two wires.

REPLY

Pavel February 2, 2019

Can you tell which version of Solidworks you are using?

REPLY

Dejan February 4, 2019

It’s the version 2017.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


REPLY

Erik February 16, 2019

Hi Dejan, thank your for creating a how-to guide for this 3d


bending machiens .

My engineering senior design team and I are in the


process of recreating (w/ some mods) the machine.

I have some questions regarding your code. What does


angleConst mean? I notice that the int value you assign to
the variable changes throughout the different ‘shape’
functions. For example, for the ‘star’ function your
angleconst = 18, and for ‘cube’ and ‘stand’ it is 16. Why
those values?

Thank you. I look forward to your response.

REPLY

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


Dejan February 16, 2019

Hey, well those constants are manually set


to fit the shapes I was making. I already
mention the code is not really good, it can
be improved quite a bit. The idea for those
constants is that the stepper motor has
200 steps, working a 16th step resolution
that’s total of 3200 steps. So to move 90
degrees we need 50 steps, t.e 800
microsteps. 800steps / 90deg = 8.88 or in
case of 32th step resolution that’s around
1600steps/90deg = 17.77. So I might have
been using 32th step resolution so that’s
why these numbers are around 16-18.

REPLY

Erik February 18, 2019

Hi Dejan,

Thank you for the feedback in the previous post. You


effectively communicated the concept of the ‘angleconst’.
With that said, I have an additional question.

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


In a previous comment you said that the code responsible
for making shapes/models like stars and cube were
“manually coded in the Arduino IDE”. Do you mean to say
that 1) you manually coded them in through trial and error
or you 2) you found a library with code online? I am asking
because I am interested in making additional shapes.

I look forward to your response.

REPLY

Sheldon March 12, 2019

hello Dejan,

Were are a group of architecture students learning how to


make and program the wire bender. Some of the problems
we are running into are the stepper motors not turning,
they are receiving the code, but they are stuck. We don’t
know if it is a wiring problem, or if it is a coding problem.
We were hoping to get some more info on how the wiring
is completed.

I hope to hear from you soon.

REPLY
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
Dejan March 14, 2019

Hey, it’s probably wiring problem. Try to


make a simpler example using just a single
stepper in order to make sure it works
properly. Try the examples from my
separate dedicated tutorial on using
steppers with Arduino.

REPLY

Sheldon March 18, 2019

Hello,
We followed your other
tutorial, and it really
helped with the two NEMA
17 stepper motors, but we
are having difficulty
figuring how the limit
switch connects to the
board. We were just
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
wondering if you could
perhaps explain how it
plugs in to the board.
Thanks

Dejan March 19, 2019

Well you should follow the


circuit diagram for
connecting the limit
switch. One pin goes to
ground and the other pin
goes to a digital pin of the
Arduino, while the same
pin also goes through a
resistor to 5V. When the
limit switch will be pressed
the input to this digital pin
will drop LOW, otherwise
it’s constantly HIGH, or
maybe vice versa if you
connect the other two pins
of the limit switch, in case
you have 3 pins limit
switch as shown in the
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
diagram.

L E AV E A R E P LY

Your email address will not be published.

Comment

Name* Email*

Website

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf


SUBMIT

H O W T O M E C H AT R O N I C S FOLLOW DISCLOSURE

H O W T O M E C H AT R O N I C S
HowToMechatronics is an HowToMechatronics is a participant
education website in the area of ON SOCIAL MEDIA in the Amazon Services LLC
Mechanical, Electrical and Associates Program, an affiliate
Computer Engineering. Tutorials, advertising program designed to
Tips, Tricks, How It Works, Projects, provide a means for sites to earn
Examples, Source Codes, Download advertising fees by advertising and
files and much more can be found linking to Amazon.com
here.

Copyright © 2019 HowToMechatronics.com. All


rights reserved. Terms and Conditions | Privacy
Policy
This website uses cookies to improve user experience. By using our website, you agree to our use of cookies. Ok Read more
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
This website uses cookies to improve user experience. By using our website, you agree to our use of cookies. Ok Read more

Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf

You might also like