MiNI
CNC mill
Motors
What are the requirements
- stepper
- stepper with closed loop control (hybrid)
- servo motor
step/direction
PPR (LPR) - pulses/lines per revolution - the total number of pulses produced per full revolution of the encoder shaft.
As each pulse will contain two edges (rising and falling) and there are two pulse channels (A and B) with 90 degree phase shift, the total amount of edges will be four times the number of PPR. Most quadrature receivers use so called 4X decoding to count all edges from encoder A and B channels yielding 4X resolution compared to raw PPR value.
CPR - cycles/counts per revolution - usually means encoder resolution after 4X decoding
20 bit encoder = 2^20 = 1,048,576 pluses per revolution.
Assume linear speed 80 mm/sec with screw lead of 2.5 mm. The pulse frequency is 80/2.5 * 1,048,576 = 33.55 MHz.
You don't necessarily need (and most likely don't) to send the pulses from the motion controller at this speed. Refer the servo motor manual for exact input, such as electronic gear..
Position reference input circuit
- Line driver - what is it for (2.8V < Hlevel - Llevel < 3.7 V)?
- open collector output
Encoder output pulses = phase ABC
Position control input signals types:
- sing + pulse
- 90° phase difference 2-phase pulse (A + B)
- CW + CCW (one clocks, the other is low)
Form:
- line driver (is faster, up to 4 Mpps)
- open collector (200 kpps)
Check electrical specifications for rising and falling edges.
Note: Clear (CLR) signal sets error counter to zero.
Electronic gear - the electronic gear enables the workpiece travel distance per input reference pulse from the host controller to be set to any value. The minimum position data moving a load is called a reference unit.
e.g.
the reference unit = 1 um.
ball screw pitch = 2.5 mm
mechanic gear ratio = 1:1
no. pulses per revolution = 2.5/0.001 = 2500
B/A = Pn20E/Pn210 = 1048576/2500 = 419.43
! NOTE: 0.001 =< el. ratio =< 4000
to move the workpiece 10 mm, you need 10/0.001 = 10000 pulses.
Contactors
https://www.allaboutcircuits.com/textbook/digital/chpt-5/contactors/
Z-Axis Motor
Yaskawa in their manual does not recommend using servo which is under the load in the stop state (such as CNC vertical axis) without the brake. And since there is no Yaskawa with brake on Ebay, I decided to go with a stepper for Z-axis. I've chosen Nanotec PD2-N (NEMA17, 42 mm) which is a stepper with the integrated driver and magnetic encoder (1024 pulses per revolution). It has a closed loop control so it is basically multipole servo motor (hmm, today I wonder if the same warning applies to this type of motor). With the motor I also ordered cables - one is for the voltage supply and communication with the computer, the second cable has 6 input and 3 output wires. Motor came three months later and the cables are ridiculously short!
I use 24V power supply from MEAN WELL DR-75-24 to supply the motor. According to the Nanotecs technical manual, an electrolytic capacitor with at least 4700 uF/50V must be placed between V+ and V-. I bought FTCAP 4700μF/63V. It is quite a beast, 35 mm in diameter and 50 mm in length. I believe the best is to place the capacitor as close as possible to the motor but unfortunately I don't have any place there. I can place it either inside the electronic box, just where power supply is, or directly on the cable somewhere closer to the motor. I will decide later.
To program the stepper it is necessary to have USB to RS422 adapter. I ordered D-Tech DT-5019. The pins in D-SUB9 between Nanotecs and D-Tech do not match and I had to open Nanotecs D-SUB and rearranged the wires:
Rx+ (green) --> Pin 1 (to TX+)
Rx- (yellow) --> Pin 2 (to TX-)
Tx+ (gray) --> Pin 3 (to RX-)
Tx- (pink) --> Pin 4 (to RX+)
GND (blue) --> Pin 5 (to GNG)
The next step was to install NanoPro software which allows to set-up the motor for the position control with clock-direction signals. I had to install .NET 3.5 (including .NET 2.0) which is required. Nanotec mentions on their website that a USB isolator must be used to prevent damage to the integrated controller if the laptop is supplied from the net. The USB isolator is not required when using battery power. OK.
Finally, I can control the motor from NanoPro in the close loop. There is a Close Loop Wizard and PID Wizard functions which help to set up the motor. Badly, the software does not allow to set a range for number of turns. The travel length of the Z axis is about 10 cm and it is not enough for NanoPro. I had to use another wizard called QuickWizard. Motor moves but definitely not as quiet as Yaskawas. Hmm.
Damn! PD2-M motor does not accept single end connection with sinking source as described in the MB2 manual. PD2-N was not perhaps not as good choice after all. I had to order a dual differential line receiver to get TTL-compatible outputs. I put a ceramic capacitor between VCC and GND and hook up chip to the MB2's differential line driver. Checked with oscilloscope and I see the TTL square signal. Good. Ufff.
At the end what really bothers me is that the motor is not as quiet as Yaskawa's ones. Considering hassles with this motor and extra money I had to spent I would probably be considering another motor for the next time. On the other side, if ...…
Axes Orientation
The movement of your CNC along the coordinate system is always based on how your tool moves, not the table. For example, increasing the X coordinate value would move the table left, but when looked at from the perspective of the tool, it’s moving right along a workpiece.