Tuesday 24 March 2015

My CNC story (part 4)

Please read previous parts first. This is the fourth part of my CNC story. Click here to find part 3, or here for part 2 and here for part 1. I will add more pictures as soon as I have a little time later on.

Abandoning an old computer


When I started with this project my plan was to reuse some old computers I have. One reason for this was that the stepper controller card was, as almost every other DIY CNC controls are, based on parallel port and rely on this port. Parallel port does not exist in modern computers, but all older ones have it as standard. Of course, even modern desktop computers can use PCI cards, so even if the parallel port is no longer standard, that is easily solved even today.

It is worse for laptops, but laptops were not powerful enough a few years ago to drive a CNC anyway, so almost nobody was using laptops, and even today, laptops are rare in this fairly traditional environment.

OK, back to the parallel port


This port type was originally designed for printers, but it turned out to be very suitable to use for many other equipment outside the normal office or home environment.

If a complex machine, like a CNC, is to be controlled by a computer then there is a need for setting different control pins in real time, and those pins are varying in both the total number, and also in timing between different states. Some of those pins (bits) are high or low over a longer period during the work of a CNC than others, some of them, for example the ones giving the step pulses, are pulsing at a high pulse rate and with very short pulse widths, some others, like the step Enable or the Stop signal are constantly on during the whole milling work, but almost none of the signals are synchronous to each other in their state changes. Synchronization is based on needs for the movement, of course if all three (or more) axes must move synchronously then pulses are synchronized, but that is not always the case and is very much dependent on the shape of milling.


Anyway, when milling machines got computerized it was a natural, low cost and a very good solution to use this port. It is simply very easy to control complex machines with this type of port because of the availability of many input, and output signals and the flexibility this port offers.





Nothing lasts forever


Up to and including Windows XP professional, the control of parallel port pins was easy and very flexible for a programmer. However, Windows 7 changed all that, it made it more difficult to set each pins of a parallel port in real time. This type of port became less and less common in computers, today basically not existing in laptops at all, and communication with printers and other peripherals rely on USB interface instead of parallel port. Printers with parallel port are gone from the market, so there is no real need for this port in normal office or home environments.

Some advantages of USB


USB port has many advantages over the parallel port, but when it comes to controlling CNC, it has a huge disadvantage. It is a serial interface, so setting individual bits in real time isn’t that simple any more, not even if one connects a USB to parallel printer port converter to the computer.

To be able to control a CNC using the USB port, one needs a USB motion control interface, which is not only an advanced USB to parallel port converter, but also interprets the G-codes and converts those codes to real time signals, setting the different pins to the levels as needed. In other words, some of the functionality of the CNC software is moved out of the computer and into a USB motion control card because of the loss of possibilities to control individual signal pins in real time through USB.

Some disadvantage of USB


One disadvantage of using USB is, apart from added costs because of the need for a motion control interface, is the need for not just the card but also an interface software, also called plug-in, which interfaces the driver with the CNC software so that the CNC software can talk to CNC stepper controllers. This is necessary unless you have a CNC software which is exclusively designed for the USB motion control card you are using. This plug-in emulates a printer port, so that existing CNC software can be used. Every CNC software is different, so one plug-in which works with one software will not automatically work with another. In other words, the flexibility of use and possibilities of selecting, changing and trying out different CNC software is considerably reduced compared with using the old parallel port solution. Also choosing between Windows or Linux is not possible at all with USB motion controllers, these simply must be designed for the one or the other.

Decisions, decisions…


Using USB definitely has greater advantages then disadvantages, especially when it comes to future computers, so I decided to go for this change and to abandon my old Windows XP Pro based desktop computer, which I intended to use as CNC computer. This saves me a lot of space and offers greater flexibility since with USB I can use any computer, even a laptop, so I can do the design of the milled pieces in my living room, move the laptop to my workshop, plug in the computer and just run the CNC which will mill the pieces.

The old desktop is a dinosaur with the external screen, external keyboard, external mouse and a huge mini-tower case, so the possibility of moving all that functionality into a small laptop is really nice and offering great flexibility.

The decision is made in December 2014. The old computer is out of the loop and USB will be used. Of course, this meant some design change… again…


Please continue with reading part 5.

Thursday 19 March 2015

My CNC story (part 3)

Please read previous parts first. This is the third part of my CNC story. Click here to find part 2 and here to find part 1. I have started to add images, will add more later on, please revisit the pages.


Restarting and full steam ahead


The project was halted but not really abandoned, and in November 2014 I stumbled across an eBay seller who sold the same type of aluminum profile I actually wanted to use, but originally found too expensive to use for a risky DIY project, like building a DIY, self-designed CNC without prior mechanical design and practical experience.




