====== Make your own cable ====== 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]] - you should be able to use a '3.3v' or '5v' 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 ==== 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 |}} [[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 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 wire {{ 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}} Repeat for all the wires. You'll want to cut away a few inches of the black cable sheathing so you have plenty of 'space' to work with the wires. Cut **down** the sheathing without cutting the colored wires, use a fine scissors. Cut 1 or 2" away. Now grab the 2x8 cable connector you bought from Digikey or whatever. You'll need to insert the wires so that they snap into the connector to match the following diagram. **Do not insert the red or green wires yet!!!** Insert just the orange and yellow wires. Look at the photos below to make sure you have the wires in the right order, they should just snap in. If they don't snap make sure the little lock-tab is facing 'out' This diagram assumes you're looking at the connector from the end that goes into the machine. Again, check with the photos many times to be sure you get this right! {{ :tutorials:knittingmachine:connbott-adafruit-kmt.png |}} {{ :tutorials:knittingmachine:conntop-adafruit-kmt.png |}} Pin 1 is black, pin 2 will be red, pin 3 will be green, pin 6 is orange, and pin 7 is yellow. Next is the one tough part, you'll want to cut the green wire as close to the black sheathing. Then cut the red wire about in the middle and solder both green and red wires to the red wire so that you have two wire connections. See the following image: {{ :tutorials:knittingmachine:cablesplice_t.jpg |:tutorials:knittingmachine:cablesplice.jpg}} Wrap it up in electrical tape {{ :tutorials:knittingmachine:cablewrapped_t.jpg |:tutorials:knittingmachine:cablewrapped.jpg}} You're done! {{ :tutorials:knittingmachine:cabledone_t.jpg |:tutorials:knittingmachine:cabledone.jpg}} **TODO**: We're pretty sure its possible to make this part less difficult by using the RTS (green) wire without splicing it to the 5V (red) wire and using setRTS() in the python code but we already mangled the cable before trying this.