It is a vital need at this moment to have frequent and consistently effective sterilization of bacteria and viruses in a variety of facilities and homes. It is also evident that in the scenarios where sterilization of walls and floors is concerned, there are simply not enough manhours available to consistently clean walls and floors by hand at repeated time intervals. This is especially true in hospitals and hospices, where the available staffing is a precious commodity. The use of a robot to complete these tasks is a workable solution to this problem and would be welcome in thousands of workplaces and homes that cannot afford more complete solutions.
This is a capstone project completed by a team including Harris Godwin, Garrett Mccarty, and myself for the Electrical Engineering Senior Project course under the instruction of Dr. Cyril Okhio at Kennesaw State University. The team would like to acknowledge a debt of gratitude to Dr. Cyril Okhio for his constant support of the team's efforts and his indispensable guidance, Dr. Hai Ho for his wealth of knowledge and experience he has offered, and Texas Instruments for providing their Robotic Systems Learning Kit for use on this project. Additional thanks also goes to the students of the KSU 3D Center for their assistance.
Objectives and Design CriteriaDuring the Fall 2020 semester, the team set out to design, build, and test an autonomous disinfecting robot. The fundamental design goals were to build an autonomous mobile robot based on the Texas Instruments Robotics Systems Learning Kit (RSLK) Max Edition that is capable of the following. The robot must safely disinfect a confined space for a finite period of time, and disinfection must occur effectively on nearly every surface nearby. The team eventually settled on aerosol disinfection as the mechanism to meet this challenge.
In addition to the TI RSLK and its associated components, the design of an aerosol can actuation system is critical to the operation of the robot. To secure the cans and actuator system, a structure was called for that would have a small footprint and be robust enough to effectively support these components. And to test the system for its functionality and effectiveness, a test course modelled after the Q-103 classroom in the Engineering Technology Center at the Marietta campus of Kennesaw State University was constructed.
ComponentsAt its most basic level, the robot needed to include the TI RSLK, aerosol disinfectant cans, an aerosol can actuator system, a support structure for the cans and actuator system, sensors, and a power supply.
The TI RSLK Max Edition includes the Romi chassis and wheels from Pololu, a power distribution board, which includes two TI DRV8838 motor drivers (used to drive the left and right motors), the MSP432 LaunchPad board, two gearmotor and encoder assemblies, left and right bumper switch assemblies, and a 400-point breadboard, as shown below. The power distribution board in the fully assembled robot makes direct connections from analog and digital signals to the appropriate GPIO pins.
A battery compartment sized for six AA batteries is built into the bottom of the Romi chassis for direct connection to the power distribution board for remote power.
Components that were acquired outside the TI RSLK Max Edition are as follows.
Sharp GP2Y0A21YK0F analog distance sensors were acquired in an RSLK upgrade kit available from Pololu. IR sensors are a viable and inexpensive option for basic obstacle detection and distance measurement. This kit is shown below.
The aerosol can actuator system was critical to the design and core functionality of the robotic system. For this design phase, we analyzed current state of the art aerosol disinfection technology available. We decided to use two continuously-spraying push-button aerosol cans and an electromechanical actuator system. An electromechanical solution for aerosol deployment was found within the Uline Air Freshener Dispenser. Appropriating the motor-gearbox system and mounting bracket within (shown below) served as a perfect starting point of the actuator system design. Two of each Uline unit were acquired for each actuator subsystem.
The team determined that the bracket accepts almost any aerosol can universally. This system contains a 3V brushed DC motor coupled to a gear set with an actuating hammer at the end. Testing showed that application of a +3V input signal to the motor results in the development of sufficient torque to actuate several cans with different pushbutton cap designs.
The Texas Instruments DRV8838 motor driver is used to interface the above motors to the embedded system. This is a surface mount component, so it was necessary to to either source an assembled board with this component or to design and order a custom PCB with through-hole terminals. A solution was found in the DRV8838 motor driver carrier from Pololu, a breakout board with through-hole terminals with the DRV8838 motor driver. Two of these (shown below) were acquired for each actuator subsystem.
After evaluating several aerosol disinfectant cans on the market, the team decided to use two cans of Eon Sanitizing Mist, because of its small footprint and its relative effectiveness in killing and deactivating bacteria and viruses. The choice of using a smaller sized can is crucial so the robot is able to continue moving with minimal impact on speed or stress on the support structure and chassis. Hypochlorous acid is the active ingredient of this disinfectant (shown below).
The final component of this robotic system is the support structure to secure to secure the aerosol cans and actuator system. This component (shown below) was designed collaboratively by the team and 3D printed.
The layout of this robotic system is shown in the below block diagram:
The bumper switches and the tachometers are not interfaced in the final robotic algorithm.
DesignThe actuator system was the first subsystem the team designed. Appropriating the motor-gearbox/bracket assembly provided a constraint on the system that served as a steppingstone to many other design considerations inside and outside the embedded system. Interestingly, an aspect that was not constrained by this selection of parts was what kind of aerosol can would fit with this system, as the can-securing brackets accept any aerosol can universally. Though, the larger the can size, the more robust the support structure for the cans and actuator system was required and possibly the more power drawn from the six on-board AA NiMH batteries.
The team worked through several conceptualized designs of a support structure before arriving at one that that satisfies the following criteria. The cans must be oriented such that the aerosol spray is facing toward the back and slightly to the sides of the robot, so the spray patterns of each can do not interfere. And the cans must be inclined so that the disinfectant spray does not deposit on the robot, but not so much that the vertical range of the spray is too limited. The final 3D model for the prototype of this structure is shown below:
This project was principally based on engineering a single embedded system that interfaces the MSP432 microcontroller with external components like motor drivers and sensors, namely the IR distance sensors which are used for wall-following behavior and obstacle detection.
The curriculum developed by Dr. Jonathan Valvano for Texas Instruments to complement the TI RSLK proved to be of great value to the team to push through the initial robotics learning curve and to get a high quality refresher course on embedded systems principles. This curriculum demonstrates the many possible robotics applications that the RSLK can be used for. Dr. Valvano's "Embedded Systems: Introduction to Robotics" was also consulted during development and is recommended as well.
The MSP432 chip is compatible with Code Composer Studio and is an ARM M Cortex microcontroller. The design of the robotic algorithm is implemented using digital control systems. A multitude of GPIO pins and timers used to implement the algorithm required careful planning and oversight.
The actuator system uses two separate PWM signals connected to the enable inputs of both motor drivers and a single phase signal connected to the phase input of both motor drivers. And both motor drivers are supplied with 3.3V logic power and motor power directly from the terminals of the battery pack on the Romi chassis. The signal routing is shown for one motor driver below:
The core behavior of the robot implemented for navigation of the test course is wall following, corner turning, and obstacle detection. The IR distance sensors are critical to wall-following and obstacle detection. There are three of these--the left sensor, the center sensor, and the right sensor, as shown below:
Each of these sensors output a 0 - 3V analog signal that is wired to its respective channel on the 14-bit analog-to-digital converter (ADC) on the MSP432. These sensors are inherently noisy, so low-pass filtering is implemented with an analog low-pass filter and digitally after conversion with an averaging algorithm. Within the main algorithm, these signals are converted to a 14-bit value, low-pass filtered, and converted to a value in millimeters using calibration constants particular to each individual sensor using a periodic interrupt that continuously updates readings at 2000 Hz.
The sensors have a range of measurement from 70 mm to 800 mm. The sensors are calibrated with the understanding that the measured distance X from the IR sensor to the wall has a hyperbolic relationship with the 14-bit digital value n for X-values ranging from 80 mm to 400 mm. That is,
where A and B are calibration constants. The calibration process involves measuring the actual distance from the sensor to a wall and reading the IR sensor's 14-bit value n corresponding to this distance. This was repeated for 17 data points over this range. These data points were used to implement a linear regression to obtain the above linear equation, wfrom which the calibration constants A and B are obtained.
The time constant of a simple low voltage DC motor calls for a PWM signal with a frequency of 100 Hz. Wall-following motion is implemented in a closed loop control system via a periodic interrupt being called at a frequency of 100 Hz that dynamically adjusts the duty cycle of the left and right motor driver enable signals, which are 100 Hz (period of 10 ms) PWM waveforms. This is necessary because the time constant of a motor is about 50 – 100 milliseconds. To contrast, the ADC reading and conversion periodic interrupt is set to operate at a frequency of 2000 Hz to ensure precise control. This is a proportional closed loop control system which receives a digital feedback signal (value XR plus a constant CR that gives DR, the distance from wall, through the line of sight of the right sensor, to the center of the robot), calculates error between the distance DR (shown below) and the input step command, adds/subtracts a proportion of that error value to a base duty cycle of each motor for updated left/right motor duty cycles, and instructs the robot to adjust the left and right duty cycles accordingly.
In addition to the functionality described above, the controller interrupt also uses two commands that set conditional flags based on inputs from the center and right sensors that are used for additional controls to handle two corner-turning scenarios. In the first scenario, the robot is following the right wall and the wall turns left (inside corner), and in the second scenario, the robot is following the right wall and the wall turns right (outside corner). In the inside corner scenario, the robot approaches the front-facing wall head-on, triggering the flag based on input from the center sensor. And in the outside corner scenario, the right sensor is telling the robot a significant increase in value XR has occurred and the conditional flag is set. In both instances, within the main program, the conditional flags trigger commands that rotate and translate the robot by extremely small amounts determined by time delay commands. And because the controller interrupt is called at 100 Hz, the motion appears smooth to the human eye.
The actuator system similarly uses two 100 Hz PWM signals for each motor driver carrier. To meet the 3V rating of the actuator system motors, a duty cycle of about 40% is required, assuming the batteries supply voltage to be about 7.5V on average. Unlike the dynamically adjusted duty cycles of the left and right motors, at any time the duty cycle of the input PWM signal for each motor driver carrier interfacing the a 3V motor is either a single constant value or zero, and thus the software implements a simple open-loop control system for the actuator system at runtime.
A separate timer is used to initialize a periodic interrupt that sets or clears a conditional logical flag used to implement the alternating can actuation at a time interval of half a second, in a method similar to the strategy of the corner-turning code. The periodic interrupt reads the flag, turns one can actuator off by making the duty cycle of the corresponding PWM input signal zero and the other can actuator on by making the duty cycle of the corresponding PWM input signal a single constant number (a high flag turns off the left can actuator and turns on the right can actuator, and for a low flag, vice versa), and toggles the flag every half second. Interrupts must be designed to have a very small timing profile to avoid performance degrading impact on the robotic system, and the actuation commands described have extremely small time delays and thus no significant impact on system performance, so the commands are placed within the interrupt.
The program is also designed to stop after a finite period of time. The program uses a counter variable that increments every half second using the periodic interrupt for alternation of the can actuators. A count of 500 is used to implement a stop time of 4’10”, which is more than enough time for the robot to completely traverse the test course. The left and right turn handling commands are placed inside a while loop within the main program that repeats until the counter variable has reached 501. The program subsequently disables all interrupts and stops every motor.
ConstructionThis TI RSLK itself was fully assembled with instructions provided by Pololu and Texas Instruments, who partnered together to produce the RSLK models. Soldering was also required to connect certain header pins to through-holes on the power distribution board. The same was required of the two DRV8838 motor driver carriers from Pololu used with the aerosol can actuator system. And jumper wires were soldered to the leads of each aerosol can actuator DC motor.
The support structure for the aerosol cans and actuator system was drawn in Solidworks and 3D printed using the services provided by the Kennesaw State University 3D Center at the Marietta campus. This support structure was secured to the Romi chassis by cutting out double-sided mounting tape capable of supporting 15 pounds to the size of the feet of the four pillars as shown below:
Similarly, the cans are also secured to the ramps using the same double-sided mounting tape attached to the curved surface of each ramp and cut to size.
A portion of the rear right-side pillar also needed to be filed away to allow for access to the USB port as well, shown below:
The robot test course was modelled after classroom Q-103 in the Engineering Technology Center at the Marietta campus of KSU. The scale model of this classroom was constructed using 2x4 wood planks cut to to the appropriate sizes as required by the specifications shown in the drawing below, where the robot is represented by the blue circle:
Benchmarking and tuning the performance of the robotic system required a mechanical load analysis, IR sensor calibration of each sensor, power budget, and algorithm testing on the test course.
The mechanical load analysis was first performed on the support structure to test the motor speed under various load weights using a set of calibration weights. Weights were placed on the support structure without the aerosol cans, and a simple forward motion algorithm was loaded as shown below:
Six tests were performed starting from zero load weight, then incrementing by 50 grams until the final test using a 300-gram load. Tachometer data from both the left and right motor encoders were gathered and used to calculate the motor speeds, and subsequently exported to an Excel file. The below figures illustrate the results of the six tests. Although the data are noisy, it is clear that the average motor speeds slightly decreasing as load weight increases.
The calibration constants of the three IR distance sensors were calculated using the above-described process of measuring the actual distance X from the sensor to the wall, recording corresponding n-values, and calculating a linear regression. The resulting linear regressions are shown below with the hyperbolic equation given along with the R-squared value associated with the linear regression, and n can be any integer between 0 and 16, 383:
An approximated power budget was calculated as follows. A border was constructed to yield the steady state response seen during wall following with minimal error as shown in below. A digital multimeter was connected in series with the battery supply to measure the current drawn by the power supply.
The current measured was 0.29 A. With six AA batteries rated at 1500 mAh, the batteries drawing the measured current constantly can theoretically supply power for time t calculated below:
It is important to remark that the power budget calculation is a guideline rather than a precise and reliable measurement. As the power supply voltage drops with the power switch on, the average power delivered to the motors decreases without motor speed control, and the current drawn also drops. So, the power budget is a rough estimate.
The process of developing and testing code involved writing and testing "building blocks" of code for integration in a complete robotic algorithm. These include instructions for basic robotic mobility with additional functionality being added progressively through the cycle of development, testing, and tuning. The below videos demonstrate these important intermediate tests.
Among the first functions tested was the forward motion of the left and right motors. In this video, the motors are driven at the same duty cycle and stopped using a software time delay:
An approximate 90 degree turn was tested using an appropriate software time delay with the forward motion shown above. These zero radius turns are the result of driving both motors with PWM signals with the same duty cycle and opposite signed phase signals:
This is a test of both a zero degree turn and backwards motion. Backwards motion is the result of applying a logical high signal to both of the phase inputs of the left and right motor drivers:
In addition to the basic robotic mobility coded as above, we also interfaced the bumper switches with the robotic system allowing for collision handling to occur with a simple edge-triggered interrupt. This however was not critical to the functioning of the robot in the final algorithm, so it was not included in the complete code. Here the robot is programmed to reverse, turn around, and continue moving forward upon actuation of a bumper switch:
Below is a test of wall-following code that instructs the robot to maintain a constant distance from the wall:
Increasing the proportional gain Kp results in a more responsive system, but with increased overshoot. Here this adjustment was made, and the overshoot is seen in the "wavy" motion of the robot:
And below is the testing of aerosol can actuation. In this code, the can actuators are programmed to turn on and off at the same time, which was not the intention of the final algorithm, but the functionality is still here to observe:
Key to the core functionality of this robotic system was the testing of a robotic navigation algorithm that handles complete and smooth traversal of the model classroom through wall following. To successfully navigate the course, various parameters of the robot’s control system had to be fine-tuned. A balance between speed and turning accuracy had to be achieved by tuning both the motors’ duty cycles as well as the controller’s proportional constant Kp.
Tuning the code for right turn handling in particular was a critical challenge that called for a cycle of testing, tuning, re-testing, and further evaluation. The difficulty faced was knowing when and if the right IR distance sensor sees the edge of the wall and how it responds to that input as shown below:
In the above figure, the red line shown is the previously described value DR from the center of the robot to the point measured by the right IR distance sensor. The robot is shown at two different instances of time marked by two distinct conditions—the value XR, the distance from the right sensor to the next measured point, has not gone above a pre-defined threshold established in the code (lower illustration) and the value XR has increased significantly to some arbitrary value (upper illustration). When the robot has reached the second condition, it is time for the controller to update the conditional flag that triggers the series of commands for clockwise rotations and translations. It was thought that at this moment the value XR would increase nearly discontinuously. This was often not the case due to the erroneous nature of faraway IR distance sensor measurements. So, this threshold XR value was among the parameters that were adjusted many times, along with the time delays used for the small rotations and translations in the corner-turning commands. The below video illustrates just one of many failures observed while testing the right corner turns:
It was clear during testing that the robot struggled to handle turns around the narrow “corridors” of the test course, as the support structure for the aerosol can actuator system was often obstructing the turns. And so, the test course was modified as shown below while still being dimensionally a realistic classroom model.
The robotic algorithm testing continued with the robot in its fully assembled state. After integrating the aerosol can-actuating code for a complete robotic algorithm, testing revealed that two full cans of the Eon Sanitizing Mist were completely depleted after the robot completed a small fraction of the course. Further testing was conducted despite this occurring, as the robotic algorithm demonstrates the robot’s functionality and expected response.
After the cycle of testing, observation, tuning, and re-testing was complete, we had a robot that was capable of traversing the course completely and then some. The total runtime is 4' 10", and the robot shuts down. In this video of the complete traversal, you can observe that the cans are indeed empty, but the actuators are alternating every half second:
ConclusionsWhile the final robotic algorithm testing was conducted with empty cans, the results delivered reflect what this robotic system was designed to do, and the functionality and performance of the robot are sufficiently demonstrated in concept and execution. The robot can be expected to meet the fundamental goals of design.
The robotic algorithm required a cycle of re-testing and adjustments, but it can be said that the response is overall smooth and reasonably predictable. The team acknowledges that there are certainly changes that could improve the response.
Future development of this project could expand in different directions. There is room for further refinement of the robotic algorithm and system responses. Speed control and the use of tachometer data can be used to make the motor responses more predictable and precise. Additionally, the robot can be re-engineered or modified to fit larger cans of aerosol disinfectant to ensure that the contents of them are more than enough to be used in a complete circle through the test course. And instruments can be added to improve the user experience, such as an LCD screen that gives useful feedback to the user, load cell sensors that can measure the emptiness of the aerosol cans so that the user can be notified when they need to be replaced, and superior sensors such as LiDAR sensors that can be used for more accurate measurements and even a room mapping algorithm.
Comments