For our ME461: Computer Control of Mechanical Systems course at the Grainger College of Engineering at the University of Illinois we were given an open ended project to design something using what we had learned all semester. We decided to make a money counting machine which will recognize the denomination of bills as well as count them. This was done by using a servo motor to initiate the movement of the bill, followed by two motors which are used to keep the bill in motion as it moves past a distance sensor and a camera. The Orange Pi is used to read the video feed and determine the color of the bill. This is then sent through i2c communication to the MSP430 which will add the value of the bill when the distance sensor is triggered.
The design of our hardware had the goal of being able to load in a stack of bills, which would then individually be counted. Unfortunately we were unable to get this mechanism to function as desired consistently. One way to improve on our design is to add a clutch which could modulate the pressure applied to the bills. Once a bill is in motion it moves along a track which was 3D printed. We were unable to print this component as one piece due to printer constraints. This track also features cutouts to place the motors in to ensure that they are appropriately positioned. Finally a hole was cut in the back of the track to make room for the distance sensor. Given the distance sensor's range is very small we had to make sure the paper slides by directly on top of it. Another design change which we would make in the future is to move the location of the distance sensor to directly below the camera to get rid of any timing issues. We would also have liked to build a housing around camera portion of the track to make the lighting more consistent.
Our code structure was built off of the utilization of states in C. There are 4 major states in our design. The first is a waiting stage. In this stage the system is waiting for a button to be pressed. Once it is pressed the system enters stage two where the servo motor moved 180 degrees forwards, and the other motors are started. This causes the system to move to state three where we are setting the servo back to its initial position and awaiting the interruption of the distance sensor. Once interrupted the MSP430 will display the denomination of the bill. Finally the motors stop spinning, the total money counted is displayed, and the state returns to state 1.
Overall our project was a success. Our system ended up functioning largely as we intended. There are minor changes we would have liked to make to make our final project a bit more photogenic, but we are very proud of our work. It ended up being a more complex project than we expected, and one which combined a lot of what we learned through out different labs. It combined camera vision, i2c communication, servo motor control, and motor dc motor control. Here is a video of it functioning.
We would also like to thank our Professor Dan Block and our TA Chad Li for a great semester full of learning and for their assistance with this project!