NEW QS 165 MOTOR

I opened my QS165 encoder today..keep in mind that I have serial number #3000001 😆
What I found to the chip is that it´s an ABI encoder, probably this one: http://www.jsuitech.cn/pd.jsp?id=22#_jcp=3_6
Googling only the first part of the chips number "6816 216" gave me this datasheet: https://datasheet.lcsc.com/lcsc/2010271836_Magn-Tek-MT6816CT-ACD_C879560.pdf

So I know, that ABI encoders are supported via VESC.. do you happen to know how I have to connect it?
Ideally, I could use the hall inputs but to my knowledge, these inputs are treated with pull-up/down resistors, so this might be an issue.
Iam gonna pair this motor with the new EBMX X-9000 and I don´t know how many ADC inputs it got...but if it´s only 2 then Iam gonna run into issues with my analoge throttle :D

IMG20230129173414.jpg
Screenshot 2023-01-29 173742.png
IMG20230129172703.jpg
Screenshot 2023-01-29 173823.png
 
So the output can be programmed to be either ABZ or UVW?
Why doesn't QS just ask Jusuitech to program some with UVW and the rest with ABZ?
Should be easy and wouldn't need any change in Assembly.
 
So the vesc actually supports the mt6816 encoder ic in spi mode. The main problem is you need to tie pin 2 to 5v instead of gnd and pin 1 is chip select (cs) instead of the 5v in abi mode.

There is also someone working to add pwm encoder input support to the vesc. But that hasn't gotten too far yet.
 
Teslafly said:
So the vesc actually supports the mt6816 encoder ic in spi mode. The main problem is you need to tie pin 2 to 5v instead of gnd and pin 1 is chip select (cs) instead of the 5v in abi mode.

There is also someone working to add pwm encoder input support to the vesc. But that hasn't gotten too far yet.

Fair enough -- my concern is that SPI often has serious problems with noise. mxlemming and I attempted to create an isolation system which provisionally worked okay, but people would have to change the chip to mt6816, and obviously, decide for themselves if they want to go to the trouble. Personally I'm never gonna run SPI off of a separate board and an ESC.
 
owhite said:
I imagine that $9,999 is not going to be the final price.

Yes, 9999 is often used as a placeholder on many chinese sites. Usually means that the final price is tbd.
 
QS165 motor magentic encoder with hall output

final_PCB.png


An encoder retrofit for the QS165 motor

This encoder is designed as a drop in replacement to the QS165 motor and uses an AS5047 to generate Hall output. In order for this to work you'll need to program the AS5047 with an external CPU. So basically this is unnecessarily expensive requiring purchase of a custum PCB and a teensy to program the board. It is unnecessarily complicated in that it requires a custom programmer dongle, common bench testing equipment, assembling a board, and knowledge of programming.

On the other hand I'm not aware of a lot of alternatives.

github repo is here.

Acknowledgement:

  • David Molony kindly helped with some development of early boards.

To build board and test
  • Create the programming dongle shown below
  • Select between 3.3V versus 5V operation with solder jumper
onnect up up the finished PCB on the bench or motor
  • Confirm the initial outputs of the AS5047 with an oscilloscope

Programming
The 5047 uses one time progromming to change some of it's registers permanantly. Note that programming definitely means you get one time to program the chip -- so be careful

As CircularBuffer points out, that code will probably work on a number of platforms. This works for me:

  • Review main.ino carefully to understand how variables are sent to the AS5047 and the program flow
  • Default variables for QS165 are set in main.ino using the lines:

Code:
  AS5047P_SetFieldInRegister(&encInstanceA, AS5047P_SETTINGS1, AS5047P_SETTINGS1_PWMON, 1);
  AS5047P_SetFieldInRegister(&encInstanceA, AS5047P_SETTINGS1, AS5047P_SETTINGS1_UVW_ABI, 1);
  AS5047P_SetFieldInRegister(&encInstanceA, AS5047P_SETTINGS2, AS5047P_SETTINGS2_UVWPP, 6);

