banner



How To Make Cad Drawing For A 3d Cnc Wire Forming Machines

In this tutorial  I will show y'all how I built an Arduino based 3D wire bending machine. This is actually a typical mechatronic arrangement because it involves mechanical, electrical and calculator engineering. Then therefore I believe many engineering students or anyone who is new into mechatronics establish this projection interesting.

Y'all can sentry the following video or read the written tutorial below.

Overview

Here's the working principle of this 3D wire bending machine. So kickoff, the wire goes through a series rollers, or straighteners. Using a stepper motor the wire is precisely fed to the wire bending machinery which also uses a stepper motor as well equally a pocket-size servo for the bending procedure.

Arduino 3D Wire Bending Machine Working Principle.jpg

At that place'due south too another stepper motor, chosen the Z-centrality, which actually enables the machine to create iii dimensional forms. Of grade, the brain of the car is an Arduino board which along with the other electronics components is fastened on a custom designed PCB.

Star shape - DIY Wire bending machine

As for the plan, I fabricated few custom functions for making various shapes, like a star, a cube and a simple stand up, likewise every bit a transmission manner 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 projection using a 3D modeling software. Yous can download and the 3D model below.

Wire Bending Machine 3D Model

Design inspiration: YouTube video

You tin can discover and download this 3D model, as well every bit explore information technology in your browser on Thangs.

You lot can download the assembly 3D model at Thangs.

STL files for 3D Printing:

For some of the parts, similar the gears, the begetting pillow blocks and some shaft couplers I used a 3D printer to brand 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 not bad chore and printed the parts with great quality. Here's a link to this 3D printer in case you want to check it out.

3D printed bearing pillow block

Building the Wire Angle Auto

I connected 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 eight mm tick MDF and eighteen mm tick plywood. In one case I got them set up I started with the assembly. First I made the base out of two MDF plates and 4 plywood columns. For securing them I used a wood glue and some screws.

Making the base out of MDF and plywood

Side by side on the tiptop 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 between the top and the pillow blocks so that I get the proper top. Now in these blocks nosotros tin can fit the 6202 bearings.

inserting the shaft through the bearings

Their outer bore is 35 mm and the inner diameter is 15 mm. And then now, through these bearings, we need to insert a 15 mm hollow shaft and then that the wire could pass through information technology. This shaft is actually the Z-centrality, which enables to bending machinery to rotate effectually the wire and in that fashion make three dimensional forms. I used a copper tube for that purpose and its length needs to be around thirty cm.

In between the 2 bearings I also inserted a 3D printed gear with module of ane.5 and thirty teeth. The gear has custom design slots where nosotros can insert M3 nuts and and then using M3 bolts we can tighten the gear to the shaft.

3D printed gear with integrated slots for shaft fastening

Next we need install the Z-centrality stepper motor. For that purpose I 3D printed a custom mounting bracket. And 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.

3d printed gear with shaft clamp for NEMA 17 stepper motor

Then using a half dozen mm drill I made ii holes on the top on which the mounting subclass will be secured. We can notice that the subclass instead of holes, has slots which enables the ii gears to exist properly paired.

pairing 3d printed gears

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

securing the feeder motor

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

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 motion the wire, I will attach a piece of plywood with a T-nut on it, and so using a bolt we will be able control the grip of the feeder.

The adjacent 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 fabricated the rollers out of bearings and 3D printed grooved outer rings.

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

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

Ok, and then now we can motility on with making the wire bending mechanism. Outset on a piece of MDF we need to adhere 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 hands got the desired shape. And then using a 38 mm pigsty saw I made an opening for the bigger stepper that we will utilize for the bending, a NEMA 23 stepper motor. Likewise I drilled some smaller holes needed for attaching the other parts.

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

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

3d printed gear for servo motor rack and pinion mechanism

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

3d printed servo motor rack and pinion mechanism

What'southward left to do now is to adhere the bender to the Z-centrality. I did that using the 2 3D printed shaft clamps. First I secured them to the bender plate using M6 bolts and nuts, and so inserted them into the Z-axis. I inserted the 2 nuts in place, and using the bolts I tightened the clamps to the shaft. Then at present all moving parts are working properly.

3d printed shaft clamps supports

Actually there are two more pocket-size details to be added. That's this iii mm nozzle on the shaft where the wire comes out.

nozzle for the wire

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

mirco limit switch for the bender initial position

And that'southward it, our 3D wire bending machine is nearly done. I say nearly, because now we demand to give live to this automobile, or connect the electronics components and programme it.

