PWM basic

What are you developing?
zmemw16
Posts: 1674
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: PWM basic

Post by zmemw16 » Sun Jan 07, 2018 6:44 pm

tempted to say, these bots are getting better, certainly around deliver your project time :D :lol:
srp

User avatar
mrburnette
Posts: 2190
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: PWM basic

Post by mrburnette » Sun Jan 07, 2018 7:24 pm

ted wrote:
Sun Jan 07, 2018 4:49 pm
(it is not "PWM basic") = it is in analog field
<...>
I'm doing this with curiosity to see the advantages of digital technology.
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:
http://hyperphysics.phy-astr.gsu.edu/hbase/hframe.html

For creating and understanding how basic electronics works:
http://www.falstad.com/circuit/

Goodluck,

Ray

ted
Posts: 62
Joined: Sun Jul 16, 2017 9:57 pm

Re: PWM basic

Post by ted » Sun Jan 07, 2018 8:49 pm

Thanks.
The first link = many years of experience in it.
The second one also is not a new one for me.
Regarding filters I think no one on forum attempted something similar

User avatar
mrburnette
Posts: 2190
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: PWM basic

Post by mrburnette » Sun Jan 07, 2018 9:54 pm

ted wrote:
Sun Jan 07, 2018 8:49 pm
Thanks.
The first link = many years of experience in it.
The second one also is not a new one for me.
Regarding filters I think no one on forum attempted something similar
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



Ray

Locked