Note: the QS165 has 7 polepairs, and according to the AS5047 docs you pass it a '6'.

  • Salt to taste if you have something else
  • Load code on teensy board using the platformio environment to install code
  • Once programmed, connect teensy to encoder board using programming-dongle
  • Start up a serial terminal
  • While program is running, review the program is effectively communicating with the encoder board
  • Confirm you like the actual output of the pins on encoder board
  • Entering single characters into the serial input gets ready for the burn
  • Typing anything besides "x" shows you serial input is working
  • Enter "x" when youre ready to burn
  • main.ino will report "no errors received, test if burn complete" if it worked

Programming hardware
dongle_probe.png


An example of programming a earlier version of the encoder board with a teensy 3.6, ribbon cable and 6 pin connector.

dongle_pogo.png


Pogo pins may be helpful for making quick connections to the board.

Output
wave_form.png


Oscilloscope output showing a single hall channel switching synchronously with one of the QS165's phase wires.
 
What is the weight of this motor? And when it says 'air cooled', does it require a fan of sorts? Curious what the continuous torque and runtime of this would be.
 
Has somebody his QS165 set up and running nicely?
I finally had the time to install the QS165 into my SurRon and pair it with a vesc-based EBMX X9000. This controller unfortunately uses custom firmware, so the official vesctool is not supported. Thus, tuning the motor is quite a pain.
I used the motor parameters I found in this thread but still got commutation issues at higher speeds/phase currents. From standstill, it´s working quite good.

Does somebody could perhaps share the motorConfig XML if he got good results?
 
Hello. I bought a set of mid QS165 engine and Fardriver ND72360 controller, as well as wiring, display, throttle, etc. Connected cables, everything loose on the table. 1 problem is the lack of reading parameters from the controller. The application on the PC sees the USB adapter and has a connection to it, but no data reading from the controller. Tried on 3 computers and same thing. Another problem is after turning on the power via the ignition key, the controller emits 2 short and 1 long beeps. According to the manual, this is an auto calibration of the engine. I can't pass this stage. After deflecting the throttle, the engine gently spins and then stops, and falls into a slight resonance, and again gently spins and so on.

Here is a link with instructions for this controller.

 
Has anyone measured rpms with a load? Looking for a motor that will spin 6k+ rpms under load on 20s or 24s.

have a look at this post [LINK] where I got 720 ehz. RPM = ehz * 60 / polepairs therefore it produced 6,170.
This was with 18S and brilliant field weakening firmware written by @mxlemming.
Note that QS is now shipping a version 2 with specs that will probably be better than my motor.
 
Last edited:
have a look at this post [LINK] where I got 720 ehz. RPM = ehz * 60 / polepairs therefore it produced 6,170.
This was with 18S and brilliant field weakening firmware written by @mxlemming.
Note that QS is now shipping a version 2 with specs that will probably be better than my motor.
Thank you! Sell me your setup so you can buy a v2. =)
 
I just got the qs165v2 in the post.
Ld 42uH phase
Lq 65uH phase
Flux linkage 19.3mWb (MESC determination)
Resistance... Negligible compared to the other bits in the circuit... 3.8mohm phase ish.

24 tooth pulley, HTD8m. 18.9mm tooth width.

It works really well with HFI. Smooth and precise from what I've seen so far, bench test only.

Has quite strong cogging and makes a whirring noise as it spins, but spins up at only 1-2 phase amps. Draws about 160W at 12000erpm... 2400mech rpm

The parameters for inductance are about half those on the v1 which means pushing more current into it at speed should be easier. Also 5pp (v1 is 7pp) so the frequency is lower for the same speed.
 

Attachments

  • IMG_20230608_173544533.jpg
    IMG_20230608_173544533.jpg
    3.2 MB · Views: 16
  • IMG_20230608_173504527_HDR.jpg
    IMG_20230608_173504527_HDR.jpg
    4.5 MB · Views: 15
Last edited:
@mxlemming nice..sounds like it will be alot easier to tune!
What did you pay for this motor now? I remember paying ~350€ for the V1. And what type of encoder(or hall) is it?
 
@mxlemming nice..sounds like it will be alot easier to tune!
What did you pay for this motor now? I remember paying ~350€ for the V1. And what type of encoder(or hall) is it?
It's not easier to tune than the v1 (which is really easy) definitely harder since you have to deal with mtpa etc. I just bought it from the AliExpress siaecosys store. 269gbp+70 shipping. Might get stung for tax yet, who knows.
 
