Launchpad || DIY or Buy || Keyboard Matrix & MIDI Tutorial
Here is the reformatted text:
**Launchpad Review**
A while ago, I ordered myself a Launchpad.
This so-called Launchpad, which in my opinion not only features a rather decent build quality for only 70 euro, also offers a total of 64 square push-buttons and 16 round push-buttons.
By connecting it to a computer through its micro-USB port, the push-buttons can, for one, light up. But they can also be used with music software like FL Studio to play back certain tones.
This way, you can, if you're talented enough, create music - which does not sound that nice in my case. Because, hey, I'm an engineer and not a musician.
WEBVTTKind: captionsLanguage: enA while ago, I ordered myselfThis so-called LaunchpadWhich, in my opinion, not only features a rather decent build quality,for only 70 eurobut also offers a total of 64 square push-buttonsAnd 16 round push-buttonsBy connecting it to a computerthrough it's micro-USB port,the push-buttons can, for one, light upbut can also be used with music softwareLike, for example, FL Studioto play back certain tonesThis way you can, if you're talented enough,create music, which does not sound that nice in my caseBecause, hey, I'm an engineerAnd not a musicianBut, just search for "Launchpad" on youtubeto see what kinds of amazing thingsyou can do with it.Anyway, while playing around with the LaunchpadsI was starting to wonder, how exactly, the push-button matrix works.And what kind of dataIt sends over to the computerso in this episode of "DIY or Buy"I will not only show you how I mechanicallyand electrically built my own Launchpadin order to find out weatherDIYing such a device is worth itBut I will also talk a bit about a keyboard-matrixand MIDI, AKA:"Musical Instrument Digital Interface"Lets get startedThis video is sponsored by JLCPCBWhere you can get 10 PCBs for only $2With 24-Hours express turn-aroundTheir focus is high-quality PCBsFor a low priceWhich you can get delivered within a weekThe first thing to figure outWhen it comes to recreatingSuch a complex electrical deviceIs a planSince i wanted to keep things simpleI kicked out the round push-buttons, from my designAnd reduced the number of square push-buttonsfrom 8x8 to 6x6For the outer shell, i wanted to use regularPLA filamentBut, a semi-flexablefilament called "Poly Flex", for the buttonsSince it is more comfortable to pushAnd also, more translucent for the LED lightsAnd speaking of LEDs, I will be using"WS2812" LEDsSince they only require 1 data pinBesides 5 volts, and groundIn order to controlAll 36 mandatory onesWhich saves us, a few I/O pins of the Arduino NanoMicrocontrollerMost of the other Arduino pins will be connectedTo the keyboard matrixWhich I will talk about in detail laterFor now, all I needed to know about the matrixthat i will be using thoseRather big, tactile switchesWhich come with a little plastic hatHere began, the most complicated part thoughSince we had to precisely measure all the componentsand create a mechanical blueprintthere will be 2 Perf-Boards on the bottomThat are mounted to the enclosures insides with screwson those Perf-Boards are all36 tactile switches soldered on towhose hats are close to the upper3D printed button mats3D printed prisms will be positionedbetween the tactile switch rowsOn to which the LEDs will be mountedto illuminate each button at an angleSounds complicated at first, but while looking backThis design idea worked out pretty wellNow with my blueprint in mindMy assistant created a 3D modelWith one to 3D design for the main enclosurethe lid, the six prisms, andthe push-button matsSo i started off by 3D printing thesemi-flexible mats, whose first attemptwas a big failuresince the extrusion speeds was too highBut after decreasing it to 39% for the second tryThe print turned out successfulBut was certainly not easy to remove from the build platormAll the remaining prints required less attention from me during printingSince they were created with easy to handle PLA filamentWhose quality was prettyawesome to loo at after I removedall the support materialbut anyway, after cleaning-up the mat as wellIt was assembly timeWhich i started off by inserting the mat into the main enclosurenext, i pushed all 6prisms into the cavities inside the enclosureand moved on by cutting 36 individual"WS2812" LEDs from a long stripwhich I obviously tested before-handThen I marked the start LEDand the direction of each LED's data, on each prismWhich resembles a snake patternAfterwards I removed the prismsand used superglue to mount each LED withthe correct orientation, in the designated spaceindicated by the bigger wiff of the prismas soon as all 36 LEDs were securedI pre-tinned their solder padsand used silvered copper-wire to connect the padsof the neighbouring LEDsOnce that was done, IPositioned the prisms inside the enclosureonce again, in order to determine the lengthof the connection wire between themwhich I then cut into the appropriate lengthneedless to say, I then used this thin0.75mm flexible wireto connect the Ground, 5 Volts, and data padsof the nabouring LED prismsNext I brought in the 2 Perf-Boardswhich featured dimensions of 10x20 centimetresaccording to the size of the enclosure, I scoredthem and snapped a piece of them offIn the horizontal and vertical axisso that they fit perfectly inside the housingafterwards, I reinserted the prismsand did a bit of cable management, before I used superglueto permanently secure them in the cavitiesThrough the help of the Perf-Boards, and a bit of ballastI let the glue dryand afterwards tested whether the LEDs still functioned correctlyWhich they didAt this point, I positionedthe tactile switchesin one half of the button-map,Laid the Perf-Board on top,and marked the position of the switchesI then pushed all the switches, into the marked spotsadded the plastic hatsand positioned them in the enclosure, once again, with a bit of forceAnd as you can see, the switches seemed to work correctlySo I repeated pretty much the same procedurefor the other half of the LaunchpadAs soon as I was sure that all switches worked correctlyI permanently soldered them in-placeAnd connected one side of all the switches in once column togetherWith silvered copper-wireBut, wait... Why am I doing this?Well, lets say we got 36 switchesTo check which one gets pushed,we could connect one side of each switchto a digital input-pin, with a pull-up resistorand all the other switch sides to groundif the switch is not pushed, we get five volts on the digital pinand, if it is pushed, we get zero voltsEasyOnly problem isthat we would need 36 digital-inputs for thatwhich we do not haveThe solutionis to connect one side of the switchin all columns togetherAnd the other side of the switch in all rows togetherNow we can connect each column to an inputwith pull-up resistorAnd each row to another pinwhich means we only need 12 pinsThe procedure is simple as wellWe look at one column, and pull each row down to groundone after the otherIf at one row the inputat the column gets pulled down to groundWe know that this switchis activatedAfter checking all rows, we then move on to the next columnand repeat this processAnd since we go though the scanning process so fastWe can pretty much capture any human button pressI later also added diodes to the ground side of the switchesto prevent ghostingBut feel free to read the keyboard-matrix help articlefrom Dave DribinTo get more information about thatAnyway, like I just describedI created all 6 column linesand then moved on to addinga diode to the other side of eachtactile switchOnce that was done, I reinserted the Perf-BoardAnd created M5 and M4Threads for the enclosures mounting screwsBefore I mark the mounting holes for the Perf-BoardsWhich I then created as well as a feed-through holefor the LED wiresAfterwards, I created a few more cutoutsIn the Perf-BoardsIn order to properly secure them inside the enclosurewith M4 and M3 boltsAt this point, I once again used silver copper-wireTo create all the row connectionsAnd finally, used a bit of0.75mm flexible wireto connect the matrix columns and rowsand the LED wires to the ArduinoAccording to this schemeAfter then mounting the Arduino with a bit of glueI closed the Launchpad up with its lidand M5 screwsWhich means, it was time for programmingTo keep things simple, I utilized the keypad libraryas well as the fast LED libraryIn the code, I simply definedWhich pins are connected to the rows and columnsAnd then used a switch statementTo light up each LEDaccording to its fitting button pressAfter uploading the code, you can seeThat the Launchpad lights upJust like I intended it to doBut, how can we connect it to our music software?Well, this software can only interactwith MIDI controllersWhich, coincidentally, our commercial Launchpad isThe sent Musical Instrument Digital Interface dataConsists of 3 bytesThe first one states weather a note is on or offand which channel we usewith "1001 0000"We sayThat the note is on, and we use the channel "0"The next bite defines which note number we want to playwhich can be 0 to 127The last byte then defines the note velocityWhich, once again, can be 0 to 127You can also easily find a chartWith all available MIDI commands, on the internetIf you're interestedAnyway, for my code, I addedThree "Serial Write" commands to each button pushfor the three bytesand basically only change the note value for each buttonBut, after uploading the codethe software did not recognise our MIDI device yetFor that, we firstly need to installthe "LoopMIDI" softwarein order to create a proper MIDI portand afterwards, we need to start the SerialMIDI bridge softwareand start out data communicationwhich, as you can see, seems to receiveproper MIDI messages, if we push a buttonAnd just like that, we can selectthe "loopMIDI" port, in the FL Studio softwaremap each button of our DIY Launchpadto an instrumentand use it, just like a proper Launchpadnow, of course, it does not feature as muchbuttons, and took a lot of work to createBut I like the fact that I can use it easilyfor other electronic projects, as a controllerThat is why I declare that bothDIY and Buy are this time the winnerBut, what do you think?Let me know your thoughts, in the comment section belowAs always, thanks for watchingStay creativeAnd I will see you next time!