Silicon ChipSimple Linear MIDI Keyboard - August 2021 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Productivity Commission report on the Right to Repair
  4. Feature: Advanced Medical & Biometric Imaging – Part 1 by Dr David Maddison
  5. Project: Second Generation Colour Maximite 2 – Part 1 by Geoff Graham & Peter Mather
  6. Feature: Automated PCB Assembly for Home Constructors by Geoff Graham
  7. Feature: The History of Op Amps by Roderick Wall & Nicholas Vinen
  8. Project: Nano Pong using an 8-pin PIC by Tim Blythman
  9. Serviceman's Log: Rocking Raucous Retro Roland Repair by Dave Thompson
  10. Project: Multi-Purpose Battery Manager by Tim Blythman
  11. Product Showcase
  12. Feature: El Cheapo Modules: USB-PD Triggers by Jim Rowe
  13. Project: Simple Linear MIDI Keyboard by Tim Blythman
  14. PartShop
  15. Vintage Radio: Bush VTR103 AM/FM radio by Ian Batty
  16. Market Centre
  17. Advertising Index
  18. Notes & Errata: Ultra-LD MK.4 Amplifier, July-August 2015
  19. Outer Back Cover

This is only a preview of the August 2021 issue of Silicon Chip.

You can view 39 of the 112 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • Advanced Medical & Biometric Imaging – Part 1 (August 2021)
  • Advanced Medical & Biometric Imaging – Part 1 (August 2021)
  • Advanced Imaging - Part 2 (September 2021)
  • Advanced Imaging - Part 2 (September 2021)
Items relevant to "Second Generation Colour Maximite 2 – Part 1":
  • Second-generation Colour Maximite 2 PCB [07108211] (AUD $15.00)
  • Colour Maximite 2 software and documentation (Free)
  • Second-generation Colour Maximite 2 PCB pattern (PDF download) [07108211] (Free)
Articles in this series:
  • Second Generation Colour Maximite 2 – Part 1 (August 2021)
  • Second Generation Colour Maximite 2 – Part 1 (August 2021)
  • Second Generation Colour Maximite 2 – Part 2 (September 2021)
  • Second Generation Colour Maximite 2 – Part 2 (September 2021)
Items relevant to "Nano Pong using an 8-pin PIC":
  • Nano TV Pong PCB [08105212] (AUD $2.50)
  • PIC12F1572-I/SN programmed for Nano TV Pong [0810521B.HEX] (Programmed Microcontroller, AUD $10.00)
  • Nano TV Pong short form kit (Component, AUD $17.50)
  • Firmware for Nano TV Pong (Software, Free)
  • Nano TV Pong PCB pattern (PDF download) [08105212] (Free)
Items relevant to "Multi-Purpose Battery Manager":
  • Battery Manager Soft Switch PCB [11104211] (AUD $5.00)
  • Battery Manager I/O Expander PCB [11104212] (AUD $2.50)
  • Battery Multi Logger PCB [11106201] (AUD $5.00)
  • PIC32MX170F256B-I/SO programmed for the Battery Manager [1110620B.hex] (Programmed Microcontroller, AUD $20.00)
  • PIC16F1455-I/SL programmed for the Microbridge [2410417A.HEX] (Programmed Microcontroller, AUD $10.00)
  • DS3231MZ real-time clock IC (SOIC-8) (Component, AUD $8.00)
  • DS3231 real-time clock IC (SOIC-16) (Component, AUD $7.50)
  • 2.8-inch TFT Touchscreen LCD module with SD card socket (Component, AUD $25.00)
  • SMD resistor - 15mΩ ±1% M6332/2512 3W (CRA2512-FZ-R015ELF or similar) (Source component, AUD $2.00)
  • Matte/Gloss Black UB3 Lid for 2.8-inch Micromite LCD BackPack (PCB, AUD $5.00)
  • Battery Manager software [1110620B.hex] (Free)
  • Battery Manager Soft Switch PCB pattern (PDF download) [11104211] (Free)
  • Battery Manager I/O Expander PCB pattern (PDF download) [11104212] (Free)
  • Battery Multi Logger PCB pattern (PDF download) [11106201] (Free)
