Upgrading the Casio DG-20 MIDI Guitar
Introducing the Casio DG-20
The Casio DG-20 is a guitar-style stringed electronic instrument released in 1987. It features six nylon strings and a full-scale plastic neck which is topped with a touch-sensitive electronic fretboard. Sensors in the instrument are used to detect when a string is plucked and what note is being played, and this information is passed simultaneously to a standard 5-pin MIDI output jack as well as an onboard synthesizer. The onboard synthesizer features multiple voices, digital reverb and chorus effects, and a simple drum machine. Audio is output from an onboard amplified speaker or a standard 1/4” analog instrument jack. Power is supplied either by six (6) D-cell alkaline batteries, or an external 9V DC jack (5.5 x 2.1mm, center-negative).
Planned Modifications
To further improve the utility of the DG-20, several reversible modifications can be made using modern equipment to provide wireless connectivity. The modifications which will be discussed in this guide are:
- Installing a Raspberry Pi Zero W into the instrument which will transmit MIDI data over Bluetooth
- Powering the instrument via USB Power Delivery provided by an onboard lithium battery pack
These modifications will not prevent use of the built-in synthesizer or any of the instrument’s input and output connections. No modifications to the instrument’s external appearance, housing, or original circuit boards are required. In total, reversing all modifications should be as simple as re-soldering a handful of internal wires.
Prerequisites
The following items are necessary to complete the modifications:
- Phillips screwdriver
- Soldering iron and related supplies
- Small gauge wire, approximately 22 AWG (0.34 mm2)
- USB Power Delivery-compliant (USB PD) portable battery pack (such as Monoprice SKU 44369)
- Short USB-C cable (ideally 1.5 ft)
- USB-C Power Delivery breakout board (readily available from major e-commerce sites and hobby stores), set to 9V output
- MIDI buffer/optocoupler board - you can build your own using schematics found online and a few dollars of parts, but it is recommended instead to use the MIDI CHIP board, available from BadassMIDI on Tindie
Theory of Operation
Wireless MIDI Communication
The MIDI CHIP board will be set up to function as a tap, using its buffered output to relay zero-latency data to the instrument’s MIDI output jack, while the second isolated output will duplicate the data and transmit it over wire to the Pi Zero. The Pi Zero can be natively configured to operate its GPIO pins as MIDI-compliant serial inputs, meaning this GPIO MIDI connection can be exposed to the operating system as a standard MIDI input device. The Pi Zero can also be configured to function as a Bluetooth MIDI host able to transmit MIDI data to an external client, such as a desktop DAW or an Android device. As the Pi Zero runs a full Linux distribution, it is also possible for the Pi Zero to transmit MIDI via WiFi or USB, or to render its own audio using software synthesizers, but this guide will focus on MIDI Bluetooth connections as these are the simplest to configure, sufficiently low-latency, and provide maximum flexibility for external clients.
A simple shell script can be installed to run on system boot which sets up the MIDI relay connection from the GPIO MIDI input to the Bluetooth MIDI output. Ideally, this will allow for communication from the Pi Zero to the Bluetooth client with under 10ms of latency, making real-time performance and overdubbing feasible. As the hardware MIDI output jack is still receiving the real-time data as well, both the Bluetooth connection and the wired connection can be used to control separate instruments at the same time.
USB Power Delivery and Lithium Battery
This modification is not necessary to enable the Pi Zero modification, however, a modern lithium battery greatly reduces the weight of the instrument compared to using alkaline batteries, and eliminates the cost and waste of disposable batteries (as well as avoiding the drawbacks of traditional NiMH or NiCd rechargeable batteries). Monoprice SKU 44369 is known to fit within the DG-20’s battery compartment without modification, and it provides 9V power output. Not all battery packs will output 9V, so it is important to find one which is fully USB-PD compliant.
USB-C Power Delivery breakout boards are typically built with an array of empty solder pads which function as configuration jumpers. Each pair of pads corresponds to a USB-PD supply voltage, such as 5V, 9V, 12V, etc. Installing a resistor across a pair of pads will inform the power supply that the device is requesting the indicated voltage. Many vendors sell these boards with the resistor already installed. If buying such a board, be sure that it supplies 9V; if not, be sure to install an appropriate resistor across the 9V pads.
Electrical Connections
If using a USB lithium battery pack, it will be necessary to connect the terminals of the USB power board to the corresponding terminals of the DG-20 battery compartment. This will effectively place the USB battery pack in parallel with the 9V DC power jack. It is not recommended to use the external power jack and the lithium battery pack simultaneously in this configuration, though an external supply could be used for the instrument if the battery pack is disconnected from the USB cable. Wireless MIDI connectivity is still available regardless of what power supply is in use.
The USB PD board is mounted inside the DG-20’s body, while the battery pack is (ideally) placed in the battery compartment. There is a small rectangular opening between the battery compartment and the interior of the instrument through which a USB-C cable can connect the USB PD board and the USB battery pack.
The DG-20 operates primarily on a 9V DC power supply, which is stepped down to 5V internally to power the onboard logic chips and built-in synthesizer. The onboard 5V supply has sufficient current capacity to drive the Pi Zero W, while the Pi Zero itself will provide a 3V3 supply to the MIDI CHIP. Wires currently connecting the mainboard to the MIDI output jack will be removed and instead connected to the MIDI CHIP input pins. New connections will be made from the MIDI CHIP output pins to the MIDI output jack. A final connection will run from the MIDI CHIP “Rx” pin to the Pi Zero’s input pin.
This guide is a work in progress, and will be updated as the project progresses.