This seller is selling it at a very reasonable price; he is located in Germany and is very fast in delivering, so I contacted him, gave him all the dimensions and asked for a price for all the listed mechanical parts I wanted. After some conversations I placed my order. Delivery was as expected, very fast, it only took a few days, all pieces cut exactly to the length I wanted, even if not all cuts were exactly at 90°, the parts were fully usable and easily aligned to  90° using the joints I also ordered, and definitely better than what I could have done on my own.


He also sold fixtures, screws, T-nuts and everything else I needed for a better design and quality than my first creation would have allowed.





By December I was back on track. This sudden design change made the mechanical work much simpler and considerably better, so I expected to have the CNC ready and working by the end of December, or at latest beginning of January. I have no milling experience, so I knew I will need some time to learn the entire “how to…” part, but at least for this adapter, the V1-F1A flash adapter, I expected that this practical learning will be quick once I have the CNC up and running.


It turned out that I was a bit optimistic about the time. I was doing good progress, but by the end of December I only had the base, a working X axis and a working Z axis ready. On this picture the Z axis is on the floor to the right of the main frame.


Never the less, I was quite happy about how well the work went on, and since the X axis was really running nice regarding the movement and the accuracy, I was now convinced that I will be able to finish this project one day with success.




Next mistake…


As very common in DIY projects, ideas pop up and design changes are sometimes made suddenly. One such change was generated by an idea to improve my design and to build in the control box and the power supply, so that I could skip two extra boxes. I also had an idea to include the power supply for the spindle motor as well, making the machine a bit larger in height but reducing the total volume and space it needed in the end. This change would reduce the cabling and the number of external boxes, so in theory, it was a very good idea. The only bad thing about it is that it meant I had to spend time and work with moving the electronic parts and place everything on top of the CNC base frame, in the Y beam holding the Y axis.

“If it ain't broke, don't fix it.”


This is as true as it can be. What seemed to be a simple change, yet a huge improvement, created a lot of extra work. It took several weeks to get everything up and working again but it was too late to reverse back the process when I realized this simple truth.

Another mistake was…


...adding new functionality.

I decided that some supervision is needed to be added. Now that I moved the electronics I got a huge front panel with enough real estate to add some instruments to supervise critical currents, voltages and temperatures. While this was also a very useful improvement and was fairly simply to implement, it took some extra time and pushed the start-up further ahead. Never the less, I went for it anyway because I was convinced that either I do it now, or it will never be done and that this design change will definitely add positive improvements.

A new set back


In the end, when the electronics were fixed and everything seemed to work well again I realized that I made yet another mistake.

The Y beam holding and driving the Y axis and carrying the Z axis could not share the same beam which holds the electronics, because the stepper motor driving the Z axis would not have enough free space to move along the Y axis. This could be fixed in two different ways, one by adding some extra spacers to move the Z axis away from the electronics, or another by adding an extra, dedicated Y beam. There was a third option also, which was to move out the control electronics into an external box again, like in the original design, but I did not want to do that, so I went for the second solution because it gave me better options for any future changes. For example replacing the control electronics and relocating it somewhere else is much easier this way than if the Y beam has shared functionality. Anyway, this meant I had to start drilling and sawing again, wasting some more time. If I would have kept the original idea and the control box would have been kept at version 1 as a separate box then these two delays wouldn’t have happened and I’d be almost ready by now.

The timing plans of the project is definitely wrong


The delay is now more than a moth compared to my original hopes about making the first cut already at the end of December 2014. At this stage, it is February 2015, but I am definitely doing progress and the improvements/changes are well motivated.



Please continue with reading Part 4.

Tuesday 10 March 2015

My CNC story (part 2)


Please read the previous part first. This is the second part of my CNC story. Click here to find part 1. I will add pictures as soon as I have a little time later.

The first (but not the only) observed problem


One issue I discovered was that the motors occasionally skipped steps and/or added extra steps when they were running. Reducing the speed helped, but the problem with the extra steps and the skipping was not solved before the motors were slowed down to totally unacceptable low speed. I simply needed to do something; otherwise it would be pointless to build. Of course, I could easily identify the source of the problem, it was the controller card. I complained to the seller and he/she was kind enough to send me a new card. Unfortunately that meant another month wasted in waiting.

Mechanical works


In the meantime I continued with the mechanical design and buying some mechanical parts. During this process I realized that my home machinery is not enough, I had to buy some new ones or complement the ones I had. One of the things I did was buying a drill press stand, so I could drill straight holes repeatedly. This sounds basic today, but my limited mechanical experience didn’t make this clear for me before I started drilling holes in a larger scale.  The other thing I realized that to be able to drill with accuracy, the bench drill must stand on a very stable stand, preferably fixed to the floor, to avoid vibrations.

