One of the things I mentioned in my last post was reverse engineering the USB communications of the Moshi board in the DC-KIII. I used SniffUSB to monitor what traffic there is between the computer and the laser. It went surprisingly well on the data collection and data parsing end. The instructions I linked to were a big help. And that is about the point where I could go no further.
I had the laser setup to a 1" square that I drew 1" from the X and Y home position. I figured that knowing the measurements of my drawing and changing 1 thing at a time I ought to be able to piece together what was being said. I started by cutting out the same drawing at 3 different speeds. I compared the data transferred to the machine but couldn't quite make sense of it. I repeated a few times and my data didn't get any better.
I was googling to see if anyone had done anything similar and I found someone talking about the parallel port model of the DC-KIII. It uses a parallel port version of the Moshi board that is in my laser. He mentioned that the communications to the board over the parallel port were encrypted. This is something I had not considered, so maybe the USB communications were encrypted too? I went back and cut out my 1" square again, capturing the communications. This time I cut out the same shape 3 times without changing anything. Looking through the captured data you can see that each time the computer talks to the laser, it says something completely different (same number of bytes though). Long story short, the USB communication to the laser seems to be encrypted and I don't have the skills or patients to try and reverse engineer that.
So I gave up on taking control of the Moshi board without modifying it. On to Phase 2...
This controller itself is pretty well designed, it's real down fall is that it only works with the MoshiDraw program. In the picture above is my component breakdown of the board. I spent a bit of time going through the datasheets of the parts that I could identify and traced all of the signals back to pins on the 40 pin unlabeled processor. It's quite convenient that they used a DIP package for that processor, because my new plan became removing the processor and controlling the stepper drivers with a PIC. The best part is that it's completely reversible by just pulling off my PIC and replacing the moshi processor chip.

- Processor Pinout.JPG (23.89 KiB) Viewed 43833 times
The stepper drivers are TEA3718. There are four of them, each one controls one of the phases of the 2 motors. The drivers have 4 levels of current that you can drive through a phase. [None, Low, Med, High] If you drive the DC-KIII motors in full step mode then you end up with 250 steps/inch, so the Moshi board drives the motors by quarter stepping. From the 40 pin socket you directly drive all of the phase/in0/in1 signals through a 74HC273 octal D flip flop to get to the TEA3718. Essentially, you setup your phase/in1/in0 signals and then use the clock signal to load it to either the X or Y motor.
The 40 pin processor is intended to communicate with the unlabeled USB chip on the Moshi board. Unfortunately the communication between the 2 chips is on pins 2 to 9 of the processor. If you look at my diagram you will notice that these are the pins used for phase/in1/in0. Between the processor and the usb chip is a 74HC245. Holding pin 13 on the processor socket high will keep the USB chip from being able to control the phase/in1/in0 while you are driving the motors.
Ultimately I'm going to make a small PCB that will plug into the 40 pin socket. It will have a USB-UART connection (Microchip MCP2200), an 8 bit PIC micro (PIC16F1936), an SRAM (probably a 23K256). A few years ago a built a CNC pcb router and designed and built the controller myself. It has a simple serial interface and I'm doing the same thing with this PIC. I'm using my PCB toolpath script and feeding the output across the USB-Serial connection to the PIC. In the picture below I've soldered wires onto the backside of the Moshi board corresponding to the important pins that I identified. I have a PIC16F1936 on a little breakout board that I made (and use for just about everything). That is my test bed.


Tonight I finished my motor driving algorithm, you can see the results below. I hope to be able to put something together and sell for low cost that will be a plug in for the Moshi board. I think it could be a hit with the crowd of people who don't want to drop $500 on a DSP but want more than Moshi Draw can offer. I still have quite a few things that need to be tested. I want to add PWM power control, add an SRAM (part number noted above) so that a job can be loaded and cut more quickly, etc.