Electronics - Hacking the SX2 Mini Mill - (Adding a reverse switch and reverse engineering the tachometer port protocol)

Despite living in an apartment, I have given serious thought over the years to purchasing an X2 milling machine to CNC-ify. When I learned that Little Machine Shop had begun selling the SX2 mill which sports more travel, a better motor (500w brushless), and a belt drive compared to the standard X2, I caved and purchased it.

I knew before purchasing this mill that it had a tachometer display port on it much like the SC2 Lathe has. I also knew there was no way in hell I was going to pay 125$ for what amounts to an lcd and simple uC. So what's the logical thing to do in a situation like this? Hack it!


Step 1 - Trace the wires:
I pulled the side panel off to see where the tachometer wires were going and found they connected to the Potentiometer board which is used to control the speed of the SX2 mill. This board has 4 unmarked jst xh series connectors (thanks for finding the connector types Don) on it that include:

  • 10 pin header that connects to the circuitry on the back of the unit.
  • 7 pin header that connects to the tachometer plug
  • 2 pin header for the fault led
  • 3 pin mystery header

Step 2 - Become sidetracked:
What could this unmarked 3 pin mystery header be for? The center pin is connected to ground and the other two pins appear to be i/o lines that are pulled up to 5v via 4.7k resistors. Hey wait, doesn't the SC2 lathe which uses the same 500w brushless motor have a forwards/reverse switch? Hmm, and Little Machine Shop sells the SX2 and CN2 potentiometer and motor controller boards as the same product!

As it turns out, you can easily make the SX2 mill run in forwards or reverse just by grounding one of these pulled up i/o lines. Connecting the i/o line towards the inside of the case to ground (center pin) will cause the machine to run in reverse. Connecting the i/o line towards the outside of the case to ground (center pin) will cause the machine to run normally.

I wonder why they left this feature out? All that needs to be done to gain the functionality is to wire up a dirt-cheap two position three prong switch to the 3 pin connector.

Step 3 - Back on track:
With that distraction gone, I finished up tracing the wires and identifying what voltages (and signals) were present on the lines using a DS1052E DS1102E (he he he) scope:

Upon completing this, I knew the tachometer port offered two ground lines, a 5v line, and three 5v digital lines (LCDCS, LCDCL, LCDDI) which would need to be decoded to display readings. To analyze these lines, I made a custom tachometer cable using a mating "7 pin mic connector" that I purchased off ebay. Officially this connector is would be considered a 7-pin DIN connector, but I had more luck searching for the item as a "XLR 7-pin mic connector".

A quick look at the digital lines using a Saleae logic analyzer indicated that a burst of data is sent every 0.75 seconds as soon as the machines turn on. I'll call these bursts "packets" from here on out.

Note: Since writing this Sieg Industries has changed the tachometer protocol. This seems to have happened around August 2014 based on customer reports. The details of the new protocol are present on the Pinout and Protocol Page.

Zooming in a bit further revealed that LCDCS appeared to be some sort of frame line and that each packet consists of 4 frames. LCDCL, being the fastest toggling line, seemed like a likely clock line candidate and the sporadic nature of LCDDI made it a good data line condendor.

To give some sort of validations to these educated guesses, I tried decoding a few of the packets sampled when the spindel was at rest and then again when the spindel was rotating.
On a positive note, I found that by reading the data line (LCDDI) on every falling edge of the clock line (LCDCL), I was able to consistently read out the 4 17 bit frames. Thankfully, while the spindle was stopped, these values did not change.
Packet when spindel was not spinning:
10100000011111010, 10100001011111010, 10100010011111011, 10100011000100000

Looking at this data closer, I noticed the first 8 bits increment by one. This made me guess they were addresses and the last 9 bits were data. To confirm this I ran the spindle at different speeds and found that while the last 9 bits of each frame changed, the first 8 always stayed the same.
Packet when spindel was not spinning:
10100000:011111010, 10100001:011111010, 10100010:011111011, 10100011:000100000

Step 4 - Decoding the data:
It was at this point I wrote a simple atmega168 program to read the frames and dump them to the terminal so I could observe how the data changed as I adjusted the spindle speed.
From pictures and data gathered around the web, I was under the impression that:

  • The tachometer display rpms increment by 20 (according to LMS)
  • The display had 4 7-segments to represent the rpms
  • The display could show a forwards, reverse, and stop symbol
I tried using this information to decode the signals, but something just seemed off. In the end I emailed Frank Hoose from http://www.mini-lathe.com in the hopes they still had their tachometer lying around. Luckily for me they did and were nice enough to clarify a few questions I had:
  • The tachometer display rpms actually increment by 10
  • The display does indeed have 4 7-segments to represent rpms
  • The display does display a separate STOP symbol when the spindle is at rest but it DOES NOT display forwards/reverse.
  • The display updates at least 1 time a second.
They also took some pictures of the tachometer guts and display without me asking which was nice.

Armed with this new information and a tachometer a buddy offered to lend me, I was able to quickly figure the rest out. The first 3 frames turned out to represent the 1000's, 100's, and 10's display digits. The final frame value never seems to change so I'm going to guess this is a "write to screen" control frame.

