I'm going to give up on Stepper motors

I am using simpleFOC quite successfully on a 4 PP BLDC motor with Teensy 4 and L298N (or the Deng FOC controller) with AS5048A magnetic sensor. I can get 300 r/sec. But for my application the motor is cogging very slightly at slow speeds, less than 5 r/sec. The teensy is going around the runtime loop at an incredible 50kHz.

I don’t need quite that much speed but I do need lower speed torque.

In my experiments with steppers (same code and set up otherwise) I cannot get the speed greater than 20 r/sec on the L298N and no speed at all on the Deng. I can get an open loop speed faster than this but still only about 40r/sec. I need a min of 150 r/sec in velocity and angle mode.

I could use torque in my application instead of angle modes so I tried the stepper torque sample from the simpleFOC website. This worked but with very noticeable stepping as the shaft was rotated against the torque. I cannot feel this on the BLDC but the torque is much less.

I’d like to use a stepper motor and achieve a max speed of 150 r/sec with good low speed torque or use in torque mode without being able to feel stepping.

Am I being unrealistic in expecting this performance from a stepper?
Can anyone suggest better driver hardware for the stepper?

You are limited by the L298N pour switching rise/fall time & delays. In the Datasheet it’s presented in us. Eg. 2 us delay, that’s 2000 ns delay. It may be cheep, but I suppose that’s the problem. Take the time to design something with better specs. There is hope still.

Let’s break the issue down. You may achieve 300 rad/sec w. 4PP. A stepper has 50PP, that’s 12.5 times the pole pair’s.

This package is pretty neat IMO

If I get around to it, I could sketch up something for the T4?

These are in stock and affordable.

They are 80v rated with a descent On_resistance and rise/fall times.

If we look at the TMC2660 stepper driver, it has a on resistance of 63(Nch) and 93(Pch) mOhm. These half bridge power stage 3.3x3.3mm has a RDs(on) of 31 mOhm when switching w. 4.5v, so in theory you can switch them with 5v also powering the T4.

All this means one could make a driver rated for pretty high voltage suitable for bigass steppers, but also smaller ones.

Like always, one has to design for the specific use case, so the current_sense resistor has to be chosen for best possible resolution.

But why not use the T4 running marlin and those FETs in combination w. TMC5160. If you are going to control several axes. One Teensy 4 per axis will become rather expensive?

What is your use case?

My use case, like it seems many, is a simulator force feedback system. I the image shows


a Teensy LC, L298N connected to an 8 pole BLDC driving a lead screw actuator system, The rotation sensor is an AS 5048a. The crossbar connected to the square shaft is a force sensor.

The system reads the force, integrates it twice to get distance and moves the motor to a new position. The input force is backed off by a virtual spring, with virtual damping and friction which are adjustable via vehicle simulation model.

The system works ALMOST well enough. I can feel a small amount of roughness as the motor moves, especially while moving slowly.

I do want to move away from the L298N, but to what? It would be nice to have two drivers on one board. I’m afraid I’m not skilled enough to create my own driver board so I must buy one.

I also want to try a stepper to see if the higher torque and number of poles reduces the roughness.
The requirements are for 150 r/sec. Can this be achieved with a stepper motor?

A stepper will not have any torque left at 150 r/sek. (Converted to 1432 rpm here) Well certainly not much, maybe 20% of slow torque. If that is good enough, then perhaps.

It could maybe work with the T4 I have no idea, but you would be punching the boundaries of the known universe. Especially driving two steppers w. SimpleFoc at those speeds.

I get why you would have the T4 potentially driving a stepper w. SimpleFoc w. your requirements.

It certainly is possible to try with better drivers, but it is a process. Almost a quest. YOU will have to brake the design down to its core components and create a circuit w. 4 half-bridges IMO. Forget about that L298N it’s to slow for what you wish to achieve w. a stepper.

Do you have experience w. Kicad ? I think this project is outside the scope of a broadboard. If you don’t, then it’s time to take the jump.

