3
\$\begingroup\$

I am looking for microcontroller or DSP (or its architectures) which are efficient in terms of power as well as performance in detecting spikes. I want to run an algorithm which detects spikes and processes them. So, I am looking for architectures which are efficient in this type of performance.

Any hints, suggestions, etc would be really helpful. Thanks in advance.

UPDATE: I am getting the input signals in digital format. I am not looking for an extremely real-time performance also. Even if I get some delay, thats fine. Also, I am not only interested in just the spike detection, but also a number of characteristics like its height, etc. In short the algorithm in quite complex. I am trying to do this for ECG/EMG signals, etc. Algorithms are not so straightforward, and hence I am looking for an efficient architecture.

\$\endgroup\$
1
  • \$\begingroup\$ Argh, you could have mentioned in the first place your bandwidth is really low. \$\endgroup\$ Jul 26, 2011 at 16:13

2 Answers 2

2
\$\begingroup\$

If you just want to detect spikes, you don't need much processing power. You can easily make a analog circuit that holds the spike high level for a little while to give a processor a chance to detect it at the next periodic A/D reading. Or, the circuitry could detect the spike and drive a interrupt pin of the processor so that it can do whatever you want it to do immediately.

A brute force approach would be present the signal at the right amplitude and impedance to a A/D input of the processor, then do everything in firmware from there. Some of the dsPIC 33F can sample at 1 MHz or more, but you didn't give any specifics to know whether that is good enough or not. Such a processor would take a few 100 mW to run at full speed. Note that you only get 40 instruction cycles per reading at 1 MHz sample rate. That's enough to just detect a spike. If subsequent readings aren't needed for a while as you process the spike (whatever that means), then this would work.

If the spikes are really short, you can preceed the A/D with a analog spike-stretcher. Something like this:

A short positive spike comes in and causes C1 to be charged up. Even if the spike goes away immediately after, the voltage on C1 will stay high and decay with a time constant of 10 µs, which is a half-life of 7 µs. If you don't need to detect another spike for a few µs after one, then this sort of spike-stretcher relaxes the sample requirements on the processor.

The actual decay time and impedances will likely need to be adjusted to your particulars.

Update:

It is now apparent you are trying to measure characteristics of low bandwidth signals. "Low" being relative to what modern microcontrollers can easily measure and digest. In this case you don't need any fancy external analog circuitry other than to present the right amplitude and impedance to the processor A/D input. You can sample the signal at let's say 2 kHz rate with analog filters that start rolling off at maybe 300 Hz. With that kind of setup, the sample stream is guaranteed not to miss any features. And, at 500 µs/sample, there should be plenty of time do peak detection and other processing.

This is really not that hard a problem, unlike what it appeared you were originally asking about.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks for the reply. I am looking for architectures which would be most efficient in doing not only the peak detection of a low bandwidth signal but also able to do the processing fast. I know most uC and DSP chips would do the job, but I am trying to find the minimum requirements and the best architecture. And I am also not sure how complex the algorithms would be but looking at the worst case, I think it would be best to do the preliminary analysis well \$\endgroup\$
    – Neel Mehta
    Jul 26, 2011 at 18:31
  • 1
    \$\begingroup\$ If you're not sure what you need, start out with a lot of power. Then you can scale back later if/when this gets produced in volume. A dsPIC 33F can do 20,000 instructions per sample at a 2 kHz sample rate. That's a lot of cycles. \$\endgroup\$ Jul 26, 2011 at 19:29
1
\$\begingroup\$

Depending on the spike's characteristics they may be too short for the microcontroller to detect. I would build an external, analog circuit to detect the spike, and present a decent digital pulse to a microcontroller's interrupt input.
A detection circuit may consist of a fast peak detector which triggers a D flip-flop, with the clamped input pulse to the D input. If it's indeed a spike the flip-flop will latch a low level, a longer signal will be registered as a logic 1. Depending on the expected spike duration you can delay the signal to the flip-flop's input.

edit
Your information is somewhat contradictory. You say the input signal is digital, yet you want to measure amplitude (and waveform?). Anyway, if it's about ECG/EMG data about any microcontroller with A/D converter should be able to handle that.
You're very mysterious about the processing, but for waveform analysis a DSP will offer you extras a simple microcontroller doesn't have, like a MAC (Multiply-and-Accumulate) instruction for building efficient FIR and IIR filters.

\$\endgroup\$
3
  • \$\begingroup\$ Please check the update in the question. I am not just looking for spike intervals. Sorry for not putting up the question clearly. \$\endgroup\$
    – Neel Mehta
    Jul 26, 2011 at 16:07
  • \$\begingroup\$ Actually, the fact is that most of the heart diseases are calculated from disorder in ECG spikes. I havent written the algorithm or the code yet, but doing some preliminary analysis on this. I have been through many research papers but I dont see any reason why a particular uC or a DSP was selected, and hence was wondering if I could get an answer here \$\endgroup\$
    – Neel Mehta
    Jul 26, 2011 at 18:26
  • \$\begingroup\$ @Neel - For signal analysis DSP is the way to go, even if you haven't finished the algorithms yet. For this kind of signals they'll all be suitable, so which one you choose will depend on other factors, like cost, supplier's support, devtools, etc. \$\endgroup\$
    – stevenvh
    Jul 27, 2011 at 4:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.