It's not easier to tune than the v1 (which is really easy) definitely harder since you have to deal with mtpa etc. I just bought it from the AliExpress siaecosys store. 269gbp+70 shipping. Might get stung for tax yet, who knows.
Could you send me your motor config file for the V1? Iam having issues with bad commutation at high duty cycle and high phase amps. It oscillates quite a lot. I tried it only with a 16S battery so far..20S should probably work a bit better?!
 
Could you send me your motor config file for the V1? Iam having issues with bad commutation at high duty cycle and high phase amps. It oscillates quite a lot. I tried it only with a 16S battery so far..20S should probably work a bit better?!
Unfortunately, contrary to popular belief, not everything FOC is VESC. I have no config file, I just compile my firmware for whatever target PCB I'm using defining qs165 as the default motor in the config header.

Have no illusions, this is not the kind of click the button and hope for the best kind of tool VESC is, you'll need some degree of programming skill, be able to use the swd debugger and it's much better if you know your motor parameters in advance (which you do for the QS).

I know from the vesc discord about your oscillation issues on vesc when you go into field weakening region. Try modifying the start of field weakening duty and the ramp time. You might also find it works better under load.
 
Last edited:
Unfortunately, contrary to popular belief, not everything FOC is vVEc. I have no config file, I just compile my firmware for whatever target PCB I'm using defining qs165 as the default motor in the config header.

I know from the vesc discord about your oscillation issues on vesc when you go into field weakening region. Try modifying the start of field weakening duty and the ramp time. You might also find it works better under load.
thank you, I will give that a try! <3
 
I just got the qs165v2 in the post.
Ld 42uH phase
Lq 65uH phase
Flux linkage 19.3mWb (MESC determination)
Resistance... Negligible compared to the other bits in the circuit... 6mohm phase ish.

24 tooth pulley, HTD8m. 18.9mm tooth width.

It works really well with HFI. Smooth and precise from what I've seen so far, bench test only.

Has quite strong cogging and makes a whirring noise as it spins, but spins up at only 1-2 phase amps. Draws about 160W at 12000erpm... 2400mech rpm

The parameters for inductance are about half those on the v1 which means pushing more current into it at speed should be easier. Also 5pp (v1 is 7pp) so the frequency is lower for the same speed.
I've just started looking at these motors.
I see there's a big difference in price between the V1 & V2 but I'm not particularly technically literate about motor specs.

What's the take-home differences between the two motors?
My 'wants' are:
Good low speed torque
Ability to rev high, but load will be fairly low. Mostly just to spin up a flywheel, it doesn't matter if acceleration is a bit sluggish, particularly in the upper end of the RPM range.
Probably prefer a Hall based (I see both motors come in either encoder or hall at present) because it opens up a wider range of controllers and I've got some quirky specific wants.

Thanks
 
I've just started looking at these motors.
I see there's a big difference in price between the V1 & V2 but I'm not particularly technically literate about motor specs.

What's the take-home differences between the two motors?
My 'wants' are:
Good low speed torque
Ability to rev high, but load will be fairly low. Mostly just to spin up a flywheel, it doesn't matter if acceleration is a bit sluggish, particularly in the upper end of the RPM range.
Probably prefer a Hall based (I see both motors come in either encoder or hall at present) because it opens up a wider range of controllers and I've got some quirky specific wants.

Thanks
V2 appears to be better in every way except for cogging. Pay more moneys, get better motor.
 
Has somebody his QS165 set up and running nicely?
I finally had the time to install the QS165 into my SurRon and pair it with a vesc-based EBMX X9000. This controller unfortunately uses custom firmware, so the official vesctool is not supported. Thus, tuning the motor is quite a pain.
I used the motor parameters I found in this thread but still got commutation issues at higher speeds/phase currents. From standstill, it´s working quite good.

Does somebody could perhaps share the motorConfig XML if he got good results?
Hey mate. I might have a tune you can try for the X9000. Send me an email to damon@ebmx.com

Are you using V1 or V2 controller?

Cheers
Damo
 
Back
Top