Saturday, January 6, 2024

It is not good because it is old, it is old because it is good


In the category: Borrowed wisdom is better than no wisdom at all. The title is a quote I have seen somewhere in a machinist forum. I can't remember where but I like it and it for me it holds thruth. The original quote is about art if I remember correctly but I think the statement is very universal. If someone knows the origin, I gladly hear it. 

First experience with turning aluminium and mild steel

Ahw, cute

I still have my first lathe, I bought it new somewhere in 2012. It has been sold under different brand names but it is mostly known under he name Sieg C1, a Chinese attempt to sound like German quality.

My small lathe has a 12 mm through hole and a 80 mm chuck, it has roughly 30 centimeters between the centers (when you cheat a little bit). The micro lathe can be moved by one person at roughly 25 kg and looks cute on a workbench. I abused the machine a lot, to get work done that would really require a larger machine. The precision was reasonable after spending a few hours of finetuning. the precision was horrible again after abuse. An example of this abuse is modifying a hardened 1605 ball screw spindle! 

A.I. Hembrug machines, 

From fascination, through obsession to possession

A.I. in this case does not stand for artificial intelligence but for Artilerie Inrichtingen a century old gouvernment factory of militairy items, mostly ammunition and barrels. Two decades after the 2nd world war the company changed it course, where most machines that we're previously designed and built for internal use now became products as a core business.     

There is a nice piece of history about Artillerie Inrichtingen in Zaandam near the Hembrug (wikipedia). Both the A.I. company and the Hembrug bridge are gone but a lot of the machines that they built are still going strong more than 50 years later...

Close encounters of some kind ...

While visiting a friend up north, there it was, in his garage, an A.I. Hembrug Dr1 lathe. He bought it from a friend and spent a lot of time revising the machine so it looked awesome.

For me this was something different then the 'toy' a could play with. The lathe with its typical machine green color is so elegantly shaped, it might be one of the best looking lathes I have seen so far. At almost 1 metric tonne (975 kg) it was a beast in my eyes. Not jealous but inspired I put this machine on my mental most wanted list ... for later when I'm older and wiser. At that time, even if I could find one in a relatively good condition I did not have the space for it. 

The great expansion

I did all my tinkering in my 2 by 2.80 meter damp shed. I cut, turned, drilled and milled a lot of aluminium in there. To the completely legitimate dismay of my wife, the chips of all my hard work could be found everywhere in and around the house. Mostly all over the shed, but also in the driveway, the hall, livingroom, well, you get the point, aluminium sprinkles everywhere. With the few benchtop machines, two bicycles a workbench and loads of storage shelfs it was almost impossible to do some work there, let alone that I could add machines that take up a square meter or more of space. So where would my DR1 go?

After roughly 10 years of my anoyance, moving everything out of the shed when I wanted to do something, moving everything back in when it started to rain, rinse and repeat, I mentioned to someone that I would like to find a place to do my hobby/work. Thanks to him I found a nice place only a few minutes drive from where I live. The new place was much bigger, has 3 phase power, is less cold and importantly is dry. there is no heating, but hey, when you get cold you just don't work hard enough.

Now with 50 or so square meters of floorspace I had some place for a grown-ups workbench and could give some of my equipment a stationary place. My first big investment (in size of equipment) was a saw table. A 90s Metabo, from the time that they were still built to last, in Germany. This first aquisition unleashed a feeling of unlimited floor space that could be filled.

Being triggered to buy

On my machine bucket list was the DR1 lathe, but with a limited budget I had to be smart about finding one without breaking the bank. Where many people mindless scroll through YouTube shorts I spent a lot of time on Markplaats searching for machines and CNC components. Admittedly a bit obsessively for a while.     

Most online market places (in my case Marktplaats) allow you to store your search terms and send a notification when an item that matches your search criteria is added. My search for a DR1 lathe became an online oilstain. At that time (and I think still) searching the online market places give you results of any of the search terms and not all of the search terms, technically an OR and not an AND query. So when you search for "AI Hembrug DR1", you suddenly find loads of other stuff that triggers on Hembrug and AI. DR1 unfortunately much less. That is how I found out that the company that made the DR1, also made several other interresting machines. There is a FR1 milling machine in a variety of versions. The U1 and U2 universal grinder, a shaper in 2 flavors and several models of drill presses.

You've got the drill