Articles in this series:
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • A Gesture Recognition Module (March 2022)
  • A Gesture Recognition Module (March 2022)
  • Air Quality Sensors (May 2022)
  • Air Quality Sensors (May 2022)
  • MOS Air Quality Sensors (June 2022)
  • MOS Air Quality Sensors (June 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Heart Rate Sensor Module (February 2023)
  • Heart Rate Sensor Module (February 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • VL6180X Rangefinding Module (July 2023)
  • VL6180X Rangefinding Module (July 2023)
  • pH Meter Module (September 2023)
  • pH Meter Module (September 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 1-24V USB Power Supply (October 2024)
  • 1-24V USB Power Supply (October 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
Items relevant to "Simple Linear MIDI Keyboard":
  • 64-Key Arduino MIDI Shield PCB [23101211] (AUD $5.00)
  • 8x8 Tactile Pushbutton Switch Matrix PCB [23101212] (AUD $10.00)
  • Simple Linear MIDI Keyboard PCB [23101213] (AUD $5.00)
  • Firmware for the 64-Key Arduino MIDI Matrix (Software, Free)
  • Software for the Arduino MIDI Shield & 8x8 Key Matrix plus 3D keycap model (Free)
  • 64-Key Arduino MIDI Shield PCB pattern (PDF download) [23101211] (Free)
  • 8x8 Tactile Pushbutton Switch Matrix PCB pattern (PDF download) [23101212] (Free)
  • Simple Linear MIDI Keyboard PCB pattern (PDF download) [23101213] (Free)
  • Simple Linear MIDI Keyboard Joiner PCB [23101214] (AUD $1.00)
Articles in this series:
  • Arduino-based MIDI Soundboard - Part 1 (April 2021)
  • Arduino-based MIDI Soundboard - Part 1 (April 2021)
  • Arduino-based MIDI Soundboard – Part 2 (May 2021)
  • Arduino-based MIDI Soundboard – Part 2 (May 2021)
  • Simple Linear MIDI Keyboard (August 2021)
  • Simple Linear MIDI Keyboard (August 2021)

Purchase a printed copy of this issue for $10.00.

Simple MIDI Music Keyboard BY TIM BLYTHMAN This MIDI Keyboard is a follow-up to our 64-key MIDI Matrix. It is similarly flexible and offers a way to easily make music, although it can be repurposed for many other uses. W hile MIDI Matrix panels are popular for being a compact way of controlling and interfacing to MIDI equipment, a linear keyboard arrangement like a piano is more ‘standard’ and, for many people, quite intuitive. This is a modular add-on to the MIDI hardware we introduced in April and May this year (siliconchip.com.au/ Series/363). Like the MIDI Matrix, it doesn’t have to be used strictly for MIDI or musical purposes. The MIDI Matrix was designed to be used with an Arduino Leonardo board, as the Leonardo can easily provide a native USB MIDI interface through the versatile Arduino MIDI libraries. We also demonstrated a few different program sketches that can run on the Leonardo to give various features, and showed some ways to interface with software on both a PC and an Android smartphone. At the same time, we presented an Arduino shield that lets you interface the hardware to a great range of MIDI equipment using standard DIN connectors. The Keyboard is intended to replace the Matrix as part of a larger construction, as presented in the earlier parts of this series. Refer to those articles, particularly the first part, to understand how the Matrix (and now Keyboard) can be used. At a minimum, you need an Arduino Leonardo board and some jumper wires to turn the Keyboard presented here into a minimal MIDI Encoder. 92  Silicon Chip The Matrix The original Matrix is basically just an array of pushbuttons that the Leonardo can scan to receive user input. In our MIDI software, each keypress is converted to a musical note. Each row or column of the Matrix is wired to a digital pin on the Leonardo. By using the time-honoured technique of scanning each row in turn, individual button presses can be detected. In our version of the software, the rows are connected to pins configured as inputs with weak pull-ups. Initially, all column pins are set to a high impedance input mode too. Each column is configured as an output in turn, and driven low. If any button connected to that column is pressed, its corresponding row pin is pulled down through the switch contacts. By scanning the columns in turn, we can detect individual button presses. While this system is simple, it cannot detect multiple simultaneous keypresses; for this, each switch needs to be fitted with a diode to prevent ambiguous closures propagating through the Matrix. Our Matrix omits these diodes in favour of simplicity and compactness, and this linear Keyboard is the same in that respect. The new Keyboard We considered a linear keyboard for our original design but could not work out a way of making it both compact and functional. We have now formulated a modular design, so a useful Keyboard can be built that is still compact, or it can be expanded to 64 keys, resulting in a device that’s over a metre long! But it still only needs 16 wires to connect it to the Arduino. The basic unit of the Keyboard is a single PCB with eight keys. Each key is wired to the same row contact as the others and also to one of the eight column contacts. A single Keyboard module is identical to one row of the Matrix. Fig.1 shows the circuit. CON1 is wired to the columns, with each terminal on CON1 wired to one side of each Our prototype uses three of these PCBs, as a keyboard made from a full set of eight PCBs would be well over a metre wide. We’ve retained the CON1 and CON2 pads on some of the boards to demonstrate and test the different options. In practice, only one set is needed; note that connecting to CON3 and CON4 is equivalent. Australia’s electronics magazine siliconchip.com.au Fig.1: this is the simple circuit of a single PCB with eight switches. The offset between CON4 and CON6 is what makes it easily expandable up to eight PCBs and 64 buttons. of the tactile switches, S1-S8. Position 1 of CON2 is connected to the other side of switches S1-S8. At each end of the Keyboard module PCB are connectors CON3-CON6, which can be used to daisy-chain subsequent PCBs to expand the Keyboard. These are eight-way surface-mount pads spaced 2.54mm apart. CON3 and CON5 (on the top side of the PCB) are wired in the same order as, and in parallel with CON1. Thus, the column signals can pass between the PCBs by joining their adjacent CON3 and CON5. These are wired as a parallel bus. Similarly, on the back of the PCB, CON4 on one PCB connects with CON6 on the next. CON4 is wired the same as CON2, but the clever part is how we have wired CON6. Pin 1 of CON6 is wired to pin 2 on CON4, and so forth, all offset by one position. Say we wired up an array of eight of these modules, numbering them 1-8 from left to right, with CON3 and CON4 wired to CON5 and CON6 respectively. Connecting to CON1 & CON2 on the first module, we would have the equivalent of a full 8x8 Matrix only with the keys in a single row. Fig.2 shows how the ‘rows’ are mapped back to CON2 on the first PCB. CON1, CON3 and CON5 are all simply wired in parallel and are not modified by this system. Other configurations If you look closely at the PCB, you can see that the little tab where CON1 and CON2 jut out is scored for removal. This lets you remove these tabs on all but one module. In fact, since CON3 and CON4 are wired identically to CON1 and CON2, you can even remove the tab from all boards and simply take the matrix connections from CON3 and CON4 Fig.2: this shows how multiple 8-button Keyboard PCBs are joined so that the Arduino can tell which key has been pressed. Each PCB along the chain offsets where the connection is ultimately made at CON2, allowing for up to 64 keys to be sensed. siliconchip.com.au Australia’s electronics magazine August 2021  93 of the leftmost board instead. If you don’t mind remapping the pins in software (or changing how they are wired back to the Leonardo board), the CON1 and CON2 connections do not have to be made on the first board. You could even take these connections from the middle of the array. We’ve designed the PCB to use large 12mm tactile switches, as these have a much nicer feel with a larger finger surface. You might find that some smaller switches can be made to fit by bending their leads, although we haven’t tried that. Since there is less space for routing on this PCB than the Matrix, it lacks the option to fit illuminated switches that the Matrix had. Hardware Like the Matrix, the Keyboard we are presenting has quite a basic design, so that you can customise it to your requirements. The switches are placed on 20mm centres, with four M3 mounting holes provided on each PCB. Nominally, the mounting holes will be on 40mm centres, although this depends on the accurate assembly of adjacent boards. The PCBs are 20mm high, not counting the tab for CON1 and CON2; 28mm with the tab in place. We strongly recommend mounting the Keyboard to a sound backing so that the PCBs do not flex when the keys are pressed. The connections for CON3-CON6 will not provide much mechanical strength as they are effectively surface-mounting pads, and are only bonded to the PCB superficially. Construction Most people will want to build a Keyboard with multiple PCBs laid out as a continuous strip, so we will describe what is needed to achieve this. The Keyboard is built on a PCB coded 23101213 that measures 158 x 28mm. Use the PCB overlay diagram, What about the black keys? You might be thinking that pianos actually have two rows of keys, white and black, and you would be right. Also, there are seven white keys per octave, not eight. We have kept this as a linear array of eight keys to make it simple and applicable to a wide range of applications. We plan to produce a 12-key PCB at a later date which has the keys staggered and grouped like a piano. In the meantime, if you’re keen to use this board like a proper piano, you could build it in two rows, with the top row offset horizontally 6mm from the bottom row and with gaps in the keys at the top to give the proper configuration. Both rows could be wired up in series (assuming they contain no more than 8 PCBs total). The software could be modified relatively easily to remap the two rows of keys into the correct sequence so that it can act as a keyboard piano. The restriction of only one keypress being detected at a time would remain, though. Our planned future piano keyboard PCB would remove that restriction. Fig.3, as a guide to fitting the components. Plan and lay out the modules before commencing construction. To keep things compact, the connections between the boards are a little tight, and it will be easier to join them before fitting other components. If you want a different layout, just about any method of wiring CON3 & CON5 and CON4 & CON6 respectively will work. You might even like to use header sockets on one and header pins on the other to allow the units to be unplugged, although this will not achieve a tight spacing. To start the PCB assembly, snap off any CON1/CON2 header tabs that are not needed. Do this by scoring along the line with a sharp knife to cut the copper traces, then carefully flex the PCB with pliers to make a clean break. You might like to clean up the rough edge. As well as our usual warnings about avoiding the inhalation of PCB dust (eg, by working outside and wearing a mask), take care not to file away the traces which run close to the edge of the PCB, especially at the back. Each PCB is 158mm long, meaning that there is 2mm of spare space for a joiner if the key spacing is to be kept even. We used cut-down double-row pin headers. The plastic spacers are very close to 2mm deep, giving the necessary spacing. Start by cutting down the headers to be used for joiners. This is fiddly but necessary, as there is no more than 8mm between adjacent switch bodies on neighbouring PCBs, and typical pin headers are around 11mm tall. You can halve the number of cuts by shifting the pins in the plastic. Place the PCB on a hard flat surface and rest the 2x8 pin header in the CON1/CON2 holes. Push the plastic down firmly with a flat edge that fits between the pins. A steel ruler is ideal for this. This will move the pins such that only 1.6mm (the PCB thickness) of each pin is proud. Now reverse the 2x8 pin header, and use the depth of the PCB as a jig to cut 1.6mm from the other side of the pins. The pin stubs may fly off at speed, so wear safety goggles and aim the header while cutting so that they will fly away from you. See the photos opposite that show what the header should look like after being trimmed and then attached to the PCBs. Soldering these headers is a little tricky as they are not a snug fit. Treat them like a surface-mounted part, applying flux paste to the pads before soldering. We recommend securing the parts during soldering with hightemperature tape (eg, Kapton) so they don’t move around. Tack the ends in place and check that the pins do not foul the tactile switch footprints. You might even like to test-fit the switches to confirm clearances. Solder the remaining pins, and be generous with the flux. It will help the solder to form clean beads that Fig.3: there’s not much to get wrong during assembly, although we recommend fitting the PCB joiners first, as the tactile switches will make access difficult when soldering them. The buttons should snap into place, so soldering them is easy. 94  Silicon Chip Australia’s electronics magazine siliconchip.com.au Parts List – Full 64-key Keyboard 8 Keyboard Modules 7 2x8 male pin headers, trimmed in height (CON3-CON6) 1 2x8 pin header (male or female to suit Leonardo connections, CON1 and CON2) mounting hardware to suit usage (M3 tapped spacers, screws etc) Keyboard Module 1 double-sided Keyboard PCB coded 23101213, 158 x 28mm 8 12mm tactile switches [eg, Diptronics DTS-21N-V or Jaycar SP0608/SP0609, Altronics S1135 + S1138] sit where they need to. Flip the board over and complete the headers on the back of the PCB. Remove any excess flux using a flux cleaner, and test the exposed CON3CON6 pads for continuity between the ends of the strip. As you can see from Fig.2, CON3 is wired straight through to CON5. But CON4 will be offset relative to CON6 (unless you have the full complement of eight PCBs), so check that each pad on CON4 is connected to one and only one pad on CON6. It’s best to do this now, as it can be quite fiddly to rework these connections with the tactile switches in place. Fit the switches next. They should snap neatly into place; just check that they are sitting flush before soldering. Finally, solder headers for CON1 and CON2. We used female headers to match the cables we had made up for the Matrix, but you can use whatever works for your arrangement, even soldering wires directly to the PCB. these are CON3 to CON5 on the front of the PCB. If none of the keys on a PCB work, then it may be a problem with the CON4 to CON6 row connections on the back of the PCB. The cut-down header pins (shown above) measure around 7mm tall so that they will fit between the end switches on adjacent PCBs (shown below). The plastic part is 2mm tall, so uniform board spacing is achieved too. Conclusion Like the Matrix, the Keyboard is designed to work with our MIDI hardware and software. But we think that readers will find other uses, especially in cases where many buttons need to be connected to a microcontroller. SC With the set of Keyboard PCBs wired up to our MIDI shield, we have a linear array of buttons that you can play like a piano. But keep in mind that by default, unlike a piano, multiple keys cannot be played at the same time. Hooking it up We tested our unit with the MIDI_ ENCODER sketch. If you haven’t done so already, we recommend reading the earlier parts of this series of articles, as they describe the software in more detail. Since the Keyboard is effectively equivalent to a Matrix fitted with non-illuminated switches, you can transfer many of the ideas relating to the Matrix to the Keyboard. As with the Matrix, wire CON1 of the Keyboard to CON2 of the MIDI shield (or corresponding Leonardo pins) and CON2 of the Keyboard to CON1 on the MIDI shield, connecting pin 1 to pin 1. Check that all the buttons work as expected, using the key notifications that appear on the Arduino Serial Monitor. If you find that some keys on a PCB don’t work (but not all), check the column connections for continuity; siliconchip.com.au Australia’s electronics magazine August 2021  95