Puitar: Raspberry Pi electric guitar project
By Lucy Hattersley. Posted
What can you do with a Pi Zero and an old electric guitar? Nicola King channels her inner Dave Grohl and finds out
Advertisement
Get started with Raspberry Pi – everything you need to know to start your journey!
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
Raspberry Puitar! A Raspberry Pi Zero Guitar! from r/raspberry_pi
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:
- Making music with a Raspberry Pi
- Giant guitar: The 12-foot electric guitar built using Raspberry Pi
- Pianola: the self-playing piano
Lucy is Editor of Raspberry Pi Official Magazine.
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles
Get started with Raspberry Pi in Raspberry Pi Official Magazine 161
There’s loads going on in this issue: first of all, how about using a capacitive touch board and Raspberry Pi 5 to turn a quilt into an input device? Nicola King shows you how. If you’re more into sawing and drilling than needlework, Jo Hinchliffe has built an underwater rover out of plastic piping and […]
Read more →
Win one of three DreamHAT+ radars!
That’s right, an actual working radar for your Raspberry Pi. We reviewed it a few months ago and have since been amazed at some of the projects that have used it, like last month’s motion sensor from the movie Aliens. Sound good? Well we have a few to give away, and you can enter below. […]
Read more →
RP2350 Pico W5 review
It’s Raspberry Pi Pico 2, but with a lot more memory
Read more →

