Reasons for Microstepping a Stepper Motor (Part Two)

Microstepping can replace a mechanical gearbox in certain applications when you need small relative movements or greater step resolution. Even if you have to use a larger stepper motor, this is often a preferable solution in a number of applications. You need to carefully select the appropriate stepper motor to get the best possible results, and you should also consider developing customized sine/cosine profiles.

You can increase stepper motor position accuracy beyond the manufacturer’s specifications by microstepping. One way to accomplish this is by designing a microprocessor-based microstepping system using the motor at two-phase-on stop positions, which are typically the most accurate rotor stop positions. Use an automatic or manual factory calibration process to store a correction value for every stop position on each motor you use.

You use the correction value to send adjusted full-step positions to the stepper motor. These adjusted positions have slightly different current levels in the windings, which compensates for the deviations of the position at the original stop positions. This type of microstepping technique is ideal when optimal step accuracy is the most important design criteria. When you use this technique, the stepper motor system must use a rotor home position indicator for synchronizing the rotor and the compensation profile.

Although the electronics needed to generate microstepping are more complex than the electronics used in half- and full-stepping, the total system complexity — including gearbox, transmission, and stepper motor — is less complex and costly in most applications. In addition, microstepping can simplify or altogether replace gearboxes and mechanics for damping noise and vibrations. Moreover, stepper motor selection is easier and more flexible.

You can use software and PWM-timers or digital-to-analog converters in the microprocessor as a replacement for external stepper motor controllers in microprocessor-based microstepping applications in order to achieve the lowest possible hardware cost, which is to say you can obtain microstepping hardware for about the same price as half- and full-step systems for comparable stepper motor sizes.

Read Part One

Reasons for Microstepping a Stepper Motor (Part One)

Microstepping can improve stepper motor system performance in a number of applications, and it can reduce system cost and complexity relative to half- and full-step driving techniques. In addition, microstepping can help solve noise and resonance problems all while increasing step accuracy and resolution.

A stepper motor system’s natural frequency is determined by holding torque, rotor and load inertia, and the number of full-steps per revolution. When stepper motor system damping is low you risk generating noise or losing steps when the stepper motor operates at or near the resonant frequency depending on damping, total inertia, and the type of stepper motor. These issues can happen at or near integer multiples and fractions of the natural frequency. Typically the frequencies closest to the natural frequency cause the most problems.

The principal source of these resonances is that the stator flux moves in a discontinuous way when you use a non-microstepping stepper motor driver — forty-five or ninety degrees at a time — causing a pulsing energy flow to the rotor, and these pulsations excite the resonance. Using half-steps rather than full-steps reduces the excitation energy to roughly twenty-nine percent of the full-step energy. If we microstep the motor in 1/32-full-step mode only point one percent of the full-step energy remains. You can reduce the excitation energy to a low enough level that all resonances are completely eliminated by microstepping.

However, this is only true of an ideal stepper motor. In practical applications there are additional sources that excite system resonances. Regardless, microstepping improves movement in nearly all applications and, in many cases, microstepping alone will sufficiently reduce noise and vibrations for most applications.

When you run a stepper motor at low frequencies in half- or full-step mode the movement is discontinuous, noise and vibrations are generated, and there will be significant ringing. The frequencies where this occurs are below the stepper motor system’s natural frequency, which is why microstepping offers a safe, simple means of extending noiseless stepping frequencies approaching zero hertz.

You don’t usually need steps smaller than 1/32-full-step — electrical step angles this small are easily absorbed by the stepper motor’s internal friction, meaning the stepping doesn’t generate overshot or ringing. The microstepping positions will deviate from a straight line because of uncompensated sine/cosine profiles.

Unipolar and Bipolar Stepper Motor Selection

There are two basic types of stepper motors for circuit design: unipolar and bipolar. A stepper motor will move one step when the current flow changes direction in the field coil(s), thus reversing the magnetic field of the poles, and this reversal is what separates unipolar and bipolar stepper motors.


Bipolar stepper motor circuits have the advantage of having just one winding and a low winding resistance. The two changeover switches are a disadvantage to using a bipolar stepper motor in that they need more semiconductors than their unipolar counterparts.

Unipolar circuits need just one changeover switch; however, they have the crippling disadvantage of requiring a double bifilar winding, meaning that at a specific bulk factor the wire is thinner and the resistance is considerably higher. Because unipolar motors seem simpler with regard to use with discrete devices, they remain popular today, although bipolar motors can be driven with the same number of components as a result of modern integrated circuits.

