Is it possible to use a microcontroller to convert encoder signal from QS165 motor to hall signal for ND72530 motor controller

Thread Starter

coolyyz321

Joined Mar 17, 2017
58
Hello, I was wondering if it was possible to convert the encoder signal from the QS165 motor to be used with the ND72530 Hall motor controller. From some research there are microcontroller boards to do the conversion, but they are not available anywhere.

I was wondering if somebody has an Arduino code or guidance as to what direction I could take to get this working.
 

Jerry-Hat-Trick

Joined Aug 31, 2022
208
Hello, I was wondering if it was possible to convert the encoder signal from the QS165 motor to be used with the ND72530 Hall motor controller.
The device in the video looks amazingly like a Seeduino XIAO which is more than likely up to the task.

1666355277856.png

The picture of the device shows three Hall output pins and A, B and Z input signals which would suggest an incremental encoder. Z would give a reference signal each revolution as a check and correction if any counts are missed. Signals A and B would give a pulse when the encoder rotates - they will be offset so you also get the direction of rotation. Actually not that difficult to convert to "hall" outputs if you know the correct angles.

BUT - I note that it has two settings, one for Talaria and one for QS165 encoders. I was able to find a mention of a Talaria bike schematic which includes the A, B and Z connections so I'm wondering whether the QS165 encoder is also an incremental encoder, and what is the "Encoder Zero Identifier Signal"? Do you have any further information on the QS165 encoder? It would be nice if you could power it up and rotate it and watch the signals on each output pin - slowly with a DMM would be fine. Ideally, a link to the actual encoder which gives details - I couldn't find one

The XIAO is pretty fast, quick enough to count pulses and switch the hall outputs so long as the encoder doesn't have too many increments per revolution.
 

nsaspook

Joined Aug 27, 2009
10,698
The device in the video looks amazingly like a Seeduino XIAO which is more than likely up to the task.

View attachment 279004

The picture of the device shows three Hall output pins and A, B and Z input signals which would suggest an incremental encoder. Z would give a reference signal each revolution as a check and correction if any counts are missed. Signals A and B would give a pulse when the encoder rotates - they will be offset so you also get the direction of rotation. Actually not that difficult to convert to "hall" outputs if you know the correct angles.

BUT - I note that it has two settings, one for Talaria and one for QS165 encoders. I was able to find a mention of a Talaria bike schematic which includes the A, B and Z connections so I'm wondering whether the QS165 encoder is also an incremental encoder, and what is the "Encoder Zero Identifier Signal"? Do you have any further information on the QS165 encoder? It would be nice if you could power it up and rotate it and watch the signals on each output pin - slowly with a DMM would be fine. Ideally, a link to the actual encoder which gives details - I couldn't find one

The XIAO is pretty fast, quick enough to count pulses and switch the hall outputs so long as the encoder doesn't have too many increments per revolution.
It's a simple task for a chip designed for motor control and is a function designed into most versions of motor control software that uses a encoder for commutation even if the faux Hall sensor signals are not exposed externally.
https://forum.allaboutcircuits.com/...nd-sensor-node-for-canbus.189388/post-1765812
My PIC32MK IMU CAN-FD controller has 32-bit register hardware QEI encoder inputs on a PCB socket that could be used to derive the required Hall signals if the motor pole parameters were supplied.
1666363557905.png1666363587465.png

While it's possible to use a cheaper hall based (trapezoidal waveform) motor controller with a encoder conversion device, the loss of performance and efficiency from using a proper encoder based FOC controller is likely to be easily noticed if the motor is a PMSM designed for sinusoidal drive signals.
https://forum.allaboutcircuits.com/threads/pic32mk-mc-qei-example.150351/post-1530400
 
Last edited:

Jerry-Hat-Trick

Joined Aug 31, 2022
208
ND72530 Hall motor controller
It's a simple task for a chip designed for motor control and is a function designed into most versions of motor control software that uses a encoder for commutation even if the faux Hall sensor signals are not exposed externally.
Not sure I understand this sentence? As far as I know, most BLDCs still use hall sensors for commutation although I get the advantage of quadrature encoders which probably allow a better job of FOC. But thanks for the links to other threads - a lot of interesting information, I will take time to study more carefully.

I may have misunderstood the original question but I thought that the ND72530 Hall motor controller needs hall sensor inputs but the QS165 encoder is quadrature, so the question was about converting quadrature encoder outputs into hall sensor outputs? Do you know how the actual QS165 encoder works, what it needs for power and what are the output pins? Sorry if I've missed this detail in your reply - I need to read carefully.

As an aside, the Clark transform was proposed by Edith Clarke - https://en.wikipedia.org/wiki/Edith_Clarke - interesting that she had to fight to be accepted as an engineer and now her transform is used worldwide to drive motors efficiently. Respect.
 

nsaspook

Joined Aug 27, 2009
10,698
ND72530 Hall motor controller
Not sure I understand this sentence? As far as I know, most BLDCs still use hall sensors for commutation although I get the advantage of quadrature encoders which probably allow a better job of FOC. But thanks for the links to other threads - a lot of interesting information, I will take time to study more carefully.

I may have misunderstood the original question but I thought that the ND72530 Hall motor controller needs hall sensor inputs but the QS165 encoder is quadrature, so the question was about converting quadrature encoder outputs into hall sensor outputs? Do you know how the actual QS165 encoder works, what it needs for power and what are the output pins? Sorry if I've missed this detail in your reply - I need to read carefully.

As an aside, the Clark transform was proposed by Edith Clarke - https://en.wikipedia.org/wiki/Edith_Clarke - interesting that she had to fight to be accepted as an engineer and now her transform is used worldwide to drive motors efficiently. Respect.
You don't need hall sensors for basic BLDC commutation when you use motor coil BEMF for positioning. I don't know the exact details of the QS165 encoder but it's pretty generic stuff to transform quadrature encoder counts and index points for a incremental counter to rotation tables for three-phase motor commutation for at least the motor tuning and start stage. What they usually don't do is to provide GPIO outputs of these commutation table signals to drive a external controller.

https://www.allaboutcircuits.com/technical-articles/sensorless-brushless-dc-bldc-motor-control/
 
Top