element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Project Videos
  • Challenges & Projects
  • element14 presents
  • Project Videos
  • More
  • Cancel
Project Videos
Documents Arduino Automatic Wire Cutter and Stripper -- Episode 368
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Project Videos to participate - click to join for free!
Related
Recommended
Engagement
  • Author Author: tariq.ahmad
  • Date Created: 13 Nov 2018 9:32 PM Date Created
  • Last Updated Last Updated: 16 Nov 2018 8:24 AM
  • Views 10753 views
  • Likes 15 likes
  • Comments 59 comments

Arduino Automatic Wire Cutter and Stripper -- Episode 368

image
Automatic Wire Cutter and Stripper

element14 Presents  |  DJ Harrigan's VCP Profile  |  Project Videos

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Say goodbye to cramped wrists and handheld gadgets for cutting wire and say hello to your new workhorse on the workbench: the A.W.C.S. The “Ox” is an automatic wire cutting and stripping machine meant to take some of the busywork out of building electronic gadgets. Will it succeed? Will it actually save time? Will my wrists be spared from carpal tunnel and tendonitis? Let’s find out!

 

Supplemental Content:

  • Project Code Download

#include <Adafruit_CharacterOLED.h>
#include <AccelStepper.h>
#include <Bounce2.h>
#include <Encoder.h>




#define ENCODER_DO_NOT_USE_INTERRUPTS
#define PIN_ENABLE_FEED 21
#define PIN_ENC_A 2
#define PIN_ENC_B 3
#define PIN_BUTTON_ENC 4
#define PIN_BUTTON_RED 5
#define PIN_LED 13
#define PIN_SENSOR A0


#define WIRE_QUANT_MIN 1
#define WIRE_QUANT_MAX 100
#define WIRE_MIN_LEN 5
#define WIRE_AWG 22




Adafruit_CharacterOLED lcd(OLED_V2, 6, 7, 8, 9, 10, 11, 12);
AccelStepper stepCut(1, 19, 18); // (DRIVER, STEP, DIR)
AccelStepper stepFeed(1, 15, 14);
Encoder encoder(PIN_ENC_A, PIN_ENC_B);
Bounce buttonOK = Bounce();
Bounce buttonRED = Bounce();




int curSpool = 0; // in future, give each spool a unique id and track total length cut
int curSpoolRemaining = 0;


int mainMode = 0;
int subMode = 0;
int lastSubMode = -99;
int scrollPos = 0;
int lastScrollPos = -99;
long encPos = -999;
long lastEncPos = 0;


long retractPos = -3600;
long stripPos = -1000; //
long stripFeedDistance = 0;
long lengthFeedDistance = 0;
long cutPos = 200; 
long targetPos = 0;
boolean isHomed = false;
int bladeCycleState = 0;
int sensorVal = 0;


uint16_t wireQuantity = 0;
uint16_t wireLength = 0; // in milimeters
uint16_t wireStripLength = 0; 
uint16_t wiresCut = 0;


float conductor_diam = 0.64516; // 22 AWG
float feed_diam = 22.0; // uncalibrated!
float feed_circum = PI * feed_diam; // 69.115mm per rev
//float feed_res = feed_circum / 200.0; // .346mm per step
float feed_res = 0.346;


// Z travel is 1/16" (1.5875mm) per revolution
// both motors are 1.8deg per step (200 per revolution)
// the cut motor driver has a noncofigurable default 10x microstepping rate
// so z resolution = 0.00079375mm per "full" step sent
// leaving us with ~1260 steps per mm z travel


boolean ledState = 0;
long curTime = 0;
long lastTime = 0;
int deltaTime = 100;


