Covid-19
Advertisement

Test Your Arduino Skills with This DIY Wire Bending Machine

Looking for a new Arduino project? How about a DIY Wire Bending Machine?

Fancy making yourself your very own Arduino-powered DIY wire bending machine? With a few extra parts, like stepper motors and some 3D printed parts, you can do just that with this great tutorial.

Before you start, you will need to get your hands on some basic components. We have included links to the products in case you need to buy them: 

This great little wire bending machine can turn basic brass wire into some interesting; geometric shapes like a triangle, square, rectangle, hexagon, and even a spiral!

Of course, you can also experiment with the parameters to create any shape, within reason, you like from the serial monitor. The project is fun to build on your own, but will also go perfect as a classroom project too.

The first part is to wire everything up. Here is the circuit diagram: 

Test Your Arduino Skills with This DIY Wire Bending Machine
Source: Electricity DIY Lab

You can either solder the components to a PCB board or connect up using a breadboard. The choice is yours. 

Next, you will need to 3D print some additional parts. You can check out the 3D print files here. If you don't have access to a 3D printer yourself, why not ask a friend to help you out?

The parts will need to be printed in PLA at 0.15 layer height with 80% infill. 

Test Your Arduino Skills with This DIY Wire Bending Machine
Source: Thingiverse

Once in hand, you will then need to begin assembling the parts. Use the bolts and nuts to affix the 3D parts to the MDF board, as well as, mounting bearings and stepper motors to their respective positions; as shown in the video.

You will also need to mount a 3D printer filament feeder to feed the brass wire into the machine from the ball bearing straightner assembly.

With all the parts assembled, it is time to sort out another critical component -- the actual code for the Arduino. We have included it in full below, but if you want an explanation of its various parts, see here

  1. #include
  2. #include "BasicStepperDriver.h"
  3. #define Feed_step 200
  4. #define Bend_step 200
  5. #define Feed_RPM 80
  6. #define Bend_RPM 30
  7. #define MICROSTEPS 16
  8. int Delay = 50;
  9. #define Bend_DIR 14
  10. #define Bend_STEP 15
  11. #define Feed_DIR 16
  12. #define Feed_STEP 17
  13. int val = 0;
  14. int data = 0;
  15. int a = 0;
  16. int b = 0;
  17. int c = 0;
  18. BasicStepperDriver Feed_stepper(Feed_step, Feed_DIR, Feed_STEP);
  19. BasicStepperDriver Bend_stepper(Bend_step, Bend_DIR, Bend_STEP);
  20. void setup(){
  21. Serial.begin(9600);
  22. Feed_stepper.begin(Feed_RPM, MICROSTEPS);
  23. Bend_stepper.begin(Bend_RPM, MICROSTEPS);
  24. Serial.println("For Triangle enter (1,Side Length) ");
  25. Serial.println("For Square enter (2,Side Length) ");
  26. Serial.println("For Rectangle enter (3,Height,Length) ");
  27. Serial.println("For Hexagon enter (4,Side Length) ");
  28. Serial.println("For Spring enter (5,Spring Length) ");
  29. Serial.println("**Note Enter value without bracket ");
  30. }
  31. void loop(){
  32. if(Serial.available()>0){
  33. a = Serial.parseInt();
  34. b = Serial.parseInt();
  35. c = Serial.parseInt();
  36. }
  37. if(a == 1){
  38. Serial.println(" ");
  39. Serial.print("Making Triangle of side Length ");
  40. Serial.print(b);
  41. Serial.println("mm");
  42. for(int x=0; x<3; x++){
  43. Serial.println("..");
  44. Feed_stepper.move(FEEDSTEPS*b*MICROSTEPS);
  45. delay(Delay);
  46. Bend_stepper.rotate(95);
  47. delay(Delay);
  48. Bend_stepper.rotate(-95);
  49. }
  50. Feed_stepper.move(FEEDSTEPS*15*MICROSTEPS);
  51. Serial.println("Finish ");
  52. a = 0;
  53. b = 0;
  54. }
  55. if(a == 2){
  56. Serial.println(" ");
  57. Serial.print("Making Square of side Length ");
  58. Serial.print(b);
  59. Serial.println("mm");
  60. for(int x=0; x<4; x++){
  61. Serial.println("..");
  62. Feed_stepper.move(FEEDSTEPS*b*MICROSTEPS);
  63. delay(Delay);
  64. Bend_stepper.rotate(75);
  65. delay(Delay);
  66. Bend_stepper.rotate(-75);
  67. }
  68. Feed_stepper.move(FEEDSTEPS*15*MICROSTEPS);
  69. Serial.println("Finish ");
  70. a = 0;
  71. b = 0;
  72. }
  73. if(a == 3){
  74. Serial.println(" ");
  75. Serial.print("Making Rectangle of Length & Height ");
  76. Serial.print(b);
  77. Serial.print(" & ");
  78. Serial.print(c);
  79. Serial.println(" mm");
  80. Serial.println("..");
  81. for(int x=0; x<2; x++){
  82. Feed_stepper.move(FEEDSTEPS*b*MICROSTEPS);
  83. delay(Delay);
  84. Bend_stepper.rotate(75);
  85. delay(Delay);
  86. Bend_stepper.rotate(-75);
  87. delay(Delay);
  88. Feed_stepper.move(FEEDSTEPS*c*MICROSTEPS);
  89. delay(Delay);
  90. Bend_stepper.rotate(75);
  91. delay(Delay);
  92. Bend_stepper.rotate(-75);
  93. }
  94. Feed_stepper.move(FEEDSTEPS*15*MICROSTEPS);
  95. Serial.println("Finish ");
  96. a = 0;
  97. b = 0;
  98. }
  99. if(a == 4){
  100. Serial.println(" ");
  101. Serial.print("Making Hexagon of Side Length ");
  102. Serial.print(b);
  103. Serial.println("mm");
  104. for(int x=0; x<5; x++){
  105. Serial.println("..");
  106. Feed_stepper.move(FEEDSTEPS*b*MICROSTEPS);
  107. delay(Delay);
  108. Bend_stepper.rotate(70);
  109. delay(Delay);
  110. Bend_stepper.rotate(-70);
  111. }
  112. Feed_stepper.move(FEEDSTEPS*15*MICROSTEPS);
  113. Serial.println("Finish ");
  114. a = 0;
  115. b = 0;
  116. }
  117. if(a == 5){
  118. Serial.println(" ");
  119. Serial.print("Making Spring of Length ");
  120. Serial.print(b);
  121. Serial.println("mm");
  122. for(int x=0; x<b*5; x++){
  123. Serial.println("..");
  124. Feed_stepper.move(360);
  125. delay(Delay);
  126. Bend_stepper.rotate(60);
  127. delay(Delay);
  128. Bend_stepper.rotate(-60);
  129. }
  130. Feed_stepper.move(FEEDSTEPS*15*MICROSTEPS);
  131. Serial.println("Finish ");
  132. a = 0;
  133. b = 0;
  134. }
  135. }

Now just upload the code to the Arduino, connect the power, and get wire-bending at your leisure using the serial monitor. Enjoy!

Interesting Engineering is a participant of the Amazon Services LLC Associates Program and various other affiliate programs, and as such there might be affiliate links to the products in this article. By clicking the links and shopping at partner sites, you do not only get the materials you need but also are supporting our website.

Advertisement
Follow Us on

Stay on top of the latest engineering news

Just enter your email and we’ll take care of the rest:

By subscribing, you agree to our Terms of Use and Privacy Policy. You may unsubscribe at any time.