When Behruz Farshi picked up his brother’s old electric guitar, he began to ponder the endless possibilities if he turned it into a digital instrument. The result is Puitar: an electronic guitar that's easy to play.

The Puitar can output MIDI sounds, including a piano

Puitar is currently monophonic, but a polyphonic version is possible

The matrix requires more GPIO pins than the Pi Zero has…

So an IO Pi Plus board is used to expand the number of pins

Power is supplied by a battery pack with a switch

Upon first attempting to play the guitar, Behruz found it very hard work on his fingers: “I was thinking it would be nice to have some kind of instrument that can be played casually, but still is every bit of the real thing,” he tells us.

Well, a digital guitar wouldn't need as much tension in the strings and also it could make any sounds you program it to make! So I ordered a Pi Zero and made a prototype.

Additionally, this was Behruz’s first Raspberry Pi-related project, as he explains: “I chose it because it is small, has all the hardware to make it convenient to do something quick, and runs Linux.”

Armed with his new Pi Zero, Behruz took around four days to develop both the hardware and the software for his project, with the most time-consuming aspect being the hardware element of the fretboard:

“As the idea was to use real guitar parts and space is very limited, it was not easy to assemble it.”

Puitar: Building an electric guitar with Pi Zero

The Puitar features a keypad matrix of 22 frets and six strings. When the player presses a string on a fret, they are connected, which means electricity can flow between them. This is detected on one of the Raspberry Pi’s GPIO pins and the appropriate note is played. “To find out which frets are pressed, we loop over the strings, setting [them] high, one at a time and checking which fret turns to show high,” explains Behruz. “The rest is a simple software project to make sounds for the pressed frets.”

To create the matrix, he drilled holes in the fretboard and soldered wires to the frets from below. After building the first prototype, however, he found that he frets would sometimes link the strings and make the guitar malfunction. “The solution is very simple: cut each fret in six parts that are separated, and connect them by diodes instead so they will conduct the electricity only in one direction, and separate the strings, although doing that manually with real fret wire will take ages.”

Puitar: Repeat performance

With this experience behind him, Behruz is now planning a second version of the Puitar:

“My plans are a body as close as possible to a real electric guitar (I have already done most of it). And, most importantly, the fretboard with the separated frets – without it, it is not possible to reliably play frets close to each other, as the strings will be connected unintentionally. On the software side, the plan would be to turn the whole project into a MIDI guitar so that I could just connect it over USB to the PC or a smartphone and play any sounds I want.”

As it is, this ingenious upgrade of an old electric guitar is music to our ears.

See also: