Written by SOLO Team
Please notice that for SOLO you need only to know the number of encoder slits which are mechanically engraved over the encoder disk as can be seen below in Figure 1. These slits each will generate a pulse once they pass through the optical beam that the internal circuitry of the Encoder is having and as a result , in a conventional incremental encoder, you will have 3 different pulses that are shown below in Figure 1 as well. The First two pulses that are shown as “CHA” and “CHB” are having 90 degrees of phase shift with respect to each other, and this phase shift depends on the direction of the rotation.
As an example now CHA is leading CHB in this specific rotation that the imaginary encoder shown in Figure 1 has, but if you change the direction the CHB will lead CHA for 90 degrees.
The last pulse shown as “Index” is generated once every mechanical turn that the encoder traverses, this pulse is useful for Encoder calibration in 3-phase motors to understand the amount of mechanical offset of the encoder with respect to the actual rotor angle of the 3-phase Motors. The index pulse will not be useful if you use DC-brushed Motors with SOLO.
Figure 1 -Incremental Quadrature Encoder Disk with it’s output pulses
The Quadrature Encoder connection to SOLO UNO will be done using the Encoder/Hall Connector as below shown in Table 1 and Figure 2:
Table 1 – The pinout of the Encoder/Hall Connector on SOLO UNO
Figure 2 – Encoder/Hall Input actual Pin numbering on SOLO UNO
Encoder Setup and calibration for 3-phase Motors (BLDC, PMSM , ACIM)
To proceed with this setup we are using a brushless Motor “teknic m-2310P-LN-04K” with 1000 physical encoder lines (pre-quad) as shown in Figure 3 below.
Figure 3 – Brushless AC motor used for the tuning of the quadrature encoder
To Setup your Encoder for SOLO we will use here SOLO Motion Terminal and subsequently, the whole wiring of your setup can be only with a USB cable and a power supply connected to the input similar to Figure 4 shown below, in the first setup the order of Motor’s wiring to ABC output of SOLO is not important, but later you might want to change that based on the calibration results in 2nd step below.
SOLO UNO wiring
SOLO MINI wiring
Figure 4- Initial wiring diagram of SOLO for setting up the Encoder
For the rest of connections like the Encoder connections to SOLO we will do them in two steps as below, but before that, just notice the whole calibration process is needed only 1 time ever, and only in the first system setup, so after that all of the calibrated parameters will be stored in long term memory of SOLO and they will be remembered.
The user must make sure the Encoder, Mechanically is fixed to the motor and stays in position, so during the motion and after calibration the placement of the Encoder with respect to the motor, must mechanically remains fixed, otherwise the calibration values will lose their credibility and each time you displace mechanically an encoder you need to run the calibration again.
The calibration finds the relative mechanical ZERO of the shaft of the Motor versus the Index pulse occurrence on the Encoder, so if you move the encoder position mechanically, you disturb the calibrated values.
1- Connect the Encoder pulses to Encoder/Hall Connector of SOLO
Now we will firstly connect the Encoder pulses to SOLO based on the following order:
1. Connect the +5V, GND and Index pulse of the encoder to respective pins on Encoder/Hall Connector on SOLO based on Table 1 and Figure 2 above
2. Now you need to connect the two other CHA and CHB pulses of your encoder to Encoder_CHA and Encoder_CHB of SOLO, but the order of the connection of these two is important, and a correct connection of CHA and CHB to SOLO will result in Incremental rise in counted number of pulses while you turn the motor in C.C.W direction while the shaft of the motor is facing you, however, if you turn the Motor in C.W direction the counted number of pulses will decay as can be seen in Figure 5 below in Motion Terminal.
To do this test you need to activate the Performance Monitoring and put the “Speed/Torque Control Mode*” in Motion terminal on “Using Encoders”, then simply turn the motor by hand in C.C.W and C.W directions and verify the situation as mentioned similar to Figure 5 below, if you are witnessing the rise of counted pulses in a reverse mode, meaning increasing in C.W direction and decreasing in C.C.W direction, you need to swap the CHA and CHB connection of your Encoder to SOLO’s Encoder_CHA and Encoder_CHB inputs.
Figure 5 – Increase or decrease of counted pulsed in C.C.W or C.W directions
After verifying this part, your encoder setup to SOLO is done, now you need to check the setup of Motor’s wiring to SOLO which will be the last part as below.
2- Find the proper Motor wires connection to SOLO
Once you use SOLO in sensor-based modes, either by using quadrature encoders or the hall sensors, the order of wirings of your Motor to SOLO’s outputs will become important, while in senroless mode the order of wires is not important.
For this reason you need to verify that the 3 wires coming out of your Motor are well connected to SOLO, in General there will be a total of 6 combinations that you can connect the wires of your 3-phase Motor to SOLO’s output A,B and C, while out of these 6 combinations only 2 of them will work flawlessly in both directions for Speed / Torque and position control. The steps to find proper wirings will be:
1. Connect the 3 wires of your motor in an arbitrary fashion to SOLO’s ABC outputs and record the combination in a table, similar to the table 2 below, where we are imagining the Motor has 3 wires with Red, Blue and Black colors.
2. Make sure SOLO is in Closed loop ( pin number 5 of Piano switch is down)
3. Make sure you have selected the right Motor type in Motion Terminal ( BLDC-PMSM or BLDC-PMSM ultrafast), you can “SET” the motor type first and then “READ” it to make sure the motor type is properly selected on SOLO.
4. Put the current limit on 70% of your motor peak current ( to have near full torque calibration), you can put this at max current limit if you want to due a full torque calibration.
5. Make sure you are putting the right value for the number of Encoder lines in Motion Terminal ( known as encoder slits )
6. Do the Motor Identification in Motion Terminal and wait till it’s done. ( 2 seconds )
7. Press the “Encoder Calibration” button in the Motion terminal, after this the Motor will start slowly rotating in both directions for a while and then it will stop. After the calibration is done, you’ll see some value between 0 to 1 in Encoder/Hall C.C.W and C.W offset section of Motion terminal if you read them. These are the mechanical offsets in each direction that are estimated based on your encoder mechanical positioning, please record the calibration values somewhere in your table too, for each combination.
8. Now automatically after calibration, if you Press “Read All Params“ in Motion Terminal, you will see you are in Digital Torque mode, so without doing anything you can just put a reference Torque value in Amps inside “Torque Reference_Iq [A]” and see if the Motor starts to move, for example you can put a value like 30% of your maximum current in Torque reference and see if the Motor goes to nominal speed in both C.C.W and C.W. directions. If the Motor doesn’t move at all or it works in only one direction, then it means the wiring combination is not right, in this case try the next combination of wires connection to ABC output of SOLO and start from step 7 above again.
In 2 out of these 6 combinations, you should see the motor works well in Torque mode, after this you can go to speed mode and check the behavior there in both C.C.W and C.W. directions, and finally after tuning the speed controller, you can tune the position controller and again check the behavior there.
Table 2 – A sample table for finding the best wiring combinations for Encoder