Electroknit Technical Information
From Antitronics
m (→Brother Electroknit KH-9xx information) |
|||
| (6 intermediate revisions not shown) | |||
| Line 85: | Line 85: | ||
== Methods of connecting the knitting machine to a computer == | == Methods of connecting the knitting machine to a computer == | ||
| - | === Using a | + | === Using a FTDI serial adapter cable (RECOMMENDED) === |
| - | + | Using an FTDI adapter is the best way to assure that you are interfacing with the machine using the same | |
| - | + | signal voltages as the original external floppy drives. | |
| - | + | ||
| + | This is documented [http://www.antitronics.com/wiki/index.php?title=Electroknit_Serial_Connections on this wiki page], which will someday be merged with this one. | ||
| + | |||
| + | MProg only runs under windows. | ||
| + | |||
| + | |||
| + | === Using a USB serial adapter WITH flow control === | ||
| - | + | This is a method I have used extensively with one model of knitting machine, | |
| - | + | but I no longer recommend it. Although it does not require any additional | |
| + | hardware like a FTDI adapter, this method does not present the exact same voltage levels to the knitting machine as the external drives which were designed to work with the machine. | ||
| + | Although I have not had any reports of problems, it is possible that this method could stress the knitting machine input circuitry, and therefore I think it is safest not to use it. | ||
{| border="1" | {| border="1" | ||
| Line 113: | Line 121: | ||
| 4 | | 4 | ||
|} | |} | ||
| - | |||
=== Using a USB serial adapter WITHOUT flow control === | === Using a USB serial adapter WITHOUT flow control === | ||
| Line 144: | Line 151: | ||
|} | |} | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
== Software Interface Information == | == Software Interface Information == | ||
| Line 212: | Line 208: | ||
[http://www.newtons.com/brother_knitking.htm Various units for sale] | [http://www.newtons.com/brother_knitking.htm Various units for sale] | ||
| + | |||
| + | = Hacking the KH-940 or KH-950 = | ||
| + | |||
| + | Since late May 2012 you can download a program called "Knittington" and use it to transfer patterns to and from the KH-930, KH-940 and KH-950. Knittington is a library, GUI front-end and floppy drive emulator written in C. | ||
| + | |||
| + | The project was developed with much help from the information provided on this site and is currently maintained by [http://wiki.forskningsavd.se/User:Stg STG] of Forskningsavdelningen. | ||
| + | |||
| + | You will find all related source code in the repository (see below) as well as pre-compiled graphical user interface binaries for popular operating systems. | ||
| + | |||
| + | https://github.com/stg/knittington | ||
| + | |||
| + | If you have access to a machine that is not currently supported, contact STG for instructions on how to set up and download pattern files for analysis and implementation in the library. | ||
Latest revision as of 07:59, 20 June 2012
Brother Electroknit KH-930E Technical information
Source Code Repository
The latest source code and documents for this project may be found here:
https://github.com/adafruit/knitting_machine
Disk Drive/Computer Connection Notes
The external floppy drive for this machine was the same as a Tandy PDD1 (Portable Disk Drive 1). This drive is connected using a serial port. There is documentation on the internet about how to connect these drives to computers, but the connector pinout on the knitting machine is different than the drive, and I didn't find that documentation to be helpful.
I was able to figure out the connector pinout by examining the knitting machine PCB.
Knitting Machine/Computer Connection Notes
The knitting machine drive connection uses CMOS voltage levels, not RS-232.
Here is the pinout of the drive connector on the knitting machine:
_____
| |
______|___|______
| | | | |
| 7 | 5 | 3 | 1 |
|___|___|___|___|
| | | | |
| 8 | 6 | 4 | 2 |
|___|___|___|___|
The pin numbering is shown as they are labeled on the knitting machine PCB, and does not agree with other documents I found on the web.
| Connector Pinout | |||
| Pin | Signal | I/O | Notes |
|---|---|---|---|
| 1 | Ground | ||
| 2 | Out | Tied to 5, Pulled up through 1K resistor | |
| 3 | CTS? | In | (Tie to pin 2) |
| 4 | No Connection | ||
| 5 | Out | Tied to 2, Pulled up through 1K resistor | |
| 6 | RXD | In | |
| 7 | TXD | Out | |
| 8 | RTS? | Out | Follows state of Pin 3 (buffered) |
Methods of connecting the knitting machine to a computer
Using a FTDI serial adapter cable (RECOMMENDED)
Using an FTDI adapter is the best way to assure that you are interfacing with the machine using the same signal voltages as the original external floppy drives.
This is documented on this wiki page, which will someday be merged with this one.
MProg only runs under windows.
Using a USB serial adapter WITH flow control
This is a method I have used extensively with one model of knitting machine, but I no longer recommend it. Although it does not require any additional hardware like a FTDI adapter, this method does not present the exact same voltage levels to the knitting machine as the external drives which were designed to work with the machine. Although I have not had any reports of problems, it is possible that this method could stress the knitting machine input circuitry, and therefore I think it is safest not to use it.
| Cable connections with flow control | |
| Knitter | 9 pin connector |
|---|---|
| 1 | 5 |
| 6 | 3 |
| 7 | 2 |
| 8 | 4 |
Using a USB serial adapter WITHOUT flow control
I have pulled pin 3 high, and am not using flow control in my software. I have not had problems with data loss while sending to the knitting machine, and the machine I am using is fast enough to always keep up with data received from the knitting machine. The data rate is 9600 bps, and the largest amount of data sent at once is 1024 bytes.
Here is the cable I am using to connect the knitter with a USB 9 pin serial port:
| Cable connections without flow control | |
| Knitter | 9 pin connector |
|---|---|
| 1 | 5 |
| 2 tie to 3 | |
| 6 | 3 |
| 7 | 2 |
Software Interface Information
There are a number of documents on the web about the Tandy PDD1 and the serial API for it, Most of them are incomplete. The knitter places the drive into a mode called "FDC emulation Mode", which allows access to raw sectors. This document is the most complete documentation I was able to find:
External Disk Drive Emulator
I have written software that emulates the external disk. It runs under Linux and keeps the data as files on the linux file system. This allows knitting designs to be saved and restored using the emulation computer. I am using these files to reverse-engineer the knitting machine file format.
The emulator is written in Python, and released under the GPL. It has been tested most extensively under Ubuntu Linux. I have reports that it does not work on windows due to problems with the serial library. It has been successfully run under OSX. If you have any information to add about platforms that it does or doesn't work on, let me know and I will update this information
I am happy to work with people who are trying to use the emulator with different models of knitting machine, and hoep to improve compatibility with other machines.
The source code is available in the git repository listed above.
Software for manipulating Brother data files
I have begun a python class which will provide an API to the brother data files.
Source code is in the git repo.
Knitting Machine File Format
A lot of the file format is now understood. Documentation is in the git repo.
Work on this continues.
This work was greatly helped by prior work performed by John R. Hogerhuis and posted on the kminternals yahoo group.
Related Links and Documents
Your mileage may vary.
BL5 Brotherlink 5 serial or USB cable Brotherlink information
Yahoo group dedicated to hacking brother machines
Brother Liberation Front is working on open source interfaces
Info and protocols for the FB-100 interface
KE-100 motor drive (not sure that this is the right model drive for the KH-930E)
Nice youtube video about how the motor drive works
Hacking the KH-940 or KH-950
Since late May 2012 you can download a program called "Knittington" and use it to transfer patterns to and from the KH-930, KH-940 and KH-950. Knittington is a library, GUI front-end and floppy drive emulator written in C.
The project was developed with much help from the information provided on this site and is currently maintained by STG of Forskningsavdelningen.
You will find all related source code in the repository (see below) as well as pre-compiled graphical user interface binaries for popular operating systems.
https://github.com/stg/knittington
If you have access to a machine that is not currently supported, contact STG for instructions on how to set up and download pattern files for analysis and implementation in the library.