A bipolar stepper motor produces the most torque, which is proportional to the intensity of the magnetic field of the stator windings and can be increased with additional windings or by boosting the current; but increasing current can saturate the motor’s iron core and, more importantly, will increase the maximum temperature of the stepper motor. Because of the double cross section of the wire, unipolar motors have the advantage of having half the copper resistance of bipolar motors. At its power loss limit a bipolar stepper motor will still provide roughly forty percent more torque than a unipolar motor built on the same frame.

Current Driving

To keep the power loss of a stepper motor at a reasonable limit you must control the current in the windings. The simplest, most popular solution is to supply only the voltage needed, using the winding’s resistance to limit current. There’s a more efficient and precise way to address this issue, but it is also more complicated than the previous example: include a current generator to achieve independence from the resistance of the winding.

Introduction to Linear & Switching Power Supplies

The main features of a linear power supply are the transformer, large input capacitor, and large transistor with a heat sink . Conventional linear power supplies use a low-frequency transformer consisting of a core made from silicon steel sheet that converts AC mains to the desired voltage and rectifies and filters the voltage to a DC level. Because equipment requires stable DC voltage, the filtered and rectified DC level must be managed with a power regulator, which clamps excess voltage at a specific level and dissipates unwanted voltage as heat.

Linear power supplies should have a limit on the variable range of the AC input voltage in order to maintain the efficiency of the power supply. Linear power supplies clamp unwanted voltage as well as ripple voltage, dissipating both as heat, resulting a very small ripple voltage. Linear power supplies have, as the name implies, linear topology, meaning ripple noise and EMI are not a concern.

A switching power supply improves many of its linear counterparts shortcomings, namely the huge volume, considerable weight, and low efficiency. A switching power supply filters and rectifies the voltage from the AC mains without a low-frequency transformer. Because of the high rectified voltage, the bulk capacitor’s capacitance can be remarkably small. Switching power supplies have high-frequency transistor’s that chop the high DC voltage into high AC voltage, converting it into a specified voltage with a high-frequency transformer, and finally rectify and filter the voltage to a DC level. The high-frequency switching of the diodes and the transistor creates ripple noises at the transient of switching.

Switching power supplies are smaller, lighter, and more efficient than linear power supplies, which is why switching power supplies have become increasingly popular in field applications. In addition, switching power supplies continue to come down in price. However, switching power supplies have the disadvantages of having comparatively complicated circuitry, less stability, greater ripple, slower transient response, and are subject to EMI (which can be reduced with filters). The choice between linear and switching power supplies comes down to whether you will be working in the field.

How to Discharge Capacitors in Switched-Mode Power Supplies

Switched-mode power supplies have multiple large-filter capacitors that can hold hazardous charges, even if the power supply hasn’t been used in days. These filter capacitors typically have values as high as 220uF/250V and 330uF/400V. You must discharge the capacitors before working on power supply circuits so you won’t get shocked.

There are three different ways to discharge large filter capacitors in a power supply: with a screwdriver, the leads of a socketed 100 watt light bulb, and the leads of a high-wattage resistor.

Using a screwdriver to discharge the capacitor is not recommended because you can generate a spark and damage the printed circuit board or circuitry of the power supply. You can even blow the power section. Keep in mind that if you know a capacitor’s stored voltage is relatively low, you can discharge it with a small screwdriver without undue risk.

If the capacitor is holding a heavier charge, discharging the capacitor can melt the screwdriver’s tip as well as the copper of the printed circuit board. A heavy spark is especially dangerous: it can cause small bits of solder lead or copper to shoot from the circuit board, potentially injuring your eyes.

The second method involves placing the leads of a socketed 100 watt electric light bulb on the capacitor’s lead and is used by technicians around the globe. The light bulb acts as an indicator, showing if the capacitor contains a charge. If there is a charge present the light bulb will illuminate and eventually turn off when the capacitor in the switching power supply is discharged.

The last method consists of placing the leads of a high-wattage resistor on the capacitor’s leads. You can use a 2.2k ohm ten-watt resistor to discharge high voltage capacitors in a switched-mode power supply. It is a very simple and effective process, taking mere seconds to completely discharge the capacitor.

There’s really no reason to discharge a capacitor with a screwdriver when all you need is a light bulb or a resistor, so keep that in mind the next time you need to discharge capacitors in a switched-mode power supply.