Work space, bench and tools


My space in my tiny home workshop is very limited, so I had to build a work bench especially made for that limited space. I attached it to the walls and fixed the bench drill stand to the bench so there is practically zero vibration when drilling. So, if any of you ever start a CNC build project, check out your work space first, check all the tools and machines you have, buy or make a steady work bench and a good drill machine. You will also need a circular saw capable of sawing the materials you are using for the frame and the other parts, which in my case is mostly aluminum. Of course, cutting plastic parts, steel and stainless steel parts is also necessary, as well as grinding and polishing things, so the machines don’t end up with a drill machine and a circular saw. Not only that, but small things like a good set of high quality drill bits and other small tools are also necessary to buy, and while individually they don’t cost a lot, adding them all up makes it into a nice sum. So, don’t start a CNC build project if you are not prepared to pay for all that, unless you already have a well-equipped home workshop.

The new controller card


After five weeks waiting my new controller card arrived. Initially I was very happy and couldn’t wait for plugging it to the motors, but my joy was quickly killed because it had the same problems with skipping and/or extra steps. I thought my analysis was wrong and was convinced that something else caused the issue. It didn’t take long to google and find forum sites where this card was mentioned as a card with very serious problems, similar to mine. So what’s next? I didn’t want to buy a new and different card, because there is no warranty that those would be better, I may end up with similar or different problems with a new card as well, only at even higher costs.

Solution to a real problem


I knew that I have a very high electronic knowledge and could fix this card, so I started measuring and documenting the work. This took quite some time, but have to admit, was challenging and interesting. In the end, I ended up with a total redesign of the card.

This can’t be true, was my first thought, so I did some more googling and found a site called CNCzone, where there was a long thread about this card and how people ended up with the same problems and found different solutions. Most people have given up, but some more or less redesigned the card, made a lot of changes to make it work. Some of the proposed changes were contradictory to others, some were directly wrong, so in the end, I trusted myself most, adopted only very few new changes from that forum since most of my redesign was right and was also implemented by some of those people. Never the less, it was great to find that site and useful to see that I was not alone. Anyway, the time went by and I continued building, concentrating on the control box and other electronics and learning all about programming CNC, using G-code and what it should be able to do.

Mechanical problems


After a while, and well after I was ready with the electronics, I got stuck with the mechanical design. I realized that regardless how I do it, with the aluminum profiles I was planning to use it will be too weak and I will not be able to get the precision I needed. Buying other type of profile would increase the costs to a level which I regarded far too high to make it worth making it, so the project stopped and was put aside.

Though, a few months later I started to see the light at the end of the tunnel.


Please continue with reading Part 3.

Monday 9 March 2015

My CNC story (part 1)

Introduction


This is the first part of a long story about my DIY CNC project. I hope many of you will find it interesting to read and will have the patience to follow the articles.

I have been actively busy with this CNC project for over 1.5 years now, in parallel with the V1-F1A and other DIY activities. I thought that making a CNC is a fairly easy task for an engineer, but I have to admit I underestimated the efforts. There were several unexpected issues involved which caused a halt or serious delay.

I started off with some reading ups and pre-study. I have electronic and computer science knowledge but no mechanical engineering, so the first step was to collect some ideas, look at what other people have done and try to learn from their mistakes. I knew the accuracies I needed, and I quickly realized that most DIY CNC are not suitable for my needs, at least not in theory. Once I was ready with the idea in my mind, I made some drawings, looked at different possibilities and tried out different ideas on paper and so on.

In the meantime, like so many others, I ordered a kind of a kit from an eBay seller whom I found reliable. The kit consisted of three stepper motors, a controller card and a power supply. This was what I thought, a major step forward because it allowed me to become a “spinner”. A “spinner” is a sort of derogatory nick name among CNC builders for a person who buys motors, controllers and power supply and starts spinning those motors… and NEVER stops being a spinner, never takes the next step, and mainly, NEVER becomes a “miller”. A “miller” is a person who have built his CNC and started milling, doing some useful stuff with it. So while seeing the motors spinning gives a real kick, becoming a “spinner” is a nightmare, not very encouraging.

Today I believe that those cheap Chinese kits are one reason why there are quite a few spinners among CNC builders. These kits can put you to a halt, caused by serious problems, which if you don’t have enough knowledge you will never be able to solve.

My advice is: don't ever buy those cheap kits if you plan to build a CNC unless you have all the time in the world AND the knowledge to fix every problem, because no doubt that you will end up with many problems or need to make serious compromises. In the end, I managed to fix all the issues and problems, but I ended up with a completely different CNC compared to the one I originally started off with, and it took time... a very long time.



Please continue with reading Part 2.