I needed a high speed ADC for sampling in cylinder pressure for my ECU, and settled on trying a few from Texas Instruments. I am using an optical encoder on the engine which provides 720 pulses per revolution . If I took a sample every pulse, then at 6000 RPM (100 Hz) then I would be looking at about 720 * 100 Hz = 72,000 Samples per Second (SPS) or 72kHz ( although I realise now that I could take a sample on each edge, resulting in 1440 samples per revolution, or 144,000 SPS). That’s pretty high speed, considering most ADCs built into microcontrollers take a few microseconds to perform their conversion which results in a sampling rate of perhaps up to 50,000 SPS max for the Arduino for example. DSP chips or higher end micros probably have better performance, but for the sake of learning, I fancied trying to use an external ADC anyway.
So, I began a search for some suitable ADCs. Texas Instruments provide free small samples, so that was a good place to start looking. ADCs do range into the Gigahertz, so my application is realistically not mega high speed, but still higher than the lowest end chips. The problem with the higher speed is not only expense, but apparently increased complexity resulting in much smaller packages which make it difficult to solder. In the end, I was somewhat limited more by the package type than anything else, since I didn’t fancy soldering a 64-TQPF. I was aiming for at least 100 kSPS, and as high an accuracy as possible in the largest package. In the end I ordered a 16-bit 100kSPS ADS8321 in an 8-MSOP and a 12-bit 0.5 to 1MSPS ADC121S101 in a 6SOT package.
I decided to have a go at soldering the 16-bit 8-MSOP chip first by following this guide, and made a pretty good mess of it. I ended up with a blob of wires, solder and melted sellotape worthy of a nailed it meme. In the end, I found it much easier to just solder each wire on to each leg. Amazingly I didn’t fry the chip in the process, and so hooked up a 50:50 voltage divider over Vss to provide a reference voltage. This chip is a little special since it’s a Bipolar ADC, meaning that it can read values both above and below Vref which would be handy for certain applications, although probably not so much for me. So I then wired it into my Stellaris Launchpad since it’s the fastest (only) dev board I have available, and began looking for a way to interface with it.
Modifying some very helpful code from this thread I managed to actually read some values out of it! The basic protocol is supposed to resemble SPI but of course is slightly non standard, with some additional clock cycles required before the data can be read out (this is the sample period for the ADC). None the less, bitbanging the protocol seems to work, and so I then added a bit of serial communication to a PC client written in Processing and after some debugging, I seem to have some pretty realistic high speed data capture! This is the result of me touching the input wires, apparently I generate some sort of sine wave (tested working on other signals too). I don’t have a signal generator, but will test it a bit more with some micro-controller generated square waves when I find my other box of bits.
I have put the code up on my BitBucket account here.