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

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

by varvara on Thu Feb 09, 2012 8:16 pm

Hi!

I am trying to hack kh 940 brother knitting machine. Unfortunately i am not able to backup the pattern and keep getting following error message:

python PDDemulate-1.0.py img COM12
Preparing . . . Please Wait
Ready!
Traceback (most recent call last):
File "PDDemulate-1.0.py", line 631, in
emu.handleRequests()
File "PDDemulate-1.0.py", line 382, in handleRequests
self.handleFDCmodeRequest(inc)
File "PDDemulate-1.0.py", line 504, in handleFDCmodeRequest
self.write(id)
AttributeError: PDDemulator instance has no attribute 'write'

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?
varvara
 
Posts: 2
Joined: Thu Feb 09, 2012 8:01 pm

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

by itmakesyousmile on Fri Feb 10, 2012 1: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: 3
Joined: Wed Jan 11, 2012 3:54 pm

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

by itmakesyousmile on Sun Feb 19, 2012 2: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: 3
Joined: Wed Jan 11, 2012 3:54 pm

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

by bekathwia on Wed Feb 29, 2012 12: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: 148
Joined: Sat Dec 25, 2010 12:18 am

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

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

Any help regarding this would be much appreciated!

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

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

by davipo on Fri Mar 16, 2012 1: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 1:16 am

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

by bekathwia on Fri Mar 16, 2012 2: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: 148
Joined: Sat Dec 25, 2010 12:18 am

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

by davipo on Fri Mar 23, 2012 2: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 1:16 am

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

by davipo on Fri Apr 06, 2012 12: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 1:16 am

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

by bro930 on Wed Apr 11, 2012 8: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 8:19 am

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

by yorksett on Sat Apr 27, 2013 8: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 7:14 pm

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

by zilga on Thu May 02, 2013 2: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 2:23 pm

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

by jixipix on Fri Jan 17, 2014 6: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 6:50 pm

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

by jixipix on Fri Jan 17, 2014 7: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 6:50 pm