void setup(){


  Serial.begin(115200);
  lcd.begin(16, 2);
  lcd.print("AWCS READY!");
  stepCut.setPinsInverted(true, true);
  stepFeed.setPinsInverted(true, true);
  stepFeed.setMaxSpeed(2000);
  stepFeed.setAcceleration(6000);
  stepCut.setMaxSpeed(20000);
  stepCut.setAcceleration(40000);
  pinMode(PIN_ENABLE_FEED, OUTPUT);
  pinMode(PIN_BUTTON_ENC, INPUT_PULLUP);
  pinMode(PIN_BUTTON_RED, INPUT_PULLUP);
  pinMode(PIN_LED, OUTPUT);
  buttonOK.attach(PIN_BUTTON_ENC);
  buttonRED.attach(PIN_BUTTON_RED);
  buttonOK.interval(5);
  buttonRED.interval(5);
  
  digitalWrite(PIN_ENABLE_FEED, LOW);
  delay(200);
  digitalWrite(PIN_ENABLE_FEED, HIGH);
  delay(200);
  digitalWrite(PIN_ENABLE_FEED, LOW);
  //setZHOME():
  setBlade('H');
  //lcd.clear();
  printMenu();
  printCursor(0);
  subMode = 5;
  setBlade('R');
}


void loop(){


  /*curTime = millis(); // VERY BASIC Calibration measurement
  if (curTime - lastTime > deltaTime){
    lastTime = curTime;
     getInput();
    //lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("POS:   ");
    lcd.setCursor(4, 0);
    lcd.print(scrollPos);
    lcd.setCursor(0, 1);
    lcd.print("SEN:    ");
    lcd.setCursor(4, 1);
    lcd.print(sensorVal);
    cutPos = 63 * scrollPos;
    stepCut.moveTo(cutPos);
  }
  stepCut.run();*/
  
  getInput();
  
  switch(mainMode){
    
    case 0: // MAIN MENU
        switch(subMode){
          case 0: // choose quantity
            if( scrollPos != lastScrollPos){
              if (scrollPos > 999)scrollPos = 1;
              if (scrollPos < 1)scrollPos = 999;
              lastScrollPos = scrollPos;
              wireQuantity = scrollPos;
              lcd.setCursor(5, 0);
              lcd.print("   "); // clear
              lcd.setCursor(5, 0);
              lcd.print(wireQuantity);
            }
            if (buttonOK.fell())returnToMenu();
          break;
          case 1: // choose length (resolution of 5mm)
            if( scrollPos != lastScrollPos){
              if (scrollPos > 99)scrollPos = 0;
              if (scrollPos < 0)scrollPos = 99;
              lastScrollPos = scrollPos;
              wireLength = scrollPos * 5;
              lcd.setCursor(13, 0);
              lcd.print("   "); // clear
              lcd.setCursor(13, 0);
              lcd.print(wireLength);
            }
            if (buttonOK.fell())returnToMenu();
          break;
          case 2: // choose strip length (default strip both ends)
            if( scrollPos != lastScrollPos){
              if (scrollPos > 999)scrollPos = 0;
              if (scrollPos < 0)scrollPos = 999;
              lastScrollPos = scrollPos;
              wireStripLength = scrollPos;
              lcd.setCursor(5, 1);
              lcd.print("   "); // clear
              lcd.setCursor(5, 1);
              lcd.print(wireStripLength);
            }
            if (buttonOK.fell())returnToMenu();
          break;
          case 3: // run
              subMode = 5;
              mainMode = 1; // RUN!
              lcd.clear();
              lcd.home();
              lcd.print("NOW CUTTING:");
              printJobStatus();
              setBlade('R');
              stepFeed.setCurrentPosition(0);
              stripFeedDistance = 32* round(float(wireStripLength)/feed_res);
              lengthFeedDistance = 32* round((2.0*float(wireStripLength))/feed_res);
              Serial.print("FEED STEPS: ");Serial.println(stripFeedDistance);
              Serial.print("FEED DIST: ");Serial.println(lengthFeedDistance);
              
          break;
          case 4: // clear
            resetParameters();
            printMenu();
            returnToMenu();
          
          break;
          case 5: // scrolling
            if( scrollPos != lastScrollPos){
              if (scrollPos > 4)scrollPos = 0;
              if (scrollPos < 0)scrollPos = 4;
              lastScrollPos = scrollPos;
              printCursor(scrollPos);
              }
              if (buttonOK.fell()){
                subMode = scrollPos;
                //delay(200);
            }
          break;
        }
    break;
    
    case 1: // RUN
    
      // loop through quantity, allow mid-job canceling
      switch (bladeCycleState){
        case 0: // initial retract, then feed length of strip
          if (stepCut.distanceToGo() == 0){ // allow the blade to retract
            printJobStatus(); // show wire X of N wires
            bladeCycleState++;
            stepFeed.setCurrentPosition(0);
            stepFeed.moveTo(stripFeedDistance); // feed length of strip
          }
        break;
        case 1: // feed, then strip
          if (stepFeed.distanceToGo() == 0){ // allow strip length to fininsh feeding
            bladeCycleState++;
            setBlade('S');
          }
        break;
        case 2: // strip, then retract
          if (stepCut.distanceToGo() == 0){ // allow time to strip
            bladeCycleState++;
            setBlade('R');
          }
        break;
        case 3: // retract, then feed length of wire
          if (stepCut.distanceToGo() == 0){ // allow retraction
            bladeCycleState++;
            stepFeed.setCurrentPosition(0);
            stepFeed.moveTo(lengthFeedDistance);
          }
        break;
        case 4: // feed, then strip
          if (stepFeed.distanceToGo() == 0){ // allow feed movement etc.
            bladeCycleState++;
            setBlade('S');
          }
        break;
        case 5: // strip, then retract
          if (stepCut.distanceToGo() == 0){ // allow feed movement etc.
            bladeCycleState++;
            setBlade('R');
          }
        break;
         case 6: // retract, then feed
          if (stepCut.distanceToGo() == 0){ // allow feed movement etc.
            bladeCycleState++;
            stepFeed.setCurrentPosition(0);
            stepFeed.moveTo(stripFeedDistance);
          }
        break;
        case 7: // retract, then feed
          if (stepFeed.distanceToGo() == 0){ // allow feed movement etc.
            bladeCycleState++;
            setBlade('C');
          }
        break;
        case 8: // cut, then retract and loop if more wires need to run.
          if (stepCut.distanceToGo() == 0){ // allow feed movement etc.
            bladeCycleState = 0;
            wiresCut++;
            setBlade('R');
          }
        break;
      }

      // return to main menu when done or cancel the job
      if (buttonRED.fell() || wiresCut >= wireQuantity){
        mainMode = 0;
        resetParameters();
        subMode = 5;
        returnToMenu();
        printMenu();
        printCursor(0);
      }
    break;
    
  }
  // the motors only really move if there is a remaning position to travel,
  // and this needs to be called often enough that nesting it 
  // inside some other function doesn't help much, so we'll just keep the .run() here
  stepFeed.run();
  stepCut.run();
  
  


} // END MAIN LOOP


void printJobStatus(){
   lcd.setCursor(0, 1);
   lcd.print("WIRE     OF   ");
   lcd.setCursor(5, 1);
   lcd.print(wiresCut+1);
   lcd.setCursor(11, 1);
   lcd.print(wireQuantity);
}


void setBlade(char bladePos){
  switch (bladePos){
    case 'H': // home
      while (!isHomed){
        curTime = millis();
        if (curTime - lastTime > 100){
          lastTime = curTime;
          sensorVal = analogRead(PIN_SENSOR);
          if (sensorVal < 430){
            targetPos += 63;
            stepCut.moveTo(targetPos);
          } else {
            isHomed = true;
            stepCut.setCurrentPosition(0);
          } 
        }
        stepCut.run();
      }
    break;
    case 'R': // retract
      stepCut.moveTo(retractPos);
    break;
    case 'S': // strip
      stepCut.moveTo(stripPos);
    break;
    case 'C': // cut
      stepCut.moveTo(cutPos);
    break;
  }
}


void returnToMenu(){
  scrollPos = subMode;
  subMode = 5;
}


void printCursor(int cursorPos){
  //clear old cursor positions
  lcd.setCursor(0, 0);
  lcd.print(" ");
  lcd.setCursor(8, 0);
  lcd.print(" ");
  lcd.setCursor(0, 1);
  lcd.print(" ");
  lcd.setCursor(8, 1);
  lcd.print(" ");
  lcd.setCursor(12, 1);
  lcd.print(" ");
  switch(cursorPos){
    case 0:
      lcd.setCursor(0, 0);
      lcd.print(">");
    break;
    case 1:
      lcd.setCursor(8, 0);
      lcd.print(">");
    break;
    case 2:
      lcd.setCursor(0, 1);
      lcd.print(">");
    break;
    case 3:
      lcd.setCursor(8, 1);
      lcd.print(">");
    break;
    case 4:
      lcd.setCursor(12, 1);
      lcd.print(">");
    break;
  }
}


