Introduction to the Component and its Suitability
For this hands-on tutorial, we will be designing a practical electronic circuit using the DELUXE REVERSIBLE 72"W X 48"H DO (Brand: Balt, SKU: 668AG-CC). At first glance, this may appear to be a large, heavy-duty office furniture component—a standing desk riser. However, its suitability for this tutorial lies in its integrated mechanical and electrical subsystems. This unit contains a robust, reversible DC motor drive for height adjustment, limit switches for end-of-travel detection, and a control board that typically accepts low-voltage inputs. We will repurpose this as the foundation for a programmable height-adjustable workstation controller. The motor’s low voltage (typically 24V DC) and the presence of Hall-effect sensors in many models make it ideal for a practical embedded control project.
Design Requirements and Specifications for a Practical Circuit
Our goal is to design a microcontroller-based controller that safely operates the Balt 668AG-CC motor. Key specifications: supply voltage 24V DC (from a regulated power supply), motor current up to 5A peak, two control inputs for UP/DOWN, and two limit switch inputs (normally closed). The controller must include a dead-man’s switch (require continuous button press) and a current sensing circuit to detect motor stall or overload. We also need an H-bridge driver capable of 5A continuous, with built-in shoot-through protection. The design must handle a 10ms debounce time for switches.
Step-by-Step Design Process with Calculations
First, select the H-bridge. A common choice is the DRV8873 from Texas Instruments, which can handle up to 8A and has integrated current sensing. Calculate the sense resistor: for a 5A motor, we want the sense voltage to be 0.5V at full current. Using Ohm’s law, R_sense = V_sense / I_motor = 0.5V / 5A = 0.1 ohms. The power rating is P = I^2 R = 25 0.1 = 2.5W, so use a 3W resistor. Next, design the input circuit for limit switches. Use a pull-up resistor to 3.3V (microcontroller logic) and a series resistor to limit current to 1mA: R_pullup = (3.3V - 0.7V) / 1mA = 2.6k, choose 2.7k. The series resistor R_series = 3.3V / 1mA = 3.3k. For the dead-man’s switch, implement a software timer that requires the button to be held for 100ms before enabling the motor. This prevents accidental activation.
Component Selection Rationale for the Complete BOM
The complete BOM includes: Microcontroller: STM32G030F6P6 (low cost, 32-bit, with hardware timers for PWM). H-bridge: DRV8873 (as above). MOSFETs: CSD18537NQ5A (60V, 10A, low R_DS(on) for efficiency). Current sense resistor: 0.1 ohm, 3W, wirewound. Limit switch inputs: 2x 2.7k pull-up, 2x 3.3k series resistors. Power supply: Mean Well LRS-100-24 (24V, 4.5A). Protection: TVS diode SMCJ24A (24V bidirectional) across the motor terminals. User interface: Two tactile switches with 10nF capacitors for debounce. PCB: 2-layer, 1oz copper, 100x80mm. The rationale for the DRV8873 is its integrated charge pump, current regulation, and fault reporting, reducing external components.
Simulation Tips and What to Look For
Simulate the H-bridge circuit using LTspice. Model the motor as a 24V DC source with a series resistance (2 ohms) and inductance (1mH). Look for shoot-through current during switching transitions—ensure the dead time is at least 200ns. Check the current sense voltage waveform for ringing: add a 10nF capacitor across the sense resistor to filter noise. Simulate the limit switch circuit with a 10ms switch closure: verify the RC time constant (R_pullup C_debounce = 2.7k 10nF = 27µs) is fast enough for the microcontroller’s interrupt. Also simulate a stall condition (motor locked): confirm the current limit resistor (R_sense) triggers the DRV8873’s internal current regulation at 5A.
Prototype Build and Testing Methodology
Build the circuit on a solderless breadboard first, but keep high-current paths short. Use thick jumper wires (20 AWG) for motor connections. Connect the Balt 668AG-CC motor terminals to the H-bridge output. Power the board with the 24V supply through a 1A fuse initially. Test each subsystem sequentially: first, verify the 3.3V regulator output. Then, using a logic analyzer, check the limit switch inputs with a manual press. Next, write a simple firmware that toggles the H-bridge enable pin and runs the motor for 1 second. Listen for abnormal noise or check for excessive heat in the MOSFETs. If the motor runs smoothly, test the dead-man’s switch by pressing the button for less than 100ms—motor should not start. Finally, perform a stall test: hold the motor shaft manually and measure the current limit via the sense resistor voltage. Use an oscilloscope to verify the current waveform is clean and the H-bridge shuts down within 10ms of a fault.
Performance Verification and Optimization
Measure the motor’s actual current draw during no-load (typically <1A) and full load (up to 5A). Compare with the calculated sense resistor value. If the current limit triggers too early (e.g., at 4A), reduce R_sense by 10%. Check the limit switch response time: the microcontroller should stop the motor within 5ms of a limit switch opening. Optimize the firmware loop to use hardware timer interrupts for the dead-man’s switch debounce, reducing CPU load. For thermal performance, run the motor for 10 minutes continuous in one direction (if allowed by the Balt unit’s duty cycle). Measure the case temperature of the DRV8873; if above 85°C, add a small heatsink. Finally, verify the entire system’s compliance with the original Balt 668AG-CC’s mechanical limits by cycling the desk from minimum to maximum height five times. The controller should operate silently and without any jitter or premature stops.

