Main Site Documentation

Custom Stepper Driver has me stumped


Can you show the schematic for the output driver stage?

Are you sure you have the winding’s in the correct order? Does it looks like if might be stepping forward and then back? If the wiring is wrong, stepper motors won’t turn.

How are you powering this? If a bench supply and not enough current to drive the motor, you will see the supply voltage drop so it doesn’t sound like a current issue as you are still seeing good voltage.


The Schematic not the layout right?

I’m pretty sure about the phases. I even double checked just now 'cause you mentioned it. It doesn’t feel like it’s just vibrating in place. I was full stepping, and I know those motors. They should feel a lot stronger than that.

I’m powering it from a ATX PSU. Probing the VCC pin showed that the voltage max was 13.1 and min was 11. something. Average was 12.1V.


Am I mistaken or are the mosfets wired incorrectly? Should the top mosfet’s Drain be connected to VS or its Source?

EDIT: Is it backwards? Should VS and AGND be swapped?

EDIT AGAIN: Ok I think I was just mixing up N and P channel there. False alarm?


Everything looks OK driver wise so might just be software configuration.


I really hope so.

Thanks much.


my go-to test here would always be the L6480 module I’d been using in early tests, putting my code against that so I know if it behaves differently to the new hardware… edit: but I know these are non-trivial little beasts so that may not be 1:1 pointing to software/driver issue versus configuration issue in what your software tells it to do…


@Brett, yea that would be nice. I don’t have one of those though.


N Channel Mosfets need to be connected to GND with sufficient current to be able to turn off right? Therefore if the driver IC isn’t able to turn them off then when I scope the mosfet on the high side it’s source voltage should be VCC right? (i.e. 12.1 Volts from the power supply). I noticed that when the chip is in stand by that motor output drops to GND, but when I take the device out of stand by and before I issue any command it goes to VCC. I think I’ll check this will a 12v led. If the led is on then current is flowing but the drive should still be in HiZ state (motor outputs off).

The IC says it provides from 4ma to 96ma of gate current to support a wide array of mosfets. Could it be that I choose the wrong value mosfets, and those need a higher gate voltage to turn off?


I attached some 12V leds to the output pins. I also tested them on a 9v battery. They shone way brighter on the 9V battery. Also they don’t turn on when the motor is at HiZ.


I’m in the same camp as @Brett - get a Eval board…

Did you use the above or other ST doco’s for reference?


Yes, the pcb engine used the eval board’s schematic and layout as reference (at least he was told to). From comparing them myself I can’t see any obvious differences.

So next step for me is to get an eval board? :sob: I wanted to get the board that came with the STM32 on it so that I can plug in values on the workstation and have it just work, but I could not find any sellers.


To me your mosfet layout looks wrong - drains should be both tied to VS??


**Edit - having looked again at your mosfet fluff my initial concerns my be incorrect…


There is a charge pump that is used to generate the higher voltage needed to switch off the MOSFET’s. This has to be configured so that the voltage is higher than the supply to ensure that the MOSFET’s are switched off.

Is this configured correctly in your design? What is the voltage at VBOOT?


I will have to add a short wire to the VBOOT net (on one of the passives) to find out. While the soldering iron is hot, are there any other voltages I should be probing?


The voltage at Vboot is between 18 and 19.2 volts.


That is more than enough to ensure that the MOSFET’s are off.


I guess I’ll probe the gate voltages next then.

EDIT: Btw, what voltages should I be looking for on the gate? If it’s 18V or more then that means the gate is off? If it’s less than 12 then the gate is on?


Ok the SQJQ910EL-T1_GE3 that I purcahsed says in it’s datasheet:

Gate-source voltage 20V (Limit). Is that a minimum limit or a maximum limit?


Ok, from the application note under the topic 2.4 Wrong setup issues

Starting from VCC the gate voltage is decreased down to the Miller plateau region, but the gate charge is not enough to complete the plateau and the Miller clamp is closed before the Vds commutation is ended. The MOSFET is immediately turned off and as a consequence the output of the power stage is subjected to a strong slew rate which could cause critical issues.

In the second case the gate charge is not enough to complete the Miller plateau region (see
Figure 12). In this case the output commutation is not completed and the overcurrent
protection, which measures the voltage drop on the MOSFET, is triggered even if very low
or even no load current is present.

The document itself is about the setup of the system to suit the selected MOSFETS, however they don’t give an actual example! (and I don’t understand).


I’ve determined that having the eval board isn’t going to help. The problem seems to lay in how the mosfets are being driven. The settings for the eval board most likely won’t work with my board.

After making some changes to the parameters, I am now getting an undervoltage lockout. This implies that VCC is being shorted to GND. I suspect that the low side mosfets are turning back on before the high side ones are fully off.