Circuit Diagram

Here'southward the excursion diagram of this project.

Arduino 3D Wire Bending Machine Circuit Diagram

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

For powering the servo, nosotros could employ the 5V coming from the Arduino, but the MG996R servo tin exist power hungry and the 5V voltage regulator of the Arduino might not be able to handle it. Therefore, I decided to use a carve up 5V voltage regulator, the LM7805, which is good enough to power the servo for this project. At that place 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 go the components needed for this project from the links below:

  • Stepper Motor – NEMA 17………Amazon / Banggood / AliExpress
  • Stepper Motor – NEMA 23 …….. Amazon / Banggood / AliExpress
  • DRV8825 Stepper Driver…….….Amazon / Banggood / AliExpress
  • Micro Limit Switch ………..………Amazon / Banggood / AliExpress
  • 12V 2A Adapter…………………..….Amazon / Banggood / AliExpress
  • Power Jack…………….………….……Amazon / Banggood / AliExpress
  • Arduino Lath ………………………Amazon / Banggood / AliExpress

Disclosure: These are affiliate links. As an Amazon Associate I earn from qualifying purchases.

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 costless online circuit blueprint software. The circuit has many connection, so I used both the pinnacle and the lesser layers to organize them. I as well added pins for selecting the steppers resolution, added one more than limit switch connection and provided additional digital and analog pins coming from the Arduino in case nosotros need them for something.

Here's a link to the project files of this PCB pattern. So one time finished with this blueprint I generated the Gerber file needed for manufacturing the PCB.

Gerber file:

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

Here we can only elevate and drop the Gerber file and once uploaded, we tin 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 nosotros tin can order our PCB at a reasonable price. Note that if it'southward your first social club from JLCPCB, yous tin can get up to 10 PCBs for only $2.

custom pcb design order from JLCPCB

Later on several days the PCBs have arrived. The quality of the PCBs is not bad and everything is exactly the aforementioned as in the design.

pcb for arduino 3d wire bending machine project

So at present nosotros can motion on and install the electronics components onto the PCB.  I started by soldering pivot headers to the PCB. This enables easier connecting and disconnecting of the components when needed. Every bit for the smaller components, like the capacitors, the resistors, the voltage regulator and the final blocks I soldered them directly onto the PCB.

Arduino and DRV8822 Circuit PCB for 3D Wire Bending Machine

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

DRV8825 stepping resolution selection

I decided to use 16th footstep resolution so nosotros need to connect the correct pins instead of the middle ones as seen on the photo above. And then the electronic components are at present set up and we tin can move on with programming the wire bending machine.

Arduino Code for 3D Wire Bending Machine Projection

Equally the code is a fleck longer, for better agreement, I will mail the source lawmaking of the program in sections with clarification for each department. And at the end of this article I will post the complete source code.

For decision-making the stepper motors I will use the AccelStepper library by Mike McCauley. And so we demand to include this library, likewise as the servo library for controlling the servo motor.  Then we demand to define the pins to which the steppers are continued and some variables needed for the plan below.

          

#include <AccelStepper.h> #include <Servo.h> #ascertain limitSwitch eleven // Define the stepper motors and the pins the will use AccelStepper feederStepper (one, 5, vi) ; // (Type:driver, Footstep, DIR) AccelStepper zAxisStepper (1, seven, 8) ; AccelStepper benderStepper (1, ix, x) ; Servo servo01; String dataIn = ""; Cord manualStatus = ""; int count = 0; int dist;

Lawmaking language: Arduino ( arduino )

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

          

void setup () { Serial.brainstorm(9600); pinMode(limitSwitch, INPUT_PULLUP); servo01.attach(2); servo01.write(40); // Initial position, bending pin up // Stepper motors max speed feederStepper.setMaxSpeed(2000); zAxisStepper.setMaxSpeed(2000); benderStepper.setMaxSpeed(2000); // Homing while (digitalRead(limitSwitch) != 0) { benderStepper.setSpeed(1200); benderStepper.runSpeed(); benderStepper.setCurrentPosition(0); // When limit switch pressed set position to 0 steps } delay(40); // Motility 1400 steps from the limit switch to starting position while (benderStepper.currentPosition() != -1400) { benderStepper.setSpeed(-1200); // if negative rotates anti-clockwise benderStepper.run(); } benderStepper.setCurrentPosition(0); }

Code language: Arduino ( arduino )

At present in the loop section, we await for commands coming from the serial monitor. If we blazon manual, nosotros will enter the manual angle 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.

          

void loop () { Cord mode = Series.readString(); if (fashion.startsWith("manual")) { manual(); } if (mode.startsWith("star")) { star(); } if (mode.startsWith("cube")) { cube(); } if (mode.startsWith("stand up")) { stand up(); } }

Code linguistic communication: Arduino ( arduino )

Let's take a look at this custom function.

          

void star () { while (count != five) { int feed = 38; // mm int feedDistance = feed * 48; // 48- constats that map the mm value to number of steps the stepper show move while (feederStepper.currentPosition() != feedDistance) { // run until it reaches the distance value feederStepper.setSpeed(1200); feederStepper.run(); } feederStepper.setCurrentPosition(0); // reset the current position to 0 servo01.write(40); // Prepare the bender pin up delay(200); int angleConst = 18; // angle constant // Bend the wire 52 degrees while (benderStepper.currentPosition() != -52 * angleConst) { benderStepper.setSpeed(-700); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); // Go back 52 degrees to initial position while (benderStepper.currentPosition() != 52 * angleConst) { benderStepper.setSpeed(1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); filibuster(100); // Feed the same distance once more while (feederStepper.currentPosition() != feedDistance) { feederStepper.setSpeed(1200); feederStepper.run(); } feederStepper.setCurrentPosition(0); delay(100); servo01.write(130); // Set the bender pin down delay(200); // Ready bender to new initial position, for bending in the other management while (benderStepper.currentPosition() != -42 * angleConst) { benderStepper.setSpeed(-1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(200); servo01.write(twoscore); // Bough pin upward filibuster(200); while (benderStepper.currentPosition() != 105 * angleConst) { benderStepper.setSpeed(700); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(l); while (benderStepper.currentPosition() != -63 * angleConst) { benderStepper.setSpeed(-1200); benderStepper.run(); } filibuster(100); servo01.write(130); benderStepper.setCurrentPosition(0); count++; } }

Code language: Arduino ( arduino )

So here we enter a while loop which is executed 5 times, because obviously the star has v points. We first 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 motility. Then using the run() part, we rotate the feeder motor with a speed set by the setSpeed() function. We stops when the above feedDistance value is reached, and correct later on that we set the electric current position value of the stepper zero.

          

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

Code language: Arduino ( arduino )

In the side by side footstep we curve the wire 52 degrees. This is washed in similar mode as explained above. Hither nosotros also accept an angle abiding 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 so runs the same number of steps in the opposite direction which actually returns the motor to its initial position.

          

// Bend the wire 52 degrees while (benderStepper.currentPosition() != -52 * angleConst) { benderStepper.setSpeed(-700); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); // Go back 52 degrees to initial position while (benderStepper.currentPosition() != 52 * angleConst) { benderStepper.setSpeed(1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); filibuster(100);

Code language: Arduino ( arduino )

Then again we feed the same length of wire and we ready the pin downwards then that the bender can move to a new initial position which is used for angle in the other management. The bough pivot is then raised, and then 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 fashion as explained above we make the cube shape or actually whatever other shape we can come up up with. As for the manual mode, the working principle of the commands are the aforementioned, except that nosotros have few more lines for reading the commands coming from the serial monitor. For example for feeding the wire, we demand to type "f", plus the distance in millimeters, for bending the wire, we need to blazon "b", plus the bending in degrees, and for rotating the Z-axis, we need to type "z", plus the angle in degrees.

          

if (dataIn.startsWith("f")) { dataInS = dataIn.substring(1, dataIn.length()); // reads the feed value dist = dataInS.toInt(); Serial.impress("Feed "); Serial.print(dist); Serial.println("mm wire."); dist = dist * 48; while (feederStepper.currentPosition() != dist) { feederStepper.setSpeed(1200); feederStepper.run(); } feederStepper.setCurrentPosition(0); delay(100); }

Code language: Arduino ( arduino )

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

          

/* Arduino 3D Wire Angle Machine by Dejan Nedelkovski www.HowToMechatronics.com Library - AccelStepper by Mike McCauley: http://world wide web.airspayce.com/mikem/arduino/AccelStepper/index.html */ #include <AccelStepper.h> #include <Servo.h> #define limitSwitch 11 // Define the stepper motors and the pins the will use AccelStepper feederStepper (1, 5, 6) ; // (Blazon:driver, Footstep, DIR) AccelStepper zAxisStepper (i, 7, 8) ; AccelStepper benderStepper (1, 9, ten) ; Servo servo01; String dataIn = ""; Cord manualStatus = ""; int count = 0; int dist; void setup () { Serial.brainstorm(9600); pinMode(limitSwitch, INPUT_PULLUP); servo01.adhere(two); servo01.write(40); // Initial position, angle pin up // Stepper motors max speed feederStepper.setMaxSpeed(2000); zAxisStepper.setMaxSpeed(2000); benderStepper.setMaxSpeed(2000); // Homing while (digitalRead(limitSwitch) != 0) { benderStepper.setSpeed(1200); benderStepper.runSpeed(); benderStepper.setCurrentPosition(0); // When limit switch pressed ready position to 0 steps } delay(40); // Move 1400 steps from the limit switch to starting position while (benderStepper.currentPosition() != -1400) { benderStepper.setSpeed(-1200); // if negative rotates anti-clockwise benderStepper.run(); } benderStepper.setCurrentPosition(0); } void loop () { String style = Serial.readString(); if (fashion.startsWith("transmission")) { transmission(); } if (way.startsWith("star")) { star(); } if (way.startsWith("cube")) { cube(); } if (mode.startsWith("stand")) { stand up(); } } void star () { while (count != five) { int feed = 38; // mm int feedDistance = feed * 48; // 48- constats that map the mm value to number of steps the stepper show motion while (feederStepper.currentPosition() != feedDistance) { // run until it reaches the distance value feederStepper.setSpeed(1200); feederStepper.run(); } feederStepper.setCurrentPosition(0); // reset the current position to 0 servo01.write(forty); // Set the bender pin up delay(200); int angleConst = 18; // angle constant // Bend the wire 52 degrees while (benderStepper.currentPosition() != -52 * angleConst) { benderStepper.setSpeed(-700); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); // Go back 52 degrees to initial position while (benderStepper.currentPosition() != 52 * angleConst) { benderStepper.setSpeed(1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); // Feed the same distance again while (feederStepper.currentPosition() != feedDistance) { feederStepper.setSpeed(1200); feederStepper.run(); } feederStepper.setCurrentPosition(0); delay(100); servo01.write(130); // Set the bough pin downward delay(200); // Set bough to new initial position, for bending in the other management while (benderStepper.currentPosition() != -42 * angleConst) { benderStepper.setSpeed(-1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); filibuster(200); servo01.write(40); // Bough pin up delay(200); while (benderStepper.currentPosition() != 105 * angleConst) { benderStepper.setSpeed(700); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(50); while (benderStepper.currentPosition() != -63 * angleConst) { benderStepper.setSpeed(-1200); benderStepper.run(); } delay(100); servo01.write(130); benderStepper.setCurrentPosition(0); count++; } } void cube () { int feed = 40; // mm int feedDistance = feed * 48; int angleConst = sixteen; // Step i while (count != three) { while (feederStepper.currentPosition() != feedDistance) { feederStepper.setSpeed(1200); feederStepper.run(); } feederStepper.setCurrentPosition(0); delay(100); while (benderStepper.currentPosition() != -90 * angleConst) { benderStepper.setSpeed(-700); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); while (benderStepper.currentPosition() != 90 * angleConst) { benderStepper.setSpeed(1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); count++; } count = 0; // Step 2 while (zAxisStepper.currentPosition() != 88 * angleConst) { zAxisStepper.setSpeed(500); zAxisStepper.run(); } zAxisStepper.setCurrentPosition(0); filibuster(100); //Stride three while (count != two) { while (feederStepper.currentPosition() != feedDistance) { feederStepper.setSpeed(1200); feederStepper.run(); } feederStepper.setCurrentPosition(0); filibuster(100); while (benderStepper.currentPosition() != -90 * angleConst) { benderStepper.setSpeed(-700); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); while (benderStepper.currentPosition() != 90 * angleConst) { benderStepper.setSpeed(1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); count++; } count = 0; // Step 4 while (zAxisStepper.currentPosition() != 85 * angleConst) { zAxisStepper.setSpeed(500); zAxisStepper.run(); } zAxisStepper.setCurrentPosition(0); delay(100); // Step 5 servo01.write(130); filibuster(200); while (benderStepper.currentPosition() != -42 * angleConst) { benderStepper.setSpeed(-1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); while (count != three) { delay(100); servo01.write(twoscore); delay(200); // Step 6 while (feederStepper.currentPosition() != feedDistance) { feederStepper.setSpeed(1200); feederStepper.run(); } feederStepper.setCurrentPosition(0); delay(100); while (benderStepper.currentPosition() != 90 * angleConst) { benderStepper.setSpeed(700); benderStepper.run(); } benderStepper.setCurrentPosition(0); filibuster(100); while (benderStepper.currentPosition() != -ninety * angleConst) { benderStepper.setSpeed(-1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); count++; } count = 0; } void stand () { int feed = xx; // mm int feedDistance = feed * 48; int angleConst = 16; // Pace ane while (feederStepper.currentPosition() != feedDistance) { feederStepper.setSpeed(1200); feederStepper.run(); } feederStepper.setCurrentPosition(0); delay(100); while (benderStepper.currentPosition() != -ninety * angleConst) { benderStepper.setSpeed(-700); benderStepper.run(); } benderStepper.setCurrentPosition(0); filibuster(100); while (benderStepper.currentPosition() != 90 * angleConst) { benderStepper.setSpeed(1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); filibuster(100); // Step 2 while (feederStepper.currentPosition() != feedDistance) { feederStepper.setSpeed(1200); feederStepper.run(); } feederStepper.setCurrentPosition(0); delay(100); while (benderStepper.currentPosition() != -lxx * angleConst) { benderStepper.setSpeed(-700); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); while (benderStepper.currentPosition() != seventy * angleConst) { benderStepper.setSpeed(1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); // Pace 3 feed = 80; // mm feedDistance = feed * 48; while (feederStepper.currentPosition() != feedDistance) { feederStepper.setSpeed(1200); feederStepper.run(); } feederStepper.setCurrentPosition(0); delay(100); // Step 4 servo01.write(130); delay(200); while (benderStepper.currentPosition() != -42 * angleConst) { benderStepper.setSpeed(-1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); servo01.write(40); filibuster(200); while (benderStepper.currentPosition() != 108 * angleConst) { benderStepper.setSpeed(700); benderStepper.run(); } benderStepper.setCurrentPosition(0); filibuster(100); while (benderStepper.currentPosition() != -66 * angleConst) { benderStepper.setSpeed(-1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); //Step 5 servo01.write(130); delay(200); // Stride half-dozen feed = 80; // mm feedDistance = feed * 48; while (feederStepper.currentPosition() != feedDistance) { feederStepper.setSpeed(1200); feederStepper.run(); } feederStepper.setCurrentPosition(0); servo01.write(40); delay(200); // Step 7 while (zAxisStepper.currentPosition() != -ninety * angleConst) { zAxisStepper.setSpeed(-500); zAxisStepper.run(); } zAxisStepper.setCurrentPosition(0); filibuster(100); // Step viii while (benderStepper.currentPosition() != -xc * angleConst) { benderStepper.setSpeed(-700); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); while (benderStepper.currentPosition() != xc * angleConst) { benderStepper.setSpeed(1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); // Stride 6 feed = 45; // mm feedDistance = feed * 48; while (feederStepper.currentPosition() != feedDistance) { feederStepper.setSpeed(1200); feederStepper.run(); } feederStepper.setCurrentPosition(0); // Step x while (benderStepper.currentPosition() != -90 * angleConst) { benderStepper.setSpeed(-700); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); while (benderStepper.currentPosition() != 48 * angleConst) { benderStepper.setSpeed(1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); filibuster(100); // Step 11 while (zAxisStepper.currentPosition() != xc * angleConst) { zAxisStepper.setSpeed(500); zAxisStepper.run(); } zAxisStepper.setCurrentPosition(0); delay(100); feed = 80; // mm feedDistance = feed * 48; while (feederStepper.currentPosition() != feedDistance) { feederStepper.setSpeed(1200); feederStepper.run(); } feederStepper.setCurrentPosition(0); // Pace 12 while (benderStepper.currentPosition() != 110 * angleConst) { benderStepper.setSpeed(700); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); while (benderStepper.currentPosition() != -68 * angleConst) { benderStepper.setSpeed(-1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); //Step thirteen servo01.write(130); delay(200); feed = 80; // mm feedDistance = feed * 48; while (feederStepper.currentPosition() != feedDistance) { feederStepper.setSpeed(1200); feederStepper.run(); } feederStepper.setCurrentPosition(0); servo01.write(40); filibuster(200); // Step fourteen while (benderStepper.currentPosition() != -70 * angleConst) { benderStepper.setSpeed(-700); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); while (benderStepper.currentPosition() != seventy * angleConst) { benderStepper.setSpeed(1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); //Step 15 feed = 25; // mm feedDistance = feed * 48; while (feederStepper.currentPosition() != feedDistance) { feederStepper.setSpeed(1200); feederStepper.run(); } feederStepper.setCurrentPosition(0); delay(100); // Step sixteen while (benderStepper.currentPosition() != -ninety * angleConst) { benderStepper.setSpeed(-700); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); while (benderStepper.currentPosition() != 90 * angleConst) { benderStepper.setSpeed(1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); // Step 17 while (feederStepper.currentPosition() != feedDistance) { feederStepper.setSpeed(1200); feederStepper.run(); } feederStepper.setCurrentPosition(0); } void transmission () { int sign; String dataInS; int angle; int angleConst; Serial.println(" // Manual Way //"); while (!dataIn.startsWith("end")) { servo01.write(130); filibuster(200); dataIn = Serial.readString(); if (dataIn.startsWith("f")) { dataInS = dataIn.substring(one, dataIn.length()); // reads the feed value dist = dataInS.toInt(); Serial.impress("Feed "); Series.impress(dist); Serial.println("mm wire."); dist = dist * 48; while (feederStepper.currentPosition() != dist) { feederStepper.setSpeed(1200); feederStepper.run(); } feederStepper.setCurrentPosition(0); delay(100); } if (dataIn.startsWith("b")) { if (dataIn.charAt(one) == '-') { dataInS = dataIn.substring(2, dataIn.length()); ///reads the angle value angle = dataInS.toInt(); Serial.print("Bend -"); Serial.print(bending); Serial.println(" degrees."); angleConst = 16; // Set up "negative" bending initial position while (benderStepper.currentPosition() != -43 * angleConst) { benderStepper.setSpeed(-1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); filibuster(100); servo01.write(40); delay(200); // Bend the wire while (benderStepper.currentPosition() != angle * angleConst) { benderStepper.setSpeed(700); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); while (benderStepper.currentPosition() != (-1) * angle * angleConst) { benderStepper.setSpeed(-1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); servo01.write(130); delay(200); // Get back to original "positive" bending initial poistion while (benderStepper.currentPosition() != 43 * angleConst) { benderStepper.setSpeed(1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); } else { dataInS = dataIn.substring(ane, dataIn.length()); angle = dataInS.toInt(); Series.print("Bend "); Series.print(bending); Serial.println(" degrees."); angleConst = 16; servo01.write(forty); delay(200); while (benderStepper.currentPosition() != (-1) *angle * angleConst) { benderStepper.setSpeed(-700); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); while (benderStepper.currentPosition() != angle * angleConst) { benderStepper.setSpeed(1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); filibuster(100); } dataInS = dataIn.substring(two, dataIn.length()); angle = dataInS.toInt(); angleConst = sixteen; while (benderStepper.currentPosition() != sign * angle * angleConst) { benderStepper.setSpeed(-700); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); while (benderStepper.currentPosition() != sign * angle * angleConst) { benderStepper.setSpeed(1200); benderStepper.run(); } benderStepper.setCurrentPosition(0); delay(100); } // Z-Axis Control if (dataIn.startsWith("z")) { if (dataIn.charAt(1) == '-') { dataInS = dataIn.substring(2, dataIn.length()); angle = dataInS.toInt(); Serial.print("Move Z-Axis -"); Series.impress(angle); Series.println(" degrees."); angleConst = xvi; while (zAxisStepper.currentPosition() != angle * angleConst) { zAxisStepper.setSpeed(500); zAxisStepper.run(); } zAxisStepper.setCurrentPosition(0); delay(100); } else { dataInS = dataIn.substring(one, dataIn.length()); angle = dataInS.toInt(); Series.impress("Motion Z-Axis "); Serial.print(angle); Serial.println(" degrees."); angleConst = 16; while (zAxisStepper.currentPosition() != (-1) *angle * angleConst) { zAxisStepper.setSpeed(-500); zAxisStepper.run(); } zAxisStepper.setCurrentPosition(0); delay(100); } } manualStatus = dataIn; } }

Code language: Arduino ( arduino )

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

For solving this effect you could endeavour to use dissimilar, stronger cloth than the copper tube or brand a unlike feeder system.

So that's information technology. I hope you enjoyed this video and learned something new. Feel gratuitous to ask whatever question in the comments section beneath and check my Arduino Projects Collection.

Source: https://howtomechatronics.com/projects/arduino-3d-wire-bending-machine/

Posted by: vangentler63.blogspot.com

0 Response to "How To Make Cad Drawing For A 3d Cnc Wire Forming Machines"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel