First, thanks for all your hard work, this project looks really great!
I want to check in on whether SimpleFOC would be appropriate for my application.
I’m currently exploring options to direct-drive 4 outrunner BLDC Gimbal motors (Smallest: 7pp, 16V & 1.65A and largest: 21pp, 24V & 2.8A), and I want to uncover the maximum possible angular repeatability for this hardware.
I’m moving very small loads, a very small distance and would like to move quickly, but moving precisely is more important.
I’m currently working with Renesas IPS2200 inductive position sensor with an incremental encoder coil design. These devices provide different levels of repeatability, depending on PCB coil & target design. We have confirmed that our IPS2200 coil design does indeed seem to produce high accuracy for angular readings. It’s analog, but so far, it looks like we’re getting at least equivalent to 20k CPR, and anticipate more from larger coils.
Here be the initial questions:
Will the B-G431B-ESC1 really work for a precision positioning application?
Is there a different driver that would be more likely to deliver high precision angular control at (relatively) low power?
Will I need to implement my own SIN/COS Encoder for this system?
How many motors could a single RP2040 reasonably control with this library?
I’m using limit switches to set end stops for motion, is there an existing homing/calibration step that will set encoder offsets automatically?
Welcome, and hope you find what you are looking for. Wish you success with your project.
General comment, the accuracy is not board dependent. It’s sensor+motor combination dependent. The board only receives the signals and sends the commands to the motor. The better the sensor and the better the motor, the better the control loop is. I’m sure there must be a really bad, poorly designed board that would create problems, but generally, all commercial boards are quite decent. The key here is to find a good and fast MCU to execute your logic.
Probably no. Not because B-G431B-ESC1 is so awesome but because this is not exactly board dependent that much.
As for reading the encoder, the RP2040 has a 16-bit ADC, but that is apparently problematic for other reasons, so I’ve been looking a 24-bit external ADCs, which seem like they could be kind of great for the analog sensor side.
For driving the motors, it looks like the RP2040 has a 16-bit PWM duty cycle resolution. I’m not exactly clear on how limiting that value might be in terms of driving the ESC, is that what you were referring to @David_Gonzalez?
This is what I was thinking about @Valentine , not the PWM frequency. Anything above 12 bits should be good enough for high precision. It’s specially important if we’re scaling the voltage (voltage limit in the library) because for low resistance motors we usually use like 10% (or less) of the available duty cycle range.
We’re moving fast here! I really appreciate the time.
Great question. After being pretty badly burned on STM32’s over the last 24 months, I’m not able to make them an irreplaceable part of my products in the future. I’ve managed to secure a reel of RP2040’s, and they’re so inexpensive, I’d really love to use them if possible.
I think the right answer is that I would gladly use the ST ESC to prototype, but it would likely get swapped out later.
Ugh, I just learned why Mouser has those parts in stock. 1 per customer per month.
Any alternative (available) part suggestions for the motor drivers are welcomed, though the couple of driver IC’s I’ve seen floating around seem to be pretty hard to get at the moment.
We’re producing a SCARA-style robot arm. The arm is very lightweight (compared to similar robots), and our end effector is usually moving <100g loads, but it’s not quite light enough to use disc drive motors.
Though I do love the creative thinking!
I might be mistaken (please correct me if I missed something!), but I think the IPS2200 sensor only provides analog output. The SPI and I2C lines are only for configuration and error detection.
Interesting, please describe where/what shortcomings you encountered. I’ve had only positive experience with STM32 families.
Please be careful, the RP2040 has only 3 ADC IOs. Also it’s a really new chip, with limited support.
LCSC has tens of thousands, no limit, $1.7 per chip. Buy from there.
I have bad news for you, direct drive is the wrong choice if you are really looking into a SCARA arm with high accuracy and repeatability. What’s your angular error and length of the arm? Also how many degrees of freedom and articulation?
For high accuracy please consider a commercial wave reducer. Again, depending on your use case, if you are frying hamburgers you are OK. If you are inserting needles into holes, you are not OK.
There are probably exceptions, but from what I’ve been able to find, SCARAs usually use relatively heavy NEMA style servos and almost never direct drive. But they’re also usually configured to carry 1-3kg at the end effector.
The entire line of STM32 chips have essentially been out of stock since Spring of 2020 (2 years now), and lead times are reportedly 52 weeks out across the board.
I managed to secure enough to produce the products we make, but ST has not done a good job of communicating with their customers through this nightmare (IMO).
Now I see you mentioned the stock at LCSC… I haven’t been able to source outside of authorized distributors, though when the wheels were coming off last Summer, even they didn’t have anything on-hand.
Indeed! Also the ADCs don’t actually work… So, there’s that.
You’re probably right, but I’ve done a few experiments that make me want to dig a little deeper and learn more before falling back to belts or gears (or strain waves). There are some components I need that pretty much have to be direct drive, so the learning won’t be wasted.
I’ve been using LCSC for quite some time. They are actually pretty reliable and have the biggest stock, even when everything else was cleaned out. even today I see nearly 300 MCUs from the STM32 lineup.
I hope it works out for you. Please come back and post pictures/videos, we all want to learn.