I was able to get 3000 rpm out of a typical nema 23 motor, relatively high torque (65 mN-M I think) just using a tmc2209. However anything above 10-20 rpm caused a humming noise. The chips theoretically can tell you if the motor skips steps, how close it is to stalling and some other things that can help a lot. I have no idea how much torque you could get out of it at the speeds you are talking about, but theoretically you should be able to take the supply voltage, subtract the back emf and from the coil resistance calculate the current that could flow through the coils, compare it to zero rpm current, and the max torque before stall should be proportional to the amount of current that can be forced through the motor.

In my search for a power output stage, there is seriously nothing available on the market right now at a reasonable price point. It’s absurd but that appears to be the way it is. You can get low side driver boards, which are easy to make with n-channel mosfets, but not high side boards, which require a charge pump or something to drive the mosfets, or p-channel mosfets, which are not very common. It’s a gap in the ecosystem.

1 Like

Hello,

Could you please define a reasonable price range?

I see so many in the price range of a McDonalds Happy Meal.

Cheers,
Valentine



We need a board on amazon, ready to use, though, not a chip we can’t find, which requires a pcb or design to use. It may seem like stuff you can do with one hand tied behind your back, but hunting down a suitable chip, actually obtaining it at a reasonable price (including shipping), in a reasonable time frame, adding any support components, figuring out how to get it working in a logical way, maybe even making a pcb for it, is too large an undertaking for most people most of the time for most projects. I would probably encounter problems like finding out the timing characteristics of the chip are no good way too late in the project and have to do everything 3 times before I got anywhere. That’s why everyone is trending towards using the l298n units. When you hop on amazon or aliexpress, that’s all there is that can do the job. There are one or two other little mosfet based ones that may or may not work, but it’s not clear, given timing constraints, and truth table combinations and so on.

I believe a good tool set is one that makes problems more tractable. We should be making stepping stones upon which others can stand and reach further than we can. People have projects that are worthy and they want to do, but the commons isn’t ready to make it economically viable to do most of them. If we advance the lego kit that is available to people, then a lot of good stuff will come out of that.

A driver chip is only part of a driver, which is only part of a motion solution, which is only part of a larger assembly or equipment kit, which is only part of some technique that actually improves life, and then only usually a little bit. Each stage can’t be this complicated, we have to divide and conquer, I think. We have to respect how much work it is to get even a small improvement in life, and try to make things more practical at every stage.

My project, open erv, has 12 printed parts, 3 motors, an mcu, power supply, screws, regen media, bearings, 2 dual sensor boards, motor driver boards, fans and fan housing, connectors, wiring, all of which have to be sourced etc. and that’s a relatively simple project, compared to many I can think of I would like to undertake. It only gives you some fresh air and saves some energy, it doesn’t make you rich overnight. It can’t cost $1000. If every stage was so complicated, it would not be at all viable to develop it. It isn’t, really, it has become a hobby and labor of love, not a viable side hustle, to be honest.

When I was searching for a driver stage, it was just to test, just to check, how much noise was coming from the driver and how much was coming from the motor’s mechanics. A sub project of a sub project of a sub project of even the best, most worthy project I can undertake, is still not worth much. I can’t spend days sourcing parts and figuring out everything, wait a month for delivery etc., if you see what I mean.

I think it would be quite awesome and logical for the T4 or other board/MCU for that matter, if we dial in the use of NPN/PNP transistors instead of drivers. That would require some time-consuming work, like you mention. All good cookies take time.

Such a board would cost between $50 and $100, before tax and shipping. Would you be willing to pay that much? Also, if I develop a board like that I need people to buy at least 1000 boards per month on Amazon to make it financially viable.

The other alternative would be to pay someone about $50k to develop and test and deliver a board for you. I promise you, the board would be an absolute success, and you will be very happy. However, I doubt you got the funding for such an effort.

Now you see why you cannot find what you are looking for, and why all efforts are on a hobby / diy level.

I’m doing my best to help hobbyists and enthusiasts to get off the ground and do things they don’t have the knowledge, expertise or time. Unfortunately, there is the occasional gap in expectations which you happen to observe. Also, since your effort is commercial, it may be difficult for anyone to agree to develop a solution for free that someone else would sell for profit.

In any event, I’m open to suggestions and very willing to help any open design. I’m all ears and willing to listen. Your feedback is very interesting and constructive.

Cheers,
Valentine

