Circuits with diodes

WBahn

Joined Mar 31, 2012
30,062
hi WB,
I have noticed, with all due respect to 'Psy' that quite often he is posting what he believes to be the answer to to a particular equation/problem and then asks for confirmation that the answer is correct.
Some of his answers are way out and the mistakes he has made could be spotted if he developed a method of double checking his calculations.

Most of us apply 'rule of thumb' techniques to check the correctness of our calculations, especially during formal written examinations.

Eric
I agree -- and I've pointed that out to him (more than once, I think).
 

Thread Starter

PsySc0rpi0n

Joined Mar 4, 2014
1,763
hi WB,
I have noticed, with all due respect to 'Psy' that quite often he is posting what he believes to be the answer to to a particular equation/problem and then asks for confirmation that the answer is correct.
Some of his answers are way out and the mistakes he has made could be spotted if he developed a method of double checking his calculations.

Most of us apply 'rule of thumb' techniques to check the correctness of our calculations, especially during formal written examinations.

Eric
Morning Mr. EricGibbs and WBahn...

What would be that "rule of thumb" technique to check my answers? I'm sorry I'm not following your advices but I would rather solve the problems by hand on paper and ask you guys for confirmation than to be wasting time on LTSpice because I need that time to solve another problems. And also LTSpice doesn't use ideal models as we assume in classes so I would be also wasting time, sometimes, trying to understand why my results are quite far from LTSpice's.

Anyway, I think we have solved this problem using nodal analysis. I'm going to check the solution and trry to uinderstand how we got there!
 

ericgibbs

Joined Jan 29, 2010
18,849
I think we have solved this problem using nodal analysis. I'm going to check the solution and trry to uinderstand how we got there!
hi Psy,
We are advising you to solve the problems manually, but its a wise idea to double check your answers.
Will you please post your Nodal analysis calc's for this problem.?

E
 

Thread Starter

PsySc0rpi0n

Joined Mar 4, 2014
1,763
Well, I'm trying to do this in a different way. I'm trying to do as our teacher made some other examples in classes.

So I have made the table with all possibilities as I have already did here. Then I have written which conditions makes each diode ON and OFF separately, so I got:

D1 - ON --> Vout ≤ Vin
D1 - OFF --> Vout > Vin

D2 - ON --> Vout ≤ 6V
D2 - OFF --> Vout > 6V

D3 - ON --> Vout ≥ 8V
D3 - OFF --> Vout < 8V

Now I'm drawing the circuit for all 8 possibilities of that table and I'll reunite the conditions which makes each possibility viable, like this:

1 - D1 - OFF || D2 - OFF || D3 - OFF

Vout > Vin ∧ Vout > 6 ∧ Vout < 8 ⇔ Vout > Vin ∧ 6 < Vin < 8

And for this situation I think Vout = 0V because all diodes are open so we are trying to measure voltage at Rload which has no current crossing it!

I'm now analysing the second situation...


---------------------------

Ok, I can't do it this way because I won't have my Vout equation in function of Vin.

I'll try to find the general Vout equation by Nodal Analysis.

So, we can say that there are 3 currents in the circuit, I1, I2, I3 and I4. Let's assume that I1 flows across D1 to the node Vout and enters it. I2 is flowing into Vout node across the branch where D2, and I3 crosses the branch where D3 towards GND and finally I4 is the current flowing across Rload towards GND too.

That said, we can state that I1 + I2 = I3 + I4

Now I need to write the equations in terms of V/R for each current.
I did like this:

Still editing...
 
Last edited:

panic mode

Joined Oct 10, 2011
2,751
D1 - ON --> Vout ≤ Vin
D1 - OFF --> Vout > Vin

D2 - ON --> Vout ≤ 6V
D2 - OFF --> Vout > 6V

D3 - ON --> Vout ≥ 8V
D3 - OFF --> Vout < 8V
looks good to me...

And for this situation I think Vout = 0V because all diodes are open so we are trying to measure voltage at Rload which has no current crossing it!
how is this going to agree with D2 states in previous quote?
 

WBahn

Joined Mar 31, 2012
30,062
Morning Mr. EricGibbs and WBahn...

