Inside the SMD4.2

In one of my previous articles I described how I came to the conclusion that my project needed a stepper motor. After a suitable one was chosen based on its parameters, the question of buying a driver came up, but I didn't want to buy one: it cost about $70...

I decided to look for a driver circuit on the internet. Everything I found at the time was based on a microcontroller, and the cost of the circuits I found also turned out not to be low; time passed, and in the end I bought the driver.

It's not hard to guess what I did first after buying the driver: of course, I took it apart. Below are a few photos with comments.
Inside the SMD4.2


Glancing over the board, I didn't find any microcontroller, but I did find a chip called the A3986; as it turned out, this chip is specifically designed to control two full bridges built on four N-channel MOSFETs, with microstepping support and adjustable maximum winding current.
Inside the SMD4.2

Inside the SMD4.2


If you look at the datasheet, you can see that the maximum winding current is set by the voltage on the REF pin and monitored via the SENSE pins. In the driver circuit, the maximum winding current is set with switches that short resistors to ground, thereby changing the op-amp output voltage fed to the REF pin.
Inside the SMD4.2

The microstep mode is set by the levels on the MS1 and MS2 pins, which are also set with switches.

The control signals go to the inputs of optocouplers (P521 and A2531), which prevents the controlling microcontroller from being burned if the driver fails.
Inside the SMD4.2


There are also two chips on the board whose purpose I can't say much about. One of them, the 74HCT14, contains 6 inverting Schmitt triggers; one of them forms an oscillator (input connected to output through a capacitor) with a frequency of about 20KHz, and it is the cause of the hissing: I found this out by accident when I touched one of the capacitor plates with a probe and the hissing made by the motor changed its tone. The other chip, the 74HCT123, is a monostable multivibrator that outputs a pulse of a certain duration on a signal transition at its input. The pulse duration is determined by an external capacitor and resistor.
Inside the SMD4.2


There are a few things I'd like to see in this driver in the future: first, LED indication of overcurrent and overvoltage; it would also be good to have a pin on which a logic one appears in case of a fault inside the unit, so that the microcontroller can de-energize the circuit if necessary; second, a self-test feature, where with a certain combination of switches (the same ones that set the microstep) a 1KHz signal is fed to the motor, letting you check the driver, motor and wires without connecting a microcontroller.