Subsystem Build & Test
Table of Contents
Team Vision for Subsystem Level Build & Test PhaseOur first milestone was set for February 16th. The goal for this milestone was to have an 8-key prototype finished completely. In some detail, our schedule between now and February 16th is shown below:
This lead to the following plans for the phase:
- We accomplished the following:
- We didn't quite meet the milestone of 8 keys as
we struggled getting a shift register to work
properly. One key is completely done, with the second
(and then additional) being ready as soon as possible
(as soon as we fix the shift register).
- Our overall timeline should not be too adversely effected, as once the shift register is working properly, the additional keys should be a matter of adding hardware. Overall, this issue and any future will continue to be monitored and worked on.
- The mechanical portion is coming out excellently
- We decided how to 'communicate' between the upper-level portion of the server / 'piano program' and the lower level. This will be espoused later in the software section.
- We didn't quite meet the milestone of 8 keys as we struggled getting a shift register to work properly. One key is completely done, with the second (and then additional) being ready as soon as possible (as soon as we fix the shift register).
Test Results Summary
- Main solenoid chassis rests in piano without causing permanent modifications.
- Main solenoid chassis provides various options for mounting the necessary electronic components.
- The mounted solenoid plunger makes contact with the key wippen and retracts back to original position using gravity and attached stopper.
- Mechanically the solenoids can actuate each piano key independently, while final electrical tests are being conducted
- A linear actuator is used to actuate the right side
pedal mechanically. Electronic components have been
ordered and testing is planned.
- Off-the-shelf Raspberry PI Motor Shield (by Adafruit) is going to be used to turn on/off and change polarity/direction of linear actuator.
Live Requirements Document: Requirements Document
Recent Two-Key Test
- Started system integration with 2-key test to start finding potential issues involving all disciplines.
- Solenoids were mounted into the main chassis at a visibly appealing angle and distance.
- PCB board with soldered components for two solenoids was built and connected to screw terminal and PI.
- Test MIDI files were created to pass information along from user interaction GUI code to PCB communicator code functions
- Solenoids move a little bit at expected times from low-level code tests but adjustments should be made to all subsystems.
- Solenoid vertical angle can be potentially lowered.
- Current sense resistance value can be decreased and other parameters will need to be fine tuned.
- DAC IC chip functioning as expected, but shift register chip communication needs to be further explored.
- Overall, progress is being made and positive results will continue to happen in time.
Risk and Problem TrackingThe risks we planned to mitigate through testing during this phase are highlighted in green below. Since we are not running the fully developed programs just yet, the risks are mostly electrical and mechanical at this point especially since the the small scale tests for these two disciplines are very indicative of what the large scale tests will be like.
- Mechanical Engineering
- Linear actuator design was unable to fit under
the piano when already assembled, even though spacing
- Solution: Milled the blocks holding the linear actuator in place to decrease their thickness and ensure an easy fit
- Solenoid base frame is a tight fit into the piano
- Solution: Take material off the sides to improve fit.
- Connecting Rod cutouts are too small, they grind
slightly if its not properly aligned.
- Solution: Use larger endmill for cutouts. This will allow us to have greater adjustability and still have the support.
- Linear actuator design was unable to fit under the piano when already assembled, even though spacing was correct
- Electrical Engineering
- Loose/hanging electrical wires inside the piano
in the testing process.
- Solution: Secure wires with zip-tie or tapes
- Unsure of power consumption, and heat dissipation
of the system.
- Solution: Measurement can be done once the 8-key prototype completed, and the estimate can be make for the overall system.
- Could not prototype PCBs on RIT campus.
- Needed to redesign and order PCBs through external company at a time and money cost
- PCBs will not ID or chain correctly without
custom modifications. There are also not enough
easily accessible test points.
- A redesign and order of more solenoid controller PCBs is necessary
- Initial guess of resistor and capacitor component
values incorrect for quick testing
- Need to fine tune parameters concurrently with testing by re-soldering existing and prepared components in surface mount lab
- Loose/hanging electrical wires inside the piano in the testing process.
- Computer Engineering
- Needed a method to communicate between front-end
portions and back-end portions of the system
- This is to be accomplished using a in-memory database management system for nodejs called LokiJS. This will allow the front-end to add note information that the back-end can then used. This allows operations to be performed asynchronously and without any complex communication.
- The server had a bug that would cause it to crash
if the play song page was reloaded. This is still
being fixed, but a lot of the 'front end' portion of
this phase was trying to fix this.
- It was a particularly difficult bug to track down because the logs were not exceptionally good, and it has to do with the way that memory is persisting regarding the file names and the note arrays.
- Serial Communication with shift register (for
enabling individual key presses) was unsuccessful
- We tried changing the RCLK signal (to push the received serial data to the parallel output) with a less "clever", more reliable method, and were still having problems with bits appearing to be sent twice.
- It is possible to create a "breakout board" exclusively for the shift register using an extra PCB and shift register component with a some soldering.
- Needed a method to communicate between front-end portions and back-end portions of the system
- LokiJS was chosen because it is specifically made for
nodejs, it's in-memory, and the API is well featured.
In-memory means that the database stores information on
RAM first and depends upon RAM as the data storage
method; this is in contrast to traditional systems which
depend on slower hard-disk usage.
- The very largest benefit of this is that data access is significantly faster. Data is available in memory, but is persisted to disk when shutdown with logs and snapshots.
- Our database table setup is expected as follows:
- We have a database table that represents the
state of the piano, with these
- key_number (MIDI note number)
- velocity_updated (boolean)
- note_on (boolean)
- on_start (timestamp of when the note started)
- We have a database table that represents the state of the piano, with these
- More about the database will be fleshed out so implementation can begin. Additional uses may include storing song data persistently after processing a MIDI file, and used as a flexible means to read notes for playback.
- The implementation is necessary to 'connect' the back end and the front end, but the front end and the rest of the system can be tested with the implementation complete
Functional Demo Materials3D Printing Press-Cap fits of Solenoids
Fitting frame into piano with Installed Solenoids
Verified that the Raspberry Pi code is transmitting the intended data to the hardware; pictured below is a scope capture of the DAC configuration data:
In a test program that only sends serial communication (no other processing), we were able to write data sufficient to configure 48 keys in about 630us, much faster than our requirement. This included setting a DAC value on every key, and sending the "enabled notes" bitstream to the shift register.
Successful serial communication with digital/analog converter hardware (it worked on the first try!)
Plans for next phase
TeamWe're considering Phase 2 to be starting on February 16th as this was when our 8-key set was supposed to be due.
- Kristina Hinova
- Mitigate any issues that come up during testing
- Build the rest of the solenoid brackets
- Order longer screws for the linear actuator assembly for a more secure fit
- David Custer
- Mitigate any issues that come up during testing
- Build the rest of the solenoid brackets
- Tuyen Nguyen
- Assist with Solenoid Controller PCB soldering, testing, and calibrating.
- Continuing with power system, manage and provide necessary power to future system.
- Work with Krisi and Ed to get the pedal working.
- Ed Maskelony
- Debug shift register issues
- Implement timed transmission of MIDI notes
- Refactor code to allow more effective integration with the rest of the system
- Work with Kevin on database specifics
- Get the Pi pedal-ready, with I2C control and switch feedback
- Kevin Davison
- Fix the server issue
- Figure out design for LokiJS database
- Implement front-end portions of LokiJS database
- Assist Ed with lower level coding if necessary
- Jared Lowenthal
- Modify and adjust PCB parameters to properly control solenoids
- Redesign PCB to fix potential issues --> order six boards and remaining circuit components including the correct switch for foot pedal
- Support general electrical design and build
- After fine tuning component parameters, and while waiting for PCB/component orders, update block diagram documentation