Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] signal processing in microcontroller

TWOOD

Newbie
Joined
Sep 6, 2023
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
51
Hello. I have a circuit with a weak signal output.
The question is:

What is a good feature in a microcontroller to analyze the signal change and deal with the weak threshold? If there is an example, it would be good. Thank you for the help.
 
Not sure how much these will help you. But you can see these documents.


If you want to brush up the basics of signal processing, you can start from here.

 
Not sure how much these will help you. But you can see these documents.


If you want to brush up the basics of signal processing, you can start from here.

Are there examples of codes for processing weak analogue signals, whether converting them to digital, or other examples such as comparison, because I am about to process data?
 
Hello. I have a circuit with a weak signal output.
The question is:

What is a good feature in a microcontroller to analyze the signal change and deal with the weak threshold? If there is an example, it would be good. Thank you for the help.
Please define "a weak signal" and "weak threshold"

To raise a signal above a threshold is the function of a fixed gain amplifier.
To detect crossing the threshold is the function of a precision comparator.
To raise a signal dynamically above a threshold depends on how fast, how much and how accurate, this must be done in specs.

ADC inputs can deal with thresholds in firmware or with differential inputs using a variable external reference.

Please explain your problem in detail.
 
Please define "a weak signal" and "weak threshold"

To raise a signal above a threshold is the function of a fixed gain amplifier.
To detect crossing the threshold is the function of a precision comparator.
To raise a signal dynamically above a threshold depends on how fast, how much and how accurate, this must be done in specs.

ADC inputs can deal with thresholds in firmware or with differential inputs using a variable external reference.

Please explain your problem in detail.
Hi, I have a signal that changes from 0.5hz to 10hz, but the threshold is from 50mv to 70mv, and I want to know what is the optimal method of processing via a microcontroller. I do not want the signal amplification stage, as it may distort the signal.
 
Hi,

As other already mentioned: define tge signal.
We don't know whether it's pure sine, distorted sine, square wave with what duty cycle range.
We don't know whether the voltage is RMS, amplitude, p-p, ....
We don't know source impedance.
We don't know how noisy it is.
Where does it come from?

Is there some kind of reference clock with a constant relation to signal frequency?

What is the information you are interested in?
How fast do you need the information (delay input - output) and how accurate and how precise do you need this information?

Klaus
 
"Normally" one wants to extract some info from a signal, like frequency content (FFT) , amplitude, phase,
and then there is the processing phase, like filtering.......

Modern processors have capability to do those basics, example :

1697493775892.png


This is a SOC (system on chip) single chip solution for a programmable digital filter. Right hand
window shows only a small percentage of chip resources used, left for other tasks.

A gui is used to config it, or use its APIs to control.

1697494268322.png


As pointed out earlier we need much more info about the signal, its properties, and your goals
for signal and information extraction.


Regards, Dana.
 
"Normally" one wants to extract some info from a signal, like frequency content (FFT) , amplitude, phase,
and then there is the processing phase, like filtering.......

Modern processors have capability to do those basics, example :

View attachment 185497

This is a SOC (system on chip) single chip solution for a programmable digital filter. Right hand
window shows only a small percentage of chip resources used, left for other tasks.

A gui is used to config it, or use its APIs to control.

View attachment 185498

As pointed out earlier we need much more info about the signal, its properties, and your goals
for signal and information extraction.


Regards, Dana.
Hi,

As other already mentioned: define tge signal.
We don't know whether it's pure sine, distorted sine, square wave with what duty cycle range.
We don't know whether the voltage is RMS, amplitude, p-p, ....
We don't know source impedance.
We don't know how noisy it is.
Where does it come from?

Is there some kind of reference clock with a constant relation to signal frequency?

What is the information you are interested in?
How fast do you need the information (delay input - output) and how accurate and how precise do you need this information?

Klaus
Hi to all, I apologize for the ambiguity in asking the question.
The diagram I worked on contains :
pré amp, high slew rate amp, vcf, Salen key, and amp analogue data _ amp digital data. For the data:
amplitude 50mv, peak 100m, 35.35, f 10hz, th 37ms, tl 63ms, as for the type of signal, it is symmetrical, sinusoidal to some extent.

Also, the digital signal can be dealt with via a digital amplifier.

I have some questions :
* when studying the change of the signal in terms of frequency or time. What is the excellent feature in microcontrollers?
* In general, the signal changes from 10hz to 0.5hz, so if the feature is used Adc mode

*Is there a way to use the external counter via interrupts? Or other way?!

*Is there a way to calculate the signal and know the input signal through the analog converter?

May be I need some dexamples.!!

I want to benefit from everyone's experience and my deep respect and best regards.
 
Its not clear to me yet. What information do you want about the signal ?
Its V or its Frequency or Harmonics and their amplitudes or phase / group delay or .... ?

