What are you developing?
I suspect that every reader here has a certain curiosity that drives their learnings in the computer field, be it big data warehouse servers or tiny microcontrollers. I can certainly appreciate the desire to learn. But, learning analog technologies and digital technologies often requires one to learn to walk before we run. In my life, I have found that a solid understanding of basic concepts is absolutely mandatory and that foundation serves well for the next layer of learning. But, just like school, we all need a few lab sessions to pull together concepts into working methods.
I would not want to impede your creativity or learning. I champion your desire to learn. I think that the stm32duino forum can assist, but our assistance must be assisted by you and that means you must study and experiment and be specific with your forum questions. Rather than asking "How would I..." it is far better to research and ask, "I have read <url> and I am have this code (attached) which I developed for prototyping, however I am having an issue..."
Of course, the forum will attempt to guide you to an answer.
I cannot remember in recent years not being able to find information on programming concerns/issues/errors/style from an Internet search. Sometimes (often) I had to download a PDF document from a manufacturer and read for hours. Sometimes I had to breadboard a digital or analog circuit to continue an experiment relating to programming or understanding a filter technique. Yes, it is hard work to acquire knowledge and to understand how to apply that knowledge to a specific problem needing to be solved.
I hope these links help you:
For the world around us and for an understanding of how everything relates/reacts:
For creating and understanding how basic electronics works:
You are probably incorrect - my guess is a number of members have PWM to analog filtering experience. The Internet overflows with knowledge. But, your diagram showed a black-box design with analog in and analog out and absolutely no code, so the implied state is you have not attempted to program a solution. Rather, you ask for a solution.
For the output side, PWM to analog is a very common thing to do. Even this old TI PDF explains the basics:
https://www.google.com/url?sa=t&source= ... hF_Y8DY8Ch
Analog input to a number representing relative value to PWM was shown in the Arduino example I linked to previously. You should build that potentiometer to LED brightness circuit. Essentially, you only have the input filter to design, the output filter to design and glue it all together with an enhancement of the Arduino code.
You have the circuit simulator link to work out the RC values.
But, unless you write the code and prototype the design, where is the learning? If you know physics, know electronics, and can understand the example code then you should be able to program something to get close to a decent solution.
Therefore I am going to lock this post. ted, please do your research, write some code to read AD, manipulate the AD value, and output the PWM, You will need to calculate the correct input and output filter values. Then if you have a specific issue that the forum can assist, post a new thread and ask your question.
THIS THREAD IS LOCKED FOR FURTHER POSTS