Test Ideas: Microcontroller runs relay endurance test
An automated test setup ensures that relays and switches comply with safety standards.
By Alvin Agustin, MET Laboratories, Baltimore, MD -- Test & Measurement World, 11/1/2010 12:00:00 AM
|
Electromechanical components such as relays and switches often must undergo endurance tests that verify their reliability and safety. Regulatory standards typically have compliance criteria that require a manufacturer to test a component's functionality after it has gone through a specified number of cycles. Standards may require testing from a few cycles to several thousands of cycles. Automated tests are, therefore, essential.
One such standard, UL 508, "Standard for Industrial Control Equipment," requires that the component under test turn on and off 6000 times while loaded according to the requirements of the standard (Ref. 1). The test cycle is 1 s on and 9 s off. The schematic in the figure shows a microcontroller-based test setup that we use to drive a relay under test. The microcontroller controls the relay, counts the number of cycles, and determines the relay's functionality. An engineer makes the final decision regarding compliance with the standard. (See a flowchart that illustrates the test process.)
![]() This test circuit for electromechanical relays uses a microcontroller to control the relay under test through an optocoupler. A power supply and load produce current in the relay contacts. |
The system consists of an optocoupler (U1) that drives a bipolar transistor (Q1), which in turn drives the relay under test. A reverse-protection diode in parallel to the relay coil protects the circuit from discharge current when the relay turns off.
The relay under test must be loaded as specified in the UL 508 standard, which also mentions loading specifications and the acceptable type of load. When the relay turns on, current from an AC power supply powers the load through the relay under test. The load-to-microcontroller interface provides 5-VDC power to the input of optocoupler U2. That forces the optocoupler's output high, indicating that the relay has closed.
The test sequence starts with the microcontroller energizing the relay driver circuit, which turns the relay on and energizes the relay load-to-microcontroller interface circuit. The microcontroller then samples the state of the interface circuit and stores the data in memory. After 1 s, the microcontroller turns the relay off-removing power from the load-and takes a sample of the interface's status.
After the on-off cycle, the microcontroller determines if the relay is still functioning properly by testing the data stored in memory. If the data in the "on" condition is logic 1 and the data in the "off" condition is logic 0, the microcontroller considers the cycle a success and will update the cycle counter and initiate the next cycle; this process repeats until the cycle counter reaches 6000 cycles.
The microcontroller sends on-off cycle data and operation status to the PC through a serial port. That eliminates data from filling the microcontroller's memory. We can convert the data into a spreadsheet format or monitor the data using terminal-emulation software. Errors in the logic sampling of the on-off cycles can indicate component failure in the on or off condition. A logic 0 in the on state can indicate a bad contact. A logic 1 during an off condition can indicate a fused contact in the relay.
The program memory is about 5 kbytes because we programmed the microcontroller using C. The microcontroller that we used has 32 kbytes of program memory. We could have significantly reduced the memory usage by programming in assembly language instead of C.
The same test setup can also be used to test switches. If you simply replace the relay driver circuit with an actuator, the microcontroller can drive a switch. Keep in mind when using a power supply as a driver, though, that some power supplies such as "wall warts" may not have the on-off response time that you need.
Reference
1. UL 508, "Standard for Industrial Control Equipment," Underwriters Laboratories, Northbrook, IL., January 28, 1999. ulstandardsinfonet.ul.com/catalog/stdscatframe.html.
Talkback
No related content found.
- 0 rated items found.
Datasheets.com Electronic Parts & Inventory Search
185 million searchable parts
- Part Number
- Description
- Inventory
- Products
- Manufacturers
Sponsored Links

