Good brainstorming and discussion. Talking of ready to use boards, having an L298n one and a dual vnh5090 (pololu clone) i chose the latter, its giving better results even if from the datasheet doesn’t explicitely look that much better (yeh i dont fully understand that datasheet…no typ HSD rise times, just max). the driver board isnt very expensive and the automotive grade components have many neat safety features (useful for my application)

these are my actual progresses, I think I still have to find driver limits:

looks like this one has been discontinued.

There is that new little board the DRV something or other that looks promising. That must be new, I only found it yesterday.

I don’t believe it would cost $50-100 for such a board on amazon ready to roll. I have sold stuff on amazon before. If I can use the lepton and add an angle sensor to the top side of the board I think that could be sold for 30 Canadian each on amazon for a good hourly wage, like 40 bucks an hour. Amazon charges $8 for storage, shipping and handling for a package that size last I checked if you put it into their prime system (I sold sweetener packets through their system for a while), or I think $3 for so called add on items (I don’t know if they still do that) so if the board costs an average of 15 bucks to produce… hm. I see your point though.

If I do the packing and shipping by letter mail it’s $2 per envelope to send a board like that, it fits in the size and weight of lettermail. I can be a seller on amazon and ship things myself. I just put them in anti static bags and into envelopes and then once every couple days I put the envelopes in the mailbox, and canada post charges my account from the code on the letters.

Distributing such a low cost item gobally is a challenge.

If they are sold in packs of five then it looks a little better. If some chinese guys get inspired to make them and put them up no ali express they could probabaly be there for 20 bucks each or something after shipping, maybe less. They can work with their buddies in Shenzen and buy the board at a much lower price than we could ever get. The full fledged simpleFOC board is about $25 on ali express after shipping. Then people should donate a buck or two per board to the developers of course. But these guys on ali express can do stuff like that.

My openerv.org project is not really any more commercial than the simplefoc project. You guys sell the boards apparently at a profit. That’s fine, I assume the supposed profits go to pay the dev costs. The stuff is open source and if you want to wait for a month you can buy it off aliexpress. Same with the OpenERV. Except the licence terms will require a small royalty. Basically I require that donation instead of just hoping for it. After the dev costs are paid off I intend to release it under mit license and wash my hands of the matter.

I should probably have bought my boards off of you, sorry, but the ali express guys just had the whole kit with exactly the motor I need and angle sensor and stuff for $60 bucks.

Apologies, I probably tried to conflate a business-level board with the low-cost board. You are correct, if I sell the Lepton, probably $25 per board would do it, to account for my time and effort. However, I would not do that, it’s really not worth my time. The $50 to $100 board I meant would be a lot better, well designed board. But then again, I need to sell hundreds of those a month. I don’t think there are that many customers out there.

Please post here your progress, we are all very interested.

Cheers,
Valentine

1 Like

Hey @Anthony_Douglas,

If you actually get a board to the point where you want to produce larger numbers and then sell it, get in touch first…

I can show you a way that is better, and will save you a lot of time and money compared to using amazon.ca :slight_smile: and at that point I think I can also get you considerably better prices than JLC.

No, I think this is a misconception. I think the best one can say is that we don’t make a direct loss on the hardware costs themselves, and even this depends on how many prototype runs are needed before they work. But if you factor in development time, running the shop, forum and website, handling and dispatching the orders, etc… then its not a money making proposition to sell these boards at this price. And to actually make money to live off this would require far higher volumes and far higher prices.
So why do we do it? SimpleFOC is an educational project, and wants to further knowledge about and use of BLDCs with FOC control, and related topics. As such it is our aim to make affordable controllers available, and until such a time as our designs are perfected and catch on commercially, this is the way to do it. It’s a labour of love :smiley:

Most commercially viable products need to be sold for twice their production costs or more, and that’s at volume. The lower the unit price, the higher the margin and the volume need to be.

2 Likes

To put things in perspective, only creating the Lepton board (design, development and testing) had cost me about $11,000. If my profit margin is 20%, I need to sell at least 2000 at $25 to recover my cost.

That should be enough to sober up anyone and really put things in perspective. Developing a real, industrial-grade designed board is about 10 to 100 times more expensive. That’s why Siemens and Toshiba sell $2,000 to $10,000 BLDC controllers.

Cheers,
Valentine

1 Like