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.
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.
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
Speed and Torque Control of a Brushless Motor with Hall sensors using Arduino and SOLO [+ Arduino Code]
In this article we are going to talk about how to control Torque and then Speed of a Brushless motor of any kind from BLDC, PMSM or Coreless EC brushless motors using Hall sensors as their rotor position feedback precisely and efficiently, we are also going to use a...
In this article we are going to control the position of a Brushless DC or Permanent Magnet Synchronous Motor using SOLO with Arduino and more specifically using SOLO’s Arduino Library , in another word, we are turning SOLO into a precise servo drive to interface and...
In this article the goal is to set up and calibrate properly the Hall sensors to SOLO for controlling Speed or Torque of your 3-phase motors specially BLDC or PMSM motors. These types of sensors come with 3 wires as each of these wires are representing a digital hall...