We use a CNC milling machine here in the workshop of RE-Innovation. It is used mainly to drill holes for prototype PCB production. We have also used it to cut out pieces for front plates and for enclosures. It has been out of action for a while as the spindle motor brushes failed and the windings burned out.
This post shows the replacement milling spindle and also how limit switches were added. It might be of use to others who would like to upgrade their machine to use limit switches. This post relates to the Blackcat 300 x 200 CNC machine, which is a re-branded version of the YOOCNC 3020.
We ordered a new spindle on eBay from this seller. It is slightly different to the previous one, being slightly narrower and also working at a different voltage (48V DC max rather than 90V DC max). The new unit came with a 360W power supply and mounting bracket. The mounting holes were in the same place as the previous spindle holder, but I did have to enlarge the mounting screw holes.
This was a quick replacement and works well (its even quite a lot quieter than the previous spindle), but I am slightly worried that there is no option to replace the motor brushes, as I found they wore down quickly even with light use. Time will tell.
These are some notes on changing the spindle and adding limit switches to the machine (which is a Blackcat CNC, the same as a YOOCNC 3020). The controller board contains the power supply for the board and the spindle, along with the stepper motor controller board:
The PCB is labelled T62-3AX, but I could not find a manual on-line, only this US supplier. The board has a set of pins labelled J6:
These were right next to the E-Stop input so I thought they might relate to inputs on other pins. A bit of searching found this useful post:
People have a similar version of the circuit board (YOOCNC T62-3AX) and have put up the pin-out for J6. This was very useful as as far as I could tell thee is no on-line manual or documentation for this board.
I added some jumper cables (which was easy as I had just obtained a 2 x 5 jumper cable for my BusPirate from Phenoptix):
Following this pin-out diagram we can add inputs to the computer via on-board optocouplers:
I use EMC 2.4 to run the CNC. I ran the configuration wizard and linked pins 11,12,13 and 15 to the 'X min limit and home', 'Y min limit and home', 'X max' and 'Y max'. I then opened the HAL configuration viewer and clicked on 'WATCH', as shown below. When 5V was present on the various pins you can see the input changed from red to yellow.
This proved that my inputs were working. I then wired them to the 4 micro switches I had installed on the machine. I had to double check which was which before soldering, but I could also have changed them in software, by changing their assignments.
One of the limit switches in action. They were microswitches with a roller lever.
You also need to change the settings for:
(There is also more info here: http://www.linuxcnc.org/docs/2.4/html/config_ini_homing.html)
You will need to play with your machine a bit to know which direction is + and -. You can change the HOME_SEARCH_VEL sign to change the direction. when you click on home axis then the machine will move until the switch is reached. This means I can easily return the machine to the 0,0 point every time and refer everything back to that point. It will take a bit more fiddling before I have everything running smoothly, but I can now rest assured that my machine will not try and cut out of the boundary again.
After fitting the limit switches and the new spindle power supply, it would not all fit back within the original case. So I quickly designed and cut a laser-cut enclosure which incorporated more space for the power supply but also the old front and back panels. The main control board needed a 24V supply, but the original one was too large, so I used a power supply unit from an old deskjet printer I had recently taken apart, which worked well as it was a much more efficient switching-type power supply. Here are some photos of the finished unit:
Here was a CNC milled warning sign I used to test that it was all working OK: