2024-07-11 05:50 AM - last edited on 2024-07-11 05:58 AM by Andrew Neil
I have STM32F407G-DISC board.
Hello Everyone,
Problem: I am working with a instrument where we frequently get the problem of frequency drop out, i.e. suddenly frequency signal goes missing i.e. goes to zero, this cause the loss in data as shown in the below image. Yellow is received frequency signal from Photodetector and Purple is the demodulated data (our desire output). When frequency goes zero the purple line is constant so data is lost.
Solution:
In order to solve this problem, I have solution in my mind, i.e. I should develop an algorithm which could work as follow,
In this case I will have two Analog Inputs F_A, F_B and one analog output A_out.
// F_A is our sensor data
// Based on F_A, F_B is our final result obtained by demodulation of F_A.
I want to developed following logic
When data is not missing (i.e. F_A is not zero then output (A_out) of microprocessor should be zero, while F_B should store in the buffer zone.
If F_A =0 is detected then the output (A_out) should be the (F_B stored in buffer zone) i.e. I want to utilize the previous value of F_B when F_A was not zero.
As a visualization: Look at picture
Yellow (F_A) will be continuously monitored, Purple (F_B) should be store in buffer zone. As can be seen rectangular point yellow goes zero and purple become constant, so this constant purple gap should be filled by buffer zone.
P.S I am Mechanical Engineering Student and I never had programming experience with MCU, I just used arduino once in my life.
2024-07-11 05:58 AM - edited 2024-07-11 06:17 AM
Sorry, this is not a "free software as a service" site.
Perhaps look to somewhere like:
EDIT: The Arduino community has a place for requesting software: https://forum.arduino.cc/c/community/jobs/42
@umairgist wrote:P.S I am Mechanical Engineering Student and I never had programming experience with MCU, I just used arduino once in my life.
Perhaps you should approach someone in the Electronics or Computing department to collaborate or assist you in this project?