Discrete stepper driver

Hi

I got a project where an integrated stepper is controlled by a microcontroller. By integrated stepper, I mean like the L6208:

But I really do not like paying for the stepper driver, when I have a capable microcontroller that can do the sine modulation current in the windings. So I am tempted to roll my own, with discrete drivers and MOSFETs.

Anyone know if that path is simply to difficult, or any other reason besides project speed to use an integrated solution?

Regards

Klaus

It isn’t impossible to do and there are a lot of resources for you to draw on. As a learning exercise, it can be very educational.

But, if you are trying to save money, you will be better off buying one off the shelf. The stepper driver chip you linked to is around $6 USD quantity 1. And you can buy complete stepper drivers that can handle up to 1A per coil - 5 A4988 based drivers for less than $10 USD. When you factor in things like a PCB and connectors, building your own is not going save any money.

Personally, I like the Trinamic Drivers as they add a lot of features. The newer 5160 can drive external mosfets so you can handle significantly higher power.

I’ve used the A4988 before. Don’t scrimp on the driver transistors. Use external ones if your analysis suggests it might be necessary. I lost a client once because I let them talk me into downsizing the motor driver circuit to exclude external transistors and save money. To be fair, I agreed to the change and all my analysis showed it should be okay, but I had a bad feeling about it. When units started to fail, I couldn’t explain it. The Allegro FAE couldn’t explain it. I finally took the system to their local lab in Seoul, and got it to fail while hooked up to a really expensive analyzer and scope. It turned out to be a freak condition that even the FAE had never seen before. None of this mattered in the eyes of my client and no further work came my way. Lesson learned.

I’d echo the comment that it would be a great learning exercise, but I’m not sure if you would end up saving that much money in the long run.

I very much look at it as a cost comparison. Which is more costly, spending the time and revisions to get the discrete+MCU solution working, or using an all-in-one external IC? If you’re building 10k or 1M quantities, then definitely spend the time to save every penny. However, if you are building 100 or less, it might be overall cost effective to just use the integrated solution.

One other consideration: When I do designs, especially in areas where I don’t have recent and immediately relevant experience, I will always choose ICs like the L6208 or the Trinamic drivers that Phil mentioned. My rationale being that I would rather have fewer “degrees of freedom” when implementing something for the first time because it gives me a much higher likelihood of the design working on the first or second revision. What I mean by degrees of freedom is not the IMU sense, but in the design sense. By choosing discrete MOSFETs to drive the windings, and by implementing the waveforms and timings yourself, there are that many more things that can go wrong. (The same rationale applies to development boards, either made by the manufacturer or by companies like Adafruit/Sparkfun/etc.)

The volume is 50k+, so the economics are there

I have done discrete gatedrivers for sensor less motor control, but this is a little different in that, I have not done steppers before, and on the other hand steppers are more forgiven that motor vector control

Upside could be to do the design and get paid for it at the same time :blush:

The gatedrivers are actually used in one of my own designs, a POL converter that I hope to release in 2021, so if I use it in a client design I need them to waive the IP rights for that function alone

At 50K, I think you are right about the economics.

The other issue in these chip shortage times is availability of components. Microcontrollers seem to be a real problem. STM8 and STM32 chips are in very short supply. A lot of Atmel micros as well. I’ve seen predictions of 6 to 12 months or worse before the supply returns to normal. In the mean time, suppliers are gouging customers. I know of several companies that have put products on hold due to extremely high cost of microcontrollers. There is at least one STM8 that went from around $1.50 to $15 rendering a product’s BOM cost to be unacceptable.

Living in uncertain times is indeed a curse.

It is really sad that design decisions are governed by what can be sourced. I have the same problem with my Pol. Spend a lot of time selecting the right parts but now I can’t get them

That is the heart of engineering! Everything is a trade-off.