Knitting machine interfaces
Created by: gwideman, Mar 30, 2015 1:51 pm
Table of Contents
Revised by: gwideman, Aug 5, 2015 11:49 pm (12 revisions)
Overview
Machines of interest
Overview Brother KH-930
Brother KH-940
Recently, a member of the maker community started a discussion about interfaces for Programming-related Accessories
(somewhat elderly) Brother Knitting [Link] is of some interest because, evidently, Disk drive FB-100
with the help of today's computers, software, and help from Arduino-ecosystem (and Pattern Programming Device
(PPD)
similar) parts, it's possible to get these old machines to do some new tricks. Cables and interfaces to the
existing KH electronics
This page consolidates some brief research I did on the subject. Overview of cable roles
Somewhat official computer I/O
cables
Less-official cables
Machines of interest Adafruit's "930 hack"
Similar FTDI hacks
Brother made a series of "electronic" or Electro-knit KH-9xx machines, with successively KH-930/940 serial connector
more modern electronics and functionality. pinout
Related software
[Link]
Puzzles
machines Interest Groups
[Link] Complete or partial electronics
replacement
Of these, the current questions relate to the quite-similar KH-930 and KH-940, introduced
around 1986, according to the above yarn-store link.
Many images can be seen via google, of course, but just as a sample:
Brother KH-930
Lower part of the picture is the main deck of the machine, while the upper part is the lid, containing various additional
attachments. When closed, the lid combines with the main deck to form a long "suitcase".
Brother KH-940
KH-940 is quite similar, but with some extra behavior.
Reader comment: The Brother KH-940 is identical to the KH-930, except that it has a larger memory. (32 KB, versus 2KB). --
Davi Post
Programming-related Accessories
Disk drive FB-100
Super resource: [Link]
This is evidently identical to a Radio Shack "Tandy Portable Disk Drive" (TPDD) for 3.5-inch diskettes, available at the time for
use with the Tandy computer(s) of the day. In the original application, it connects to a computer via a simple somewhat
proprietary cable, using a variant of RS-232 serial data protocol.
In the knitting machine application, it connects to the knitting machine (obviously) but can also connect to a Pattern
Programming Device (PPD, described below).
There's an available Operation Manual, which helpfully includes a schematic:
[Link]
And the command protocol is detailed here:
[Link]
The salient part of the schematic:
Here we see that the I/O consists of signals named per RS-232, and electrically the signals are 5V TTL-level. Serial protocol
(RXD, TXD) is implemented by the Hitachi HD63A01V1's SCI (Serial Communications Interface). I didn't investigate how much
of the handshake (DTR, RTS, DSR, CTS) is implemented by the chip vs requires implementation in firmware. (See Adafruit
comment on that.)
[Link]
Based on this, there's good reason to expect that the drive and the knitting machine would be able to interface to a present-
day computer via a common 5V serial I/O hardware module:
There are off-the-shelf Brother-specific cables of various kinds available to interface to computers
FTDI-based USB-to-serial adapters or similar?
Resulting capabilities would depend on what software has been created to use the drive's protocol so that the computer can
either talk to such a drive, or more usefully, so that the computer can emulate the drive and thereby interact with the
knitting machine. More below.
Pattern Programming Device (PPD)
Picture shows one of several (?) PPD devices, and associated cartridge.
The PPD allows the user to design patterns and load them into the cartridge. Then:
Cartridge can then be plugged into the knitting machine. Or...
PPD has cable to knitting machine, over which pattern can be sent.
Additional communications options:
The PPD can communicate with the diskette drive (and obviously the disk drive could later communicate the patterns to the
knitting machine).
The PPD receptacle on the knitting machine suggests an additional way that a computer might interact with the knitting
machine (BL4). My current (probably naive) belief is that with a computer that can talk to the knitting machine drive interface
directly, the PPD is redundant. However, it may be that putting patterns in cartridges makes them more convenient to use in a
practical workflow, given the existing knitting machine user interface.
Cables and interfaces to the existing KH electronics
Overview of cable roles
The various devices in this environment can communicate primarily via serial signals. The following diagrams summarize what I
think I learned about this.
Serial communication as originally provided by Brother:
Any combination of serial communication between knitting machine,
PPD and diskette drive is apparently possible. (Though not
simultaneously.)
A PPD cartridge can be moved manually between knitting machine
and PPD programmer unit, or apparently patterns on the PPD
cartridge can be communicated to the knitting machine by cable.
Conceptually, the cables all perform the same sort of serial
communication. However they differ mechanically and in which-pin-
does-what details.
The various devices can communicate with a computer, using the same serial communications protocols and appropriate
cables/adapters:
With appropriate cable and software, the computer can:
Read/write to the floppy drive (that is, the computer acts like it's the knitting
machine, so far as operating the drive).
Emulate the diskette drive while connected to the knitting machine, allowing the
knitting machine to save and load patterns to the computer. Once on the
computer, patterns can be stored, edited and manipulated by various software, for
later use by the knitting machine.
Emulate the diskette drive while connected to the PPD unit, allowing PPD to save
and load patterns between cartridge and computer.
Apparently, when the BL1 cable is augmented with a "magnet arm" (= BL5), it
enables software on the computer (eg: DesignaKnit) to offer "interactive knitting"
("IK").
A further alternative is the cartridge emulator:
The cartridge emulator gadget allows software on the computer to interact directly with data
that the knitting machine (or PPD) sees in the plugged-in cartridge. (I don't know what use
cases that supports that aren't supported by the serial I/O arrangements.)
If the cartridge is plugged into the PPD programmer unit, and there's a serial cable from PPD
to knitting machine, then both PPD and knitting machine can see this "live editable" cartridge.
This setup can be further augmented by BL1/BL5, to add further interactive knitting capability.
Somewhat official computer I/O cables
There is a range of cables available by the name of "BrotherLink", with different model numbers. This page, from Soft Byte, the
producers of the DesignaKnit software, describes them:
[Link]
I'm pretty sure these are Soft Byte cables, not official Brother products
[Link] (pricing)
[Link] (pricing)
Apparently there was an original line of cables that, on the computer end, expected to plug into an RS-232 port. Since
today's computers no longer have RS-232 ports, a more recent line of cables has USB connectors on the computer end.
As I understand it, here's how the functionality of these recent-ish (USB on the computer end) cables breaks down:
Model Comp Comp Comp Comp <- dknits Notes
<--> <--> <--> -> $
KH PPD FB100 cartridge
BL1 Yes $148 Interactive on KH-940, 950
Reader comment: For interactive knitting, you need BL5, with magnet arm. -- Davi Post
BL3 Yes $148 Reader comment: The BL3 connects a computer directly to the PPD. -- Davi Post
BL3 Yes Adds magnet arm to enable interactivity. Interactive because Computer --> PPD --> Knitting
Plus machine
PPD Appears to be a gender changer for existing cable. That is, it exchanges all the input and output
Adapter wires, since comp <--> PPD or disk drive requires opposite gender compared to comp <--> KH
BL4 Yes Computer connects to supplied cartridge emulator module that plugs into PPD or knitting machine
(apparently not 930 or 940 though?)
BL4 Yes Same as BL4, but adds BL5 (BL1+magnet arm) to enable interactive knitting.
Plus
BL5 Yes $166 Identical to BL1, but adds magnet arm. I infer that the magnet arm interacts with a magnet
detector in the BL's little box so box can detect carriage position?
Reader comment: Your inference in BL5 Note is correct. The box on the BL5 cable detects the
passing magnet arm and sends a pulse on the data line to DAK, so it can count rows interactively.
(Unrelated to FB100 communication, except that it might interfere.) -- Davi Post
BL6 Yes $166 Same description as BL4 Plus
BL7 Yes $135 Reader comment (Davi Post): The BL7 USB cable connects a computer directly to the FB100, for
use with the FB100 Utility software, created by Jos Timmermans.
[Link]
[Link]
Less-official cables
Adafruit's "930 hack"
[Link]
This is not a hack of the KH-930 machine at all. It's simply a way to make a BL1 cable (at least, the serial-communications
part, not the magnet-detecting part) using a commonly available FTDI-based USB-to-5V-serial ("TTL-232") module or cable. An
example of such a module is the Adafruit:
[Link]/[Link]?main_page=product_info&cPath=18&products_id=70
We learn from the tutorial that the KH, disk drive and PPD use serial signals that are not immediately compatible with today's
de facto standard "TTL-232" signals. Instead, the signals are inverted. There's a procedure to reprogram the FTDI cable to
invert the signals.
In addition, the connector needs to be changed on the end that plugs into the KH.
In principle, this looks like a simple hack.
The main tricky part is that several components of the project have to work before you get any feedback that you're on the
right track:
The FTDI cable has to work -- but this can be tested initially. (And Adafruit cable has helpful LEDs.)
The FTDI driver (Windows or Mac) has to work, again this can be tested initially
The reprogramming of the FTDI cable has to succeed.
Due to inversion, not quite so straightforward to test.
Loopback would work.
If needed, for separate testing, the signals could be reinverted with external components and examined.
The rewiring of the connector has to be done correctly.
The software needs to be installed and configured correctly
Python. Installation -- grrrr.
Configuring the software to talk to the driver and correct COM port.
Can software be exercised in absence of KH?
Understanding how to operate the knitting machine to get it to save or load patterns.
Only at this stage do you get feedback on whether the rest of the apparatus is working -- and it's basically go or no go.
This is probably trivial if the user has experience with an actual disk drive. If not, and it doesn't work... there's room for
confusion as to where a problem lies.
Not insurmountable, but is it worth it compared to the modest cost of a pre-made cable?
Do-it-yourself:
FTDI cable $18-20
Connector: $1
Pins (in case needed): $1
Shipping: say $10
Total parts: $32
Time -- Several hours (the first time)
Brotherlink 1: Apparently $150 +shipping
[Link] $50 + $7 shipping
[Link] $45
+ Intl shipping
Similar FTDI hacks
[Link]
KH-930/940 serial connector pinout
Pinout of the connector on the KH, inferred from the other available info
Function TPDD Schematic Knitting machine Per Adafruit Per daviworks
FB100 FB100 FB100 KH KH KH FTDI FTDI FTDI FTDI i/o FTDI FTDI FTDI FTDI
pin func i/o pin func i/o [3] pin func pin func i/o
Reference 1 Gnd - 1 Gnd Blk 1 Gnd Blk 1 -
Ground
Flow control 2 CTS in 2 CTS out Red 3 +5V CONFLICT NC
Flow control 3 DTR out 3 DTR in Grn- 3 +5V out Grn 6 out
Red
Flow control 4 RTS out 4 RTS in NC NC
Flow control 5 DSR in 5 DSR out NC NC
Data 6 TXD out 6 RcvData in Orng 4 TXD out Orng 4 TXD out
Data 7 RXD in 7 TxData out Yel 5 RXD in Yel 5 RXD in
8 NC - 8 NC? - NC
Flow control Gry, 2 CTS in Brn 2 CTS in
Brn
Flow control Grn 6 RTS out Red 3 +5 -
Notes
In real RS232, there are two "genders" of device. essentially a host and a peripheral. In RS232 nomenclature, a signal is
labeled the same on both ends of the cable, so TXD on one end connects to TXD on the other, despite the name seeming
unintuitive -- at one end TXD is an output, at the other end TXD is an input. To avoid confusion I renamed the data signals
at the KH end as RcvData and TxData to emphasize the data direction.
FTDI adapter, when rewired so it emulates diskette drive
Note that the wiring spec'd in the Adafruit tutorial appears to show a wiring conflict, in which +5V from the FTDI is wired to
an output (CTS) on the KH. It's not clear why this wiring was chosen, and it is almost certainly a mistake. (This could harm
the KH, or just cause the KH circuitry to consume a bit more current and get hot.) If KH pin 2 is really an output with
sentient activity, it's probably safe to leave it unconnected, as the drive emulator software probably ignores it as an input.
Daviworks leaves this KH output unconnected.
Daviworks wires KH's DTR input to a DTR output on the FTDI, while Adafruit wires it to +5V (ie: signalling the computer is
constantly "Ready"). This is explained here: [Link]
Related software
DesignaKnit: [Link]
FB100 emulator: [Link]
KH plugs in to PC, FB100 emulator software make PC act like diskette drive, KH thinks it's talking to diskette drive
FB100 utility [Link] :
FB100 drive plugs in to PC (via BL7 cable or similar); FB100 utility allows copying and inspecting (maybe writing?)
FB100 files on PC.
PDDEmulate: Drive emulator by Steve Conklin, and used in Adafruit's tutorial. (Misleadingly named, since it doesn't
emulate a PDD, it emulates the diskette drive.)
Link supplied by Adafruit ([Link] )
indicated site unavailable when I tried it.
Code at: [Link]
Uses Python plus PySerial (so requires installing that properly, but runs on multiple platforms), and uses Tkinter etc for
GUI.
Almost certainly requires Python [Link]. So Python installation needs to avoid colliding with any more-recent
Python version.
Img2track knitting software [Link] The img2track program reads a graphic image file and
converts it to pattern data formatted for a Brother KH‑900‑series knitting machine. The pattern can be loaded into the
knitting machine with a USB-to-serial adapter cable. Img2track works with Brother models KH‑930, 940, 950i, and 970.
(Img2track is pronounced "image to track".) -- Davi Post
Lots of other software pertaining to the knitting per se, for which I didn't collect links.
Puzzles
How, exactly, does DAK implement interactivity, when it's communicating with the KH via just disk-storage protocol? Do the
BL cables interact with some other part of the KH user interface? Push on a button somehow?
I think this is mostly answered by reader Davi Post's comment: For interactive knitting, you need BL5, with magnet arm.
Your inference in BL5 Note is correct. The box on the BL5 cable detects the passing magnet arm and sends a pulse on the
data line to DAK, so it can count rows interactively. (Unrelated to FB100 communication, except that it might interfere.)
Interest Groups
Reader Davi Post contributes:
There is an active community of machine knitters using img2track on Ravelry, and also on Facebook.
[Link]
[Link]
This mailing list is not very active, but has a lot of information on the work of Steve Conklin and John Hogerhuis, who got this
movement started.
[Link]
Complete or partial electronics replacement
Another approach to modifying the KH's behavior is to replace the internal electronics fully or partially. These projects mostly
seem to be for people who want to program the knitting machine with completely custom software, rather than interface to
existing knitting software. But I may well have missed some effort to do a more mainstream-compatible job.
Example projects:
[Link]
[Link]
[Link]