Software apps and online services
Hand tools and fabrication machines
In the ME 461: Computer Control of Mechanical Systems course at the University of Illinois at Urbana-Champaign we had to design and build a mechatronics project that incorporated a Texas Instruments MSP430 micro controller. For our project we decided to build a ball trapping mechanism that trapped a ball as it rolled down a ramp. To accomplish this, we designed a system that utilizes a section of 90-degree PVC ramp, a 5V linear solenoid, 3 QTR-1A reflectance sensors, custom 3D printed parts, and a MSP430 microcontroller.
The section of PVC ramp is supported by one end with a wooden stand and has multiple 3D printed brackets mounted to support all of our hardware. We mounted a T-slot profile beam from the company MakerBeam to the ramp so that we can use nuts and bolts to fix the locations of our 3 QTR-1A reflectance sensors. At the bottom end of the ramp we have our solenoid mounted to the T-slot beam, interfaced to the MSP430 with use of a TIP1226 transistor. A custom 3D printed "plunger" was mounted to the head of the solenoid. Our MSP430 was soldered directly on to a PCB board and is not mounted directly to the ramp.
The system uses the MSP430 micro controller to interface with all connected components. The micro controller reads data from each QTR-1A reflectance sensor and subsequently gives commands to the solenoid. The QTR-1A reflectance sensors produce a digital I/O signal. The final version of the project uses the two reflectance sensors to get a time difference that the solenoid timing is based off of. In order to know the precise time to trigger the solenoid and catch the ball, data was taken with the use of a third sensor placed where the solenoid is located. The ball was repeatedly rolled down the ramp at different heights and initial velocities. The data was then processed by plotting the time difference between the first and middle sensor vs the time difference between the middle and last sensor. A best fit line was then added to the data in the form of a second order polynomial. The results of the testing are shown in the figure 3 below:
Now that data was collected, the sensor placed by the solenoid was no longer in use and the resulting 2nd order polynomial equation was implemented into the MSP430's code. There are interrupts on each sensors, such that as the ball rolls past each sensor the time (in milliseconds) is saved into a variable, and the time difference is calculated between the two sensors. This time difference is then put into the experimentally determined equation and the output is the time from the second sensor in which to trigger the solenoid. When the timer reaches this time, the transistor controlling the solenoid is switched off, releasing the solenoid and successfully trapping the ball.
Since the solenoid is a one way solenoid it has to be reset by hand. Additional code was added to allow the user to reset the process and roll the ball again. Pressing a button, or rolling the ball back up the ramp will reset the solenoid and allow for an additional roll.
Increasing the top speed in which system could still catch the ball was first attempted by implementing a third order polynomial to the test data. The top speed was not successfully increased, and this makes sense because the r-squared value representing how well the equation fit the data barely increased, from 0.9987 for the second order polynomial to 0.9994 for the third order polynomial. Since the r-squared value for the second order fit was already a near perfect fit, there was no need to implement the third order polynomial in our code.
Next, in order to attempt to increase the top speed of the ball without failure, the sampling rate was quadrupled from 1 ms timing to 0.25 ms timing. Again this did not have an effect on the max speed the ball could roll. Through further testing, it was apparent the physical properties of the solenoid was the limiting factor. When extended, the solenoid was no longer rigidly connected to the base, such that at fast speeds the solenoid was triggered at the correct time but allowed the ball to slip out due to the horizontal movement of the solenoid shaft.
Overall our project was successful and does what we intended on creating. Areas of improvements towards the design that we see is that the system will need to incorporate an acceleration reading such that if the ramp angle changes the system will still be able to catch a ball. To accomplish this we will need to add one more QTR-1A sensor in order to calculate two different velocity readings. With this we would be able to calculate acceleration and later implement a multi-variable equation relating acceleration and velocity to the solenoid trigger time. Another solution to a change in acceleration will be to incorporate a accelerometer chip to the system to calculate the ramp's inclination angle to predict the acceleration as well.
Another room for improvement will be to use a solenoid that is capable of extending without allowing movement in the direction of the ball's travel. This would allow the system to catch faster moving balls.
Finally, we will like to thank Dan Block and Chad Li for a great semester, and a successful project.