OK, so it's been a while since my last post. I found a bit of software, "NI - Multisim" for simulating my circuits, while simulating my first circuit i found that it really wasn't kicking the correct voltages out, the design was all crappy. I'd built it on veroboard and made a right mess of it. The module was only supposed to be a half way house anyway, so I have decided to scrap it and start all over again. Doing things properly and not rushing it.
Sooooo...
The first module in the system needs to generate my Control Voltage, but I want a keyboard to control it, so I thought I could use an Arduino to take MIDI in and turn it into a stable CV. I have a 12-bit DAC (LTC1257) that I found at the bottom of a cupboard gathering dust. So first things first, get the Arduino talking to the DAC.
I wrote a little program to send the clock and data using an arduino external library calling the "ShiftOut" command. Because it's a 12-bit DAC and the shiftout command only works on bytes, I've had to split the integer in half and send both halves separately. Sorting out the endianism was a bit of a nightmare, getting my clock and data the right way round always floors me, and controlling the 'Load' pin of the DAC HIGH or LOW at the right time so the DAC pays attention was also a challenge, but the end result is fairly positive.
I have had to buy a scope at this stage, and I have opted (due to cheapness) for a
Hantek 6022BE which is essentially just a data acquisition module that then displays its data on the computer. Quite nifty really, I'm a fan, dead cheap for what it does. Anyway, the end result you can see on the picture.
The application is driving the DAC up in steps of 90! which is massive for what seems like little change (the DAC is railed from 0v to +12v). In an effort to remove noise out of the DAC I have tried many different values of decoupling capacitors, but have found that each one of them make things worse not better. I have decided to invest in a Voltage Reference generator chip for the DAC (which is mentioned by the DAC datasheet) in the hope that it will produce a more stable voltage out.
In addition to the MIDI in, I have decided to include a software feature that will allow a selectable voltage out or a selectable sweep speed of 0 to 12v (simply because the arduino chip has spare pins and it seems a shame not to use them.