HB-25 Motor Controller Tester

It is typical that for each product carried by Parallax, each individual part must pass a test procedure to ensure each product works perfectly before being shipped to the customer. Some products are more complicated than others, and therefore, require more complex test procedures.

For me, every project, including test procedures, starts with a prototype to prove the circuit and code and make easy adjustments and changes as you go. In this case the prototype was built on a Board of Education with a BS2.

Test pins were used to provide power and motor output to the HB-25 under test, and the black wire was used in the calibration process. The test procedure happens in two parts. First, the unit under test is calibrated by sending a 1.5 ms pulse while shunting a calibration pin. Once calibration has completed, the unit under test gradually increases the pulse to 2 ms, then gradually reduces it to 1.5 ms while testing the output for the correct PWM output. Then the pulse gradually decreases to 1 ms and then gradually increases back to 1.5 ms, again, while checking the PWM output.

The test takes several seconds, so while it’s running, a yellow LED indicates the test is in progress. If the unit passes the test, a green LED comes on. If the test fails, a red LED comes on.

The prototype required a few wires to be manually connected in order to go through the various stages of the test. The final test fixture needed to be more automatic, so a custom base was constructed, which included a specialized clamp to hold the unit under test against pogo pins that created all the necessary connections to complete calibration and testing. A photo insert made it easy for the person performing the test to get the orientation correct. A Super Carrier Board was used for the final circuit.

The schematic shows the circuitry used to facilitate the test. The BS2 provides the signals to two (2) relays and three LEDs. There are also two inputs. The test is initiated by pressing the reset button on the Super Carrier Board.

Understanding The Code / Circuit

Pressing the reset button starts the program in the BS2 from the beginning. Looking at the code, here’s what is happening:

  • The signal pin for the HB-25 is set low (resting state)
  • The yellow “test in progress” LED is turned ON
  • The calibration relay is turned ON (this shunts a special pin for calibration)
  • The calibration routine sends out the “center” pulse, while turning the “power” relay ON
  • After sending several “center” pulses, the calibration relay is turned OFF

At this point the HB-25 is ramped up in the forward direction while testing the output for the correct pulse width. If the anticipated pulse width doesn’t match, the test fails immediately. The same test is then done in the reverse direction. Once both tests have completed, the outputs are checked to see if there is any output signal from the HB-25. Is there is, the unit fails the test. There is a line in each section that toggles the yellow LED on / off to indicate testing is in progress and that the code isn’t “stuck”.

The images above show the steps to test an HB-25 module. This is how much the test procedure is simplified using automation.

Resources


HB-25 Motor Controller Tester by Chris Savage is licensed under CC BY 4.0

PLEASE FEEL FREE TO LEAVE YOUR COMMENTS, QUESTIONS, SUGGESTIONS OR FEEDBACK ON THIS POST.

Leave a Reply