What would be that "rule of thumb" technique to check my answers? I'm sorry I'm not following your advices but I would rather solve the problems by hand on paper and ask you guys for confirmation than to be wasting time on LTSpice because I need that time to solve another problems. And also LTSpice doesn't use ideal models as we assume in classes so I would be also wasting time, sometimes, trying to understand why my results are quite far from LTSpice's.

Anyway, I think we have solved this problem using nodal analysis. I'm going to check the solution and trry to uinderstand how we got there!
Part of learning this stuff is learning to check your own work. Remember, as either an engineer or a technician, your primary role is that of problem solver, meaning that the people paying you will expect you to solve problems and produce correct solutions. Who are you going to ask for confirmation? If someone else has the correct solution already, the people paying you would have paid that other person instead.

The "rule of thumb" is that you start from your solution and confirm that it is consistent with the problem. If the problem is to find the solution to 3x=12 and you get a solution of 4, then you evaluate 3(4) and see if you get 12. If you do, then the solution is correct and if you don't then the solution is wrong.
 

WBahn

Joined Mar 31, 2012
30,062
I'll try to find the general Vout equation by Nodal Analysis.

So, we can say that there are 3 currents in the circuit, I1, I2, I3 and I4. Let's assume that I1 flows across D1 to the node Vout and enters it. I2 is flowing into Vout node across the branch where D2, and I3 crosses the branch where D3 towards GND and finally I4 is the current flowing across Rload towards GND too.

That said, we can state that I1 + I2 = I3 + I4

Now I need to write the equations in terms of V/R for each current.
I did like this:

Still editing...
Don't describe your circuit and voltage/current definitions with words. That is too prone to miscommunication. Draw a diagram, even if it is a sketch in Paint.
 

Thread Starter

PsySc0rpi0n

Joined Mar 4, 2014
1,763
Ok, let's try again

D1 - ON --> Vout ≤ Vin
D1 - OFF --> Vout > Vin

D2 - ON --> Vout ≤ 6V
D2 - OFF --> Vout > 6V

D3 - ON --> Vout ≥ 8V
D3 - OFF --> Vout < 8V


Situation 1
D1 OFF
D2 OFF
D3 OFF


Conditions that makes each diode OFF

Vout > Vin ∧ Vout > 6 ∧ Vout < 8 ⇔ Vout > Vin ∧ 6 < Vin < 8

If I measure Vout in the attached circuit that matches this conditions, it would measure 0V, so I think because of this, this situation would be impossible.

If I replace the Vout equaiton for this situation which would be Vout = 0 in the conditions above I would have:

0 > Vin0 > 6 ∧ 0 < 8

The first 2 that are bold are impossible, so I think this situation would be impossible.
 

Attachments

Last edited:

WBahn

Joined Mar 31, 2012
30,062
Ok, let's try again

D1 - ON --> Vout ≤ Vin
D1 - OFF --> Vout > Vin

D2 - ON --> Vout ≤ 6V
D2 - OFF --> Vout > 6V

D3 - ON --> Vout ≥ 8V
D3 - OFF --> Vout < 8V


Situation 1
D1 OFF
D2 OFF
D3 OFF


Conditions that makes each diode OFF

Vout > Vin ∧ Vout > 6 ∧ Vout < 8 ⇔ Vout > Vin ∧ 6 < Vin < 8

If I measure Vout in the attached circuit that matches this conditions, it would measure 0V, so I think because of this, this situation would be impossible.

If I replace the Vout equaiton for this situation which would be Vout = 0 in the conditions above I would have:

0 > Vin0 > 6 ∧ 0 < 8

The first 2 that are bold are impossible, so I think this situation would be impossible.
Please use units correctly. Neither 6 nor 8 are voltages. It's 6V and 8V. The 0 is actually, strictly speaking, okay because zero volts is zero (whatever units you want to use). It's a bit of a sloppy notation, but it is widespread and unambiguous.

Why can't 0V > Vin? If Vin = -2V, doesn't that satisfy the constraint? The problem is that it requires 0V > 6V, which is a false statement.
 

Thread Starter

PsySc0rpi0n

Joined Mar 4, 2014
1,763
D1 - ON --> Vout ≤ Vin
D1 - OFF --> Vout > Vin

D2 - ON --> Vout ≤ 6V
D2 - OFF --> Vout > 6V

D3 - ON --> Vout ≥ 8V
D3 - OFF --> Vout < 8V

2nd situation
D1 OFF
D2 OFF
D3 ON

Vout > Vin ∧ Vout > 6V ∧ Vout ≥ 8V ⇔ Vout > VinVout ≥ 8V

In the attached circuit, made for this situation I would say that:

Ir3 = IRload ⇔ (Vout - V2)/R3 = (Vout/Rload)

But I think I could also do a voltage divider but somehow I think the result is different.

Vout = (Rload*V2)/(R3 + Rload)
 

Attachments

Thread Starter

PsySc0rpi0n

Joined Mar 4, 2014
1,763
Please use units correctly. Neither 6 nor 8 are voltages. It's 6V and 8V. The 0 is actually, strictly speaking, okay because zero volts is zero (whatever units you want to use). It's a bit of a sloppy notation, but it is widespread and unambiguous.

Why can't 0V > Vin? If Vin = -2V, doesn't that satisfy the constraint? The problem is that it requires 0V > 6V, which is a false statement.
Vin goes from 0V up to 50V says the problem.
 

WBahn

Joined Mar 31, 2012
30,062
D1 - ON --> Vout ≤ Vin
D1 - OFF --> Vout > Vin

D2 - ON --> Vout ≤ 6V
D2 - OFF --> Vout > 6V

D3 - ON --> Vout ≥ 8V
D3 - OFF --> Vout < 8V

2nd situation
D1 OFF
D2 OFF
D3 ON

Vout > Vin ∧ Vout > 6V ∧ Vout ≥ 8V ⇔ Vout > VinVout ≥ 8V

In the attached circuit, made for this situation I would say that:

Ir3 = IRload ⇔ (Vout - V2)/R3 = (Vout/Rload)

But I think I could also do a voltage divider but somehow I think the result is different.

Vout = (Rload*V2)/(R3 + Rload)
If D2 is OFF, then how does V2 enter into your calculation of Vout in any way?
 

Thread Starter

PsySc0rpi0n

Joined Mar 4, 2014
1,763
If D2 is OFF, then how does V2 enter into your calculation of Vout in any way?
V2 is the voltage source at R3 and D3 branch. V1 is the voltage source at D2 branch.

Well, that's a new piece of information that you've never given us (at least not that I can see).

We are NOT mind readers!
I'm sorry if I haven't told this before! Let me check!

Edited;

Indeed I haven't... I'm sorry!
 

Thread Starter

PsySc0rpi0n

Joined Mar 4, 2014
1,763
Not according to the schematic you posted in Post #30.

You need to make the effort to provide consistent nomenclature.
Jeezzz... You're also making it hard. I was looking for the original picture of 1st post... I only uploaded those other circuits so that we could see the equivalent circuits for each situation!

Ok, re-writing again post #30 with correct equivalent circuit and so on:

D1 - ON --> Vout ≤ Vin
D1 - OFF --> Vout > Vin

D2 - ON --> Vout ≤ 6V
D2 - OFF --> Vout > 6V

D3 - ON --> Vout ≥ 8V
D3 - OFF --> Vout < 8V

2nd situation
D1 OFF
D2 OFF
D3 ON

Vout > Vin ∧ Vout > 6V ∧ Vout ≥ 8V ⇔ Vout > Vin ∧ Vout ≥ 8V

In the attached circuit, made for this situation I would say that:

Ir3 = IRload ⇔ (Vout - V2)/R3 = (Vout/Rload)

But I think I could also do a voltage divider but somehow I think the result is different.

Vout = (Rload*V2)/(R3 + Rload)

Anyway, the solution we have is nothing what I'm getting. I have 4 equations and only one of them is not Vin dependant! So, I'm wasting my time here.

