Single Axis Step Motor Controller/Driver Board

A Complete Step Motor Controller and Driver Board

Similar projects worth following
This is a single axis step motor controller and driver on a single PCB. The Driver chip supports up to 2.5A per phase of motor current and up to 32X microstepping. Phase current is software controllable, as is the microstep configuration.
A few years ago, I built a 3 axis version of this board using a TI Launchpad eval board as the processor. This single axis board needs to go in an even more confined space than the original board, so the eval board was dumped and the actual processor was installed directly on the board. The rest of the board was designed to be software compatible with the 3 axis board.
There are 2 limit / home switch inputs with ESD and some EMI protection. Three UARTs are brought to connectors on the board, one with RS232 level shifters and the other two as logic level. An onboard EEPROM provides nonvolatile storage for configuration data. Power input is 10 - 14V. The PCB is a 4 layer board with most components on one side of the board.

It was important to me to make this board software compatible with the original 3 Axis project #Stepmotor Driver Board for TI Tiva Launchpad . The software for that project has been in use for a while and is pretty solid. Also, there is quite a bit of software in this project and I just did not feel like writing it again. When I brought the single axis  board up, I was able to flash the software from the 3 axis controller into the new board and verify operation of all of the features on the new board immediately.

Single Axis Step Motor Controller and Driver Board
DC Power and Serial Commands In, Motor Drive Out

As part of this project, I duplicated the debug interface from the Launchpad board on a small, separate PCB that is connected to the target processor via a standard 10 pin 1.27mm JTAG/SWD cable. The debug processor from one of the Launchpad boards was desoldered and installed on the JTAG/SWD PCB along with a USB connector and power supervisor chip. This approach works well. The tool chain is configured for the specific eval board and works the same as the debug on the Launchpad board did. Because the original project was done several years ago, the version of the vendor tools is pretty old at this point. Replicating the hardware expected by the old tools simplified the development by not requiring changing tool chains.

This board duplicates the Launchpad Debug operation.

The unpopulated J1 Connector in the upper left corner would be used to flash the processor on the board, but was not needed.
The end use for the board is to drive the Theta axis on my Antenna Rotator project #Satellite Antenna Rotator Mechanical System . Software support for the Theta axis is a problem because antenna rotators generally support Azimuth and Elevation only. The data protocol that I used as the input to the rotator control is based on the Ezcomm protocol, but it got extended quite a bit. Hamlib is an open source project that serves are a hardware abstraction layer between the top level control software and the various radio equipment. GPredict is the top level software package that I use to drive the Azimuth and Elevation axes to the predicted positions of the selected satellite. It has no understanding of the satellite rotational orientation, so it cannot command a Theta position for the earth antenna.

For testing, I created a manual control for the Theta axis position outside of the GPredict software.  I extended the Ezcomm module in Hamlib to support the extra axis. This was not a graceful solution. Having the Theta control on a separate serial port and independent of the GPredict/Hamlib software will simplify this operation considerably. When I implemented the Theta axis control, I was expecting to write a tool that would control the Theta axis by optimizing the antenna orientation based on received signal strength. That is still to be implemented.

In the original system design, the Theta axis was driven from the 3 axis board via an exposed cable. As this is used for pointing an antenna, it is pretty sensitive to RF emissions. The original implementation radiated pretty severely when the Theta motor was enabled. Assuming that I can enclose the motor and wiring along with the controller board, the EMI problems from the Theta motor should be much lower. Additional input power filtering was added to the new motor board to reduce EMI on the input power wiring.

Hardware checkout and software development requires the debug interface, the target processor board and some implementation of the mechanical system.

Development System Components
Debug Interface, Target System and Mechanical Mockup

The debug interface is shown on the far right, the Single Axis Motor Board is in the middle and a mock up of the mechanical system on the far left. A USB cable plugs into the connector at the bottom of the debug interface PCB to connect to the PC running the development tool chain. Power connections for the target board can be seen on the lower right side of the target board. RS232 connections between...

Read more »


Schematic for the Debug Interface Board

Adobe Portable Document Format - 232.88 kB - 06/13/2020 at 14:36