void printMenu(){
  lcd.setCursor(0, 0);
  lcd.print(" QTY:    WRL:   ");
  lcd.setCursor(0, 1);
  lcd.print(" STL:    RUN CLR");
}


void resetParameters(){
  wireQuantity = 0;
  wireLength = 0;
  wireStripLength = 0;
  wiresCut = 0;
  bladeCycleState = 0;
  stripFeedDistance = 0;
  lengthFeedDistance = 0;
}


void getInput(){
  buttonOK.update();
  buttonRED.update();
  if (buttonOK.fell()){
    ledState = !ledState;
    digitalWrite(PIN_LED, ledState);
  }
  encPos = encoder.read();
  if (abs(encPos - lastEncPos) > 4){ // did the encoder move one detent?
    if (encPos - lastEncPos > 0){ // positive
      scrollPos++;
    } else { // negative
      scrollPos--;
    }
    lastEncPos = encPos;
  }
  sensorVal = analogRead(PIN_SENSOR);
}

 

Bill of Material:

 

Product Name Manufacturer Quantity
Buy Kit

Stepper Motor Bipolar 1 A Two Phase 3.4 ohm 6.5 mH

SANYO DENKI - SANMOTION 1 Buy Now

Stepper Motor Power Step High Torque Bipolar 294 in-oz 2.8 A Two Phase 1.1 ohm 3.8 mH

