For my project I am building two boxes, which work together creating an old school drum sequencer. The first box has a button that the user controls through rhythm. In order to play sounds and make beats, simply plug cables from the box with the wav trigger into the box with the Arduino. This can be synced up to a synthesiser for some cool live performances.
Area of Interest
I had a great experience both this year and last year at BlueStamp. This was my second year and I really wanted to challenge myself. I did this by designing my own project instead of picking one that was already available. Last year I built an autonomous plant watering system and this year I built a drum sequencer. For my second year I wanted to see if my project could turn into product that would potentially be profit yielding. After researching other sequencers I came to the conclusion that my product would not be that successful on the market. The reason being that it isn’t as user-friendly, it doesn’t have as many features, and it is not practical for its price of 140 dollars. That being said I think that other people can benefit from my experience and the struggles I went through, so I uploaded my code to GitHub. My code can help people who want to “do it themselves”. This year I wanted to help people learn what I did and replicate it and or add on to it. I myself can also add on to in the future. I plan on adding a speaker and changing the code to manipulate different channels’ delay.
My final milestone was very firmware intensive. I initially thought that my project would work using the open source code from a hobbyist in London. After a few weeks of debugging and trying to make sense of his code I decided that I would need to start over and get some basic functions working. I started with the big button. I made sure that when I pressed it that it went from LOW to HIGH or in other words 0 to 1. I could visually see this in the serial monitor by using Serial.Print whenever I pressed the button to display a 0 or 1. The next thing I worked on were the mono jack outputs which tell the sound box what to do through a quick pulse. Once I got the mono outputs working with the big button I could move on to dealing with the other buttons and knobs. The knob that changes the channel that the sequence is playing on is the rotary switch. Once I figured out how it worked through running tests, I could change between different channels and play different sounds. Each channel has its own separate array of 1s and 0s, or HIGHs or LOWs, which affect the pattern played from the sound box. The only thing that changes the sound is the wav files on this box. I also began working on more complicated aspects of the code that I relied on for the full functionality of the product. A big part of the drum sequencer is the array that stores all of the sounds. When you click the button a HIGH is stored in the array. The more times you click the button the closer the HIGHs are together. This can affect the length of the beat. The only way that sound can be played through the sequence is through an interrupt which is triggered by a clock in signal. In most cases the clock in would be synced with the clock out of a synthesizer. That being said my code was a bit different in that I do not need a clock in signal so I could play beats with having a synth. This was not how I initially intended the product to work, but it actually added some usefulness. Now you don’t need to hall a big synth around to play the drum sequencer you can just have the two boxes. If you wanted to, you could modify it so that the interrupt is dependent on a clock in signal. Some of the other buttons on my control box were a fill button, a delete button, a clear button, and a reset button. The fill button sends a continuous HIGH pulse to whichever channel that you are on. So instead of the array going 000100010001… it would look like 1111111111111111 and stay that way until you take your finger off of the button. The delete button takes one beat away. Before the delete button you would see 000100010001… after you would see 00100010000….. There is also a clear button that gets rid of all of the 1’s resulting in no sound from the channel. The reset button just resets everything by clearing all of the channels. The bank button changes the type of bank that channel is on. There are two banks per channel. An example of this would be a beat on channel one playing 0001010100. When you click the bank button it is still the same sound but nothing plays out of the channel because you are on the second bank and must input the sequence. Another way to think of this is when looking at the array it is  by . The 12 represents the channel outputs(6) multiplied by the number of banks which is (2) resulting in 12. The  represents the total number of steps that you could have in the array. One of the variable resistors regulated step length. I used if-then statements to change how many steps there would be depending on where the knob was and how much resistance there was. I used a similar process for the shuffle potentiometer(variable resistor) that would change what channel was playing based on where the knob was. To find the values of the potentiometers and the rotary switch, I ran a series of test files so that I knew what I was working with in my actual code. After a few weeks of hard work everything was functional.
For my second milestone I built my second box, the wav trigger. This box stores all of the sounds. A wav file is loaded on to the board and then the signal is triggered by the mono jack that is wired to the board. There are 16 possible sounds that can be put on the wav trigger at a time. You choose what sounds you want because the sounds are uploaded using an SD card. A wav sound is at a high sample rate which means higher sound quality. CDs, Radio Stations, and DJs often use wav to improve sound quality. Because you can change the sounds on the Wav Trigger SD the amount of sounds you can have is unlimited. The box also has LEDs that flash whenever a pulse is sent to them from the other box. The whole box is set to ground so that the LEDs work. Another option could have been to use a PCB but for what I was doing it was easy, practical and worked fine. A possible modification that I plan to add is adding a speaker to the box so that you don’t have to bring around a speaker. But it isn’t hard to use a portable speaker and plug in the 3.5mm cable into the input on the speaker.
For my first milestone I dealt mainly with hardware. I used a ruler and sharpie to drill the holes where I wanted them, labeled everything, then moved on to the interior wiring. I connected all of my LEDS to the positive ends of the mono mounts, putting all of the female ends of the LEDS to ground. The reason for this is that whenever the mount receives a signal not only will it play the sound but the LED will also flash. Then I wired my 5 volt wire to all of my red buttons and my big arcade button. I placed 10k resistors on the buttons and 1k restores on the LEDS. I wired both of my potentiometers to ground, power and to the Arduino and did the same with the rotary switch. I had to use the power supply to determine the inputs of the arcade button. It served as a large switch; the two prongs on the sides of the button powered the LED and the back and top prongs were for the switch. This was important for knowing what to wire to my Arduino and what pins I would be calling in my code as inputs. All the buttons used were momentary push buttons, meaning they stay on for however long they are pressed and then turn off. The two potentiometers serve as variable resistors the resistance changes as you turn the knobs. The function of my box is to make beats, but it needs signals from another box that will house a wav trigger. With 16 different mono jacks that you can plug into from the BIG BUTTON box to the wav trigger box. Make next step is to finish the wav trigger build and then test the two together. One thing that I could have done better is wiring the box I will do this with my second box, but the wires on this box are to long and it would have been effective to mount the PCB (Printed Circuit Board) instead of leaving hanging especially considering that the box I am using is metal.