MCP300X ADC at max 200ksps rate - Page 1
Forum section: electronics / projects

author: Winkhaus
author_rank: Contributor
timestamp: July 02, 2017, 06:53:26 pm
content: Hello,Does anyone know if there are any circuits that can demonstrate running the MCP300x ADC chips at or close to their max advertised sample rate of 200ksps?It seems like even the demo boards max out at 50ksps.Thanks,Winkhaus

author: jbb
author_rank: Super Contributor
timestamp: July 03, 2017, 08:25:34 pm
content: Not of that specific chip, no. Maybe you can take a demo board and reprogram / rejig it?However, I have found in the past that running SPI / I2C ADCs right up to their maximum clock rating can be a bit tricky due to factors like getting the right clock rate. Also, you need to be aware that the promotional material will almost always give you the max sample rate for one channel. If you want to sample more than one channel, your sample rate will drop.In fact, if you're doing something time-sensitive like a control loop, you must sample the ADC very regularly or the control response gets weird. This means that if you need more than one channel your sampling rate will drop to half or lower.I see in the MCP3004 data sheet that the max clock rate is 3.6MHz. Can your host system deliver that? Or can it only deliver 2MHz and 4MHz? You would have to pick 2MHz (for reliable performance) and your achievable clock rate would drop. And that's at 5V. At 3.3V the MCP3004 is only good for 1.35MHz.If you really need 200 kS/s, the easiest approach may be to use a faster SPI ADCs. Also, please note that this chip has 1 Least Significant Bit (LSB) Integral Nonlinearity (INL), 1.5 LSB offset and 1 LSB gain error. This means that it gives you a lower Effective Number Of Bits (ENOB) than the rated 10 bits.You can perhaps help the multi-channel situation with scheduling. Say you have to sample Ch0 fast, and Ch1 - Ch3 not so fast. You could scan like this:Ch0 | Ch1 | Ch0 | Ch2 | Ch0 | Ch3 ...That sort of compromise can be very effective (many patterns are possible).

author: hans
author_rank: Super Contributor
timestamp: July 03, 2017, 09:17:53 pm
content: Can you maybe show how the SPI timing looks like?If you get down to the details then sure most micro's can generate a 8MHz SPI clock but maybe with 3us delays between the 8-bit transfers. Then only 25% of the time the SPI bus is busy, effectively slowing down to 2Mbit/s.A 16-bit mode could help, but there will also be delay between setting the CS GPIO, etc.If you then try to push 200kHz x 16-bit through the bus at only 3 or 4MHz clock, you need a fairly high efficiency SPI driver.Maybe DMA can help out.

author: Kleinstein
author_rank: Super Contributor
timestamp: July 04, 2017, 03:46:30 pm
content: The really easy solution would be using an µC that already include an ADC that is fast enough. Some modern ones, like most ARM based even have a 12 Bit ADC. So they should get a similar or even better performance than this external ADC.To really get the max speed one needs the right clock. This might mean changing the crystal / oscillator.

author: Winkhaus
author_rank: Contributor
timestamp: July 04, 2017, 05:04:40 pm
content: I only need one channel of the ADC. I'm pretty sure I can generate a 3.6MHz clock signal, I have a crystal with a value that's close to that, or if need be I could use a DS1088.I was just curious about the MCP300x chips because the spec sheet says they can do 200 ksps, but all the example circuits I've seen are running at much lower sample rates.I was thinking of making a circuit from discrete logic gates to implement the SPI to read from the MCP300x and write the data to an SRAM chip. Then later I would worry about how to transfer the SRAM data to the PC. It just seemed to me that if Microchip is going to advertise 200ksps then somebody there must have already done this to test it. But then I'm new at this stuff so I don't really know.

author: jbb
author_rank: Super Contributor
timestamp: July 05, 2017, 01:39:59 am
content: If you really want to, you could use a 14.4 MHz crystal and set SPI master to divide by 4.Making a logic gate solution to run the sampling is possible but a lot of work. Could be fun if you want to do it that way.If what you want to do is 'confirm' the data sheet, it's actually a lot more complicated. You would need to test many chips from different batches at different temperatures and supply voltages to truly confirm the performance.For example, at moderate temperatures and with a well regulated 5V supply, you could probably overclock it to 4 MHz. But you might have reduced accuracy. If you build a product like that you will then find that some units out in the field work OK and some (for example) crap out when the weather gets cold.