My project is about detector.
The objective is I have to read the peak value of the voltage.
The steps :
Detect the incoming Gaussian Shaped Rule (peak value)
Memorise its Amplitude
Tell ADC that the amplitude of the pulse is stored
ADC can start the conversion
ignore all incoming pulses until ADC finishes conversion
Hold the memorised value during conversion
Forget the memorised value after ADC finishes conversion
Get ready for next Pulse.
Zero Label Detector (ZLD) : detect the pulse. if the peak value detected. it will send to SG as input.
Switch GATE (SG) : Will receive the peak value. Send to ADC to start coversion. delay of conversion need to be longing in (ms) because the T of graph is (us). it will send to SD.
Switch DUMP (SD) : will open to send the data conversion to PD.
Peak Detector (PD) : will send the data to serial to show the peak value of the voltage.
i can make a basic ADC.
but how to make it to follow the sequence above ?
i just need someone to lead me to the start.
any idea ?
I hope u can understand my explaination.
Thank You.
Detect the incoming Gaussian Shaped Rule (peak value)
Memorise its Amplitude
Tell ADC that the amplitude of the pulse is stored
ADC can start the conversion
ignore all incoming pulses until ADC finishes conversion
Hold the memorised value during conversion
Forget the memorised value after ADC finishes conversion
Get ready for next Pulse.
but what, exactly, do you want help with?
Have you written some code that does not do what you want? If so post the code and explain what it should do and what it actually does.
Some of your steps are not clear to me.
For example Step 5 - how could there be other pulses that need to be ignored? An ADC conversion takes about 100 µsecs.
I suggested some simple code earlier to detect the peak value.
That may cover Steps 1 and 2
After that you just seem to want a simple analogRead() to deal with Steps 3, 4, 5 and 6
Is Step 8 really a return to Step 1 ?
The Arduino is a great system for learning-by-doing. Write a short program and see what happens.
What is the length (in time) of the pulse? You'll have to be running lots of conversions over
this period to get measure a reasonably accurate peak max value.
What are your accuracy requirements?
void loop()
{
// state diagram 01 (ZLD)
// t for time. using time as range to take certain wave as input to trigger SG
// using float because voltage can be in any decimal number
for (int t=0; t<=1; t++)
{
float in = analogRead(A0);
float peak = in*0.00488;
if ( zld == HIGH )
{
float Amplitude;
analogRead (Amplitude);
digitalWrite (8,HIGH); //SG at pin8
}
}
float Amplitude (int AnalogCh, int Threshold)
{
int check1;
int check2;
int check3;
int check4;
yet i dont kno it is correct or not. in this program it have put time as reference which is every 1 sec it will take the max peak from all the pulse that it has detect at zero label detector. and send to the op amp as in circuit. the op amp will compare the highes and lowest value.