The solution I have is:
\(
\displaystyle {v_{OUT} = \left\{\begin{matrix}
\frac{4}{7}\cdot v_{IN}+\frac{8}{7},\,\, v_{IN} > 12\\
\frac{2}{3}\cdot v_{IN},\,\, 9< v_{IN}< 12\\
\frac{1}{2}\cdot v_{IN}+\frac{3}{2},\,\, 3< v_{IN}< 9\\
3 ,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, v_{IN}< 3
\end{matrix}\right.}
\)
 

Attachments

Thread Starter

PsySc0rpi0n

Joined Mar 4, 2014
1,763
Ok, I almost got it.

This is what I got:

\(
\displaystyle {v_{OUT} = \left\{\begin{matrix}
\frac{4}{7}\cdot v_{IN}+\frac{8}{7},\,\, v_{IN} > 12\\
\frac{2}{3}\cdot v_{IN},\,\, 9< v_{IN}< 12\\
\frac{1}{2}\cdot v_{IN}+\frac{3}{2},\,\, v_{IN}<9V\\
3 ,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, v_{IN}< 3
\end{matrix}\right.}
\)

The only one I couldn't get, I don't know what is wrong!

The situation where there are differences between my solution and teacher solution is situation 7 - D1 ON - D2 ON - D3 OFF

The conditions that makes diodes like that are:

Vout < Vin ^ Vout < 6V ^ Vout < 8V
<=> Vout < Vin ^ Vout < 6V

Then I say that I1 is the current across R1 = 2.5k, I2 is the current across R2 = 5k and I3 is the current across Rload.
So,

I1 = I2 + I3

(Vin -Vout)/R1 = (Vout - V1)/R2 + Vout/Rload
<=>(Vin - Vout)/(5/2) = (Vout - 6)/5 + Vout/5
<=>2(Vin - Vout)=Vout - 6 + Vout
<=> Vout = (1/2)Vin + 3/2

Then, replacing this equation in the conditions equation, I get:

(1/2)Vin + 3/2 < 6V

Vin < 9V

But our teacher has 3V < Vin < 9V which would have implied that the conditions of Vout for this situation (D1 ON, D2 ON and D3 OFF) would have to be something like x < Vout < y...
 
Last edited:

t_n_k

Joined Mar 6, 2009
5,455
@PsySc0rpi0n
You seem to have lost sight of the earlier advice you received about checking that your answer is consistent and logical.
In your piecewise statement in post #37, it should be clear there are glaring errors. For the two input ranges 9 <Vin <12 & 9<Vin <13 you state different outputs. For the mutually inclusive range 9 <Vin <12 you then have different answers for Vout, depending upon which case you choose. This is logically inconsistent.
 

WBahn

Joined Mar 31, 2012
30,062
Jeezzz... You're also making it hard. I was looking for the original picture of 1st post... I only uploaded those other circuits so that we could see the equivalent circuits for each situation!
Well, don't you think that your customers and/or employers are going to expect consistency in your work?

Better to fight with it now and learn how to pay attention to detail than to start learning it after you've been fired a few times for lack of it.
 

Thread Starter

PsySc0rpi0n

Joined Mar 4, 2014
1,763
@PsySc0rpi0n
You seem to have lost sight of the earlier advice you received about checking that your answer is consistent and logical.
In your piecewise statement in post #37, it should be clear there are glaring errors. For the two input ranges 9 <Vin <12 & 9<Vin <13 you state different outputs. For the mutually inclusive range 9 <Vin <12 you then have different answers for Vout, depending upon which case you choose. This is logically inconsistent.

I saw that. I have changed my post a bit after I saw it! Now the only inconsistency I have to my teachers answer is that last situaiton.

Well, don't you think that your customers and/or employers are going to expect consistency in your work?

Better to fight with it now and learn how to pay attention to detail than to start learning it after you've been fired a few times for lack of it.
Let's not put it that way. You're trying to place the bulls in front of the car. Let's go easy and slowly.
Anyway, I almost got the answer and I got few "helpful help". I saw a lot of complaints and just a little help that in practice. I understand that you want me to do everything perfect and that I should follow all your advices but I have no time to follow all your words... As you see I got the result without LTSpice. And I don't have time to check all my answers with it. And another reason is that most of the times, the answers I need, LTSpice can't give them to me! I like a lot LTSpice but unfortunately I don't have time to learn more.
Tomorrow I'll start another diodes exercise. Or maybe yet today!
 
Top