Bill of Materials-Dbg_IF_1_Mouser.csv

Bill of Materials for the Debug Interface Board

Comma-Separated Values - 1.56 kB - 06/13/2020 at 14:36



Schematic for the Single Axis Step Motor Board

Adobe Portable Document Format - 609.96 kB - 06/13/2020 at 14:35



Bill of Materials for the Single Axis Step Motor Board

Comma-Separated Values - 3.86 kB - 06/13/2020 at 14:35


  • Finished the Metal Work

    Bharbour06/27/2020 at 15:29 0 comments

    Installing the new board in my previous project  #Satellite Antenna Rotator Mechanical System  required some sheet metal work. I wanted to re-use as much of the existing system as I could, but move the external step motor and it's wiring into a closed up box. Here is the completed antenna arm.

    Completed Antenna Mount Arm
    Completed Antenna Mount Arm

    The original design has the step motor outside the box, with the drive pulleys, belt, and theta home sensor inside the box. The motor drive signals and theta home sensor wiring can be seen going to the main body of the rotator.

    Original Design of Antenna Mount Arm with External Theta Motor.a
    Original Design of Antenna Mount Arm with External Theta Motor and Wiring.

    Here is a picture of the original design theta mechanics.

    Original Design Theta Mechanism and Wiring.
    Original Design Theta Mechanism and Wiring.

    The only new mechanical parts that had to be designed and made for this modification are a motor mount bracket and the new box.  Here is the new motor mounting arrangement with the new brackets.

    New Design Theta Mechanism
    New Design Theta Mechanism

    In both designs, the theta home sensor is a photo-reflective sensor that looks for the set screw hole on the driven pulley.

    Looking inside the box on the modified theta mechanism, you can see the motor and the control board. The control board is mounted to brackets on the sides of the box. There is not much extra space inside the box. It would have been possible to make the whole theta head larger, but that would have required a lot of extra machining to make a new base plate and was not really necessary.

    Theta Mechanism Box Inside View
    Theta Mechanism Box Inside View

    The control interface to the new theta control uses an RS232 serial physical layer. The RJ45 connector is used for that RS232 connection because they are a nice small connector that has a positive lock for the cable. A standard network cable has 8 wires in it, so a single cable can carry the control link for the azimuth/elevation control board and the theta control board. A small PCB with two RJ45 connectors and a header connector was bolted to the main body of the rotator to break out the azimuth/elevation control link from the cable and pass the theta control link on to the theta board. Due to the mounting arrangement on the RJ45 jack that I used, it was easiest to mount it's PCB to the top cover of the enclosure. The cable sticking out of the left side of the enclosure mates with the header connector visible below the RJ45 jack. Nut inserts are used for the cover mounting holes because sheet metal screws shed small bits of metal and strip easily.

    Theta Head Box with the Cover Installed.

    Power for the theta axis comes in via the 2 pin circular connector shown just below the RJ45 jack. Because this project was motivated by reducing the EMI radiated by the exposed step motor wiring in the original design, I took extra care in designing a filter for the input power to the motor control board. The DC power and RS232 links are the only connections to the theta head. On the right side of the box, the external step motor mount hole is visible. I designed a bracket that flips the motor over and covers the old mounting hole. The new bracket uses the old belt tensioning adjustment slots visible in the base plate.

  • Built a scond board up

    Bharbour06/18/2020 at 21:33 0 comments

    The Theta Axis project that I designed this board for is going to be a close fit to get everything into. In the interest of easy assembly, I built up another one of these boards, but instead of the little 2.54mm screw cage terminal strips for the power, motor and home switch, I put 2.54mm Molex Cgrid III connectors in. I have a crimper for the pins for that line of connectors and they work well for applications like this. Another advantage to these connectors is that there is no side access required for assembly, just push the connector onto the pins and go.

    The new board built up with no problems. The only issue that I had when I powered it up is that I had the EEProm write protect pull up resistor populated and the firmware complained about not being able to write the EEProm. I pulled the resistor and all was well. I made the same mistake on the first board and marked the electronic copy of the schematic but forgot to mark the hardcopy of the schematic. That is fixed now.

View all 2 project logs

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates