Low-speed direct-drive 3-phase motor and controller

nsaspook

Joined Aug 27, 2009
13,079
Example of a 3-phase closed loop servo system capable of very low speeds and positional accuracy with the proper position encoders. A PIC32MK controller is generating the required 3-phase waveforms in response to the user encoder position control input. It calculates the error from the motor encoder and then uses a PI feedback loop to generated the required corrective motions as 3-phase drive signals.

PXL_20211213_004921367.jpgPXL_20211213_014801539.jpgPXL_20211213_004846894.jpg
 
Last edited:

strantor

Joined Oct 3, 2010
6,782
Example of a 3-phase closed loop servo system capable of very low speeds and positional accuracy with the proper position encoders. A PIC32MK controller is generating the required 3-phase waveforms in response to the user encoder position control input. It calculates the error from the motor encoder and then uses a PI feedback loop to generated the required corrective motions as 3-phase drive signals.

View attachment 255062View attachment 255063View attachment 255064
That is pretty slow in my book, but for this application we are talking about 10 deg/sec (1.67 RPM) max (rapid transit, per videos linked by TS) and 0.25 deg/min (0.000694 RPM) nominal (according to this) with an accuracy of +/- 0.0000194 degrees. What you demonstrated seems it would be about right if it were the input to a 1000:1 gearbox, but he wants to do this without a gearbox. And without an encoder.

I'm going to stop harping on the encoder thing and just say finally and definitively that an encoder is absolutely 100% required for this, no getting around it. The direct drive telescopes linked by TS are using Heidenhain (Ferrari of encoders) 24 bit absolute encoders which give 0.0000214577 degree resolution.

Now that's out of the way and we can start being realistic; we no longer need motors manufactured by NASA. The accuracy of the system is built into the encoder, and does not need to be built into the motor as well. The motor can be a bit "sloppy" relative to the design goals. That is to say, still a motor that any other industry would consider to be extremely precise. A high quality servo motor. Probably a frameless torque motor. Not a brushless washing machine motor or a 3D printed contraption. Maybe a 2nd hand CNC servo but those are more for high speed. If TS has access to a decent CNC machine that isn't a clapped out craigslist special, he might be able to DIY the motor (again, assuming it's coupled to an expensive encoder).

Or, maybe he can relax the design criteria and get away with a more obtainable encoder and maybe even a brushless washing machine motor. But I'm pretty sure those two concessions alone already completely undermine the dream. Especially considering at this point insisting on direct drive is pretty pointless as a servo worm drive would be much easier, cheaper and more accurate.

My point here isn't that it can't be done; it can. But not on a budget. On a budget, you can definitely make an awesome telescope, but will it compete with a $200k unit? No way in hell. At least not if insisting on direct drive. There are reasons that telescope cost that much. The dream is about to get dashed against the rocks of reality and there's no easy way to put it. You have to either do the best you can with what you have and be happy with it, or dream something else.
 
Last edited:

nsaspook

Joined Aug 27, 2009
13,079
That is pretty slow in my book, but for this application we are talking about 10 deg/sec (1.67 RPM) max (rapid transit, per videos linked by TS) and 0.25 deg/min (0.000694 RPM) nominal (according to this) with an accuracy of +/- 0.0000194 degrees. What you demonstrated seems it would be about right if it were the input to a 1000:1 gearbox, but he wants to do this without a gearbox. And without an encoder.

I'm going to stop harping on the encoder thing and just say finally and definitively that an encoder is absolutely 100% required for this, no getting around it. The direct drive telescopes linked by TS are using Heidenhain (Ferrari of encoders) 24 bit absolute encoders which give 0.0000214577 degree resolution.

Now that's out of the way and we can start being realistic; we no longer need motors manufactured by NASA. The accuracy of the system is built into the encoder, and does not need to be built into the motor as well. The motor can be a bit "sloppy" relative to the design goals. That is to say, still a motor that any other industry would consider to be extremely precise. A high quality servo motor. Probably a frameless torque motor. Not a brushless washing machine motor or a 3D printed contraption. Maybe a 2nd hand CNC servo but those are more for high speed. If TS has access to a decent CNC machine that isn't a clapped out craigslist special, he might be able to DIY the motor (again, assuming it's coupled to an expensive encoder).

Or, maybe he can relax the design criteria and get away with a more obtainable encoder and maybe even a brushless washing machine motor. But I'm pretty sure those two concessions alone already completely undermine the dream. Especially considering at this point insisting on direct drive is pretty pointless as a servo worm drive would be much easier, cheaper and more accurate.

My point here isn't that it can't be done; it can. But not on a budget. On a budget, you can definitely make an awesome telescope, but will it compete with a $200k unit? No way in hell. At least not if insisting on direct drive. There are reasons that telescope cost that much. The dream is about to get dashed against the rocks of reality and there's no easy way to put it. You have to either do the best you can with what you have and be happy with it, or dream something else.
You nailed it. The system I designed has no lower limit on RPM as it tracks an encoder position. My test encoder has only 360,000 counts per shaft revolution ( .001° or 3.6 arc seconds ) accuracy.
https://www.celeramotion.com/wp-content/uploads/2019/05/LP-Data_Sheet-Packaged_DRC-M35.pdf
On the bottom of the LCD display you see the encoder position error slowly counting down from an offset of 135 to zero of the encoder shaft rotation.
https://forum.allaboutcircuits.com/threads/pic32mk-mc-qei-example.150351/post-1538714

That's at least 10X less than what's needed for a good direct-drive telescope drive.
https://forum.allaboutcircuits.com/threads/pic32mk-mc-qei-example.150351/post-1530400
 

MaxHeadRoom

Joined Jul 18, 2013
28,617
You can obtain quadrature encoders now with extremely high resolution.
The mechanical coupling is usually the Achilles heel, but if using a direct drive motor, this may not be an issue.
It would be interesting to see if a Fischer-Paykel motor could be used in a BLDC format (Not AC servo motor mode).
 

strantor

Joined Oct 3, 2010
6,782
You nailed it. The system I designed has no lower limit on RPM as it tracks an encoder position. My test encoder has only 360,000 counts per shaft revolution ( .001° or 3.6 arc seconds ) accuracy.
https://www.celeramotion.com/wp-content/uploads/2019/05/LP-Data_Sheet-Packaged_DRC-M35.pdf
On the bottom of the LCD display you see the encoder position error slowly counting down from an offset of 135 to zero of the encoder shaft rotation.
https://forum.allaboutcircuits.com/threads/pic32mk-mc-qei-example.150351/post-1538714

That's at least 10X less than what's needed for a good direct-drive telescope drive.
https://forum.allaboutcircuits.com/threads/pic32mk-mc-qei-example.150351/post-1530400
I only scanned it, but just from that I can tell that it's an uncannily relevant thread you linked, and project you undertook. Can you share any details about the telescope in question? Drive motor, gearbox type (or none), what kind of real-world accuracy it was able to achieve, what it cost, and any other details that might give this thread some context about what is achievable in the "DIY on a budget" arena?
 

nsaspook

Joined Aug 27, 2009
13,079
I only scanned it, but just from that I can tell that it's an uncannily relevant thread you linked, and project you undertook. Can you share any details about the telescope in question? Drive motor, gearbox type (or none), what kind of real-world accuracy it was able to achieve, what it cost, and any other details that might give this thread some context about what is achievable in the "DIY on a budget" arena?
The system he's building uses this type of encoder for the direct-drive. It's not a budget item.
https://www.renishaw.com/en/resolute-encoder-series--37823

Example (not his) of a 26-bit encoder ring absolute encoder for a telescope mount.
1639419101969.png
 

strantor

Joined Oct 3, 2010
6,782
The system he's building uses this type of encoder for the direct-drive. It's not a budget item.
https://www.renishaw.com/en/resolute-encoder-series--37823

Example (not his) of a 26-bit encoder ring absolute encoder for a telescope mount.
26 bits! wow, that's a buttload of resolution! 67 million distinct known positions per revolution, for 0.000,005,364 degree resolution.

You know what else has 26 bit resolution? The LDC1612 Inductance-to-digital converter. Actually, it has 28 bit resolution. Maybe a guy could roll his own absolute encoder (inductive, not optical) with as much accuracy? After all, inductive encoders are a real thing now, and made even by the likes of Heidenhain:


A roll-your-own inductive encoder made in the home shop is probably not going to be all that accurate, whether you wind coils or etch PCB coils, or whatever. But, since we are talking about a singular use device rather than a production model, it could probably be painstakingly calibrated to be (very very near) perfect. Take it out to a parking lot with a laser pointer mounted to it and measure the counts every few mm along its arc at radius of 100m or so, generate a correction table, and now you have... something. Think it would work? Of course you would need the most accurate, most drift-resistance, most MILSPEC capacitor out there for your LC tank, but that's peanuts beside the cost of a 26 bit optical encoder.

Edit (how an inductive encoder would work using LDC1612 [see 2:00 - 4:40]):
 
Last edited:

strantor

Joined Oct 3, 2010
6,782
We will see. Sometimes it's a bit of a shock to see that your ideas need to be modified by the reality of what's needed to make it work.
Well if he never comes back I may start my own thread. This ultra-high-resolution DIY encoder concept has created an itch in the back of my brain that wants to be scratched. I thought of a way to jack up the resolution even higher while simplifying the calibration procedure by using multiple coils and LDCs. This applies to linear as well as rotary applications. I think I might give it a go on my CNC machine, make some "poor man's glass scales" sans glass and scales. If it works I might even be able to manufacture NASA motors with sub-micron precision! Apparently unrealistic dreams are contagious...
 

Thread Starter

uzernaam

Joined Dec 12, 2021
19
Well shoot, I guess @uzernaam took off. That sucks. I was pretty intrigued by this thread.
No, I'm still here.

The project is underway.

I'm combing through all the posts and doing a lot of research.

I still believe the project is do-able on a budget.

I will post updates when I have something of substance.
 

Thread Starter

uzernaam

Joined Dec 12, 2021
19
Well if he never comes back I may start my own thread. This ultra-high-resolution DIY encoder concept has created an itch in the back of my brain that wants to be scratched. I thought of a way to jack up the resolution even higher while simplifying the calibration procedure by using multiple coils and LDCs. This applies to linear as well as rotary applications. I think I might give it a go on my CNC machine, make some "poor man's glass scales" sans glass and scales. If it works I might even be able to manufacture NASA motors with sub-micron precision! Apparently unrealistic dreams are contagious...
I'm wondering if laser etching on stainless or glass could scribe ticks onto the material, and an optical reader could then convert them into the digital signals necessary.

000
001
010
011
100
101
...

but more than 3 bits.

When I watch how relatively uneducated people in very primitive shops in Pakistan can manufacture and repair diesel engines, I take the attitude of "never underestimate what a determined attitude can accomplish" ... even on a budget.
 

MaxHeadRoom

Joined Jul 18, 2013
28,617
I'm wondering if laser etching on stainless or glass could scribe ticks onto the material, and an optical reader could then convert them into the digital signals necessary.

000
001
010
011
100
101
but more than 3 bits.
I assume you already know how an incremental photo LED encoder/scale versions work?
The lines are photo etched on glass and two photo leds detect two lines 90° apart (quadrature) the resolution is increased by typically squaring up and incrementing by 4, i.e. reading all four edges.
The initial detection results in a sine wave, where this can also be used to calculate the co-tangent angles for very fine resolution and absolute encoding.
 

nsaspook

Joined Aug 27, 2009
13,079
I'm wondering if laser etching on stainless or glass could scribe ticks onto the material, and an optical reader could then convert them into the digital signals necessary.

000
001
010
011
100
101
...

but more than 3 bits.

When I watch how relatively uneducated people in very primitive shops in Pakistan can manufacture and repair diesel engines, I take the attitude of "never underestimate what a determined attitude can accomplish" ... even on a budget.
Those people in Pakistan are very educated in the mechanics of machines. Those that have been educated in classical mathematical mechanics can easily see the skills used by them. To underestimate their ability is a mistake just like underestimating the requirements to build very low speed, high precision drive systems would be.
 

Thread Starter

uzernaam

Joined Dec 12, 2021
19
I assume you already know how an incremental photo LED encoder/scale versions work?
The lines are photo etched on glass and two photo leds detect two lines 90° apart (quadrature) the resolution is increased by typically squaring up and incrementing by 4, i.e. reading all four edges.
The initial detection results in a sine wave, where this can also be used to calculate the co-tangent angles for very fine resolution and absolute encoding.
Now I do.

But back to your description... I'm guessing they use lasers to activate a chemical that does the etching. Shorter wavelength lasers can etch finer details. I'm guessing they're in the ultraviolet range for high resolution?

I wonder if a carbine or diamond tipped tool on a reciprocating apparatus can be ratcheted in extremely small increments by reduction leverage/gearing. The machine might scrape a tiny line every thou or whatever at speed 1, every two thou at speed 2, every 4 thou and speed 4, etc. I'm thinking a stepper motor would be ideal to run the mechanism.

I have so many parts, gadgets, and doo-hickeys lying around I bet I can cobble together something.

I anticipate this will be a multi-year project, but I plan to move forward a little every day.
 
Last edited:

MaxHeadRoom

Joined Jul 18, 2013
28,617
Those people in Pakistan are very educated in the mechanics of machines. Those that have been educated in classical mathematical mechanics can easily see the skills used by them. To underestimate their ability is a mistake just like underestimating the requirements to build very low speed, high precision drive systems would be.
On a related issue, when the global economy balance was changing and China was a contender, I figured that India no different than Pakistan in race, would have the edge,
They possessed many skills, among them acquiring jobs in the west in the computer fields etc, and also had the advantage of having English as a second language.
But it wasn't to be! :(
 

MaxHeadRoom

Joined Jul 18, 2013
28,617
Now I do.

But back to your description... I'm guessing they use lasers to activate a chemical that does the etching. Shorter wavelength lasers can etch finer details. I'm guessing they're in the ultraviolet range for high resolution?
It is some method of photo-etching on glass, I am not sure of the details.
 

GetDeviceInfo

Joined Jun 7, 2009
2,192
26 bits! wow, that's a buttload of resolution! 67 million distinct known positions per revolution, for 0.000,005,364 degree resolution.

You know what else has 26 bit resolution? The LDC1612 Inductance-to-digital converter. Actually, it has 28 bit resolution. Maybe a guy could roll his own absolute encoder (inductive, not optical) with as much accuracy? After all, inductive encoders are a real thing now, and made even by the likes of Heidenhain:


A roll-your-own inductive encoder made in the home shop is probably not going to be all that accurate, whether you wind coils or etch PCB coils, or whatever. But, since we are talking about a singular use device rather than a production model, it could probably be painstakingly calibrated to be (very very near) perfect. Take it out to a parking lot with a laser pointer mounted to it and measure the counts every few mm along its arc at radius of 100m or so, generate a correction table, and now you have... something. Think it would work? Of course you would need the most accurate, most drift-resistance, most MILSPEC capacitor out there for your LC tank, but that's peanuts beside the cost of a 26 bit optical encoder.

Edit (how an inductive encoder would work using LDC1612 [see 2:00 - 4:40]):
This emulates a resolver.
Although bulky, would a torque arm not practically provide sufficient sweep. Accuracy gained with a larger radius. Resolution determined by image pixelation.
 

strantor

Joined Oct 3, 2010
6,782
I'm wondering if laser etching on stainless or glass could scribe ticks onto the material, and an optical reader could then convert them into the digital signals necessary.

000
001
010
011
100
101
...

but more than 3 bits.

When I watch how relatively uneducated people in very primitive shops in Pakistan can manufacture and repair diesel engines, I take the attitude of "never underestimate what a determined attitude can accomplish" ... even on a budget.
Now I do.

But back to your description... I'm guessing they use lasers to activate a chemical that does the etching. Shorter wavelength lasers can etch finer details. I'm guessing they're in the ultraviolet range for high resolution?

I wonder if a carbine or diamond tipped tool on a reciprocating apparatus can be ratcheted in extremely small increments by reduction leverage/gearing. The machine might scrape a tiny line every thou or whatever at speed 1, every two thou at speed 2, every 4 thou and speed 4, etc. I'm thinking a stepper motor would be ideal to run the mechanism.

I have so many parts, gadgets, and doo-hickeys lying around I bet I can cobble together something.

I anticipate this will be a multi-year project, but I plan to move forward a little every day.
Sure, you could etch or scribe a glass disk and make your own optical encoder. You mentioned making a scribe line every 1 thou so I take that as a hint that you have among your cache of parts and expertise the prerequisites to make marks around a disk every 1 thou, but probably not any finer than that. (That's no insult; that's about what I could manage too).

Let's do a little math and figure out how big this glass disk needs to be, in order to measure an arc-second:

1 arc-second = 1/1,296,000th of a degree.

[Before I continue, it seems worth pointing out that this will require scribing 1,296,000 lines on a glass disk of (yet unknown) diameter. And that's just the outer edge. If you're wanting an absolute encoder like you described, there will be another ring inside that one with 648,000 lines, And another inside that with 324,000, and another inside that, and so on.]

If each of these lines are 2 thou apart (1 thou dark, 1 thou light, and so on) then 2 × 1,296,000 ticks = 2,592,000 thou of circumference of the disk, or 2,592 inches.

2,592 / pi = 825" diameter glass disk, or 68.75ft. I don't know where to get a glass disk of 69ft diameter, or what heavy lift transport firm is capable of delivering it.


Since that's obviously ridiculous, we could look at it the other way around; what resolution of optical encoder could you make given what you have and a reasonable starting diameter. Let's say you use a glass disk with a 12" diameter. That's pretty massive as far as encoders go, but I suspect you'll have (or be able to design in) room for it.

12" diameter × pi = 37.70" circumference.

37.7 / .002 (again 2 thou) = 18,848 ticks

This is a pretty decent resolution in my world. Typical encoders for the motors I deal with usually go up to 8,192 and rarely any higher. If you make it a quadrature encoder instead of absolute then you can skip all those inner rings and quadruple the count by using the state change scheme described by @MaxHeadRoom . Only downside is you'll have to do a reference ("homing") movement each time you turn it on.


So 18,848 counts × 4 = 75,392 counts per revolution.

75,392 counts ÷ 360 degrees = 209.42 counts per degree.

209.42 counts ÷ 60 arc-minutes = 3.49 counts per arc-minute

3.49 counts ÷ 60 arc-seconds = 0.0581728395 counts per arc-second.

Invert that: 1 ÷ 0.0581728395 = 17.19 arc-second resolution .

Is a positional accuracy of +/- 17 arc-seconds good enough? I think it will have to be, because what I just described is probably about the best than can be done without NASA lasers.
 

strantor

Joined Oct 3, 2010
6,782
This emulates a resolver.
Although bulky, would a torque arm not practically provide sufficient sweep. Accuracy gained with a larger radius. Resolution determined by image pixelation.
Yes, as far as I know about resolvers (which isn't a whole lot) basically a resolver, but with more than 3 phases. I agree a torque arm would increase accuracy but I think/suspect this falls in the same category with gearboxes, which is the category of [anything other than direct drive] and therefore not open to consideration.

EDIT: my reply about resolvers was actually about synchros. I had them confused and I'm re-educating myself at the moment.
 
Last edited:
Top