Digilent Inc, An NI Company

Debug Motor Controllers with Analog Discovery 2

This project presents how to create and run an automated test written in C to debug an H-Bridge DC motor controller and a stepper motor controller with Digilent Analog Discovery 2 Logic Analyzer and Pattern Generation.

Digilent Analog Discovery 2 is a USB oscilloscope, logic analyzer, and multi-function instrument that allows users to measure, visualize, generate, record, and control mixed-signal circuits of all kinds. Driven by the free WaveForms software, Analog Discovery 2 can be configured to work as any one of several traditional test and measurement instruments.

WaveForms seamlessly connects to Analog Discovery 2. Designed with a clean, easy-to-use graphical interface for each instrument, WaveForms makes it easy to acquire, visualize, store, analyze, produce and reuse analog and digital signals.



In this project, we want to debug an H-Bridge DC motor driver and a stepper driver are controlled by an Arduino UNO. The following functions in Analog Discovery 2 are used:

  • Static I/O
  • Voltmeter
  • Logic Analyzer
  • Pattern Generator

The results are displayed in the console window along with messages about the current operation. Data exported in a file can be visualized by running the plotting.m MATLAB script or the plotting.py Python program, or you can write your own program to plot the data.

Read the complete guide and download all the source files in the Digilent Reference Page.

Digilent Analog Discovery 2 is available in Elfa Distrelec.