I made an electronic knitting machine. (It cannot KNIT for now.)
Get latch needles
Buying a used knitting machine on an internet auction and taking latch needles is much cheaper than buying them! (It's kind of time consuming, though..)
Lathing a long screw to make a lead screw
Big thanks to FabLab Shibuya and Akito Nakano, I (Actually, they) made a lead screw which is similar to ones used for CNC machines from a 88yen (about $1) long screw I bought at a DIY store.
Lathing the edge of the screw.
Attached a nut through the screw firstly then lathe. After lathing, screwthread often get stripped. If you rotate this nut, the screwthread will be recovered.
If the nut still cannot be removed, you need to use a die.
Lasercut and assemble the parts
I strongly recommend you to do press-fit test with your material. Don't believe the thickness a store says!
Used the chamfer method Neil taught at the Computer-Controlled Cutting class.
Fixed a ballbearing on the lathed part of the screw.
You need to hummer only the internal circle, so you can use something whose size is suitable to it.
Mechanical Part Completion
▲ This is not knitted only by the machine, knitted by me with this machine. The machine still has a mechanical problems:
1. the servo motors do not have enough torque to knit.
2. this structure cannot hang yarn when servo motors move backwards.
Code
Coded on Arduino 1.0.
#include <Servo.h>
#include <Stepper.h>
Servo servoPush;
Servo servoHang;
// change this to the number of steps on your motor
#define STEPS 200
// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
Stepper stepper(STEPS, 8, 9);
void setup()
{
Serial.begin(9600);
// set the speed of the motor to 50 RPMs
stepper.setSpeed(50);
//pin7 to servo pwm
servoPush.attach(7);
servoHang.attach(6);
}
void loop()
{
for(int i=0; i<=8; i++){
servoPush.write(180);
delay(1000);
servoHang.write(35);
delay(1000);
servoPush.write(0);
delay(1000);
servoHang.write(90);
delay(1000);
if(i!=8){
stepper.step(1150);
delay(1000);
}
}
for(int i=0; i<=8; i++){
servoPush.write(180);
delay(1000);
servoHang.write(35);
delay(1000);
servoPush.write(0);
delay(1000);
servoHang.write(90);
delay(1000);
if(i!=8){
stepper.step(-1150);
delay(1000);
}
}
}
PCB design
I made a PCB to move servo motors and steppers after the end of the class because originally it is not allowed to use Arduino for our final project.
I used Eagle to design a PCB.
▼ Here are exported pictures (500 dpi) (the images below are not 500 dpi, click them and new tab will appear, those are 500 dpi.) and Eagle files.
▼ However, I still get errors when trying to program the board.. (still trying to debug it. 2 Aug, 2013)
▼ The above errors seem to be a problem about setting fuse bits. After some trials, I took another way that I added 16MHz crystals and two 22pF capacitors on the board. Since it still cannot be programmed with AVR ISP mkII (now my FabISP has been broken) although I chose 'Arduino Uno', I programmed ATmega328P on my Arduino Uno, and took it away and put it on the socket.
▲ Here is how it works. The servo motors works successfully but the steppers still have something wrong and don't work.. (I tried all possibilities of the order of the pins and the supply voltage also seems enough..)