Electronics - Hacking the SX2 Mini Mill - (Adding a reverse switch and reverse engineering the tachometer port protocol)
Pinout:
On the back of the side panel of the SX2 mini mill there is a XLR 7-pin mic port. This is used to attach an external tachometer display to the mill. This same port and protocol is used on the SC2 Late as well. The pinout and internal cable colors for this port are described in the image below:
Electrical line specifications:
- 2 GND
- 2 5V+
- 1 LCDCS - Frame indicator, a 5V digital line that is normally pulled high.
- 1 LCDCL - Clock line, a 5V digital line that is normally pulled high.
- 1 LCDDI - Data line, a 5V digital line that is normally pulled high.
Data specifications:
Once the SX2 mill (or SC2 lathe) is turned on, a blip of data is sent over the LCDCS, LCDCL, and LCDDI lines every 0.75s. This blip will hereby be called a packet.
Each packet consists of 4 frames. The frame starts are indicated when the LCDCS line is pulled down and the frame ends are indicated when the line is pulled back up. Each frame consists of 19 bits of data. A bit is read by reading the state of the LCDDI line on every fall of the LCDCL line.
The first 8 bits of each frame represent the address of the frame. The following 9 bits represent the frame's data. Only 4 addresses are used and these are always sent in the same order (0xA0, 0xA1, 0xA2, 0xA3). These addresses respectively indicate the 1000's rpm digit, 100's rpm digit, 10's rpm digit, and one additional register which always has a value of 0x20.
The 9 data bits of each rpm digit frame are structured such that:
- The first data bit is always 0
- The next 7 bits identify which of the 7 segments of the digit should be turned on (1) or off(0). An image below describes what bits toggle what segments.
- The 9th data bit is always 0 EXCEPT for when the spindel is not rotating. In this scenario, the 10's place digit's final bit is 1.
If you found this project interesting or helpful and have the means feel free to donate! CNC builds are expensive!
No comments have been provided.
