SSZTAP1 november   2016 CSD17571Q2 , SN74HC164 , SN74HC595 , TCA9539 , ULN2003A


  1.   1
  2.   2
    1.     3
    2.     Interfacing Flexibility
    3.     Driving High Voltage and High Current
    4.     Putting It All Together
    5.     Additional Resources

Jose Gonzalez Torres

As you can see from my previous blog, my dad has always been a great source of inspiration and knowledge for me. There is one piece of advice that keeps coming back to me: “Measure twice and cut once.” However, as engineers, whenever we are challenged to design a control or power circuit for stepper motors, LEDs and other peripherals, we like to adapt the system to specific rules and conditions. We are essentially measuring twice, but only for that specific set of conditions. Any changes after the fact would only mean additional costs and time for evaluation, which can be a big pain for any project. Or as my dad would say: “You already made your cut, you can’t take it back!”

So what happens when you need a solution for multiple systems or configurations? How can you make sure that you maintain a balance between having a system that can power a motor, but also gives you the flexibility to add other high-voltage devices after your design is done? I recommend starting your design by using a module or subset of the system, which you can later scale.

Interfacing Flexibility

The first thing you have to do is make sure that you can connect your power driver at will. While it is a good idea to choose a host controller with enough general-purpose input/outputs (GPIOs) to drive your outputs, implementing a control scheme or program becomes increasingly difficult, as each GPIO pin has its own call and action to execute. This is where serial interfaces become handy. Most processors have a slew of internal interfaces, as you can see in Figure 1. These interface modules can control memory or external sensors, and even communicate with other processors.

GUID-5BE7A9CB-DA56-4CB5-8D4A-1C22D09766E4-low.jpg Figure 1 MSP430™ Internal Block Diagram

For our system, however, the choice is simple. As I mentioned in the intro, we are making this system to drive multiple peripherals including stepper motors. For Stepper motors we need to make sure we supply a sequential and synchronized output from the host.

GUID-07EC8BF5-C4B8-464B-A439-9617683A4B61-low.jpg Figure 2 SPI Master-slave Connection

Interfaces like Serial Peripheral Interface (SPI) and I2C give you the advantage of having a clock signal coming from the host or master (as shown in Figure 2), with the ability to expand by sharing the serial data and clock lines. For the sake of your design, however, you want to keep costs low, since a solution with a high number of motors and LEDs would need multiple iterations.

Some motors, LEDs and other devices may not benefit from having the internal serial interface as a processor. In those cases, you can employ a serial-to-parallel converter such as the SN74HC595 shown in Figure 3. This device helps channel data sequentially to the outputs. I picked this part for my design because it’s easy to use, low cost, and enables designers to stack or daisy-chain similar devices. Any other serial-to-parallel device can also help complete the task, such as the SN74HC164 or TCA9539.

GUID-702CD328-BA77-47F2-9619-30357E2E286A-low.jpg Figure 3 SN74HC595

Driving High Voltage and High Current

Unfortunately, you cannot simply drive a high-power load from a host microcontroller. You can, however, apply a FET to lower the overall current demand from the processor. This is in fact one of the more popular threads in design forums, and the main reason why the “Interfacing the 3-V MSP430 to 5-V Circuits” application note is very popular. If you take a page from this app note, you’ll see that the ULN2003A is a simple solution.

Figure 4 showcases how the MSP430 microcontroller and ULN2003A can drive a 12V logic rail along with some motors and LEDs. This works out great because the ULN2003A can handle voltages up to 50V and currents up to 500mA/channel, which gives you ample range for motors and LEDs.

GUID-C54B2C62-F74B-43F4-9EA8-918872BE04D1-low.jpg Figure 4 Connecting the MSP30 to High Voltage and High Current Loads

Putting It All Together

Now that you have everything you need, you can connect your MSP430 MCU, SN74HC595, ULN2003A and a CSD17571Q2 to create a flexible power structure that’s scalable in multiples of eight channels, as shown in Figure 5.

GUID-63E59FFF-2B19-4460-8AB5-6A5543658F4F-low.png Figure 5 Our Dynamic Driver System

You can use this architecture to create complex systems such as an air conditioner, an LED display matrix, or even a robot with multiple lights and motors. You can also create multiple versions of the same design with added features or functionality, such as extra displays or motors, as shown in Figure 6.

GUID-AB9E3516-631B-4172-B646-C532973A7765-low.png Figure 6 Scaling Our Power Driver to Accommodate More Peripherals

Because you kept the design at a comfortable scale, you can now expand or reduce your features based on your application requirements, or recycle the same structure to come up with other applications that need high voltage, high current or both. And because you only chose the lower-cost alternatives, you can ensure that your board remains cost-effective, even with multiple iterations.

This is such an easy-to-use and flexible design, that we took this idea and made a BoosterPack out of it. But it is just one of the many different ways that you can drive high-power peripherals such as stepper motors and LEDs. What other architectures can you think of? Please let me know in the comments.