Sensor requirement for EUC

Im planning to build a DIY electric unicycle, as an odrive hobby project. Obviously this requires high torque at low speeds, and high resolution encoder feedback. So sensorless does not seem to be the way here; so that eliminates most e-wheel options right off the bat.

Wheels with 3-phase hall effect sensors are on the market, but would that sensor setup suffice though? Seems that most of these setups use binary signals per hall sensor; so that should provide a hard limit on position resolution.

Obviously I dont care about absolute position encoding in this application; but analog, or at least high-resolution digital measurement of where i am at in my 3 phase cycle, seems like itd be worthwhile.

I am not sure what existing EUCs use exactly; though reinventing the wheel here is part of the fun, obviously. Am I overthinking this and should 6-state digital 3-phase hall effect sensors be fine? Or does odrive already get clever and try to combine the hall signal with back-EMF measurements to give me an improved resolution phase estimate? Or what would be the preferred option to get maximum precision out of my odrive?

Looking around a bit more, I suppose the configuration I currently feel best about, is to take a low-KV BLDC motor with an encoder of my choice (cant go wrong with the one on the odrive webshop I suppose), and connect that to my wheel via a belt drive providing some additional downgearing. That will give me maximum freedom to choose my components, and optimize for required properties, without having to hack components into existing e-wheels. Probably wouldnt be my first choice if this was a production project; but for DIY prototyping and figuring out what torque/backlash/resolution is acceptable for good performance, it seems like the most flexible setup.

1 Like

I think most EUCs (I have to try hard to read that acronym as Electric UniCycle and not Equipment Under Controlā€¦ :stuck_out_tongue_closed_eyes: ) on the market use Digital Hall sensors with fairly high pole-count motors, so that the resolution is not too terrible.
Certainly an encoder would be better, but it can be hard to mechanically integrate (for me at least) a hub motor with a rotary encoder.
You might consider magnetic absolute encoders with SPI interface, e.g. AS5047p. These are supported by ODrive and do not require a calibration or index search sequence on start-up, unlike incremental encoders.
For this, you would need to make some kind of bracket that suspends the sensor over the centre of the wheel, with the diametrically polarised disc magnet glued to the centre of the wheel.

I would NOT recommend using a belt or gearing to drive an encoder. Belts usually have some compliance, be it slippage, stretching, dynamic vibration, or backlash, that can ruin the accuracy of the encoder and thereby ruin the commutation of the motor. And if the encoder turns are not an exact multiple of the motor turns, you will be in trouble.
That said, some people have managed to do this.

1 Like

I wouldnā€™t use the SPI encoders for a unicycle personally, not robust enough. Use an ODrive Pro with the integrated encoder, maybe. But yeah, the hall sensors + high pole counts are probably fine (itā€™s more of a torque / velocity problem than positioning anyway)

Ah ok; if the digital hall sensors work for existing EUCs I suppose it should be fine for me. That being said getting that to work well might depend on custom firmware tuning on their end, which I dont know that odrive will provide. Its an OS project ofc but hacking its firmware wasnt on the top of my list of things to play with.

The encoder would be on the motor shaft, not on the wheel, so the motor control should be fine. Ofc the slack will make the system harder to control; but figuring out that part of the control algorithm actually is part of the fun for me. And not like a rubber tire has infinite stiffness to begin with.

Ill take a look at the magnetic-absolute onesā€¦ the encoder on the odrive store is for max 8mm axle sizes, and none of the suitable motors ive found so far seem to fit that constraint. Not having much luck so far googling for alternative encoders I can buy; is there a nice odrive compatible guide, like there is for motors?

Dont have experience with absolute magnetic encoders; in what sense would you say they are not robust? Like interference with external magnetic fields? Certainly not being forced into doing a startup sequence I dont need would be great.

Not sure what you mean by integrated encoder. You mean the one suggested on the webshop?

Indeed an EUC is not a positioning problem as suchā€¦ but keeping balance efficiently requires making fine adjustments around the zero-velocity point. Well I suppose it actually does not require that for a typical EUCā€¦ but I want to try something along the lines of the superride-S1000 for instance. I suppose most EUCs require some minimum forward velocity so they are not concerned with control around the zero-velocity point; so whatever the typical EUC does might not be the measure of things for meā€¦

Err, you canā€™t mount an encoder to the ā€˜shaftā€™ of a hoverboard wheel motor anyway, because the shaft is the stationary part and contains the wiring, while the wheel moves.
Thatā€™s one reason why Iā€™d recommend an absolute encoder.
Paul is right about the SPI though, what he means is that as a high speed, low voltage serial signal it has to be treated with some care, as electromagnetic noise from the motor can easily interfere with the data from the encoder. As long as you use ferrites on the motor wires and put some series resistance in the SPI to prevent ringing, it should be OK in my experience though.
The new ODrive Pro / V4.x has a SPI magnetic encoder built onto the PCB. But Tbh I wouldnā€™t want to mount Ā£200 of electronics in a place where it could be damaged in a collision, i.e. near the moving part of a hoverboard wheel.

1 Like

Not looking for hoverboard motors per se; thinking of going with the inrunner ā€˜gokart/trikeā€™ motors, as they are typically headlined on aliexpress, as they look more professionally built, better cooling, and have more detailled specs, non-janky mounting options for different sprockets, internal bearings optimized for the type of load youd get from a chain, and I like being able to go into the 3000W range so i should have sufficient torque after a 5x downgear or so, while also ending up in a reasonable speed range. These things cost $100, perhaps 2x a hoverboard, but even if they gave away the hoverboard motors for free im not sure theyd be worth it to me.

Overall the electronics should be a pretty compact build; without long motor or sensor wires. That, plus some ferrites, I think it should be ok? That being said mounting the incremental encoder on an extension of the shaft could work of course. But do I always need a bootup sequence with those encoders? If so, I think im going to try and make the absolute encoder first anyway.

I think ive heard of the single-motor odrive pro thing you are talking about; but this website appears silent on the matter and I dont see it in the shop. Is it slated for release in the future? The only hits I get are from aliexpress; but respect for the people paying for the hosting of this forum aside, my time is too precious to be messing around with parts with 1 page of documentation, most of which are chinese characters.

I see your point about damage; though note that these electronics&motor would sit above the wheel, not on the wheel axle itself, and there should be plenty of room to build an impact resistant housing there.

1 Like

In that case, ODrive Pro would be a good fit. :+1:
Itā€™s in a kind of semi-open beta phase. Email info@odriverobotics.com and iā€™m sure Oskar will fit you up with one. :slight_smile:

2 Likes

Cool, I will definitely consider that; though I had a use case for the second controller so ill have to think about it.

Shopping for motors on aliexpress is such a mixed experience. The choice is overwhelming, but I literally havnt found a single motor with something resembling a complete datasheet; even the seemingly more respectable motor manufacturers with their own website and branding towards robotics. Seems there is a real antipathy to describing stall torque; or bothering to mention duty cycle when talking about non-continuous values. I thought i had found a good motor, but I was lucky enough to see it used in a youtube review and it was the noisiest piece of shit you could possibly imagine for 1000rpm BLDC. Ill keep on browsing I suppose. The other thing that bothers me is the ā€˜uncanney valleyā€™ of motor aspect ratios; where you have the pancake style direct drive hub motors, and long and thin style motors; but the thing I think would be ideal for my application, roughly 2:1 diameter to length, 1-2kRPM max, somehow seems to not be a thing. What seems like the best option right now is a wind-turbine generator, of all things, but it does not mention weight and i fear it isnt optimized for mobility applications in that way, looks to be a very beefy housing.

One other thing that keeps mystifying me is the size difference between an odrive and a similar-wattage ebike motor controller; they tend to be monstrous in comparison. Is it that they use lower efficiency mosfets, so they need the big heat sink? Or am i going to run into limitations trying to use an odrive running a 1kw motor at full duty cycle for an hour?

A datasheet?? On Aliexpress?? :rofl: :stuck_out_tongue_closed_eyes:

T-motor is good, but expensive, and possibly they only make outrunners.
Also, try ā€œ8318 kv85ā€. Iā€™ve used these motors a lot. They have about 3 Nm torque at 30A. Might be too small for you though, and they are also outrunners ofc.

I have happily used ODrive for a 1kW ebike, pulling a bike + trailer up a hill, didnā€™t seem to get warm.
It may be that ebike controllers just use bigger heatsinks to ā€œlookā€ more powerful. They also probably use the cheapest MOSFETs and gate drivers they can get away with.

1 Like

I know I knowā€¦ but even on the t-motor website, or cubemars which seems to be a robotics-oriented product from tmotor, still nothing resembling a complete datasheet. tmotor has some decent options though; outrunners are an option if the axle mounting options are right (sufficient room to fit a properly supported axle through). Their U-series looks like it has good options for me. I guess price isnt much of a concern to me at the moment. Found some pretty nice type of ā€˜boutiqueā€™ motors on aliexpress as well. Cant find the company that makes these; there are a few size options like this out there on different stores. Clearly not trying to win the $/watt race, but they sure look pretty, and their specs would serve me well.

Good to hear that operating the odrive like that should be no problem!

1 Like

Would you tell me more about the setup you used for your ebike? Iā€™ve never used an odrive before, and Iā€™m interested in giving that a try.