Ok guys, this is an exercise i was given. This is a window comparator and all i had to do is to write down the equation of the sin. signal and then design the circuit in the paper with the right values of the resistances. Can you help me to solve it? In fact i just want the sin. equation and 4 resistance values.
yeah i can see that both threshold points Upper (-860mV) and Lower (-3.33V) are shown on the diagram. I tried to find the resistance values by doing that : Vutp=Vcc * [(R1+R2)/(R1+R2+R3)] and Vltp=Vcc * [R1/(R1+R2+R3)] and finally a third equation Vwin=Vutp-Vltp=Vcc * [R2/(R1+R2+R3)]
As for the sin. equation this should be like this : f(t)=A+Bsinωt where A,B and ω (rad/s) must be calculated. I dont know how to calculate A and B.
hi,
Using the general equation y(t) = A. sin( ωt+Φ)
For 'A' count the number of divisions on the Y axis of your plotted wave, from the maximum to minimum value, 'A' is half that value.
For the Period count the number of X divisions from the lowest point on the plotted wave to the next lowest, this will give you the period in mSecs... Freq= 1/Period
Also you will see there is an offset from zero on the Y axis also the plot doesn't start at zero degrees.
EDIT:
Your diagram showing the divider is incorrect.
The threshold voltages have to be 'negative' , not positive
You already got y=5*sin(w*t+TH)-3 so you know A and B already. To get w, you find the time between the two lower valleys and assuming that the graph is accurate the time between those two points is 10ms, so your frequency f=1/0.010=100Hz. Knowing w=2*pi*f you should get w.
Now solving for TH we take the equation for y above and set it equal to zero:
5*sin(w*t+TH)-3=0
and we know what w is and that the sin goes through 0 degrees at y=-3 and then goes more positive on the graph and that happens at t=0.020 seconds, so we know t is 20ms. Setting t=20ms and evaluating that equation, we find several solutions and one of them is TH=0. Graphing that equation with TH=0 we find that the sine goes through y=-3 at 20ms the same as the graph, so we know that ONE solution for TH is zero and that is the simplest so we keep that TH=0. Thus we have the complete equation for the sinusoidal part.
To get the resistor values, we start with the equations similar to yours but we also include the negative supply rail Vss:
D=R1+R2+R3
Vutp=(Vcc-Vss)*(R2+R1)/D+Vss
Vltp=(Vcc-Vss)*(R1)/D+Vss
and remember that Vss is negative.
To get the resistance values, we first select a rough impedance for the whole resistance string, say 100k. This means R1+R2+R3=100k.
Next we solve for R1 from:
Vltp=(Vcc-Vss)*(R1)/D+Vss
and we get:
R1=((Vss-Vltp)*D)/(Vss-Vcc)
Now that we know R1 we can solve for R2 from the other equation:
Vutp=(Vcc-Vss)*(R2+R1)/D+Vss
and we get:
R2=((Vss-Vcc)*R1+(Vutp-Vss)*D)/(Vcc-Vss)
Now that we know R2 and R1 we get R3 from knowing D too:
R3=D-R2-R1
and that's about it.
Note that R3 is the resistor that connects to the most positive supply rail Vcc, and R1 is the resistor that connects to the most negative supply rail Vss. You can also do this by taking Vcc=0 (ground) and connect R3 to ground and solving the above with Vcc=0. That means you dont have to use the positive supply rail. Both set points are negative so we can get away with this for this problem.
Also remember that Vss is negative so it enters the equations as a negative number like -5. So for example if Vcc=5v and Vss=-5v then Vcc-Vss=5-(-5)=10, and this is important.
Oh, do you think i gave too much information? He seemed to be having such a hard time solving for the resistor values and even for w so i thought i would help him along. Note i never said what w really was numerically, and i didnt actually solve for any resistor values
Oh, do you think i gave too much information? He seemed to be having such a hard time solving for the resistor values and even for w so i thought i would help him along. Note i never said what w really was numerically, and i didnt actually solve for any resistor values
hi Al,
I dont wish to offend the OP, but he didn't seem to get my point about the divider network, the Vthresholds having to be powered from a negative supply.
As Eric said, you need to use at least one negative supply rail to power the divider and that is because (obviously) that the two set point voltages are both negative
With the equations i gave i left it as an option to use also a positive supply rail or you can make that (Vcc) equal to zero and just use Vss, but either way the equations will work to give you the resistor values. I also hope you understand how these equations came about, and if you dont please let us know and i'll provide more information about that.
To get the resistor values, we start with the equations similar to yours but we also include the negative supply rail Vss:
D=R1+R2+R3
Vutp=(Vcc-Vss)*(R2+R1)/D+!Vss!
I rewrote your Vltp equation and i end up here : R1=(Vltp-Vss)*D/(-Vss) , Where Vss=-10 and Vcc=0. Are you sure you didnt make a mistake with the Vss sign of the denominator?
Now that we know R2 and R1 we get R3 from knowing D too:
R3=D-R2-R1
and that's about it.
Note that R3 is the resistor that connects to the most positive supply rail Vcc, and R1 is the resistor that connects to the most negative supply rail Vss. You can also do this by taking Vcc=0 (ground) and connect R3 to ground and solving the above with Vcc=0. That means you dont have to use the positive supply rail. Both set points are negative so we can get away with this for this problem.
Also remember that Vss is negative so it enters the equations as a negative number like -5. So for example if Vcc=5v and Vss=-5v then Vcc-Vss=5-(-5)=10, and this is important.
Hi,
thanks. +5volts apply on the output (that's because the max output voltage is +5V?) and the 2 comparators right? How do you calculate the R4 and why is it for?