Subsystem Build & Test
Table of Contents
Team Vision for Subsystem Level Build & Test PhaseDuring this phase, we planned to fix up the solenoid rack spacing and clearance without blocking keys from playing and front panels from fitting. Also, on the coding side, we wanted to create a file that could parse the notes out of a MIDI file and turn it into a format that could be passed into the microcontroller & send the signals to corresponding solenoids.
The solenoid circuit was finalized and fixed using opto-isolators that kept solenoid signals separate from each other. Also, the program to parse MIDI files was created & turned into a 2D array format that will send a velocity value to the corresponding key’s solenoid when activated.
Test Results Summary
Electrical System Testing
- Created wooden test rack to quickly test power delivery, control of the solenoids, and check temperatures after running for a long time using PWM IC. Addressed issues with solenoids firing altogether instead of individually with an opto-isolator. It was found that up to 10 solenoids could be fired simultainously at the maximum volume. It was also found that after an hour of play, The solenoids reached a temperature of 150 F.
- The Piezo Electric Vibration Sensors communicate thier data back to the Taspberry Pi via Teensy Micro Controllers. That subsystem was designed and tested.
- Serial communication between teensy and teensy,
- Teensie has 5 serial interface
- The teensie has 22 analog pins
- Serial to pi communication,
- Usb will be used in order to communicate to one of the teensies.
- Serial communication will be used to read value and parsed every 2 digits.
- Base Plate
- The base plate and base stands resized to address clearance issues when piano covers are installed. Base plate reduced in width by half centimeter on both sides. Thinner sheet metal (1 millimeter thick) was cut to produce new front stands so that the rack is able to slide in all the way between a thin gap on the right side of the piano. The previous front stand was moved to the middle of the rack to help the new stand withstand the weight of 88 solenoids. The back stands had a half centimeter sheared on the side facing outward as the piano cover would scrape this as it opens or closes.
- Flat Bracket
- Material purchased required more milling than machine shop willing to accept for a single job. Replacement material found that could be cut using water jet. Individual flat brackets removed from ‘stencil’ and excess material removed using belt sander. Flat brackets fit into 8020 rail using the screws and washers ordered. Rail with additional solenoids to be mounted after confirming circuit changes work.
- 3D Printed Press Fit Caps
- Went through some iterations while attempting to modify design such that less glue would be needed to secure caps to solenoid plunger and abs rod. Previous team sized holes at 0.114” (for 0.094” plunger) and 0.145” (for 0.125” abs rod) to be sure there was clearance between cap and plunger/rod.
- Hole size reduced from 0.114” (2.9mm) to 0.094” (2.39mm) to be exact fit for the solenoid plungers. Also reprinted previous version of caps (2.9mm). None of these caps fit the plungers, suspected issue was the settings for/tolerance of nozzle used to print caps. Issue solved by raising hole size size to 3mm.
- Hole size reduced from 0.145” (3.68mm) to 3.5mm to be a closer fit to 0.125” abs rod (3.175mm), had more play than desired.
- The main mechanical subsystem desinged for the sensors was the frame on which they are held. This frame consists of clips which mount it to the piano, and some sort of plate which holds the sensors. The overall problem was brittle material. Retaining clips (portion connected to framing) had to be within a certain size to not slip when load to whole clip. Retaining clips not flexible enough to repeatedly latch to framing without breaking.
- Designed to be placed on fixed brass colored framing and to fit rectangular plate that can fit larger (when compared to hooks) circuit boards and sensors; originally oriented below moving sustain rail.
- Did not have clearance when piano covers mounted. Could not be made shorter (referencing depth into piano) without rectangular plate hitting backcheck (wooden piece with red highlight that is inside curved portion of clip; see #23 here: http://www.concertpitchpiano.com/UprightActionModel.html)
- Retaining clip portion was not long enough as curve in framing was not accounted for. Weakness of retaining clip portion discovered. Clips broke under regular effort from a person.
- Redesigned such that clip would now rest on section of framing above the sustain rail and top retaining clips made longer to account for curve in framing.
- Continued having issues with strength of retaining clips. Clips scrapped in favor of hooks.
- First printed design to go on hammer rail. The hook section was too thin, it did not fit around the rail.
- Second design to go on hammer rail. Hook wide enough, but slid around. Need hook to be fitted on hammer rail to survive movement caused by sustain pedal.
- Fitted hook stays in place when sustain pedal used and fits on hammer rail.
Risk and Problem Tracking
- Mounting Rack
- Discovered the previous team designed the rack to fit with 87 keys in mind instead of 88.
- They had taken out a key of the right most side and placed the stands of the rack there. When opening and closing the cover that is placed on the keys, the wooden cover would scrape on the mounting and not open all the way. The current mounting rack was also too low and would jam the mechanism that moves the hammer. These problems were fixed with a lot of readjustments. First, the long aluminum plate and back stands were sheared and new thinner front stands were made. Lastly, the previous front stands were moved to the middle and the entire rack was raised by about an inch.
- Discovered that we were unable to play solenoids separately after assembling wooden test rack and designing prototyping circuit for stress testing. Solved issue by adding opto-isolators to circuit as previously discussed in MSD1.
- Opened 7-inch monitor and tested circuit to find issue preventing video from raspberry pi from being shown. Socket for power adapter seemed to be the problem as monitor has been working since soldering power cable directly to circuit.
- Stress testing solenoids showed temperatures above scorch point of wiring shielding and transition point of PLA (only material available for 3D printing) from solid to glass. Recorded power draw higher than suggested by data sheets. Unable to create thermal simulation for regenerative design using autodesk products, autodesk support could not find fault causing simulation to fail. To retest when solenoids connected to 8020 framing to see if frame acts as better heatsink and if temperatures can be controlled with passive cooling. To decide whether power supply is suitable for instantaneous power draw for number of solenoids to be played simultaneously. If not suitable will make recommendations to successive team in final write-up addressing how we tackled customer/engineering requirements.
- Solenoids currently heat up to 150 degrees Farenhight after 20 minutes of continuous operation (firing every half second). They could heat up faster depending on voltage given (volume desired) and with 88 of them close together, may need a cooling solution.
- Status: Holding rack successful (stays in place when sustain pedal pressed),
- Code to read from sensors is also complete, Teensy
- MIDI Parser
- It was important when testing the MIDI parser to ensure that the notes from the 2D array would play at the exact time in the song that they were supposed to. This required that the length of each tick (⅓ beat) was calculated properly depending on the given playback tempo, and that the solenoids played each note at the expected pace without delays. The MIDI parsing code was completely rewritten for this phase using a parsing library called MIDO. Instead of a JSON format, each message is processed into a 2-D array where each row represents a MIDI ‘tick’ or incremental time delay, and the columns represent the PWM value of each key at a certain time. The code sleeps until a new tick should be run and then sends each value in the given row to the PWM IC so it can change the voltage values. The system is fairly simple in its current iteration but very inefficient in its use of memory, as the vast majority of the entries in the array are redundant and unchanging. Future improvements to the system include only storing rows when the key volume changes, as well as storing “delta” vectors where only the keys who are changing are given a place in the column.
- The timing system that makes sure that the keys are played when they should have not been tested thoroughly, though we are fairly confident in it. Other systems have been evaluated as back up options in case Python’s native timing systems are not sufficient, such as using MIDO’s built in ‘play’ function which uses a more robust timing system at the cost of not being able to preprocess data.