The GuitarBot is a project, realized as a Matura Paper at the Kantonsschule Sargans. Since it's completely written in English, this short info page is also in English. It should give a rough overview and some insights of what the GuitarBot is all about. The whole paper can be downloaded as a PDF at the bottom of this page.
The page has the same structure as the paper itself:
▼▼ Scroll to continue! ▼▼
One of the main questions is how to adjust the pitch of the tone. On the lower level, there are four stepper motors connected to timing belts. Each motor drives a self-created "fretter" along a linear slide. The solenoid, as a part of the fretter, "frets" the string at the current position and herewith defines the tone's pitch.
The second important part is the picking of a string. In order to achieve independent picking, each string has its own picking mechanism. This mechanism contains of two servo motors. One, equipped with a guitar pick, plays the string when moving up and down. The second servo motor, with some foam rubber at its arm, is used to mute a tone.
The whole mechanics has to be controlled by some electronics. The microcontroller used in the GuitarBot is an Arduino Mega. Arduino boards are pretty cool because they're easy to handle and they're powerful. Because it's open source, there's a huge variety of additional stuff for the Arduino.
There are also several other boards in the GuitarBot. For example one Big EasyDriver for each stepper motor, a servo controller to drive all the servos, or a relay module to toggle the fretters.
The Arduino is programmed in simplified C++. There's an immense amount of libraries available. Libraries used for the GuitarBot, for example, are "AccelStepper" or "Adafruit_PWMServoDriver".
The program actually just reads the commands from a .csv file (stored on an SD card), and executes them at the right time. Commands can be "move", "play", or "stop". The corresponding functions are "movePosition()", "playTone()", and "stopTone()".
- readLine() is the most complicated function of the program. Once called, a line from the .csv file is read, character by character. The different data values (time, string, command, ...) are stored in variables. Those variables are later transmitted to the executed function (move, play, or stop).
- movePosition() is used to initialize a movement of a stepper motor. The function actually just sets a new target position. The movement itself is then executed while the rest of the program continues.
- playTone() plays a tone. No kidding! It triggers the solenoid, lifts the muter, and picks the string with the second servo (the one with the guitar pick attached).
- stopTone() is the easiest function. All it does is lowering the muter. The played tone is therefore muted ... or stopped.