UVW/SinCos Encoder Swap

rider119

100 mW
Joined
Mar 17, 2020
Messages
36
From my understanding a SinCos encoder is superior to UVW hall sensors, especially at providing torque at low RPM, please correct me if I am wrong here.

So, I am not having much luck searching here or Google for swapping halls to SinCos. Is this doable? Anyone have any links with a good explanation on how if it is? I'm planning to use a QS motor, 138 90H most likely. Sevcon controller, Gen4.

Thanks
 
The sensors themselves don't determine how low RPM torque is applied. The controller design and setup do.

Now, the UVW type are more granular in sensing position vs SIN/COS, so that might affect the ability of the controller to determine rotor position...but with few exceptions a controller that's designed to use the UVW sensors wouldn't be able to do anything different with any other kind of sensor without rewriting the firmware...so you'd still get the same results.


As for changing which kind of encoder a controller uses to read motor position--that can only be done if the specific controller model you have supports both, and has a user-alterable setting for whcih one it's going to look for, that you can change and that you know how to do this.

If any of the above sentence's stuff isn't true, then you can't use that controller except with it's original position sensor type.


Now, you can convert the output of one sensor type to the other, via arduino or some other MCU, but you don't get the same results as using the correct encoder with the correct controller--the results will still be the same as before; the only difference is you could *use* a motor that has one type of encoder with a controller that needs the other. You'd still be stuck with the granularity of the UVW (vs the smoothness of the SIN/COS position sensing)


So...you have to pick a controller that supports SIN/COS if you want to use it. And have a motor with that kind of sensor on it (or install one). Then you have to calibrate the controller to the motor (because it won't just "know" what position it is in; you have to tell it where "zero" is, etc, as well as how many SIN/COS cycles it should expect for one motor revolution, or however it's firmware is designed to deal with this.


If you are using a Sevcon, I assume you already have (or are also getting) all the programming hardware and software for it, and know how to use it? If not, it's likely to be quite an adventure to get a motor to spin on it, much less run optimally, based on everything I've seen about Sevcons so far. :(

This thread
https://endless-sphere.com/forums/viewtopic.php?t=88647
will at least help with the alignment process...but all the other setup before you get to that point, and after that point...isn't covered. (it's specific to each motor used).

Don't forget to buy the Sevcon in the version you want to use...I don't think you can switch most of them from UVW to SIN/COS, though i have heard that there are certain specific models that can.
 
From a mechanical standpoint, how does a sin/cos encoder function? Is it similar to a hall? This is all new territory for me as I'm sure you can tell. If you have any good links to info that explain things that would be very helpful.

I do have an IXXAT cable and DVT software and have had it up and running. I picked up a Gen4 Size2 recently for cheap that I'm hoping to learn on before investing in a large Size4/6. I've read many a threads about the horror stories and I may end up adding to it, but time will tell!

And yes, I understand that the controller is the driving factor in how the power is delivered, but as you stated, the UVW gives off a square waveform vs the parabolic waveform of a sin/cos wave. So I get the gist of what is going on, I'm just trying to understand it more fully. Thanks for your insights!
 
rider119 said:
From a mechanical standpoint, how does a sin/cos encoder function? Is it similar to a hall?
Depends on the specific design, but basically the UVW uses the actual (digital) motor hall sensors to sense the actual motor magnets passing them, and these switch on or off in a six-step pattern based on where the magnets are in relation to each sensor. This gives a fairly granular position reading whose resolution is determined by the number of magnets vs circumference of rotor vs number of halls / steps. It's "good enough" to get the position for smooth startups on good controllers (crappy controllers may grind at full throttle from a stop in some rotor positions...but typically that's only the generic ebike type controllers, not anything with FOC or that could be programmed with any seriousness).

The SIN/COS has it's own ring magnet that is magnetized in a smoothly-transitioning N/S manner continously around it's cirumference, and has two analog ("linear") hall sensors that continuously change output voltage based on that magnetization as it passes them to give a pretty exact position reading of the rotor. As long as the controller can correctly and fully utilize this information, it can tell pretty exactly where the rotor is (vs the granular position data from the UVW system).

But the UVW system actually tells the controller (in theory, anyway) exactly where a specific rotor magnet set is in relation to the phase coils / stator teeth...if the controller is well-designed, it should be just as good (better, without calibration) as a SIN/COS encoder. ;)

In reality...it depends on the motor design, sensor placement, the sensors themselves / the encoder itself, the wiring, the controller design in hardware and software, any settings that exist, etc.

If interested, somewhere here
https://endless-sphere.com/forums/viewtopic.php?f=30&t=32838
are pics of the SIN/COS encoder in a powerchair BLDC motor, along with my method of installing UVW hall sensors so I could use it with a regular ebike controller. ;)



I do have an IXXAT cable and DVT software and have had it up and running. I picked up a Gen4 Size2 recently for cheap that I'm hoping to learn on before investing in a large Size4/6. I've read many a threads about the horror stories and I may end up adding to it, but time will tell!
As long as you know what you're getting into. :) I have an old Sevcon from a Zero, but I don't have the motor it went with, and have no way to change it's settings to work with any of the motors I do have (even if I had any idea what I was doing with it :lol: ). I don't remember what model it is, but I can check, if it's something you might be interested in.

FWIW, a size2 is nearly 300A, IIRC. What kind of stuff are you trying to do that this isn't enough for? :lol:


And yes, I understand that the controller is the driving factor in how the power is delivered, but as you stated, the UVW gives off a square waveform vs the parabolic waveform of a sin/cos wave.
Just remember...the *position sensor* waveform is not the *motor power* waveform. Theoretically the SC type is finer resolution for more accurate position data than the UVW...but that depends on how the controller actually works.

What you should do is find a controller and motor system that is designed to do the specific thing you want it to do, under the conditions you want it to work that way, and get those. :)

As long as what you are using is a true FOC controller, with torque (current) throttle control, and at least some tuneability in it's settings for phase current vs throttle input, etc., it can very likely be setup to do whatever you want. A good FOC controller will be able to read feedback from the phase signals via it's current sensors as well as position data from the position sensors to probably get about as fine a control over everything regardless of position sensor type.

How true it is with each specific controller out there, I have no idea. :/ ATM I only have direct experience with one FOC controller on my trike, and that was Incememed's SFOC5, which is still in beta testing stages, and as such still left a fair bit to be desired at the time I had to stop testing it well over a year ago (I hear it's better now...but no experience). I've got a pair of Lebowski-brained Honda IMA controllers in build progress, but as yet not finished to test on the trike--I expect they'll do just fine based on others' results with them, though...and they're a damn sight easier to setup than a Sevcon even if I have to build them myself. :lol: :oops: (and the source code is now publicly available so if I had any clue how to code I could modify that to do anything I wanted that they don't yet do).
 
Wow, its been a minute since I've been on here haha between and house remodel and getting married I haven't had much time to work on this. But, I have finally wired up the Sevcon G4S2 to QS120. I'm just starting to figure out the settings, going through each section one at a time trying to figure it all out. Need to either buy or barrow an oscilloscope to match my encoder wires to phase wires, map them accordingly in the TPDO section of DVT, then I think I might be able to get the motor actually spinning. But I'm still trying to figure out the TPDO mapping.

Amberwolf, thanks for your responses and explanations! I may be interested in that Sevcon you mentioned if you still have it and can get me some info on it! I also picked up a 2016 Zero FXS in recently so I may try to pull the .DCF file from that controller to at least see what the settings are for reference; try to figure out some of the logic of what is going on maybe.

The G4S2 is capable of 180A battery and 220Arms peak, 75Arms continuous. 28s/100v nominal max.
 
Back
Top