Arduino RPM Application for Sieg Lathes and Mills

Home Model Engine Machinist Forum

Help Support Home Model Engine Machinist Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Jennifer Edwards

Well-Known Member
Joined
Aug 9, 2018
Messages
215
Reaction score
88
Location
Bridlington, East Riding of Yorkshire, UK
I recently purchased from Axminster a Sieg SC2 Lathe, and SX2 Milling Machine. To my dismay there was no way to tell how many RPM's the spindles were turning. When I looked at the price of the add on LCD display, I was shocked to learn that they sell for £150 each!

Thinking that a simple chip and LCD display in a tacky white plastic box should cost more like £15 I set off on a quest to build my own.

I began by posting a thread on this forum inquiring about the "pinout" of the RPM port on these machines and was lucky enough to get a response that directed me to "macpod.net" where a guy named Jeffery Nelson had done the grunt work of analyzing the data on the seven pin "RPM" port located on a number of Sieg machines including mine. BTW he sells an Arduino kit to make your own for £50. Alas me being the cheapskate I am decided to go it on my own,

So I started by hitting up Amazon and purchasing an Arduino R3 clone, an LCD display, a couple of enclousures for them, a few Arduino jumpers, and a seven pin plug to match the port on my machines.

My next issue was learning how to program in the Arduino language, which was suprisingly easy as I spent the last 20 years of my career working in the "C++" language which is very similar.

I began by taking a bit of code that Jeffery had written and modified it to write to the I2C type LCD I had chosen, which used two wires for data as compared to the many that the older LCD's use. It was an interesting journey thru the world of port addresses and interrupts. Having that sorted I uploaded the code to my Arduino R3 clone, and to my amazment it looked as though it may work. I had added some debugging display statements in the code that output to the LCD at each step and to my amazment it ran!

Here is the Pinout from Jeffery's web site:

sx2_cn2_tachometer_port_pinout.jpg


This is the "pinout" of the RPM port on the Seig machines. The drawing is as if you were looking into the port. As you can see there are three data lines, pins 1,2, and 3, and two sets of 5V DC power on pins 4 thru 7. Which Arduino pins to jumper from the Seig RPM port to your Arduino board are defined in the documentation included in my code.

I scoped out the power on pins 4 & 5 and determined it is very clean regulated power at 4.96 Vdc on my lathe and 4.98 Vdc on my mill, perfect to power an arduino board, which solved the issue of needing an external power source to run the board and LCD.

So I hit up good old Amazon and searched for a GX16 type 7 female plug. To my dismay it was the only part of the project I could not find there. Fortunately good ole E-Bay came thru for me, I was able to purchase two of them for a mere £3.

While on Amazon I purchased te remainder of the hardware needed for the project including an Arduino UNO R3 clone, Some arduino jumpers, a bit of heat shrink tubing, an LCD display, and enclosures for the board and display. the total investment for everything was just shy of £30. I am sure you can do even better if you shop around.

This is everything I purchased for the project:

fullsizeoutput_de2.jpeg


First I tackled soldering the five Arduino jumpers to the seven pin connector, which turned out to be tedious. I am sure some choice expletives echoed around my shop while using my antique underpowered soldering iron.


q%INoa+iRCav0QBltnPQnA.jpg


Before assembling the plug I placed a dab of hot glue in the center of the soldered wires and also placed a strip of electrical tape around the outside to insulate the wires from one another and the metal casing on the plug. I finally used a little heat shrinkable tubing to make it pretty.

The next step was to assemble the LCD enclosure, which to be honest I do not like as the back is open to the elemens, which in my shop can incluse flying metal chips. it will be replaced when I re-engineer this prototype and build a single enclosure for the whole project.

VJuXj%ohQBeemEQvy4+EqQ.jpg


Following this step I placed the R3 clone into its enclosure, attached all the jumpers to the proper pins (which are defined in the code I will place at the end of this post). I put a dab of hot glue on the enclosure where the jumpers were attached just to keep them in place, but still be removable when I disassemble this prototype and build the final enclosure.

wSvnEypRSRiz7An2+8%dWw.jpg


I was now ready to test my code for the first time, a scary moment for any progrmmer. for the forst test i chose t use my lathe. I inserted my seven pin plug into the port which is labeled "RPM" and to my amazment the boards LED lit, the display came to life, and displayed my first step message "LCD Found":

msbYIuhBSy62ahqPEhdaKw.jpg


Things were looking good. After another second or so the program header message which is displayed when all the pins are defined and the program is ready to begin looping scanning the port was dislayed:

kH187MoBT56l3bK0nC3NTg.jpg


I just had to see my name in lights! Now the program entered its looping and began reading the four packet groups theat are sent by the Seig controller board. the first message i saw was the "Stopped" message, which I have since changed to "Spindle Stopped" for clairification:

View attachment 105574

I was really getting excited, the program was behaving as it should, but could it actually read the spindle speed when the packets began to fly? I gingerly twisted the speed control knob a little and to my great pleasure recieved the following:

7B3oCrplRW+AakHVp2pDbw.jpg







I was in business! the darn thing worked like a charm. Just to be certain I Checked the spindle speed with the strobe application that i mentioned in an earlier post and clocked it at 322 RPM's not too shabby.

The Sieg controller board transmits the thousands, hundreds and tens column out the RPM port and always leaves the fourth "ones" column at zero. By playing with the strobe I had determined that The controller board rounds the RPMs up the tens column when the ones column speed gets to a six, so from one to 5 rpm you would see a zero displayed, from six to sixteen you would see 10 dispayed and etc... so accuracy of the Sig data is never more than 5 RPM's in error. Way more than accurate enough for the model engineer.

Here is an image of the final product. I attached the Arduino board on the back side of the lathes motor enclosure (visible on back left) and the LCD on top where I can easily see it. Notice the port on the Arduino enclosure is facing upwards, so I can easily attach my printer cable to it when and if I apply updates to the program.

%5SRgRNLTteGtIbGxLGEBg.jpg


Conclusion:

This is one way you can beat the high price of the ready made RPM display available from Axminster and other supliers, and have some fun learning to use the Arduino system.

This project was to build myself a prototype to verify that I had the coding to run the two wire I2c type LCD and that the code I located on the net was still viable. With this done I will now build a permamant home for my little Arduino project. I will post the final product when i have built its permamant enclosure.

Thank you to Jeffery Nelson for making all the information needed to buld this project on his web site: www.macpod.net available under his "Hacking the SX2 mini mill" heading.

here is the latest non inclusive list of machines that this code works with:

Finally, I attempted to list the code here in this forum but it was too long to post here.

If you want a copy of the code please e-mail me at: [email protected]

Thanks for reading, I look forward to your coments,
Jenny

I have added the code as an attachment.
 

Attachments

  • Jennifer_RPM_Program.txt
    11.3 KB · Views: 1,167
Last edited:
Well done, Jenny!
Do you have a rotary table? I used an Arduino Uno to control my 4" RT. The same circuit/sketch can be altered to automate a dividing head. I also designed a case for the Arduino, LCD, keypad, and stepper driver board, but haven't printed it yet.
The RT controller setup is detailed on this forum, including the code.
 
Well done, Jenny!
Do you have a rotary table? I used an Arduino Uno to control my 4" RT. The same circuit/sketch can be altered to automate a dividing head. I also designed a case for the Arduino, LCD, keypad, and stepper driver board, but haven't printed it yet.
The RT controller setup is detailed on this forum, including the code.

Thank you for the nice comment.

Yes I do have a rotary table, but alas and alak it is but a manual one. I have done a lot of CNC work in the past so perhaps one day I will attach a stepper motor and play with it. i use it so infrequently that it is not high on my "to do" list.
 
Well done, Jenny!
Do you have a rotary table? I used an Arduino Uno to control my 4" RT. The same circuit/sketch can be altered to automate a dividing head. I also designed a case for the Arduino, LCD, keypad, and stepper driver board, but haven't printed it yet.
The RT controller setup is detailed on this forum, including the code.

I tried to post the code here but it was too long to fit in the post, there is a thousand character ( or is it word?) limit for a single post.
 
Hi Jenny
Nice work !
You should be able to add the code as an attachment. A .txt file should work and just tell folks to copy and paste into the Arduino IDE.

Scott
 
Hi Jenny,

I did a similar display for and SC3 (and SX2P mill) and shared the design with a YouTuber called Andrew Whale. Here is the video he did about it:


Both of us used an Arduino Nano (clone) for it's small size, and a 4 digit "Digital Tube" display; but otherwise similar to yours. I shared some drawings and my Arduino sketch with Andrew Whale - if anyone wants them just ask either here, or I think the other Andrew will forward them out too.

Thanks to MacPod/Jeff Nelson for doing the really hard work of figuring it out!

