This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorials:knittingmachine:index.html [2010/10/27 03:07] ladyada |
tutorials:knittingmachine:index.html [2016/01/28 18:05] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Brother KH-930e knitting machine ====== | + | {{ :tutorials:knittingmachine:brother.jpg |}} |
- | Adventures in communicating with the Brother KH-930e knitting machine! | + | {{vimeo>16532649}} |
- | ===== Make your own cable ===== | + | This tutorial covers how to talk to a knitting machine! Once the interface cable is made, we can create cool custom patterns and load them from a computer! |
- | The kh930e is designed to work with a Tandy PDD1 floppy drive. We don't need it! Make your own cable to communicate between your computer and the machine. You will need: | + | |
- | * [[http://www.adafruit.com/index.php?main_page=product_info&cPath=18&products_id=70&zenid=08edecd591934eebcc4993c01b0259d6|FTDI cable]] | + | |
- | * 2x4 connector part number [[http://search.digikey.com/scripts/DkSearch/dksus.dll?vendor=0&keywords=WM8036-ND|WM8036-ND on Digikey]] | + | |
- | + | ||
- | You will need to make some minor mods to get the cable talking to your knitting machine. Follow the tutorials to get your knitting cable going | + | |
- | ==== Change 'polarity' of the FTDI cable ==== | + | {{:tutorials:knittingmachine:adazoomed.gif?300|}} to {{:tutorials:knittingmachine:adafabric.jpg?300|}} |
- | FTDI cables have standard 'inverted' TTL (zero is 3-5V and one is 0v) but the KH930E requires the opposite. Luckily its very easy to fix this by reprogramming the software. | ||
- | You will need a copy of [[http://www.ftdichip.com/Resources/Utilities.htm|FTDI MProg ]] (windows only) and your FTDI cable. Plug in the FTDI cable into your windows computer and [[http://www.ftdichip.com/Drivers/VCP.htm|install the driver that matches your computer best]] | ||
- | {{ http://www.ladyada.net/images/arduino/foundft232ruart.jpg?nolink&256x129 |}} | + | ====== Brother KH-930e knitting machine ====== |
- | [[http://www.ladyada.net/learn/breakoutplus/ftdifriend.html#installing_ftdi_drivers|Please read our detailed tutorial on installing the driver here]] then come back when the driver is installed | + | Adventures in communicating with the Brother KH-930e knitting machine! |
- | + | ||
- | Now download [[http://www.ftdichip.com/Resources/Utilities.htm|FTDI MProg]] and run the program | + | |
- | + | ||
- | {{ :tutorials:knittingmachine:mprog.gif |}} | + | |
- | + | ||
- | Select **Scan...** from the menu | + | |
- | + | ||
- | {{ :tutorials:knittingmachine:mprogscan.gif |}} | + | |
- | + | ||
- | The message window should say it found a cable | + | |
- | + | ||
- | {{ :tutorials:knittingmachine:mprogscanned.gif |}} | + | |
- | + | ||
- | Now select **Read and Parse** to read in the cable programming | + | |
- | + | ||
- | {{ :tutorials:knittingmachine:mprogread.gif |}} | + | |
- | + | ||
- | {{ :tutorials:knittingmachine:mprogparsed.gif |}} | + | |
- | + | ||
- | Click the buttons that say to **Invert TX and RX** | + | |
- | + | ||
- | {{ :tutorials:knittingmachine:mprogsignals.gif |}} | + | |
- | + | ||
- | Here is the wierd thing, you have to **Save as...** the settings so just save it anywhere | + | |
- | + | ||
- | {{ :tutorials:knittingmachine:mprogsave.gif |}} | + | |
- | + | ||
- | Now you can click the **Program** button (lightening bolt) | + | |
- | + | ||
- | {{ :tutorials:knittingmachine:mprogprog.gif |}} | + | |
- | + | ||
- | The message window will say it programmed | + | |
- | + | ||
- | {{ :tutorials:knittingmachine:mprogged.gif |}} | + | |
- | + | ||
- | You're done! Quit Mprog | + | |
- | + | ||
- | ==== Rewire the connector ==== | + | |
- | + | ||
- | Next we need to rewire the FTDI cable to match the pinout of the knitter. The cable comes with a 1x5 connector, but we need a 2x4 connector | + | |
- | + | ||
- | {{ http://www.ladyada.net/images/ybox2/propcablestart.jpg?500 |http://www.ladyada.net/images/ybox2/propcablestart.jpg}} | + | |
- | + | ||
- | Use tweezers to lift up the black connector tabs | + | |
- | + | ||
- | {{ http://www.ladyada.net/images/ybox2/propcableremovewire.jpg?500 |http://www.ladyada.net/images/ybox2/propcableremovewire.jpg}} | + | |
- | + | ||
- | Then gently pull out the wires | + | |
- | + | ||
- | {{ http://www.ladyada.net/images/ybox2/propcablepullout.jpg?500 |http://www.ladyada.net/images/ybox2/propcablepullout.jpg}} | + | |
- | + | ||
- | {{ http://www.ladyada.net/images/ybox2/propcableremoved.jpg?500 |http://www.ladyada.net/images/ybox2/propcableremoved.jpg}} | + | |
- | + | ||
- | ====== Python code ====== | + | |
- | Now that you have the cable running, its time to download the software. Visit the Adafruit [[http://github.com/adafruit/knitting_machine|github]] repository and click on **Download** to download the source code. | + | |
- | + | ||
- | //This code is based on [[http://www.antitronics.com/wiki/index.php?title=Electroknit_Technical_Information|Steve Conklin's knitting machine code]] which is totally awesome but doesn't support pattern insertion. Still, check out his site for a lot of detailed information.// | + | |
- | + | ||
- | Download the file and unzip it into a directory that is easy for you to get to. For windows, we're going to stick the folder in **My Documents** in a folder called **brother** but if you are comfortable with command lines put it where-ever you'd like! | + | |
- | + | ||
- | {{ :tutorials:knittingmachine:brotherfolder.gif |}} | + | |
- | + | ||
- | You will need Python installed to run the code. To see if you have Python installed, open up a command line and type in **python**. If you're running Windows you probably don't have it, so download it from [[http://www.python.org/download/|the official Python site]] | + | |
- | + | ||
- | Open up a command line (windows) or Terminal (mac) or xterm (linux) and **cd** to the **brother** directory and then type in **ls** (or **dir** if **ls** doesnt work) to list all the files | + | |
- | + | ||
- | {{ :tutorials:knittingmachine:brothercmd.gif |}} | + | |
- | + | ||
- | + | ||
- | ===== Determining the serial port ===== | + | |
- | + | ||
- | Now we need to figure out what the name of the FTDI cable is. This process differs a little for Mac, Linux and Windows people. | + | |
- | + | ||
- | Under Mac, in the Terminal window, type in **ls /dev/cu.* ** which should give the following responses or so | + | |
- | + | ||
- | {{ http://www.ladyada.net/images/arduino/lscu.jpg }} | + | |
- | + | ||
- | The name we are looking for is **/dev/cu.usbserial-XXXX** where the X's are going to be unique for each cable. Copy and paste the name into a text file so you'll remember it for later. | + | |
- | + | ||
- | For Linux/Unix type **ls /dev/ttyUSB*** into a terminal window, you should see a device file called something like **ttyUSB0** | + | |
- | + | ||
- | {{ http://www.ladyada.net/images/arduino/lstty.png }} | + | |
- | + | ||
- | If you are using Windows, go to the **Device Manager** (From the **Start Menu**, select **Settings->Control Panel**. Double click on **System** and select the **Hardware** tab. Then click on the **Device Manager** button) | + | |
- | + | ||
- | {{ http://www.ladyada.net/images/arduino/devicemanager.jpg }} | + | |
- | + | ||
- | + | ||
- | + | ||
- | ====== Backing up patterns/dumping memory from kh930e to computer ====== | + | |
- | Start up the disk drive emulator in the command line by typing in **python PDDemulate-1.0.py img COMPORT** where **COMPORT** is your serial connection. For example on a mac the command might be **python PDDemulate-1.0.py img /dev/tty.usbserial-A7TKMHYD** this will make an 'image' of the knitting memory in a directory called **img** | + | |
- | + | ||
- | {{ :tutorials:knittingmachine:screen_shot_2010-10-26_at_9.56.37_pm.png |}} | + | |
- | + | ||
- | {{ :tutorials:knittingmachine:screen_shot_2010-10-26_at_9.57.57_pm.png |}} | + | |
- | + | ||
- | Now on your machine... | + | |
- | + | ||
- | * When "ready" lamp is lit, clear display with **CE** key, then prepare to save pattern data to "disk" by typing **552**, then **STEP**. | + | |
- | * Display will go blank and then "ready" and "pattern no" lamps will light up with the "track" number 1 in the display. Press **STEP**. | + | |
- | * Machine will beep when finished, and the track data will now be in the **img** folder along with your emulator and other scripts. | + | |
- | * The emulator also makes a handy **file-01.dat** file to make it easy to preview the patterns using **dumppattern.py** | + | |
- | + | ||
- | We'll need that **file-01.dat** file, so make a backup of it somewhere else for safekeeping! That file contains all your patterns. | + | |
- | + | ||
- | + | ||
- | ====== Viewing patterns ====== | + | |
- | + | ||
- | You can use the **dumppattern.py** software to view patterns and see which patterns are in which slot. Not all information is printed, like memo data, just the stitches. | + | |
- | ====== Creating new patterns ====== | + | * [[ftdicable.html|Make the FTDI interface cable]] |
+ | * [[pythonstart.html|Prepare the computer by downloading the software]] | ||
+ | * [[backup.html|Backup your Brother Knitting Machine's memory to your computer]] | ||
+ | * [[dumppatt.html|View patterns from the machine's memory]] | ||
+ | * [[insertpatt.html|Adding a new pattern from an image]] | ||
+ | * [[loadmemory.html|Load your new file back to the knitting machine]] | ||
- | Having a backup of your patterns | + | Much of this tutorial is directly adapted from [[http://www.antitronics.com/wiki/index.php?title=Electroknit_Technical_Information|Steve Conklin's totally awesome knitting machine wiki page]]! |
- | {{:tutorials:knittingmachine:screen_shot_2010-10-26_at_9.56.07_pm.png|}} | + | [[http://sternlab.org/|Becky "Lady Becky" Stern and her Electroknit did the knitting machine tutorial part - go Becky!]] |
- | {{:tutorials:knittingmachine:screen_shot_2010-10-26_at_9.55.27_pm.png|}} | + | |
- | {{:tutorials:knittingmachine:screen_shot_2010-10-26_at_9.55.40_pm.png|}} | + | |
- | ====== Putting new patterns on the machine ====== | + | Becky made the above video (for [[http://blog.craftzine.com/archive/2010/11/hack_your_knitting_machine.html|CRAFT]]) which walks through the process. |
- | * Start up the disk drive emulator in the command line. | + | |
- | * When "ready" lamp is lit, perform a memory reset by pressing CE key, then type in 888, then press STEP key. | + | |
- | * Clear display with CE key, then prepare to load new data into memory by typing 551, then STEP. | + | |
- | * Display should go blank, then "ready" and "pattern no" lamps should illuminate. Press 1 to indicate which "track" to load from the disk drive emulator, then press STEP. | + | |
- | * Machine will beep when finished. pick a pattern and knit as normal. | + | |
====== Troubleshooting ====== | ====== Troubleshooting ====== |