Thursday, 31 May 2012
Arduino, Processing & The Modular (Part 3)
So now we have hardware which sends out a clock pulse and a random voltage. Well, I say 'random', but it's now more of a varying voltage. At any point it can go up or down from its current value by a limited amount. If the values go above the mximum they revert to 0 and go on from there. If they fall below 0 they go to the max value and go on from there. This can all be visualized at pretty close to real time in various ways using Processing code running on the PC to which the Arduino is connected by USB.
Processing watched for an incoming serial stream and plots the points with x being time and y being voltage.
Arduino, Processing & The Modular (Part 2)
Once the final stage of adding a potentiometer to control the clock rate had been proved to work I set about rigging up a simple aluminium faceplate to hold the jack sockets, LEDs and potentiometer in place. I added an extra pot, LED and socket for future use. The knob next to the red LED changes the clock rate. The other 2 knobs are unused. Soldering the Arduino's 'tipped' patch leads to the front panel components allowed for easy subsequent repatching on the breadboard.
Arduino, Processing & The Modular (Part 1)
My next experiment is a hardware and software combo. An Arduino Leonardo microcontroller (which I was lucky enough to win last week in a competition run by the fantastic Arduino store oomlout.co.uk) programmed and hooked-up to talk to my modular synth and also to the computer. The first stage involved getting to grips with the Arduino's PWM analog output. This was unusable for control voltage generation as it's really buzzy. It needed filtering so I experimented with a simple RC filter circuit on the breadboard and found a resistor/capacitor combination that works pretty well (further work needed as it slews quite alot - I'm running it through the modulars sample & hold module to reduce that further.). Next came a visual indication of the random output voltage by means of a green LED. Then a clock output visualized with a red LED was added.
With each clock pulse the Arduino's code sends the text value of the random voltage out via USB to the PC to allow it to be picked-up by a Processing application that's watching for this data stream.
Subscribe to:
Posts (Atom)