Cheers - Andrew
 
Last edited:
Would love a copy of the diagrams & code please. You are both doing a great job developing this, as Jennifer points out the cost of buying one is over the top. Thank you both. I tried to get the diagram from Andrew in the video, I think my request got lost in the electronic maze.

Barry
Australia
 
Hi Jenny,

I did a similar display for and SC3 (and SX2P mill) and shared the design with a YouTuber called Andrew Whale. Here is the video he did about it:


Both of us used an Arduino Nano (clone) for it's small size, and a 4 digit "Digital Tube" display; but otherwise similar to yours. I shared some drawings and my Arduino sketch with Andrew Whale - if anyone wants them just ask either here, or I think the other Andrew will forward them out too.

Thanks to MacPod/Jeff Nelson for doing the really hard work of figuring it out!

Cheers - Andrew


Thanks Andrew,

Yes I have thought about using Nano and a NIXIE tube display, which would look really cool, but I did not want to get in to an external power supply the nixies require. In fact the original code that I left intact can be un-remarked and it will work with that type of display without removing mine.

I chose this display because I would like to expand on the program to allow input of material and diameter and display a suggested speed. Perhaps from a menu of materials and diameters you could scroll thru. Maybe use a Bluetooth board and mobile phone combo for input. The possibilities are endless.

It is the reason that I chose a two pin two line display. Got extra character space and to lessen impact on the boards limited I/O capabilities.

Currently I am trying to decide what sort of input device to employ.

Yes Jeffery saved me me lot of work, it would have been a much longer project without his help. I made an appropriate donation to his cause and have corresponded with him.

Thanks again,
Jen
 
Last edited:
Would love a copy of the diagrams & code please. You are both doing a great job developing this, as Jennifer points out the cost of buying one is over the top. Thank you both. I tried to get the diagram from Andrew in the video, I think my request got lost in the electronic maze.

Barry
Australia


Barry,

Thank you for the kind words,

I placed everything you need to wire it in the code at the bottom of my post.

Jenny
 
Hi again Jenny,

Regarding the name "digital tube", it's a bit misleading! It's just what the chinese ebayers call the 4 digit LED display. I've no idea why, as it's simply a 4 digit LED display with a TM1637 chip to make it I2C addressable. I guess it's intended for use in a clock, but in this application we can just use the 4 digits. There is no separate power supply required - in fact the connection to a Nano is very neat: just using 4 wires to the ICSP header.

Personally I like the big LED display....but your 16x2 display is more flexible if you want to do other things with it.

Cheers - Andrew
 
Hi again Jenny,

Regarding the name "digital tube", it's a bit misleading! It's just what the chinese ebayers call the 4 digit LED display. I've no idea why, as it's simply a 4 digit LED display with a TM1637 chip to make it I2C addressable. I guess it's intended for use in a clock, but in this application we can just use the 4 digits. There is no separate power supply required - in fact the connection to a Nano is very neat: just using 4 wires to the ICSP header.

Personally I like the big LED display....but your 16x2 display is more flexible if you want to do other things with it.

Cheers - Andrew


Yes I gathered that. And I have used the two line display with an eye to some fun improvements in the future.

I left the four digit code intact, so it will output either way without raising an error,

The code actually outputs to both streams The I2C and the serial four digit display originally used by Jeffery.
 
This is an FYI;

I just had another request for a copy of the code for this project.

There is a complete copy attached to the bottom of my original post that anyone can download.

If you have a problem downloading it I am more than happy to email a copy to anyone.
 
Last edited:
I think the 'Digital Tube' name is in reference to the old Nixi tube displays... Maybe you are not old enough to remember them... Anyone have a reference to a part # for the "digital Tube"?
 
Not too young to remember nixie tubes, unfortunately!
The "Digital tube" that I used can be found on eBay by searching for "D4056A".
Please be aware that this display is _not_ going to work with Jennifer's sketch which is posted above. It needs a different arduino library.
 
Last edited:
You can still buy Nixie tubes, there is a company in Russia manufacturing them. You can often find them being flogged on eBay, and a few folks sell them direct from various web sites.

A few years back I built a “steam punk” looking clock with a set of them. There is nothing like that Cold War countdown look they give.
 
Maybe they're trying to convince buyers that it is actually a VFD display?

Russians aren't the only ones making nixie tubes either. There's a small business in Czech republic (I think) making them as well. Can't remember what they're called though.
 

Latest posts

Back
Top