CONTROL MUSIC WITH a HARD DRIVE MOTOR

by Kimanzi254 in Circuits > Audio

602 Views, 6 Favorites, 0 Comments

CONTROL MUSIC WITH a HARD DRIVE MOTOR

harddrive modes.PNG

Just a build up from the previous instructable. In this instructable, we are going to use a hard drive motor to control the audio levels of a high pass filter and band pass filter independently. This is achieved with a push button which switches between the two filters. Digital potentiometers are used in this case, being between the hard drive motor and the audio filters.

Enjoy!

Supplies

  1. Arduino Mega
  2. HardDrive motor
  3. LM324 IC
  4. 5 x 1KOhm
  5. 3 x 56KOhm
  6. 1 x 10KOhm
  7. Red and Blue LED
  8. Jumper wires
  9. Breadboard
  10. Push button
  11. 4 x X9C503 Digital potentiometer

If you decide to use my filter designs kindly click on the images to view the components used

THE HARDWARE

BLOCK.PNG
harddrive modes.PNG
Highpassfilter.PNG
midband.PNG

The hardware can be sectioned into three blocks as shown. Details on how the hard drive motor works as a rotary encoder can be found in my previous instructable. The first block constitutes of the Hard drive motor, lm324 and Arduino mega. Make sure you connect the circuit as shown in the circuit diagram, and if you decide to change the pin connections on the Arduino also make the changes are reflected on the software. The middle block consists of the digital potentiometer, the beauty of this is that you can use that one hard drive motor to control the two audio filters independently. A single button is used to switch between controlling the two audio filters.

The third block constitutes of the audio filters. The audio filters operate on dual power supply circuit. Make sure you double check you connections since we are dealing with both high voltage(+/- 12V) and low voltage (+5V). Do not mix them up! If you construct the circuit on a breadboard, make sure the connecting wires are as short as possible to avoid any noise pickup. The audio output of the audio filters should be the input of digital potentiometer. The output of the digital potentiometer connects to the input of the amplifier. I will write an instructable on how to design an audio filter. The LEDs indicates which mode the hard drive motor is in, is it controlling the high pass filter or it is controlling the bandpass filter?

THE SOFTWARE

FilterArduino.PNG

I did use the Arduino IDE. As stated above, any hardware changes in terms of pin selections for the Arduino have also to be reflected on the software. The code is quite straight forward. Incase of any issues, do make sure you double check your connections especially the ground connection. The code is quite familiar to the previous instructable so coming up with other applications is quite easy.

Downloads

HOW IT WORKS

Details on how the hard drive motor works with the Arduino as a rotary encoder is detailed in my previous instructable. The digital potentiometer is basically a variable resistor whose resistance can be varied digitally with the use of the Arduino. The X9Cxxx family doesn't really need a microcontroller to work as per the datasheet.

The movement of the hard drive motor either pulls up or pulls down some pins connected directly to the digital potentiometer and depending on the direction of the hard drive motor it either increments or decrements the value of resistance. With that we can change the audio levels of the filters. The button connected to the Arduino changes the digital potentiometer you can control. If you want to change the audio level of the High pass filter you simply press the button once and the led lights up showing you are in 'high pass filter mode'. If you press the button again, a different coloured led lights up indicating you are in 'band pass filter mode' ;you can now control the digital potentiometer on the band pass filter side. So basically you can control the two filters independently with the same hard drive motor.

The audio filters (high pass and band pass) are of the 3rd Order design, more on the filters will be discussed on a different instructable. But basically the high pass filter allows frequencies higher than a certain cutoff frequencies to pass and attenuates frequencies less than that of the set cutoff frequency. The band pass filter passes frequencies within a certain range but suppresses or attenuates any frequency outside the set range.


HAPPY BUILDING