User Tools

Site Tools


tutorials:knittingmachine:index.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:knittingmachine:index.html [2010/10/27 02:53]
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 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 ​ }} +
- +
-===== Setting the right port in software ===== +
- +
-Open up **PDDemulate-1.0.py** with some text editor (any will do, such as SimpleText, or IDLE or Word) and search for **def open(self** its about halfway through the file. +
- +
-Change the line that says **def open(self, cport='/​dev/​ttyUSB0'​):​** so that the part after **cport** has the right port number. For example: +
-  * Under windows it should say something like **def open(self, cport='​COM4'​):​** +
-  * Under mac it might be **def open(self, cport='/​dev/​cu.usbserial-A4001nrf'​):​** +
-  * Under linux it might stay as **def open(self, cport='/​dev/​ttyUSB0'​):​** or it might be slightly different +
- +
-Save the file+
  
 +    * [[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]]
  
-===== Backing up patterns/dumping memory from kh930e to computer ===== +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]]!
-  * Start up the disk drive emulator in the command line. +
-  * 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.+
  
-===== Creating new patterns =====+[[http://​sternlab.org/​|Becky "Lady Becky" Stern and her Electroknit did the knitting machine tutorial part - go Becky!]]
  
-===== 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 ​======
   * If the RAM data has been corrupted, the screen will flash "​888"​ and the machine will seem unresponsive. Hold down INPUT and STEP at the same time, and when the display should change. Perform a memory reset by hitting CE, 888, STEP.   * If the RAM data has been corrupted, the screen will flash "​888"​ and the machine will seem unresponsive. Hold down INPUT and STEP at the same time, and when the display should change. Perform a memory reset by hitting CE, 888, STEP.
  
-===== Outside resources =====+====== Outside resources ​======
   * [[http://​www.devicemanuals.com/​guide/​Knitting%20Machine/​Brother/​Brother-KH-930-Knitting-Machine-Owner%27s-Manual-T0RJNU9UUT.html|KH-930e manual]] - fill out a CAPTCHA to download the PDF manual   * [[http://​www.devicemanuals.com/​guide/​Knitting%20Machine/​Brother/​Brother-KH-930-Knitting-Machine-Owner%27s-Manual-T0RJNU9UUT.html|KH-930e manual]] - fill out a CAPTCHA to download the PDF manual
   * [[http://​zephyrfalcon.org/​labs/​python_pitfalls.html|Python pitfalls]] - helped spot a bug    * [[http://​zephyrfalcon.org/​labs/​python_pitfalls.html|Python pitfalls]] - helped spot a bug 
/home/ladyada/public_html/wiki/data/attic/tutorials/knittingmachine/index.html.1288148023.txt.gz · Last modified: 2016/01/28 18:05 (external edit)