The first bit of digit frame data is always 0. The next 7 bits toggle the 7 segments of the digit on/off. To figure out what bits controlled what segments, I incremented my spindel speed by 50 rpms up to 950 rpms and recorded what the 100's place digit displayed.

The last bit of digit frame data is always 0 EXCEPT for the 10's place frame. When the spindel is rotating, this bit is 0 but when stopped, the bit is set to 1.

Step 5 - Test findings:
I wrote a quick and dirty arduino app (click for code) that connects to the port, processes the packets, then displays the data.

Here's what it looks like with the spindle at rest and while running (click on the images for larger versions):

Step 6 - Document the pinout and protocol
I figured it would be better to keep the "journey" log separate from the pinout/protocol data so I wrote this up on the pinout_and_protocol page.

The future:
I plan on designing and fabricating my own tachometer display which should cost nowhere near the ~125$ vendors want for these. It would be nice if I could sell these in order to pay for this mill and fund my cnc build.
Kits are in! email me for info.

In addition, I plan on exploring the controller board of this machine some more. It is designed in a very practical manner where the motor driving circuit is on a main board and the brains of the operation (an Atmega8) is placed on an easily removed daughterboard. Surely some interesting hacks will arise from this design! :)


If you found this project interesting or helpful and have the means feel free to donate! CNC equipment is expensive!

Comments to date: 12. Page 1 of 2.

Jools   guest

10:19am on Saturday, December 1st, 2018

HI Jeff.
This is awesome information and will really help all mini mill owners.
I have a question and it is can the information that the mill sends out, the 'packets', be read or displayed on Linuxcnc? Normally I think it is done by a rotary encoder but if it could read this and you could make a module I would buy one straight away :-)

Admin:  Hi Jools, someone already made this and LittleMachineShop sells it. Check out Part Number 4213 "CNC Spindle Control Upgrade Kit for SX2, SC2". It requires you to replace the microcontroller on the mill to make it input/output a different set of signals. Note that since the kit changes the signals I can no longer read them... however that is a bit of a moot point since you should then be able to see the speeds on the computer monitor :)

Graham   guest

8:37am on Monday, January 23rd, 2017

Try USPS, the good ol' United States Postal Service, I purchased a very similar unit to this one but you have to solder the bits onto the PCB yourself. The cost including shipping was AUD$100.00, shipping was USD$9.95 with tracking, that would have made the cost of your tach for me at AUD$79.13, a bargain. Hope this helps.

Admin:  Graham, I am still using the same USPS service that I used when I originally shipped your kit. The price of a small USPS flat-rate international box has increased over 300% since then. I also have to fill out/sign 3 more forms with duplicate information...

Graham   guest

7:04pm on Saturday, January 21st, 2017

Would dearly like one of these but the exchange rate is a killer, with postage at USD $35.00 it is nearly the same as the Sieg unit. The Sieg here in OZ is AUD $120.00, this little baby converts to $115.00. But a big thankyou for nutting out the spindle reverse plug. Great work.

Admin:  Yea, I wish shipping international wasn't so expensive but the $33.50 price is literally what I have to pay USPS to ship these. When I first started selling these the cost was only $13.50. I miss that! I really need to find a a low cost fulfillment service that ships internationally but that is far easier said than done.

andre   guest

3:07am on Saturday, May 14th, 2016

I Want to try and build this myself for an Sieg SC2 lathe.

A Question about the arduino code you've provided, is it with the latest protocol changes or does it still need some tinkering?

Admin:  The Arduino code is different than the code I use with the kits (which are confirmed to work with the new/old protocol). If you read the Arduino code, you will see there is a line that you can uncomment to support the new protocol. Please confirm this works if you try it!

Yalis   guest

8:27am on Wednesday, May 14th, 2014

Any idea what the max load (current) can be on the two +5V pins of the '7pin mic connector' ?.
Did you check the supply current of the original tachometer.

Admin:  I do not have the original tachometer so I cannot say what the current draw for that was. It has also been a while since I've looked to verify my design was ok so I can't state a specific number.

ryan from barbaos   guest

5:22pm on Monday, May 27th, 2013

will this work on real bull mini lathes

Admin:  I will need more information as they make more than one lathe. Please email me

Mark B   guest

6:33pm on Sunday, March 18th, 2012

Excellent product at a fraction of the price of the orginal. Have them on my mini mill and mini lathe.

Andrew H.   guest

10:55pm on Tuesday, February 14th, 2012

Love my tach. ran down to "the shack" and picked up a project box. took the project box apart, cut it down with my bandsaw and than milled it so the top would fit back on. Came out great!

L Davis   guest

10:14am on Tuesday, February 7th, 2012

Service form Jeff was fantastic. Kit fitted and functions perfectly.
Thanks mate, great work, keep it up.

Mr T   guest

1:02am on Sunday, November 13th, 2011

Love mine, if you have it built it or build it yourself , you may want to put the main 7 pin connector on the back of the board, this will give you better mounting and case options
Its not a gripe just a personal preference, I love mine, more then happy I bought mine!!!!!

Page: -1-   2   

echo "";



securityy image