Switching Power Supply: Preventing Noise

A switching power supply is a remarkably efficient type of power supply, which quickly turns off and on, used to regulate amperage and current. Although all switching power supplies will produce noise, they are usually designed to create noises inaudible to the human ear. If your switching power supply isn’t designed for quiet operation and it’s producing a high- or low-pitched whine or hissing, there are ways to mitigate the noise.

High-Pitched Noise without a Fan 

Check where you’ve plugged in your power supply. High-pitched hisses or whines are typically caused by external electromagnetic interference. Keep your power supply away from anything which produces electromagnetic interference — for example, fluorescent lights, power strips, flat-screen monitors, or large batteries. Simply moving your switching power supply a few feet from objects that produce interference can stop the noise entirely.

If after you’ve moved the power supply and the noise continues, it is likely because you have a dry capacitor that needs replacement. Unplug your power supply and leave it unplugged for three or more hours, because capacitors will hold an electric charge and will need to lose this charge. Do not remove or replace capacitors without electronic training.

Use a soldering iron to remove the capacitors. Purchase identical components, and then solder the replacement capacitors to the circuit board.

High-Pitched Noise with a Fan 

First you need to unplug the device connected to the power supply, and then remove the casing. The fan is most likely oscillating at a frequency that makes the ordinarily high-pitched whine audible to the human ear.

Remove the power supply fan’s protective plating, which is located in the center of the fan. The protective plating will be held on with screws or a thick sticker; remove the screws or peel the sticker back. Place a couple drops of sewing machine oil on the now-exposed bearing. The last step is to put the protective plating back on and replace the power supply casing.

Low-Pitched Hum 

Look for a metal casing that fits over the entire power supply. Place your power supply in the metal casing and screw it shut. Plug the power supply in and turn it on.

Three Types of DC Power Supplies

Because controlled electrical energy is useful in myriad testing situations, the power supply is an exceedingly popular piece of electronic test equipment. Although anything which supplies power — for example, a combustion engine — can be broadly defined as a power supply, we’ll limit our discussion to types of direct current (DC) power supplies that are commonly used for development, maintenance, measurement, and testing.

Constant Voltage/Current

The constant voltage/constant current power supply, which as the name implies provides constant voltage as well as constant current, is perhaps the most popular variety of power supply. When operating in constant current mode, these power supplies maintain their set current even as the resistance of the load changes. Constant voltage/constant current power supplies frequently have features including remote sensing, master/slave connections, and analog programming (remote programming terminals.)

Multiple Output

Multiple output power supplies typically have two or three outputs. If you find that you often use multiple voltages while testing, a multiple output power supply is the cost-effective choice. Many users opt for a triple-output power supply which provides one output for digital logic and two outputs for bipolar analog circuitry. Some common features include timed operation, settable voltage limitations, storage registers for up to fifty instrument states, and the ability to connect two channels in parallel or series for higher current or voltage.


Because they are generally used  in conjunction with a computer-operated system for production and testing, programmable power supplies are often referred to as “system” power supplies. System power supplies have used a number of computer interfaces in the past, two of which — IEEE-488, or GPIB (general purpose interface bus), and RS-232 serial communications — have been widely used. Ethernet and USB interfaces have also been quite common.

In addition, these power supplies have command languages for sending instructions to the instrument through the digital interface. These languages include proprietary, SCPI (standard commands for programmable instruments), and SCPI-like. The ability to control a programmable power supply via your computer, instead of pushing keys on the instrument’s front panel, makes this type of power supply especially useful when working on complex setups.

Digital Multimeter Troubleshooting and Repair

Your digital multimeter should last for a number of years with reasonable care, but there may come a time when you multimeter malfunctions and you’ll have to decide whether to repair it or buy a new one. Before going out and looking for a new multimeter you should use the following techniques to troubleshoot and repair you multimeter.

The first step is to check the battery. Try to power on your digital multimeter. If the multimeter doesn’t turn on or the display is dim you may have a weak or dead battery. Simply replace the battery and you should be good to go.

If your multimeter powers up but you aren’t getting accurate measurements you may have faulty test leads. Set your multimeter to read resistance and touch the test probe leads together. It should read zero ohms. If you have resistance ratings of over one ohm or the reading is erratic, you should be able to fix the problem by replacing the probe leads.

If you still haven’t been able to address the issue the next step is to disassemble your digital multimeter. Use a small screwdriver to remove the screws holding the case together.