LIN ENGINEERING 1 Buy Now
TMCM-1070 -  Stepper Motor Driver, 2-Phase, Single Axis, 2.8A, 24V DC Output, USB, RS485, CAN TRINAMIC 1 Buy Now
Motor Driver R701 Microstepping Two Phase 12 to 80 Vdc 7 A 560 W 200 kHz LIN ENGINEERING 1 Buy Now
A100067 -  Development Board, Arduino Mega 2560 Rev3 RETAIL, ATmega2560 MCU, 54 3.3V I/O, 16 Analogue Inputs ARDUINO 1 Buy Now
1141 -  Assembled Data Logging Shield For Arduino ADAFRUIT 1 Buy Now
24-15112 -  Wire, PVC, Red, 22 AWG, 100 ft, 30.5 m STELLAR LABS 1 Buy Now
OLED Character Display ADAFRUIT 1 Buy Now
Pushbutton Switch Off(On SPST 125 V 50 V 400 mA Solder APEM 1 Buy Now
Incremental Encoder 5 VDC 2 Channels 60 rpm 24 Detents 24 Pulses PEC11R Series BOURNS 1 Buy Now
Hall Effect Proximity Sensor Flange Mount 55100 Series Analogue 4.5 to 5.5 Vdc HAMLIN 1 Buy Now
AC/DC Enclosed Power Supply(PSU ITE 1 Outputs 200 W 24 V 8.4 A TDK-LAMBDA 1 Buy Now

 

Additional Parts:

 

Product Name Quantity

SCHLEUNIGER CS 9100 “V” STYLE CUTTING AND STRIPPING BLADES

1

 

  • oled
  • stripper
  • automatic
  • arduino_vcp
  • manufacturing
  • vcp_arduino
  • element14 presents
  • friday_releasedj
  • wire cutter
  • adafruit
  • atmega2560
  • arduino
  • arduino_mega
  • automation
  • dj harrington
  • friday_release
  • e14presents_djharrigan
  • Share
  • History
  • More
  • Cancel
Actions
  • Share
  • More
  • Cancel
  • Sign in to reply

Top Comments

  • hutkikz
    hutkikz over 5 years ago +4
    I just thought you guys would like to see the machine I built inspired by DJ's excellent video!. www.youtube.com/watch I supersized it a bit and changed it up to use the parts and materials I had…
  • dougw
    dougw over 6 years ago in reply to DAB +3
    Have you tried a wire-wrap tool meant for stripping 30 gage Kynar? I actually end up using a low cost tool like this - with the stop adjusted properly:
  • juanecs
    juanecs over 6 years ago +3
    Where can I download the code? I know the video points to element14.com/presents but where specifically. Please
Parents
  • DAB
    DAB over 6 years ago

    Interesting build, but I must say, for 22 gage wire I feel like you are using a sledge hammer to pound a one penny nail.

     

    Now, what I would like is something to help strip 30 gage wires. Those little suckers are small to see, impossible to hold and no stripper I have reliably does the job.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dougw
    dougw over 6 years ago in reply to DAB

    Have you tried a wire-wrap tool meant for stripping 30 gage Kynar?

    image

    I actually end up using a low cost tool like this - with the stop adjusted properly:

    image

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Sean_Miller
    Sean_Miller over 6 years ago in reply to dougw

    Wire Wrap:

     

    I was first introduced to wire wrap about 6 years ago (I know it was the only way back in the day) when I started making the lights for R2D2's dome.  I bought the gizmo and a spool of super small wire, but for the life of me, I couldn't figure out how to make it happen more effiently than just soldering.

     

    Doug, can you give me the debrief on how/why to wire wrap?

     

    -Sean

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • Sean_Miller
    Sean_Miller over 6 years ago in reply to dougw

    Wire Wrap:

     

    I was first introduced to wire wrap about 6 years ago (I know it was the only way back in the day) when I started making the lights for R2D2's dome.  I bought the gizmo and a spool of super small wire, but for the life of me, I couldn't figure out how to make it happen more effiently than just soldering.

     

    Doug, can you give me the debrief on how/why to wire wrap?

     

    -Sean

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • dougw
    dougw over 6 years ago in reply to Sean_Miller

    Wire wrap sockets could have 4 wires on each pin. They allowed chips (in sockets) to be densely packed right up against each other and make arbitrary connections without spending time worrying about routing. A wire wrap circuit could be connected much faster than laying out a PCB and much more densely packed than any soldering solution. For prototyping, un-wrapping connections and wrapping different connections was easy and clean.

    The gas-tight wire wrap connections were just as reliable as soldering, lower impedance and some claimed even better strength than soldering. If you use an electric wire-wrap gun like the one I have, with a spool of wire on it, you can make connections almost as fast as you can pull the trigger, way, way faster than stripping and soldering. If you are connecting a net or multiple pins on the same bus, you don't even need to cut the wire at each pin, just daisy chain to the next pin. Even manual wrapping tools, like the one above, can be quick and efficient if you are properly set up with pre-cut, pre stripped wires of appropriate lengths. There are many tricks to efficient wire-wrapping.

    It has fallen out of favor these days mostly because surface mount parts don't go in sockets, density needs to be higher, especially in the vertical direction and signal frequencies can be too high for random wire routing. However there are still many applications where it is the best and most efficient way to make a connection. For example, when making a connection between 2 header pins on a PCB - those square pins are still compatible with wire wrap tools. The connection is far stronger, far lower impedance, and takes up far less space than using a wire jumper. And it is easy to remove a wire wrap if you need to - much easier than de-soldering.

    Wire-wrapping could be fully automated if you put your mind to it.

    I am very glad I still have all the tools and wire. They can provide a very convenient way to make reliable connections.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • neilk
    neilk over 6 years ago in reply to dougw

    I still use a wire wrap using a hand tool like the one you showed. Both the tool and my stock of wire (pre-cut, different lengths and a spool) date back over 30 years.

     

    Neil

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube