You are on page 1of 11
Jum cheap Keyboard info @ MIDI Keyboard! (Add NLLport 0 keyboard ‘Ad MIDI Port to Keyboard by EvanKsle(imemberfEvanKsls) Download Favorite Wi Made Here is an 8 minute video with closed captioning that demonstrates all the steps below from start to finish ‘Glick here to watch on YouTube (httpsu/www.youtube,com/watch?v=IXx8v-ZW6TK) S¥inatre @ revcuweton 8 conmant —Oowtoas Step 2: What You'll Need 74HC595 Chips (Serial-Parallel Shift Re $0.15 USD each (lused 2 of these) ‘Ada MID1 Port to Keyboard by Evan te mamberEvankale) [ Faw owrioad Favorite Wi Made Resistors (Few cents foe oT Prototype Boards S7 U S $1.50 fora pack of 10 ‘only used 1) j 3 More Images ’ 1B seonentat ntti —aeeneeneranmennermeii ‘© 1 Arduino UNO, or any Arduino alternative © 2 Serial to parallel shift registers ‘© Resistors (1 2200 for the MIDI port, and 6 10k0 for pull-up resistors - this will depend on step 4) 1 Proto board ‘© 1 Female MIDI port © 1 Male pin header ‘And the tools we'll need are breadboards, breadboard jumpers, a multimeter, soldering equipment and wires. Where to buy ‘Arduino UNO: httpu/amzn.to/2dq4 Mv (httpd/amzn.to/2dq41Mv) «© 74HC595 shift registers: http//amzn.to/2dtémoT (http//amzn to/2dtémeT) « Resistor pack: http://aman.to/2dBuQaw (http://amzn.to/2d8uQaw) « Perfooard: http://aman.to/2cOcN7q (http//amzn.to/2cO @ Ave auesion PP comment Dowload Step 4: Figure Out the Scan Matrix ‘Add Wid| Port eo AU BS aay WEARER (AD. RAKIM PY Ceslstance) reading. Attach the prghRSEo tWwoRinRat QpIMEse an sweep the heyboarcte finc:our keys For my keyboard, | have a 17 pin ribbon, which | concluded to be a 6x11 scan matrix. To fit all the keys on the Arduino UNO, I'll be combining 11 pins into 3 using 2 shift registers. Then our total input pins is then reduced from 17 to 9. (the result ofthis will be different for every keyboard but the procedure will be the same) rst» © rskaueston My comment —_dowioaa Step 5: Setting Up First Shift Register 3 os a a f a a se We'll start with the fist shift register. Wire up the ground and voltage pins as seen in the picture. ‘Then plug in our Clock, Latch, and Data lines and plug it into the digital pins 89,10 of the Arduino. Then we wire up the voltage and ground from the arduino to the board, Run the first bit of test code from the image. Taking our voltmeter to measure the output of each of the data pins, we should 0 voltage for pins that we are shifting out a 0 and positive voltage for the pins we are shifting out a1 FAT» @rskaueston MY comment —_dowioaa isRalpy.Ghein Second Shift Regis! aces yrnmset (Once we have our first shift register working, we're going to daisy chain our second one, Weill wire up the voltage and gnd just lke the first one, then hook up the additional data pin of the first chip to the Data pin of the second chip. Then welll also need to hook up Latch and Clock pins of the two chips (see image). Now we plug in our Clock, Latch, and Data lines again same way as we did before, and make a small change in our Arduino program to accomodate for the second shift register (see image). We should see the same alternating pattern with our data pins from this program throughout all of our data pins. Iyou're wondering which chip comes first, then simply shift out 8-bits of 0's and 8 bits of 1's at a time and check which chip is outputting the signal 5% Maat © Askaiesion PY comment Dawrloas Step 7: Setting Up Resistors Ye Dorion Hook up the power to our second breadboard. We're going to extend the first 11 of our data pins from the shift registers to the second board (see image). ‘Then we're going to bring 6 lines into 6 digital pins of the arduino. We'll need to add a 10k ohm resistor to ground for each of these lines so that we have a pull- down resistor configuration. This will guarantee that we have the signal we want when the switches on the keyboard are open. Asie © rsecueston WY comment dowioas Step 8: Pull Up or Pull Down? Ye (Oor 1 from SR) Yee (always 1) ce (always 0) x0 (0 oF 1 from SR) One thing to note, ifthis direction of current doesn't work for your keyboard, we can switch over toa pull-up resistor configuration by simply doing the following (see the image): « First we remove the voltage and ground connection to the shift registers. ‘Add MIDI Port to RePBESYF ERARREH AURAAESIAROIS IO AMsitive voltage instead of GrOUNFricad Favorite Yi Made ‘And we also want to keep the shift register pins connected just the way they are. «© This will create the pull-up configuration you see in the diagram. WAT? @ Ackavesion 2 comment Dowload Step 9: Add the Keyboard Ribbon Plug the cable ribbon into place, matching the rows and columns of the scan matrix. SY AddT® @ Askaueston Conment —_Dowrloas Step 10: Setting Up MIDI Port By MIDI cut (facing solder lugs of socket) 2200 To microcontroller serial output We're going to wire the serial output pin of the port to the serial output of the Arduino, which is pin 1 for the Arduino UNO. ‘Ada mio Port tc RGD WEE HRSA FRUNEL RIAN valiAge Pins like the diagram. ooynias Favorite 1 Made PF AddT|» —@Askqueston comment Download Step 11: Upload Arduino Program Download the full Arduino code from GitHub (httpsi/oithub.com/evankale/ArduinoMidiPiano) (choose the correct version; pull-up or pull-down) Watch the video from Step 1 at 4:30 - 5:45 to review any necessary changes you need to make to the code in order to get it to work with your specific configuration Ads —@Accauesion PY comment Download Step 12: Testing be To test our keyboard, we'll plug in our MIDI port to the computer and fire up a MIDI monitor program like MIDI-OX. We'll hit all the keys to make sure we have everything wired up correctly Ifyou don't have a MIDI port, you can get get one of these MIDI to USB adapters (see image) for a few bucks. F AddtIe —@Askaueston WP comment —_Doweoas Step 13: Transferring to Proto Board Once everything is working, we're going to transfer everything from our breadboard to the proto board and solder in all the connections. Plug our wires into the Arduino just the way we had it before, and use the male pin headers here tolock them in place. 2yenatre © rskaueston MY comment downoad Step 14: Putting the Keyboard Back Together Asawoireic oes ey. A | | I then traced over the shape of the MIDI and USB ports onto the keyboard case and cut out the hole. added a few popsicle sticks to support the Arduino and proto board and hot glued them in place. AT? © Askavesion comment dowload Step 1 inal Testing Plug itn, fire up a DAW, and give it a try! ‘That's it! If you liked this instructable, then perhaps youl like some of my other projects! You can check them out at Blogspot (http/Amww.evankale blogspot.com), or visit my YouTube Channel (httpy/wmw.youtube.com/evankaled!}) WAT» © Askauesion FY comment Dowlsaa 7 People Made This Project! curveme'stersupport(memberleurveneistesuppot) made it Nizile (memberNzhill) made borat (Imemberonwad2) made it Nesomis (memboriNosomis) made i

You might also like