After you’ve opened the multimeter locate the fuse and remove it. If it’s a clear glass fuse inspect the inside to see if the thin wire within is burned out. If it’s blown, replace it. If it’s a ceramic fuse you’ll have to check its resistance with another multimeter and, if there is no resistance, you’ll need to replace it. (Consult your multimeter’s manual to find out which fuse you need.)

Look for wires and other connections that may be corroded or broken. If you do find a damaged connection desolder it with a soldering iron and wick and resolder it.

Check for loose parts or screws inside the multimeter’s case and fix them in the appropriate way.

Reassemble your digital multimeter, set it to measure resistance, and touch the probe leads together. It should read well under one ohm. If the multimeter is still malfunctioning, it may be time to replace it.

Oscilloscope Sound Experiments

A digital storage oscilloscope is a piece of electronic test equipment primarily used to measure voltage, but it can detect sound waves as well. Emitted as resonant frequencies, longitudinal sounds waves travel through a medium like air or water and the medium dictates the sound’s travel speed, which in turn changes the way we hear certain sounds.

When you connect a speaker to a function generator — also known as an arbitrary waveform generator — you can detect the sine wave created by sound wave. Once the speaker receives the function generator’s input, the sine wave is transmitted to the oscilloscope, enabling you to analyze changes in the sine wave’s height and width on the device’s display.

Another experiment you can conduct involves creating sound waves in a single direction using a resonant tube apparatus, which will guide the sound wave along a tube (the length of the tube is controlled with a piston in the device). When you change the length of the tube, the output will sound louder because the apparatus maximizes the sound wave’s amplitude.

Once properly set up, you can also use your oscilloscope to analyze the pitch and sound waveforms of music. To do so you connect one end of an eighth-inch cable to your music player or computer and plug the other end into a BNC adapter, which you will then plug into the input of your digital oscilloscope. Turn on the oscilloscope.

Set the sec/div knob to one millisecond or quicker and switch the coupling knob to AC, which enables the oscilloscope to analyze the music’s pitch. Next you’ll set the volts/div to point five volts (this is the oscilloscope’s standard setting). Select the song you’d like to analyze and press play on the music player or computer. Observe the waveform as it develops.

You can then calculate the number of horizontal divisions in two complete waveforms by counting the number of divisions it takes a waveform to complete, which is indicated by lines on the graph’s horizontal axis. Each division is designated by a large line. You can determine the pitch by dividing two by the number of horizontal divisions times the sec/div number. You can use a frequency conversion chart to match this value to a specific pitch.

Real-Time & Sampling Oscilloscopes (Continued)

Another oscilloscope technology is known as equivalent time sampling. These sampling oscilloscopes have a base digitizer that is considerably slower than a real-time oscilloscope’s digitizer, but their input bandwidth can exceed 70 GHz, which is possible because sampling oscilloscopes don’t use a repeated signal and phase-coherent trigger. (Phase coherent signifies that the trigger signal happens at the same point in the waveform every time.) In addition, the trigger path is a separate connector, meaning you have to either split a repeating signal to create the signal or use an external clock source to supply the trigger. Although the majority of contemporary sampling oscilloscopes use sequential sampling, each trigger still yields just one sample.

So why would you want an equivalent-time sampler? First, you won’t find a 70 GHz real-time oscilloscope, and a 20 GHz sampling oscilloscope costs much less than a 20 GHz real-time oscilloscope. What’s more, an equivalent-time oscilloscope will have a faster sampling resolution, which is to say femtoseconds rather than picoseconds. Equivalent-time instruments have additional bits which improves the vertical resolution. Lastly, sampling oscilloscopes often have twelve- or fourteen-bit digitizers that enable you to analyze noise better and improve jitter measurement, which isn’t possible with an 8-bit digitizer.

Sampling oscilloscopes require an understanding of your signal and what you would like to measure, which is to say you can’t go poking around the circuit and expect to stumble on a solution to your problems.

There aren’t nearly as many sampling oscilloscope vendors as there are real-time oscilloscope makers because sampling oscilloscopes tend to be a part of mainframe systems in which you purchase the mainframe and pick and choose plug-in modules to suit your needs.

Note that a large number of real-time oscilloscopes are capable of equivalent-time sampling as long as you’re able to trigger your signal; however, you do not need a separate trigger path added to the front.

Simply smart circuitry since 1971.