## 5 The Hardware Implementation of the Dual-Axis-Based Solar Tracking System
### Reconfigurable BILBO Architecture for Stuck-At Fault Detection  
Our previous attempts to devise a configurable BIST framework [64] yielded a hardware configuration that remained separate from the chip's primary design and utilized multiple devices as a CUT [63]. This approach resulted in an augmented presence of logic elements (such as multiplexers, flip-flops, and logic gates) and an increase in power consumption during testing procedures. Hence, this study concentrates on formulating a reconfigurable multiple-input signature register (MISR) derived from the previously outlined BILBO structures for on-chip testing purposes. The implementation process is segmented into various phases, beginning with the analysis of output signals from the motor driver and culminating in the final layout of the ASPCB, which will integrate the BILBO architecture. A more detailed examination of the signals was undertaken in [61] through the development of an online built-in self-test (OBIST) aimed at detecting single bit-flips and single stuck-at faults. Real-time monitoring of output signals from the motor driver was conducted using a Hantek 6022 BE PC Oscilloscope, as illustrated in Figure 9. The captured waveforms apply to most contemporary motor drivers designed for the control of two-phase bipolar stepper motors. The TB6560, introduced in Section 3, is a microcircuit manufactured by Toshiba, featuring a galvanically isolated Step/Dir interface and offering four engine control modes: full-step, half-step, micro-stepping 1/8 step, and micro-stepping 1/16 step. These control modes enhance precision and balance power consumption while moving the mechanical axis of the solar tracking system. Typically, the interface signals for stepper motor drivers are galvanically isolated due to the presence of significant switching currents in power circuits with stepper motors, resulting in high levels of noise and voltage level shifts across all modules in the system's common wires (ground). Galvanic isolation becomes crucial under such conditions. As previously mentioned, the Step/Dir interface serves as the primary control interface for the stepper motor driver, comprising three signals: Step, Dir, and Enable. The Step signal functions as a trigger signal, where each pulse (HIGH value) indicates a single-step rotation of the motor's rotor. It is important to note that a step here refers to the driver's step and not necessarily the minimum discrete movement of the stepper motor. In micro-stepping mode, one step represents only a fraction of the physical step  
Figure 9: Stepper motor driver output signals before (**Right**) and after calibration (**Left**). Distorted waveforms on the right become flat signals on the left after probe compensation. of the motor. Typically, motor drivers respond to signal edges, and the frequency of the Step signal, as depicted in Figure 9, determines the rotational speed of the motor. Both the maximum Step pulse repetition rate and minimum pulse width are constrained, usually dictated by the capabilities of the motor driver. The actual rotational speed of the motor is constrained by factors such as winding current, mechanical loads, inertia, etc. The Dir signal indicates the rotational direction of the motor. Generally, a high signal level implies clockwise rotation, while a low signal level indicates rotation in the opposite direction. The Enable signal is used to activate the motor driver, with the disabling signal level merely removing voltage from the output without affecting the driver's logic. Hence, the Enable pin can stop the motor without maintaining the current flow. The motor driver can operate even with a low signal level (no input voltage). Additionally, a Relay signal was incorporated in the present study to switch between the two stepper motors controlling the solar tracking system. When a HIGH signal is applied to the relay module's input, the system switches to horizontal stepper control.