After our first sprint, we decided to shift from sliding loose leaf pages to flipping pages in a binder. This approach requires only one motor to flip pages forward and allows us to not worry as much about the speed of the motor.
Stepper motors In the code for the stepper motors, we decided to stop using an Arduino library because it was incapable of running multiple stepper motors at once. Even though we decided to only use one wheel, we wanted to move away from this library sooner rather than later, as it would likely hinder our progress again in the future. Instead of the library, we switched to code that turned the coils on and off in the order necessary to rotate the step motor in a counterclockwise manner. By looping this code, we were able to get the motors to move much more consistently than with the library.
Box Moving from our cardboard model, we laser cut our box out of hardboard. We also added our first 3D printed mounts, which held the motors in the proper positions inside the box. We intend to create a reverse function that allows the user to go back a page, so we took this into consideration when designing our box. Having it go backwards would require a motor on both sides: the one on the right for flipping forwards and on the left for backwards. However, when the page is flipped forward, the wheel on the left needs to get out of the way to allow the page to join the stack on the left; therefore, a hole was cut in the box that would allow the wheel to recede into the box to get out of the way. The motor had to have freedom of motion in the pitch direction, so it was mounted on an axle that allowed it to rotate. There was no mechanism to keep it from rotating down into the box this sprint, which is why human intervention was still needed to hold the motor in place.
Pedal We created the first cut model of our pedal by sandwiching a piece of Velostat, a material whose resistance decreases when force is applied, between two pieces of copper tape. When the user presses down on this pedal, the pages will turn.
After our previous sprint, we decided to move away from eye tracking software in favor of beat detection software. Using the open source aubio library written in Python, we were able to record music and find the beats per minute (bpm) of a piece. In the calibration phase, the laptop keyboard acted as our pedal by indicating when a page should be turned while the bpm was analyzed. Whenever a button on the keyboard was pressed, the time at which it was pressed was recorded in an array. Once the piece was completed, the bpm of the piece as well as the array of turning times were saved to a file. In the live phase, this file was read and used to turn the page at the correct time in the music.
Next, we tested the system with a button on a breadboard instead of the keyboard. This closer models our final design, which will use a pedal attached to the breadboard. The system relies heavily on open communication between the Arduino code (responsible for the button and motors) and the Python code (responsible for beat detection). To start the calibration phase, the user presses and holds down on the button. The Arduino then signals to the Python code to start "listening" and detecting beats. Whenever the user presses the button to turn the page, the Arduino again signals to the Python code, which saves the time that the button was pressed. During the live playing mode, the Python code detects the beats once again and signals the Arduino at the appropriate times during the piece. This integration allows for an easy transition from a button to a pedal.
Overall, we integrated the software and mechanical components by using key/button presses, to stand in for the pedal. Once calibrated, the motors will turn by themselves at the defined times during the live-playing mode. We tested this with music played off a laptop and, as seen in the demo video, it works (the motors turn at the correct times)! At this point, we haven't yet added in the swiper and corresponding servo motor, which is why the page isn't being flipped.
Our Main Takeaways
After testing our current mechanical system, we found that our system was not fully reliable. In particular, it would often flip multiple or no pages. To remedy this, we will add springs to hold the wheel firmly against the paper. We will also add rubber to our wheels to ensure better grip on the paper.
Although our beat detection software works reliably with pre-recorded music, it has not yet been tested live. It is imperative that we test the system with live music, as tempo changes in live-playing may make our software unreliable. We plan to test live music by playing various pieces on the piano.
The PowerPoint that we presented in class can be found here: