LED notification for 50% duty cycle

Thread Starter

J7NF

Joined Mar 12, 2016
18
I am using 555 timer to create PWM signal, It is required to use a notification LED, that will be on when reaching 50% duty cycle and off when different than 50%. Any help please
 

Papabravo

Joined Feb 24, 2006
21,159
I don't think you can create a reliable circuit for exactly 50% duty cycle. Would say 40% to 60% be an acceptable range?
 

ronv

Joined Nov 12, 2008
3,770
I am using 555 timer to create PWM signal, It is required to use a notification LED, that will be on when reaching 50% duty cycle and off when different than 50%. Any help please
One way would be to build a window detector set at lets say 48 and 52%, then low pass filter the PWM signal to turn it into a DC signal.
upload_2016-4-1_18-4-8.png
 

Dodgydave

Joined Jun 22, 2012
11,284
Expanding on post#3 by Ronv,

You can alter the Window voltages by changing R2, this will move the V-reference voltages together or apart giving you a Bigger or Tighter window should you need, like 49%, 51%, or 20%, 80%..etc
 
Last edited:

Thread Starter

J7NF

Joined Mar 12, 2016
18
correction

Sorry. It is required that the LED is on when the duty cycle is larger than 50% and off when the duty cycle is below 50%
 

GopherT

Joined Nov 23, 2012
8,009
correction

Sorry. It is required that the LED is on when the duty cycle is larger than 50% and off when the duty cycle is below 50%
That makes more sense.

Also, does the circuit have to work regardless of the 555 frequency?
Or will the 555 astable be set to a single frequency?

How quickly does it have to respond to a change in duty cycle? This is asked because a low pass filter will take a few cycles (or even a many dozens of cycles) depending in how well the pow pass filter is tuned for accuracy. In other words, you cannot have accuracy and speed at the same time but this solution will work best for a variable frequency 555 (over a limited frequency range).

On the other hand, if you need it to respond immediately, but for a single 555 frequency, some variation if a missing pulse circuit would work best (using a second 555 as a retriggerable monostable).
 

AnalogKid

Joined Aug 1, 2013
10,986
If the frequency is stable, you can do a time-domain window comparator with two moostables and a flipflop.

Edit: that was for the original question. For the latesgt rev, one monostable and one ff, or one comparator, or one of many other missing pulse circuits.

ak
 
Last edited:

dannyf

Joined Sep 13, 2015
2,197
Just follow the path i laid out for you: pwm -> lpf -> comparator -> led.

There are gazillion different ways of doing it. For example, here is one for 5v environment:

The pulse train comes into a lpf formed by R1/C1. Its output (voltage across C1) is compared with the internal 2.5v reference of comparator TL431. If the pulse train has a DC > 50%, the voltage across C1 > 2.5v (under 5v rail), and LED (undrawn but in serial with R2) lights up. Otherwise, LED is off.

That's just one way of building a comparator. You can use logic gates (HC04 for example), or opamps or straight out comparators.... Choices are countless. But the basic gist is the same.
 

Attachments

bertus

Joined Apr 5, 2008
22,270
Hello,

@dannyf , your circuit will work only when the PWM signal has an amplitude of 5 Volts.
Any other amplitude will switch at an other duty cycle.
There is no supply voltage of the 555 circuit given in the openings post.

Bertus
 

GopherT

Joined Nov 23, 2012
8,009
Clearly you don't :) ; but in the interests of education we should be guiding students, rather than spoon-feeding them ready-made solutions.
I learn better though a discussion, examples and listening to multiple arguments concerning the merits of various options. The line of educational thought in the homework section is laughable. If you would spend any time in an education department of local teachers college, you will quickly learn that most students taught by the Socratic method need to be highly motivated and the teacher must have a clear understanding of the students ability - otherwise the teacher is only creating frustration for the student.

I think you would have a huge student following of thousands of students if you discuss options and solutions with students rather than torment them with a poorly implemented Socratic method. Let's see what this OP leans here and then we can look at how many OPs have abandon their post over in the homework section.
 

Papabravo

Joined Feb 24, 2006
21,159
I learn better though a discussion, examples and listening to multiple arguments concerning the merits of various options. The line of educational thought in the homework section is laughable. If you would spend any time in an education department of local teachers college, you will quickly learn that most students taught by the Socratic method need to be highly motivated and the teacher must have a clear understanding of the students ability - otherwise the teacher is only creating frustration for the student.

I think you would have a huge student following of thousands of students if you discuss options and solutions with students rather than torment them with a poorly implemented Socratic method. Let's see what this OP leans here and then we can look at how many OPs have abandon their post over in the homework section.
Our assumption is that students who are assigned homework have the background and the motivation to succeed. If they lack that then nothing we do is going to fix that problem, and more to the point, fixing that problem is not our responsibility. I agree with your position for every other subforum. In Homework Help, we are not asking for complete solutions, we are only asking students to show us what they know so that we can help them toward the solution. I don't think that is too much to ask.

The other problem we run into, as parents, is the requirement that a problem be solved in a particular prescribed way. This is pedagogical BS. In my view any method at all that solves the problem is a valid method. Some methods are faster, or easier to understand, or better by some metric; but that is hardly the point.

As an example a student might show up with a problem on KVL and says:
"I understand that voltages around a loop must sum to zero, but I don't quite understand what is going on in the common branch of a circuit with two loops and two sources." This is a student we can and should work with.

The other kind of student just says: "Show me the solution".
 
Last edited:

GopherT

Joined Nov 23, 2012
8,009
Our assumption is that students who are assigned homework have the background and the motivation to succeed. If they lack that then nothing we do is going to fix that problem, and more to the point, fixing that problem is not our responsibility. I agree with your position for every other subforum. In Homework Help, we are not asking for complete solutions, we are only asking students to show us what they know so that we can help them toward the solution. I don't think that is too much to ask.

The other problem we run into, as parents, is the requirement that a problem be solved in a particular prescribed way. This is pedagogical BS. In my view any method at all that solves the problem is a valid method. Some methods are faster, or easier to understand, or better by some metric; but that is hardly the point.

As an example a student might show up with a problem on KVL and says:
"I understand that voltages around a loop must sum to zero, but I don't quite understand what is going on in the common branch of a circuit with two loops and two sources." This is a student we can and should work with.

The other kind of student just says: "Show me the solution".
That is fine - I didn't say it should be changed, or that I wanted to fix it. Already tried and met certain unmovable objects. Because if that culture of stasis, I would like to see posts in subforms that the Op decided to post in. If they don't want to post a homework question in homework, they should be allowed to post anywhere they please. Let the members decide how much they want to tutor the OP out of ignorance. Threads should not be moved because a mod suspects (or is even told) it is homework. An OP can be advised that they might get different / better / ??? Help in the homework section but a thread should not be moved without the OPs consent.
 

Papabravo

Joined Feb 24, 2006
21,159
That is fine - I didn't say it should be changed, or that I wanted to fix it. Already tried and met certain unmovable objects. Because if that culture of stasis, I would like to see posts in subforms that the Op decided to post in. If they don't want to post a homework question in homework, they should be allowed to post anywhere they please. Let the members decide how much they want to tutor the OP out of ignorance. Threads should not be moved because a mod suspects (or is even told) it is homework. An OP can be advised that they might get different / better / ??? Help in the homework section but a thread should not be moved without the OPs consent.
In my view that is just dishonest. If that is the way people want to play the game, then we would certainly have to adjust our approach to "homework like" questions regardless of where they occur. Does that really benefit the community?
 

GopherT

Joined Nov 23, 2012
8,009
In my view that is just dishonest. If that is the way people want to play the game, then we would certainly have to adjust our approach to "homework like" questions regardless of where they occur. Does that really benefit the community?
Why is it that so many engineers say, "I came out of college and felt like I didn't know anything. Then, after a few months on the job, I knew x, y and z like the back of my hand." It is because not everyone benefits from "being taught" or "doing homework". Some people learn by doing, some learn from discussion and some learn from simply seeing another person work through the problem one more time or one more different way. It has nothing to do with being fair or benefiting a community by "showing the solution". If that lets them through an engineering class, then professors are not putting enough weight on the exam and too much weight on homework.

Try being a mentor and do projects with engineering students. You will be surprised how quickly they catch on just by working through a handful of problems with them (spoon feeding) them. I do it every week. It works. It builds confidence, it is efficient, if you talk through the process and where they might have come across a similar problem, in math, physics, chemistry or personal finance they learn even more. I am personally stunned with the rate of abandon threads that happen in the homework section. And surprised that everyone playing in that sandbox is happy with their approach - and justify it based on "benefit to the community" apparently.
 

Papabravo

Joined Feb 24, 2006
21,159
For that process to succeed there needs to be basic levels of understanding. You need to acquire certain basic levels of understating before you can work in a group. No group I have ever seen wants somebody to walk in and say "show me how to solve this problem". The cooperative model requires that everyone have the potential to contribute. I can't tell you how many times an alternate viewpoint has challenged me to improve my own solutions. That only happens when you can follow the discussion.
 
Top