The support package allows me to read from and write to pins on the Arduino using Simulink blocks. Simulink is a block-diagram environment used for developing algorithms and modeling dynamic systems. I used Simulink and its support package for Arduino t o develop the algorithm for the tuner. On the shaft of the motor, I assembled a simple gripping mechanism using a clamp hub, four screws, and some tape. It has a voltage range of 3-12 V, and so I used a 9 V battery as the power source. The motor I used has a speed of 6 RPM and a maximum torque of 613 oz-in. I needed a geared motor with a low speed and a high torque. I couldn’t use just any DC motor for this project.
I soldered wires onto these leads to connect the tip and the sleeve to the audio input circuit. One end of the cable will be connected to an input jack, which has leads for the tip and the sleeve. The end of a guitar cable has two connections, called the tip and the sleeve. The guitar is connected to the tuner via a standard guitar cable. These four circuits interact with an Arduino Due, which is running an algorithm that was developed using Simulink. The inputs and outputs are controlled by the four circuits mentioned above: a digital input circuit for the push button, an analog audio input circuit for the guitar, a digital output circuit for the LED display, and a motor-driving circuit for the tuning peg gripper. The gripper connected to the motor is used to turn the tuning peg until the string is in tune.A six-LED display is used to indicate which string has been selected.The push button is used to select the string to tune.The figure above shows an overview of the automatic guitar tuner.