Hacking the Brother Knitting Machine - Extra files!!
Moderators: adafruit_support_bill, adafruit

Re: Hacking the Brother Knitting Machine - Extra files!!

by itmakesyousmile on Fri Feb 10, 2012 2:38 am

varvara wrote:any ideas what can be wrong?
i am thinking maybe i have modified cable wrong.
I have followed these instructions http://www.ladyada.net/learn/electroknit/ftdicable.html and dont understand very well whether pin2 and pin3 are interconnected and both red and green wires cut and not connected to the pins or red wire goes to pin3 and pin2?


Hi varvara - I, too, find that portion of the tutorial rather unclear. I can't tell from either photo or the description exactly how the red and green wires are connected. Maybe someone who knows will post a reply.
itmakesyousmile
 
Posts: 4
Joined: Wed Jan 11, 2012 4:54 pm

Re: Hacking the Brother Knitting Machine - Extra files!!

by itmakesyousmile on Sun Feb 19, 2012 3:49 pm

I heard back from someone else that what you want is for the red and green wires to form a "Y". So the green pin goes into the connector, and a stub of green wire coming from the pin is soldered to the red wire, just outside of where the red pin goes into the connector. The remainder of the green wire is simply left, cut and dangling, wrapped up in tape.

That's my best interpretation.
itmakesyousmile
 
Posts: 4
Joined: Wed Jan 11, 2012 4:54 pm

Re: Hacking the Brother Knitting Machine - Extra files!!

by bekathwia on Wed Feb 29, 2012 1:35 pm

itmakesyousmile is correct-- the green wire is connected to the red wire in my cable. As we wrote in the tutorial:

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.
User avatar
bekathwia
 
Posts: 154
Joined: Sat Dec 25, 2010 1:18 am

Re: Hacking the Brother Knitting Machine - Extra files!!

by troma on Mon Mar 05, 2012 11:30 pm

Any help regarding this would be much appreciated!

Image
troma
 
Posts: 1
Joined: Mon Mar 05, 2012 11:24 pm

Re: Hacking the Brother Knitting Machine - Extra files!!

by davipo on Fri Mar 16, 2012 2:48 am

Hi, I'm a programmer working on improving this hack. We have Steve's emulator working well with a couple of Macs. We didn't bother connecting the RTS (green) wire to +5v (red). Running some experiments I found that RTS goes active when the serial port is opened by the software (at least on the Mac). I did have to invert the RTS# signal (along with TXD and RXD) by programming the FTDI cable with FT_PROG. (The '#' following RTS indicates it is low when active, and the KM needs it high.)

It's possible that the serial driver in Windows doesn't behave the same way. But at least for Mac (and probably Linux/Unix) users, there is no need to cut and solder the cable.

Thanks to Steve and Becky who have made this hack available.

--Davi


bekathwia wrote:itmakesyousmile is correct-- the green wire is connected to the red wire in my cable. As we wrote in the tutorial:

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.
davipo
 
Posts: 5
Joined: Fri Mar 16, 2012 2:16 am

Re: Hacking the Brother Knitting Machine - Extra files!!

by bekathwia on Fri Mar 16, 2012 3:41 pm

Hi everyone! I'm reposting this very useful info from Steve Conklin (http://www.antitronics.com/?p=226), who claims a simple code bug fix has allowed the emulator script to run on Windows. His note:

There are more and more people diving into hacking on knitting machines, which is really great!

It’s getting to the point where there are too many people to thank for carrying this forward, you know who you are.

But, the increasing popularity has led to some problems and frustrations for people.

Recently I discovered an old thread on a Ravelry forum about the PDDemulate.py disk emulator that I wrote. People were frustrated by problems they were having. By the time I discovered the thread, I had already been contacted by one of the people with the problem, and I discovered a bug in the emulator. It’s now fixed in the repository. But months had gone by between the forum postings and email contact. The forum thread is still out of date, because a solution has been found but that’s not indicated.

I try to be responsive to people when they have problems with the code – I help when I can and try to be up front if I’m too busy to dive in deeply or if the problems are with an environment I don’t have (I only have a KH-930, and only run the emulator under Linux). But I don’t have time to find and follow every forum where this is being discussed.

Through email from people using the software, I’m becoming aware of more people who are working on this but unaware of others doing the same thing. It feels like there’s a larger community forming around this, but it’s fragmented.

Therefore, I’d like to respectfully suggest that we centralize the resources used for these projects, so that we can help each other, and keep a record in one place of the existing knowledge. Other forums are great, and I know there are communities with forums which reach and help the people who participate in them. Those should continue of course, but for people with deeper interest it may be appropriate to point them to this blog entry.