Even though these particular machines like the mill, grinder or drill press were not on my list, I do got an interrest for them. My first AI machine (I don't know if it really was made at the Hembrug factory), was a drill press, that became a story of its own where I broke it during transport. To cut things short, it took a bit less than a year and now is an amazing machine again. Once you have a large and sturdy precision drill you realize that it is not just your own skills but also the equipment that allows you to work with better than 0.1 mm precision. One thing I learned is that I was able to lift 80 kilograms to get the machine in my car, the other thing I learned is that I really shouldn't do that. You have one back and it is nice if it lasts you a lifetime.

My prevous drill press was a Kinzo that I bought on a flee market for 5 Euros, upgraded it with a 50 Euro drill chuck and used it for more than 10 years. It always sounded horrible but it did the job. Just before I sold it I realized that it was not the drill spindle making this horrible noise but the bearings of the motor that were completely worn out. I sold it at a very small profit without the chuck. The spindle did have more than 1 mm play when fully extended, so not the biggest problem of the machine but a problem nevertheless. The new A.I. drill press was almost life changing. Nice to know that in general, larger machines make less noise then their smaller equivalent.   

Youve got the mill, and a shaper? 

FR1a

Markplaats' poor search implementation kept introducing new machines, so I can't help it. The first image of a particular A.I. FR1a milling machine immediately caught my eye. It had a nice fresh paint job and it looked very complete. I started bidding on the machine and soon, got worried that I might be able to buy it within my set budget. In the mean time while negotiating with the seller of the mill I got in touch with another seller that had an A.I. shaper for sale. All of the sudden I had to become an expert in hoisting, securing/strapping equipment. Use of a palet truck. Also reverse parking a large vehicle on a very narrow driveway. My wife and I spent almost a full day to fetch both machines as they were located in opposite sides of the country. The total weight of both machines also exceeded the maximum load I am allowed to drive with my drivers license so we picked them up one by one.

If you are in doubt what a shaper is, I also didn't know but I was intrigued already and the machine was very affordable. I did some research and found a shaper enthousiast going under the alias Rustinox on YouTube. At first I had the feeling Rustinox was heavily influenced by the "if all you have is a hammer, everything looks like a nail" syndrome. But credits where credits are due, he is very creative with his shaper, knows it inside out and loves to share his knowledge and findings with the rest of the world. 

I consider using a shaper as a lost art. Almost anything you can do on a shaper, you would probably also be able to do with a milling machine, except maybe cutting inner keyways for axles. A shaper is relatively slow, but one thing stands out, the cutting tools that you use for shaping are the same cheap high speed steel (HSS) cutters that you would use on a lathe. They are easy find and to grind into a specific cutting geometry that works for you. If you make a booboo while making chips (cutting metal) it can be ground again. So if you are a hobbyist like me, time is of lesser relevance.

I decided against buying the shaper, even though I convinced myself that cutting inner keyways was one of the best features of the machine. The FR1a mill I had to have as this one came with flat belts and the direct driven, larger and more rigid milling head. 

A few days later I suddenly had 2 new machines in the workshop, the mentioned milling machine and yes ... the shaper. How this came about???, Some planets were exactly aligend, there was a small solar flare at the time of decision making, I already had to rent a truck with a hydraulic tailgate that could lift the 450kg mill, a pallet truck and the seller of the shaper kept lowering the price until I succumbed.

When the machines were finally in the workshop I could not get them fully in place as I could not move them anymore. I rented the pallet truck with the lorry and had to bring them back at the end of the day. The shaper is 375 kg and the mill rough 450 kg, not somethng that you easily move around. A few weeks later a friend of mine owning a chain hoist helped me out. We strategically drilled some holes in the wooden beams that support the mezzanine. With some lift and shift, we got everything in place. If already knowing what was about to come I left a free spot alongside the wall for another machine ... for just in case.

To be honest, I equiped the shaper wit a frequency inverter, cleaned and oiled it, did some tests and after that, the machine has hardly been used. It will be, I'm sure, there are plans... The milling machine is a different story, from the day it was in my shop I used it regularly and what I liked most is that instead of all aluminum and steel parts that I created manully, that took ages to make, hadn filing with limited precision, I could now make stuf in minutes not hours, or hours not days. And it all looked so pretty, shiny and above under a near perfect angle.     

Better Lathe than never

A Hembrug DR1 Lathe does not come cheap. There are a lot of models out there and you need to invest some time to understand what the differences are. To give an impression how ignorant I am when it comes to these machines, I thought that the maximum turning speed (RPM) of the lathe had to do with the configuration of the motor. The DR1 lathes come in a 1000, 2000 and 4000 RPM version. besides the motor and electrical configuration it also requires that the main bearings are capable of handling high RPMs. Almost everybody that I asked for advise told me that if I would invest in a machine like this I should buy a 4000 RPM capable machine with Norton gears. The future me would agree at this point as future me now understands why.

When prices go up people start talking about investments instead of buying, at least that is what I did. I was very convincing when talking to myself that these machines have a similar price for over a decade. If you disregard inflation, you can sell the machine for the same price in 10 years, so you rented it for the price of the inflation. Nah, I'll take it. 

I did not have the money to buy a machine yet but I was doing my homework. I found a very nice revised machine at a company that specializes in fixing and upgrading machines and bringing them back to original precision, grinding the guideways (hope this is properly translated) within 0.005 tolerances or less. I asked for a quotation how much this completely repainted, trimmed, trammed and refurbished machine would cost. My thought, it is a machine that is over 60 years old, how much could that set you back? There were 5 digits involved ...

My next question, do you have anything less expensive? The owner of the company told me he had some machines that were not refurbished, he could give them a standard checkup and I would get 3 months warenty if anything poppup up, or worse, popped off. I lost a digit in the process. I now needed to find around  4k. I agreed with myself that I needed to sell some stuff that I hardly or never used and when I came close to half of the money the other half could come out of my savings. I put al kinds of gear equipment, tools, furniture, electronics in an excel sheet and put the items on the same online marketplace where I often buy stuff. 

A few months later I ended up buying a machine that was checked up and ready to go, with a 3 jaw chuck, a live center, a Drehblitz tool changer, two drilling heads. As a bonus I had to fix some minor issues with the opportunity to get to know the DR1 better.

My Hembrug museum       

So I ended up with a mill, a shaper, a drill press and a lathe from the same Dutch brand. I like the consistency of the machines in my workshop. Really benificial is that some parts are the same across the machines. So if you know how to maintain or repair one, it is very likely that you will have little issues with the other. Also the lubricants used are more or less the same and many of the T slots are the same size.

Every machine by now has a separate story that I most likely will tell them tales some day. Including the do's and don'ts. I have made several mistakes, some that could have resulted in minor injuries but luckily did not, some that were costly or very time consuming. If these stories keep people safe or safeguard your machines from broken or bent parts or fried motors I will gladly share.
For all the machines one thing can be said, they are heavy and sturdy and in general built with great attention to detail. The machines are built between 1960 and 1975. The reason why these machines still exist today is because they are built to last. 
Not everything that is old is good,... but good quality has potential to become old.   
A good friend of mine spoke the wise words, “you don’t own these machines, you’re allowed to use them in your lifetime”.      
  

Tuesday, January 2, 2024

EPS 01 - The year of the robot


The year of the robot

… and automate everything

In 2019 I visited the SymfonyCon conference in Amsterdam, where one of the speakers, Fabien Potencier, held a talk where he released a new major version of Symfony (5) live on stage. He also had written a book Symfony, The fast track, that was covered by several automated tests and updated automatically with every new version of the software. I’m not easily impressed but roughly 4 years later I still take inspiration from that particular event. Throughout the talk one thing was clear, when you want to get a lot done in little time, automate everything. That thought stuck with me ...

Now, at the start of a new year I'm thinking about making some YouTube content about my machine shop, the projects I'm working on and hope to provide some tips and tricks on milling and turning.

As a broadcast automation veteran I should know a thing or two on how to automate audiovisual workflows. Video productions can be very time consuming when done incorrectly, so from day one I want to invest in automating the process, being able to focus on the creative side of things. Given that I’m a very technical and not necessarily a creative person it makes sense to invest my time in the latter domain.

Why 'The year of the robot'?

When I was a small kid I was a big Transformers fan, this late 80s series featured robots that could disguise themselves as common, real world objects. The Autobots as the name implies, took the shape of an automobile, the Decepticons mostly planes and other worldly stuff. Although the series took some liberties with Lavoisier's law of conservation of mass transforming a 4 tonne robot into a handgun.

Building a robot for me as a kid meant that you had to create a bi-ped that had a lot of similarities with human anatomy. C3PO if you like but with a little more bolt and nuts. As a teenager I spent countless hours drawing mechanical constructions but never got to a point where I designed something that was realistic to build. I lacked the engineering skills and not unimportant the equipment that was required to actually build a functional robot.

Looking at the amount of R&D that goes into robots that can walk I’m glad that with (my) age and a better understanding of what realistic or achievable goals are. A good motivator is also that you build something that is fun but also useful. (unless it is really fun, then the usefulness is irrelevant.

Definition of a robot

A robot is a machine — especially one programmable by a computer — capable of carrying out a complex series of actions automatically. A robot can be guided by an external control device, or the control may be embedded within. Robots may be constructed to evoke human form, but most robots are task-performing machines, designed with an emphasis on stark functionality, rather than expressive aesthetics. wikipedia (Robot)

Etymology

Robot - 1920s: from Czech, from robota ‘forced labour’. The term was coined in K. Čapek's play R.U.R. ‘Rossum's Universal Robots’ (1920).

Fastforwarding to the here and now, I have changed significantly over the years, but I still have the same childhood dream of building amazing robots. It took me a while to realize that a major part of that dream was already fulfilled while tinkering with 3d printers, building CNC milling machines and converting my mini lathe into a CNC machine. All these devices are in fact robots, machines that can be programmed to execute tasks.

My Ýear of the robot'' is about learning more about the theory of robotics. I have read maybe two books and the rest of my knowledge comes from YouTube and creative searches also known as Googling.

Pure theory however is boring so I want to apply any new knowledge or skill to one or more of my robotized machine projects.

The primary targets are;

  • a mid 90s Phillips R&D robot that was stripped by someone from all motors and electronics but has most of the mechanical parts in place. What makes this project interesting is the conversion from 3 degrees of freedom (DOF) to 4 DOF and using it as a 'crane' for a DSLR camera to record videos, being able to give an alternate viewpoint while building something or making a stop motion time lapse series.
  • My Roland PNC-3000 Tabletop milling machine that needs a few full days of work to get it into a working state. This machine deserves a fourth axis but I would settle for making parts in the 3 axis planes to start with.
  • My home built portal mill is probably my longest running project I have. I consider it a robot but I have no specific challenges for it, except for finishing it!!! Then being able to mill alluminum parts that are up to 600mm by 400mm in size.
  • My Cube 3d printer has the same fate as the portal mill. It took so much time to complete that the reason for building it has been long gone.

These are the projects that I will work on this year and hope to have most of them completed at the end of the year. I will write about the projects and what I run into.

Giving back to the community

What very often seems to be lacking when looking for a solution is a step by step guide to get from point A to Z. All the 'if I would have knowns' that I encountered I hope to be able to give back as blog post advise to the community.

Coming back to automate everything, I will also report on my progress in audio/visual automation and the road to success (or failure) making short video clips. So much for my good intentions for this year. Hope it will be a productive one ...

Monday, December 25, 2023

Roland PNC-3000 tabletop mill

Roland PNC-3000 tabletop mill

I got my hands on a Roland PNC-3000 already more than a year ago. I found it on Markplaats a Dutch plaza for 2nd hand stuff. It was a proper barn find as I picked it up at a farm and it litterally came out of a barn where it probably resided for years, clearly not months. The paint was flakey, the guide rails rusty and there was dirt and spiderwebs all over it.

Still I was intrigued enough to buy it, as it came with 2 additional spindles, original documentation, a handfull of spare parts. Machines like this from that era, although outdate in electronics are in general built to last, with quality, precision components. The original price back then was around 25.000 US dollars.

The spec

Although marketed as a tabletop device the machine is still a good 35 kilos and built up from rigid components. It comes with dual 35 mm round guides for the Z axis, supporting the spindle motor. For the X and Y axis dual 20 mm round linear guides. The ballscrews are NSK types 1404 (that proved to be very hard to find as a replacement.) All in all mechanically well spec-ed.  

The plan

I already did some research before buying the mill and I knew that the electronics and drivers that come from the late 80s eighties/begin nineties could be troublesome and to use the drivers from another era would limit the capabilitites of the hardware. So the hardware would stay and most of the electronics would go. Depending on how complex the modification would be it would be nice to reuse the display, as it gives constant feedback on the curent XYZ positions.

So, this is what I had in mind:
- Try to fire up the machine without any modification to see if there would be any movement in manual control.
- Strip the machine, 
- Remove all rust and oxidation 
- put a coat of primer over the base and the covers 
- replace parts that were beyond repair
- Remove the controller board (that also includes the stepper drivers)
- Put in new stepper drivers
- Use a commodity micro controller, like an Arduino Uno with GRBL as control software
- Optionally replace the spindle motor and motor controller
- Put everything back together

The execution

Testing the machine

After a quick inspection under the hood to see if there was no visible signs of trouble in the electronics I plugged the machine in and switched it on. IT did smell a bit funny after a few minutes as if it was overheated but after some fiddling I got the X and Y axis to move and even though the guide rails where completely without lubricats and on top of that slightly rusty the movement was not yerkey. The Z axis however only moved a few centimeters and did want to go down, helped by gravity and a heavy spindle motor, but stuttered and by occasion wanted to go up a few milimeters. After a more thorough inspection I notices that there where some ball on top of the ballscrew nut instead of in it. The detailed report you can find in the Z axis story. The problem seemed to be both mechanical and electrical. Probably one half of the driver had burned out as the the Z axis had so much trouble moving that it would result in overcurrent.

Besides the few mechanical issues there was not much wrong with the electronics. Not much, but few things seemed to out of place. The Y axis display seemed to loose track of the position once in a while, the rotary encoders of the controller unit are probably corroded and work half of the time. The spindle however did turn on and the speed was controllable with the potentio meter near the power inlet. So not a bad score. The verdict, lets continue fixing this piece of japanese craftmanship

Disassembly

Removing all the covers was a breeze, it became clear that the machine had been partly disassembled before. Most of the crosshead screws where heavily abused wth a screwdriver that obviously did not fit properly, so when reassembling I need to find myself some nice M3 and M4 screws that do this machine justice.

The controller and driver electronics can be removed from the back of the machine, just clipping some tieraps and removing some cable mounts, most of the cabling terminated with molex KK 254 connectors, so it separates easily. Whith the spindle and motor removed and the electronics out of the way the thing that is disassembled is the Z axis. Also to allow further inspection of the ballscrew that was missing a few (or many) balls.

Next up was the removal of the X/Y table, this is done by removing the round guiderails from the base and the table. The steel rods are secured with imbus screws at one end and the fit is H7 precision milled holes. Under normal conditions the rod would just slide out as it is not press fit, but after years of moisture and temperature changes the aluminum body and the steel rods cold welded together. It took a few hours and some custom tooling to remove the rods from the base and the table. It also was clear the the X and Y axis guide rails did not have a layer of fly rust but had some serious, dents and scratches. While trying to sandpaper them into a smooth and even surface again I realized that this would be come a nightmare and that whatever precision the machine once had would go out the door.

With the ballscrews, motors, coupling etc removed it it was posible to clean and inspect the different components. As the ballscrews where mostly covered in dried out grease they had not suffered the same fate as the guide rails. So these could luckily be reused. This grade of ballscrew would set you back a couple of hundreds when replacing them with the same quality. Alternatively a cheap 1204 ballscrew could be used, possibly sacrificing some precision.

The only parts that were not removed fromt he machine were the 35 mm guides of the Z axis, these were so stuck, are not really in the way of any refurbishing and alse had very limited rust so did not have to be replaced.

Cleaning and fixing  

Now with an explosion of parts it was time to start cleaning everything up. 

The base

I removed the paint and scrubbed the bare metal with a wire brush until the white coat of oxidation was completely removed from the aluminium base. With a knife I peeled the flakes of paint from the machine until it got really hard to remove (meaning it was still in tact). After cleaning the base up the work of applying car filler, to get rid of the ugly dents that were created where the paint was removed. Now the process of sanding, filling, sanding, filling, applying primer as a base coat started.

The covers

The metal covers were even worst. I started with the wire brush, then tried a motorized wirebrush on my hand drill and finally ended up using an angle grinder with a laminar buff to remove enough material to get rid of allt he rust. Here also car filler saved the day. Dus to my impatience I did not get it perfect but the improvement was major nevertheless. The covers I was able to clean and spraypaint in one go. Having everything in a single color again made a huge improvement already and helped with morale.

The spindle support

After putting some cloth in the 35 mm bush bearings to make sure that no grit or dirt could end up in the linear baring I completely scrubbed the casted unibody. After completing that and cleaning it up with some spiritus it looked nice. It does not have a coat of paint but given that it was not in a realy bad shape, my assumption is that it will last my lifetime without any further hassle.

The spindles

I have to make a distinction here between the spindle motor and the removable spindles that are mountend in the unibody frame. These spindles have a collet that I think is unique to this machine, the tighning nut and the collet are one and the same thing. It works but there are better alternatives in this day and age. There are 2 spindles with a collet mount and there is one spinle with a drill head/chuck. These machine were often used to drill holes in PCB's so that makes sense, at least to me.

Cleaning the spindles

While turning the spindles by hand they all sound slightly different. Mostly because there is a different amount of grease in the bearings I suppose. Other posibility could be that there is a different amount of play in the spindles. The bearings are at oposite side and are angle bearings so play can be removed by tightening the nut that holds everything together. I decided to take on of them apart to see what it looks like on the inside and apply some grease when reassembling. In the end the plan changed to creating a ER11 finish on the spindle and replace the current collet system all together for one of them.Worst case scenario, if this plan fails I have a backup unit. When the time comes for this side project I will record my findings in a separate blog.

Using thinner I removed the old grease from the bearings, the are semi closed so using a compressor with a piece of cloth around the bearing saves you the embarresment of having grease spread evenly all over your face. I don't know yet if I want to replace the bearings. Given other wear and tear (the Z axis) I have the feeling that this little machine has seen a lot of use, and ocasional abuse. For now they seem to work, just not that silent

The spindle motor

Yikes, there is a lot to say about this motor, for one it uses carbon brushes, the color of the motor is the ugliest shade of grey they could find and the thing is noisy as hell. No wonder I considered replacing it ... but with what. 

Currently the motor controller is in working order. The motor fits snuggly in the Z chassis and delivers a decent amount of power given its size. Replacing it would also mean replacing the motor controller, which in turn would make the tacho/rotary encoder on the pully of the spindle useless without conjuring up a electrical circuit or modifications to the software to actualy have a feedback loop.

The remaining electronics

A few components remain relevant, the transformer has powered this machine in the past and it would surely be able to do so in the future, right? The motor driver PCB features a solid state relay that is used to chop the sine wave and regulate the RPM of the motor. When the motor is not replaced al can remain the same and the orginal wiring can be used. The display that is mounted to the front of the Z axis unibody, showing the cartesion coordinates of the three axis in 0.01 mm increments. If this display can be reused that would be awesome as it would mean that the physical appearance remains unaltered. More on this later. The last piece of electronics that I would like to salvage is the controller. The base has a magnetic sheet glued to the front and the manual control box just stick to this with a large metal bottom plate. Once attached it looks like part of the machine.

Autobots transform

I would personally not use a block style transformer in the current day and age, but a torodial transformer when building a machine like this. This transformer however fits the housing, it already fused and the secondary windings give voltages that are matched for the used stepper motors. 

When measuring the actual voltages I did not end up with the expected values but slightly higher which would bring the voltage for the stepper motors close to the maximum allowed value. After looking at the diagrams again I found out that the transformer can be wired for 110, 220 and 240 volt and this one was wired for a primary voltage of 220 volt, in line with the net supply of the Netherlands in the 1980s. Gradually the net voltage has been increased in roughly a decade of time. Checking an outlet gives me a 235 volt reading. A quick rewire brought the output voltage back on spec. Nice if some things are so easy to solve. Wat remains for now is to create a small voltage regulator for 12 volt output to make it possible to power some of the electronics. As a workarond I've added a switching powersupply for this for now.

The motor driver

Nice to have all this stuff in place. A small, white, 4 pin molex connection is used to control the motor. While testing it scared the shit out of me as I was making a connection on the female molex connector, providing the 12 volt powe to drive the circuit. Then making a connection to the motor on pin. Stupid that when you connect something to let a motor spin that I still was caught by surprise that the the thing started spinning, at full RPM as there was no feedback from the tacho yet. What is tricky is that the encoder (tacho) is connected to the display (VF signal) to show the actual RPM as a bar on the display, a control voltage signal is then connected to the motor driver. I'm not sure yet if the machine in its orriginal state controlled the RPM or if this was always done with the potentiometer on the motor controller PCB. 

The display

There is a lot of things that can be said about the display, it is actually a smart module as the actual pulse counters are part of this assy. Also the RPM to bargraph conversion is done here. The feedrate that is at the lower right hand side of the display is controlled from the original control board. What I like about this is that during normal operation it shows the feedrate setpoint, when an error occurred the LEDs are used to give a status indication what is wrong. Nice dual function. For now GRBL does not make it easy to do anything with the feedrate, maybe I need to switch to GRBL HAL in the future as this has a plugin architecture that allows you to extend the functionality. Don't know how yet but it looks promising.

Following the schematics I found out what pins are used to drive the display from the motherboard. A 15 pin connector holds the step and direction for each axis. The display is literally counting the pulses that are sent to each stepper motor driver. When hooking up the display with a breadboard as a proxy to an Arduino (Mega in this case) I got the Z and the X axis to work relative quickly. The Y axis however failed to stick to the promis of the diagram. OK, deduction mode on! With a 1k resistor in series I probed all the different pins and I could not get the Y axis to respond to amanually induced step signal. As I was about to give up and put the display back on my desk the Y axis came to life without any input. To cut a long story short. Through the year of use, the 24 wire cable moved up and down with the Z axis. The cable was mounted to the metal backplate and the plasitic clamp was a pinch/hinge point with a relatively sharp bend in the cable. I tried to solve the problem with three wires that were not connected, but I ended up discovering that more than one wire was actually broken. I ordered a new cable, molex pins and I'm still trying to find the correct crimp equipment to properly fix this. Until then I will have to solder 21 wires onto the existing connectors using a short piece of the original wire to connect it. Not pretty, but workable, nothing that a piece of braid and a crimpsleeve can not hide from sight :)

The 7 segment display units have a decimal point, this is however not used. It would make it a lot easier for quick readout if the display would show 100.00 instead of 10000 for 100 mm. There are some jumpers on the display board so maybe this is 

Stepper motor drivers.

The stepper motors are high quality Vexta steppers, originally these steppers were used in half mode, with seperate coils per phase. In my experience these also work well more modern stepper drivers. To avoid assuming that this would work a test setup was made with a driver actually moving all the individual parts of the machine and running some tests. What works well is using a tool like universal gcode sender to run an actual millng cycle without material in the machine or the spindle on. I ran 10 test cycles of 10 minutes virtually milling a design I once made. After that I checked the going to a know position with a measurement clock set up. This is to check if any steps were missed during the cycle. While that does not give a definitive answer (an equal amount of steps could be missed in both directions) it is a good start.

The new electronics

Overview

To keep things easy for myself I wanted to use some components that I already had and know. I have experience with GRBL, although outdate it is still new and relevant when compared to the age of the maching. GRBL runs just fine on a Arduino Uno, the one that I still had from trying to jailbreak my Apple TV 3 (and failed.) would do just fine. Initially I wanted to use separate drivers but the space in the Roland milling machine is confined/constrained. I had a board lying around that I did not dare use because of all the crazy bad reviews it got on the angry interwebs, maybe time to give it another go. Not unimportant is the software that needs to be used like Arduino studio and Universal GCode Sender. I'm not endorsing anything, I'm just pointing out what I'm using.

The stepper motor controller

As a stepper driver controller I used something that I once had bought and used in several test setups.  The board I'm talking about has 4 stepper motor drivers on a single PCB and a delta 25 printer connection to provide the steps and direction, with the users of Mach 3 in mind, using a paralel port on a PC. The board however has a very bad reputation of being unreliable, lots of stepper noise and even claims of spontanious blowups within the voltage specification. So I stay way below the maximum of 36 volts that the board should be able to handle, I run the motors at 25% current, and do not use microstepping. With what I tested, in a 100 minute run the board seems to stand its ground. If it would fail misserably it should take no more than a day to replace with 3 separate drivers. The fourth stepper driver (for a rotary A axis is currently not connected) due the use of an Arduino Uno with a limited capacity and pinout, software for the uno not being available for 4 axis.   

If you are thinking; "why no microstepping". This has to do with the display. The original configuration used the Vexta stepper's 400 steps per revolution to divide every millimeter of the ballscrew (4 mm per revolution) into 100 steps per mm. This makes it easy to create a direct relation between the steps and the lineair movement. The display counts these steps and comes to a 1/100th of mm precision on the display by just counting the steps. By using microstepping the amount of steps go up without the displacement changing, resulting in the display being incorrect. 

Not too bad, I often like to do some mechanical trickery to end up with integer values instead of floating point values.

The micro controller (and electronics)

I first thought there was nothing that I would be able to say about the arduino micro controller, besides that it survived some serious stupidity so far.

To be able to get everything neatly tied up in the original enclosure of the milling machine I thought it made sense wire everything on an experimentation PCD that piggybacks on the Arduino. I found out that not knowing how to use a design program for circuits boards can make your life misserable

I first created the layout of the solder islands in an overview drawing. I wanted to put a 26 pin boxed header on the print to use a flatcable with a delta 25 connector going to the stepper controller. Since the driver board is restricted to what data terminals there are within the parallel port the layout for these pins is predetermined. On the connector the driver enable, step and direction pulses are present for the 3 (some 4) axis, 3 limit switches are handled here and a switch for the emergency stop. This emergency stop is also present on the display (effectively the only control in the form of a button) 

This is a table of the different pins on the delta 25 and a drawing of the physical layout. I always seem to forget what pin 1 is on a connector.

So the step and direction pulses for the display also need to go somewhere. I added the 15 pin molex connector tot he drawing and labeled the pins where appropriate. Last but not least I marked the pins on the arduino where, with the standard layout of GRBL, the input and output signals should be. 

Now the great puzzle begins, I decided to use the soldering islands as vias. Al the tracks run horizontally on the bottom side and vertially on the top side (isolated wires). After a few hours of connecting the dots I had a design that in my opinion had the shortes path from point to point and required the least amount of soldering work. After switching the tip of my soldering iron the process of wiring everything sped up. Even after quadruple checking the soldering there were several things wrong. Most of them in the design phase. Luckily the strategy of shortest paths and horzintal and vertical distribution made the fixes relatively easy.

In its current state both the stepper driver board and the display are doing what I tell them to do.

The software

When I ran a test with the milling machine connected I had to figure out if I could get the homing cycle to work. 

Some theory

Homing in the CNC world means, First retract Z to make way for X/Y moves. The z axis moves all the way back to a limit switch. When the switch triggers the machine immediately stops, it then reverse the motion for a few milimeters and then appoaches the limit switch at a much lower speed to alow the switch to more accurately trigger (also reducing the timing component). When Z is homed, The X and Y axis both move at the same time in the direction of teh limit switch that is set up for homing. The same procedure as with the Z axis takes place. When all the axis are homed, the software has a 0,0,0 reference where to start from.

Cartesian mindfuck

I also have a portal mill, this mill has a stationary bed and the milling spindle is attached to the gantry and  moves over the bed. So sending the mill in a positive position for X or Y moves the mill in the positive direction, away from me and to the right.

The Roland PNC-3000 has different approach, the mill is stationary and only moves up and down in the X/Y plane and the table moves under the mill. While testing (without the home switches) I used UGS (Universal Gcode sender) to move in a positive direction, so X+ moved the table to the right. Y+ moved the table upwards. 

Only when trying to get the limit switches working I realized that the table moved in the oposite direction. If the tool needs to move to the right in respect to the object that is processed the table is moving to the left. same applies to the other axis in this plane.

So where can these direction be changed? 

  • Flipping 2 wires of the coil of the stepper motor makes it move in the oposite direction.
  • The direction can also be changed by inverted the direction signal from the arduino to the stepper motor. 
  • The homing direction can also be changed. 

What can't be changed though is what the display uses as a positive or negative movement.

For me it seem logical that the part is placed as it is designed and that the path that is calculated is visible as such. UGS has a visualizer and I'm sure that you can rotate the axis in UGS for the visualizer but for me.

Positive move means the tool moves to the right or the top of the object. I will have to see how all this wil work out. 

Doing your home work (aka getting homing to work)

So when a homing command is given first the Z axis and then the X/Y axis are homed. So the table needs to move into the direction of the limit switch.

The limit switches are at the top and the left hand side. 

To check the configuration of GRBL you can type $$ in the console window of UGS (or any other terminal application)

This dumps

$0 = 10    (Step pulse time, microseconds)
$1 = 25    (Step idle delay, milliseconds)
$2 = 0    (Step pulse invert, mask)
$3 = 0    (Step direction invert, mask)
$4 = 1    (Invert step enable pin, boolean)
$5 = 0    (Invert limit pins, boolean)
$6 = 0    (Invert probe pin, boolean)
$10 = 1    (Status report options, mask)
$11 = 0.010    (Junction deviation, millimeters)
$12 = 0.002    (Arc tolerance, millimeters)
$13 = 0    (Report in inches, boolean)
$20 = 0    (Soft limits enable, boolean)
$21 = 0    (Hard limits enable, boolean)
$22 = 0    (Homing cycle enable, boolean)
$23 = 0    (Homing direction invert, mask)
$24 = 25.000    (Homing locate feed rate, mm/min)
$25 = 500.000    (Homing search seek rate, mm/min)
$26 = 250    (Homing switch debounce delay, milliseconds)
$27 = 1.000    (Homing switch pull-off distance, millimeters)
$30 = 1000    (Maximum spindle speed, RPM)
$31 = 0    (Minimum spindle speed, RPM)
$32 = 0    (Laser-mode enable, boolean)
$100 = 200.000    (X-axis travel resolution, step/mm)
$101 = 200.000    (Y-axis travel resolution, step/mm)
$102 = 200.000    (Z-axis travel resolution, step/mm)
$110 = 600.000    (X-axis maximum rate, mm/min)
$111 = 600.000    (Y-axis maximum rate, mm/min)
$112 = 500.000    (Z-axis maximum rate, mm/min)
$120 = 50.000    (X-axis acceleration, mm/sec^2)
$121 = 10.000    (Y-axis acceleration, mm/sec^2)
$122 = 10.000    (Z-axis acceleration, mm/sec^2)
$130 = 200.000    (X-axis maximum travel, millimeters)
$131 = 200.000    (Y-axis maximum travel, millimeters)
$132 = 200.000    (Z-axis maximum travel, millimeters)
ok 

The settings that are relevant for homing are

$3 = 0    (Step direction invert, mask)

This is a value where 3 bits can be set to indicate if X, Y, and or Z motors go clockwise or counter clockwise.
x-dir has a value of 1 -> bit 001
y-dir has a value of 2 -> bit 010
z-dir has a value of 4 -> bit 100
To indicate for example that X and Z need to be reversed set the values 

1 + 4 = 5 -> bit 001 + 100 = 101
The controller will use this value to reverse the behavior for the corresponding stepper motors
The maximum value is 7, with 8 possible permutations.

$23 = 0    (Homing direction invert, mask)
This is also a mask as explained in for parameter $3 and indicates the direction the axis will move. if the table moves in the wrong direction, first make sure that the direction is correct when manually positioning. After this, if any of the axis move in the oposite direction of the limit/homing switch the mask can adjusted accordingly.

$24 = 25.000    (Homing locate feed rate, mm/min)
This is the speed at which the acurate positioning takes place. At first the machine performs a fast move in the direction of the limit switch. This saves time when homing but the switch is pressed very quickly resulting in a less acurate result. The speed for the fast move can be set in parameter $25. The speed as set in this example makes the machine move very slowly towards the switch giving a more repeatable result. Repeatability is important because after homing it is the intention that a job can be resumed after the machine has lost his knowledge of the absolute positioning. For example after failure or a power cycle. It is always good validate if the positioning is acurate and I do not recommend restartign a job based on homing alone, it has saved me several times though (during 3d printing, not milling)

Seek rate

$25 = 500.000    (Homing search seek rate, mm/min)

This is the setting of the velocity for fast moves. Please take into account that a machine can not stop immediately. The mass of the machine will make rapid deceleration impossible. When the machine reaches the limit switch it needs to stop immediately. Setting a value that is too high might damage your machine as it cant stop in time and crashes into your limit switch or mechanical hard stop. Start with a lower value first and if visually validate the speed. The seek rate is expected to be higher than the locate rate.

Debounce delay 

$26 = 250    (Homing switch debounce delay, milliseconds)

When the metal contact of a switch moves it is a spring action. As a result, when making contact, the metal part bounces a few times, giving not one but multiple short pulses before the contact is fully made. This behavior is noticable when the contact is normally open and closes (making contact to indicate the switch is triggered). When a switch is normally closed, it is opened when the switch is triggered. Normally closed is preferred as it would also trigger a machine stop if for some reason there is something wrong with the cabling. The debounce time suppresses the repetive triggers of bouncing. 

Switch pull-off distance

$27 = 1.000    (Homing switch pull-off distance, millimeters)

The pull-off distance is the amount of mm that the cariage of the axis is pulled back after the switch was triggered. It should be enough to break the contact of the switch. A switch has a hysteresis, the point of making contact and the point of breaking contact are a little bit apart. This is by design to make sure that a switch that is just triggered wouldn't keep triggering due to mechanical vibration. after moving 1 mm as in the example setting the machine is at 0 (origin) 


MDrive 23 Plus and a micro controller

MDrive Plus 23

The MDrive Plus 23 is stepper motor with the NEMA 23 form factor with a built in driver 
(Type MDI1FRL23A7-EQ-OL1).

I bought a box of these stepper motors as it would make some projects a lot more compact to build if you do not have to use separate stepper drivers. Great for a robot arm where a big toroid transformer can be used as a weight int he base but you do not need the space for 5 or 6 separate drivers.

The stepper motors that I got are equiped with a short lead and a M12 fine thread 5 pin connector.

The challenge

MDrive type stepper can be controlled in many different ways, this is determined by the configuration of the software. The drive can be programmed for analog input, step and direction, RS-422 and RS-485 serial connectivity. Almost all I/O in the drive is multi purpose.

So now I have to figure out what protocol to use as I got them preconfigured ...
 
The drives came with a Phoenix Junction box, I tried to find some information about this type but it seems that they are built to specification. Good news, the pinout of the 8 pin multi connector and the 4 output connectors is documented on the back.

Pin 1 - Is the supply voltage
Pin 3 - Is the 0v connection 
Pin 2 - I/O (B) data connection
Pin 4 - I/O (A) data connection 
Pin 5 is Ground (GND)

So the first step is to take the lab PSU and power the drive with 24 volt. The range according to the specification of this drive is somewhere between 12 and 70 volts. 24 volts is on the safe side.

I removed the connector from the multi cable and hooked up the 24 volts to the brown and blue leads, I checked tried to rotate the axis of the stepper motor and there is an appearent hold current. So power connection done.

Now the tricky part, I do not know for sure that the connectivity is RS-485, there are only 2 leads for the data. Also, what is a good terminal application of you want to debug serial communication on a Mac? Hmm,

The current setup is an ancient Prolific USB to RS232 cable, a RS connection checker (a 25 pin to 25 pin
converter with leds for RTS, DTS, rx, tx etc). and a KK systems K2 RS-232 to RS 485 converter. Only dip1 to on RS-485 communication. It looks rediculous but sometimes you have to work with what you got.
 


First tried directly using iTerm with 
screen /dev/tty.usbserial-FD120 9600.

Pin 3 (B I/O) and 8 (A I/O) are the data lines and pin 1 is ground on the Delta 9 output of the K2 converter.

The wires of the multicable
B = 2 (GY/PK) 
A = 4 (WH)

Connecting to the port at 9600 baud with the connection above made the stepper motor start to run. Kind of a success, I think, kinda ... but not.

Even thought he I/O A And I/O B are both designators for the RS-485 protocol it turns (no pun intended) out that the A and B connections let the motor turn CW or CCW depending on the pins that are pulled low. The default DTR and CTS pulled low made things move but this had nothing to do with serial communication.

Now what?

Factory Reset

I don't know what day and age the drives come from and the company has changed names a few times over the years. There is a lot of documentation but I have not found a single source how to properly get you started.

One of the documents (2003) referes to the MD-CC200-000 interface, I snipped an image out of the PDF, 

So the requirements are a RS-422 connection to the 10 pin P2 header of the drive. The NEMA 17 and 23 drives use pinf 6, 7, 8, 9, 10 as can be seen in the image. The rest of the pins are reserved for nema 34 or can be configured as additional in or outputs.
 
It seems that this pinout is still valid. I need to reconfigure the KK K2 RS422/485 interface to go with the standard wiring. Only thing is that I have no connector to use to connect to the drive.
The connector type in the old document is not correct, it is in fact a DF11-10DS-2C connector, it has 4 notches, 2 at one long side and 1 per short side.

Novanta IMS - MD-CC402-001 USB drive connector kit is recommended. Lowest price I found for this item was 170 US dollars. I must be able to do better as this is a USB to RS-232 converter with built in RS-232 to RS-422 converter.

According to the documentation the following must be done to reset the drive to factory default.
 
Type FD and press ENTER. (FD = Factory Defaults.) 
The “Copyright 2001-2003 by Intelligent Motion Systems, Inc.” Message should appear.

2023-12-25 --- this is where the story pauses. In search of a connector to hook up the RS-422. To be continued.

It is not good because it is old, it is old because it is good

In the category: Borrowed wisdom is better than no wisdom at all. The title is a quote I have seen somewhere in a machinist forum. I can...