Skip to content

16. Wildcard Week

This week Hero shot!


This week Checklist

This week I want to make some copper wire artwork produce by machine, but I did’t have machine to make it, so I will try to make a wire bending machine to make copper wire artwork.

  • [✓] Documented how I made my creation
  • [✓] Described problems and how I fixed them
  • [✓] Included my design files and hero shot of the result

Research

I have searched a lot of videos/instructions and this is what I think is most likely to be achieved with the resources on hand.

Arduino 3D Wire Bending Machine


Hands-on

Print out 3DP gear components first, and collect mechanical and electronic parts from old machines.

I choose to use this board - Makerbase MKS DLC V2.0, because it can be programmed using the Arduino IDE.

Measure and arrange parts.

Mount to MDF board.

Hardware part of the wire bending machine is roughly completed.


Problems

1. Stepper motor too hot!

When the machine is running about 10 minutes, one of the steppers will be very hot, and the servo motor will continue to vibrate slightly. I modified the program so that the motor will stop power supply when it reaches the desired position, to prevent the motor overheat.

In addition, I adjusted the maximum current of the motor driver board according to the advice of the instructors, and now there is no problem of overheating.

2. Control board out of order…

I’ve tried everything I can think to try to repair it, but still not work, In the end I decided to buy two more control boards.

The video below is one of the testing before the control board broke down.


Coding

#include <Servo.h>

const int servoPin = A5;
Servo myservo;

#define enPin 8

// stepper motor X
#define stepXPin 2
#define dirXPin 5

// stepper motor Y
#define stepYPin 3
#define dirYPin 6

#define stepsPerRevolution 200
#define delayms 1000

void setup() {
  Serial.begin(115200);
  pinMode(servoPin, OUTPUT);
  pinMode(stepXPin, OUTPUT);
  pinMode(dirXPin, OUTPUT);
  pinMode(stepYPin, OUTPUT);
  pinMode(dirYPin, OUTPUT);
  pinMode(enPin , OUTPUT);

  digitalWrite(enPin, HIGH); // disable Stepper

  action001(); // make a star shape

  delay(3000);
}

void loop() {
}

void feed(int distance) {
  digitalWrite(enPin, LOW); // enable Stepper
  digitalWrite(dirYPin, HIGH);

  for (int i = 0; i < stepsPerRevolution * (distance / 2); i++) {
    digitalWrite(stepYPin, HIGH);
    delayMicroseconds(delayms);
    digitalWrite(stepYPin, LOW);
    delayMicroseconds(delayms);
  }

  delay(500);

  digitalWrite(enPin, HIGH); // disable Stepper
}

void turn(boolean direction, int angle) {
  digitalWrite(enPin, LOW); // enable Stepper
  digitalWrite(dirXPin, direction);

  for (int i = 0; i < stepsPerRevolution * angle; i++) {
    digitalWrite(stepXPin, HIGH);
    delayMicroseconds(delayms);
    digitalWrite(stepXPin, LOW);
    delayMicroseconds(delayms);
  }

  delay(500);
}

void header(boolean position) {
  myservo.attach(servoPin);
  if (position) {
    myservo.write(20);
  } else {
    myservo.write(110);
  }
  delay(1500); // delay for 1.5 second
  myservo.detach();
}

void action001() {

  header(false); // ⬇ true = high position, false = position
  feed(30); // feed 25mm

  for (int j = 0; j < 5; j++) {
    header(true); // ⬆
    turn(HIGH, 4); // ▶ to +4
    for (int i = 0; i < 4; i++) {
      feed(5); // feed 5mm
      turn(HIGH, 1); // ▶
    } // ▶ to +8 尖角轉彎
    turn(LOW, 6); // ◀  to 2
    header(false); // ⬇
    feed(25); // feed 25mm
    header(true); // ⬆
    turn(LOW, 5); // ◀  to -3
    turn(HIGH, 2); // ◀  to -1

    header(false); // ⬇
    feed(30); // feed 25mm
    turn(HIGH, 1); // ▶ to 0
  }

}

Downloads

Arduino program for wire bending machine (Makerbase MKS DLC 2.0 board)
week16.ino


Last update: May 22, 2022