If you need the frequency and want no latency, cycle to cycle, then reciprocal counter
technique best. If signal is well behaved, and its period symmetrical high and low time,
then this method can give you frequency in just 1/2 its period.

You can use adc, its advantage is it would give you both frequency and amplitudes.
But its latency is the entire period + some small analysis time.

If you want to analyze the primary fundamental of the waveform but it has a lot of
noise then prefiltering best. Digital approach using DSP methods advantageous.

If you want greater spectrum analysis then FFT.....

We need to know what you are trying to measure. And would help to know once you
get that info what you do with it, what do you want to control / act on ?


Regards, Dana.
 
Hello, thank you for the information.
I appreciate that well.
* I want to mesure frquency and the duty cycle. f1 out put signial _ [f2 out put change of signial ]
* Secondly, I want to know the changes that occur to the out put. I am not interested in knowing the frequency (f1 out put ) as much as knowing the value of the change between the first wave and the second wave [ out put], whether at the frequency/ time/ duty cycle/ phase/

I look forward to helping in any context

As for klausST, I don't know what I should provide you with.
The shema diagram is a multiple of stages for amplifying the signal.
As for the noise, there are some of them at the circuit

There is interference from the IC 7660 and harmonic signals at the input level. I think I got rid of them in the amplification stages. But If you have processing to correct the signal and remove the harmonic signals through the microcontroller, this is better than accuracy and design.
Thank you too.
 
* I want to mesure frquency and the duty cycle. f1 out put signial _ [f2 out put change of signial ]
* Secondly, I want to know the changes that occur to the out put. I am not interested in knowing the frequency (f1 out put ) as much as knowing the value of the change between the first wave and the second wave [ out put], whether at the frequency/ time/ duty cycle/ phase/

A combination of ADC to handle the amplitude investigation and a reciprocal counter
to do the freq / duty cycle measurement, along with a comparator to produce clean
gate for freq / period counter. The filter in post #8 would get rid of the trash in signal
so basic waveshape could be examined from the ADC samples. This is all one chip using
this SOC. Note filter can be LPF, HPF, BPF, Notch, cascade of any combo, FIR or IIR, all
configed with wizard. Note DelSig ADC resolution << 1 mV, its 20 bits with good accuracy
at 16 bits, onchip Vref.

1697633046195.png


Whats on the chip :


1697632585021.png


$15 board should be more than enough to do the job, compiler and IDE (PSOC Creator) free :

1697632692411.png



Regards, Dana.
 
Last edited:
The filter in post #8 would get rid of the trash in signal
The input frequency range is 0.5Hz ... 10Hz.

So it needs to pass the entire range.
If 0.5Hz is the fundamental it will pass all overtones up to the 20th. ...additionally all the (non fundamental frequency related) noise within this band..

Also the response time of a 0.5Hz filter needs to be considered.

As for klausST, I don't know what I should provide you with.
danadakk showed much more effort, diagrams, possible solutions, simualtions .. than you did. Just scroll up..
"Helping" means: You give the informations, you show what you have done so far, you do the main job ... we help to rectify mistakes.
Not answering simple questions about waveform, where the signal comes from, source impedance... why? Is it a top secret project? You are free to hide the informations, nothing against it. It just makes it difficult and time consuming to find a solution. A solution for you.
It´s you, who expects a solution. A solution to a problem. A problem that is still unclear.

If you´re not willing to take a pencil and a sheet of paper for sketching, or not willing to show a scope picture...I´m not motivated to spend time.
Don´t get me wrong: You are free to do your job the way you like, I´m not angry in any way, just explaining why I leave.


Klaus
 
Filter in post 13 done to range of interest with impulse response :

1697660355894.png


Took about 5 min to get all the corners, order, sample rate..., right with the wizard. Its two
cascaded Biquads, LPF followed by HPF. All onchip. Note filter runs in background while
processor and other 95% of chip doing other application stuff.


Regards, Dana.
 
Last edited:
Hi, I have a signal that changes from 0.5hz to 10hz, but the threshold is from 50mv to 70mv, and I want to know what is the optimal method of processing via a microcontroller. I do not want the signal amplification stage, as it may distort the signal.
I use a low noise op amp in the phono stages I build,and it would work great with this application, I would go with the AD797, its an expensive op amp, but will give you very low noise and distortion figures.
 
The real problem is still unclear. "

The diagram I worked on contains :
pré amp, high slew rate amp, vcf, Salen key, and amp analogue data _ amp digital data. For the data:
amplitude 50mv, peak 100m, 35.35, f 10hz, th 37ms, tl 63ms, as for the type of signal, it is symmetrical, sinusoidal to some extent."


Is this a low-frequency Doppler signal or some signal-controlled FM generator and mixer? Are there 1 or 2 sources?
Without a purpose or block diagram or specs. or better problem description, I can see why there is no answer, in spite of good ideas.
 

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top