The definitive repository for the knitting machine disk emulator and related files is here:

Adafruit knitting machine rep on Github: https://github.com/adafruit/knitting_machine

If you’d like to fix or improve the code, or add information about different models of knitting machine, please fork that repo and then make pull requests to have your changes incorporated.

Technical information about connecting to Brother knitting machines and about the KH-930 is here:

Antitronics Knitting Machine Wiki Page: http://www.antitronics.com/wiki/index.p ... nformation

Discussion about the software and reverse engineering of the data formats is taking place here:

Yahoo kminternals group: http://groups.yahoo.com/group/kminternals/

The Yahoo group and git repository are the only places that I’ll regularly follow, and try to respond to questions.

I’ll still respond to email, my email address is in the code in the repository. But I’ll probably ask you to go to the Yahoo group. Still, if you’re self conscious about the question or whatever, you can use email.

Now, let’s all make great things!
User avatar
bekathwia
 
Posts: 154
Joined: Sat Dec 25, 2010 1:18 am

Re: Hacking the Brother Knitting Machine - Extra files!!

by davipo on Fri Mar 23, 2012 3:55 am

Hello knit-hackers!

I've been working on new software for the Brother KM hack that will make the process easier. My program takes an image file and generates a new data track with the pattern sized to the image. It is working, and we plan to release it by the end of this month. But recently I have been concerned with a hardware issue.

I was suprised to see that Steve Conklin's new page on the KH-930 serial port shows pin 2 as an output.
http://www.antitronics.com/wiki/index.p ... onnections

The Ladyada tutorial (http://ladyada.net/learn/electroknit/ftdicable.html) tells us to connect pin 2 of the connector to the red wire of the FTDI cable. This applies +5v power from the cable to a knitting machine output, which might damage the knitting machine or the FTDI USB-to-serial converter chip.

When I measured the voltage between pin 1 (GND) and pin 2 of the KH-930, with nothing connected, I was alarmed to see 18.5 volts. Did the same on a KH-930e, got 16.4v. Why are these voltages so high? Is it possible pin 2 (and pin 5 to which it is wired) supplies power to the floppy drive or PPD?

We disconnected the +5v power (red wire of FTDI cable) from pin 2 of the connector, to avoid possible damage to either the knitting machine or the FTDI device. We tested the emulator after this change, and it worked fine with both of the knitting machines.

I recommend that anyone with a similar cable make this change. I hope Steve and Becky can advise us on this.

It is fine to leave the red wire connected to pin 3. (Alternatively, use the green wire with pin 3, and invert the RTS# signal when programming the cable, as I noted in my previous post here.)

--Davi Post
davipo
 
Posts: 5
Joined: Fri Mar 16, 2012 2:16 am

Re: Hacking the Brother Knitting Machine - Extra files!!

by davipo on Fri Apr 06, 2012 1:52 am

Hi folks --

I'm a little late with the release I promised you. I did not want to announce it on April Fools Day! :-)

Please see the announcement at
http://forums.adafruit.com/viewtopic.php?f=8&t=27397

Thanks,

--Davi
davipo
 
Posts: 5
Joined: Fri Mar 16, 2012 2:16 am

Re: Hacking the Brother Knitting Machine - Extra files!!

by bro930 on Wed Apr 11, 2012 9:25 am

troma wrote:Any help regarding this would be much appreciated!

Image


Did you find a solution?
bro930
 
Posts: 2
Joined: Wed Apr 11, 2012 9:19 am

Re: Hacking the Brother Knitting Machine - Extra files!!

by yorksett on Sat Apr 27, 2013 9:13 pm

Solved at least for now. I was using the wrong command.
I am coming in way late but I am wondering if someone can help.
I am getting the following error:


C:\Users\....\Documents\brother\knitting_machine-master\knitting_machine-mast
er>python PDDemulate.py img 5
Preparing . . . Please Wait
yorksett
 
Posts: 1
Joined: Sat Apr 27, 2013 8:14 pm

Re: Hacking the Brother Knitting Machine - Extra files!!

by zilga on Thu May 02, 2013 3:56 pm

Dear engineers! I really need your help: I'm a knitwear designer and I have a knitting machine Brother KH930e. For nearly a year I try to find ways to join a knitting machine to a computer and do my design. After studying the material on this subject I have a few questions:
if we follow the instructions Becky Stern (http://learn.adafruit.com/electroknit/overview), then we can use the size of the working area in 24 of the needle, that is, we can not enter the picture with a large number of needles (or am I wrong?)
And besides, I do not understand - is it possible to use the Windows 7 operating system to connect to the machine?
As I understand it only in knitting - for me, this tasks (Hacking) is impossible))) ...
Maybe some of you have a desire to help me - I'm ready to test any of your design on my knitting machine...

Thank you in advance for any reply and offer

I do not speak English (using Google Translate) so sorry for possible mistakes
zilga
 
Posts: 1
Joined: Thu May 02, 2013 3:23 pm

Re: Hacking the Brother Knitting Machine - Extra files!!

by jixipix on Fri Jan 17, 2014 7:59 pm

Hi, I'm gradually working my way through this in the UK on a Brother950i with a windows vista 32bit laptop. It's so exciting!
I'm getting exactly the same problems as one of your forum members posted in Dec 2010 ie;

PDDemulate.py is giving me this error: "Error, write of 850 bytes when expecting 1024, Failed to write data for sector 0, quitting" with trackbacks to lines 631, 382, 603, 253, and 172, IOError.

I have a full set of .dat and .id files in the img folder, all read as 1kb. The machine isn't beeping, but freezes while my laptop shows the error with pddemulate.py.

Has anyone else had this problem and resolved it?

I love the idea of being able to create something from a scanned image or in pain, Yay! the world is exciting again!!!

Well done to Becky and all at adafruit, brilliant!
jixipix
 
Posts: 2
Joined: Fri Jan 17, 2014 7:50 pm

Re: Hacking the Brother Knitting Machine - Extra files!!

by jixipix on Fri Jan 17, 2014 8:39 pm

Sorry, should have added that the link mentioning Steve Conklin's code ("is awsome") is no longer working, I obtained links from Sally Kentfield in the UK, but am struggling with lack of support to get this problem resolved. Any help would be REALLY appreciated. If someone can give me a link to the Python code, I'll check I've used the most recent version!
Thanks Jixipix
jixipix
 
Posts: 2
Joined: Fri Jan 17, 2014 7:50 pm

Re: Hacking the Brother Knitting Machine - Extra files!!

by lmworster on Sat Sep 20, 2014 8:39 pm

I guess I'm going to revive this thread from the dead.

I have a KH-930e. I was able to successfully create a container pattern, uploaded the pattern to an Ubuntu[1] laptop, modify it, and send the pattern back to the machine. I stopped here for a bit and picked up a few weeks later, working from my Win7-64bit desktop, mostly reviewing the code and trying to figure out everything it's doing (I'm a software engineer). Ran into a couple of problems, which may stem from the fact that I don't use pip and needed to install Pillow[2]. Somewhere in there I decided to run the memcheck and clear the memory (returns without an error). Anyway.

From here, I started running into the problem mentioned by jixipix and troma. That was last night; was not able to solve it. Tonight, I tried using img2track to load a pattern into my machine. Nothing happened. So I tried to go back to using Becky's method (from my Windows machine). Nothing. Tried Becky's method from my Ubuntu machine. Nothing.

By "nothing", I mean that I can enter 551 on the machine (or 552), STEP, 1, STEP, the lamps go off like they're supposed to, and then the KM never comes back. I get no indication from either img2track or PDDemulate of any communication happening. (I should note here that I failed to be a Real Engineer and didn't document exactly what I did last night, so I can't be sure I'm actually doing the same things tonight.)

I've been trying to join the KMInternals group, but haven't been accepted yet.

If anyone has any idea(s) of what's going on, I'd definitely like to hear them, because I'm pretty close to just ditching the Brother's electronics in favor of the Knitic Project.



Notes:
[1] If you're creating the bitmaps with the GIMP, it doesn't use the proper header format. You're either going to need to use a different image editor (I opted for MSPaint - open, re-save, close fixed the header) or edit the header manually (I believe there are some scripts out there to help with that).
[2] Current versions of Pillow don't like "import Image" - you need "from PIL import Image" [reference].

lmworster
 
Posts: 2
Joined: Sun Sep 07, 2014 8:26 pm

Re: Hacking the Brother Knitting Machine - Extra files!!

by itmakesyousmile on Sat Sep 20, 2014 9:23 pm

I guess the first thing is to verify that your machine can communicate with an external device using the Brother cable. Also that you can load an knit an internal pattern.

WRT img2track: Have you checked the img2track log to see what information is there? Most img2track support is through the Ravelry img2track group. You could post there, or perhaps contact Davi directly through the daviworks.com/knitting website.

The 930 normally should only take about 5 seconds to load a pattern using img2track. Have you read through the User Guide? You might find some answers there.

I can't speak to any of the hacks, as I haven't gotten any of them to actually work (and that seems to be a pretty common experience.)
itmakesyousmile
 
Posts: 4
Joined: Wed Jan 11, 2012 4:54 pm