# Need help with a homework (LM335 thermal controller circuit)

#### MrAl

Joined Jun 17, 2014
6,788
Yes I am referring to the original circuit, but I meant R3 and R4. (Sorry for that mistake) I understand the role of R5 and R6. I actually already made a post about these too, theorising that they are there to narrow the range.

Alright, I see where the issue is now. I didn't consider that rounding would affect the result at a great degree.
Hi,

R3 and R4 are there to bias the 'diodes'. They need a certain minimum current to work right.

#### Matherios

Joined Feb 25, 2018
74
Hi,

R3 and R4 are there to bias the 'diodes'. They need a certain minimum current to work right.
How do we determine their values?

Last edited:

#### MrAl

Joined Jun 17, 2014
6,788
How do we determine their values?
Hi again,

Well for each 'diode' we do the same procedure really.

Start with finding the min current for the diode. Then find the max current draw. The current through the diode should be at least the minimum once you subtract the current draw that the rest of the circuit takes from that node.
In reality you may want to double the min current for the diode, and increase the max current draw value by say 20 percent, just to make sure it works with any variation in real world component values.
The resistor value sets the total current (diode plus circuit) so choose the value to satisfy the above requirements.

Does this sound like something you could do yourself?

#### Matherios

Joined Feb 25, 2018
74
Hi again,

Well for each 'diode' we do the same procedure really.

Start with finding the min current for the diode. Then find the max current draw. The current through the diode should be at least the minimum once you subtract the current draw that the rest of the circuit takes from that node.
In reality you may want to double the min current for the diode, and increase the max current draw value by say 20 percent, just to make sure it works with any variation in real world component values.
The resistor value sets the total current (diode plus circuit) so choose the value to satisfy the above requirements.

Does this sound like something you could do yourself?
The Max Current threw the diode is Id2(max)=P/V=0.25/5,6=44.64mA
The Current it requires to work is Id2=Id2(max)/10=4,464mA
But after that i don't know what to do.

#### ericgibbs

Joined Jan 29, 2010
9,070
hi M,
To get the value of R3 which is the 'load' resistor for the LM335, look at the datasheet

The LM335 operating output is approx 3v, the Vsupply to the top of R3 is 5.6v.
Using the attached image of the operating current, select a typical operating current, then calculate the value of R3 .

What is the R3 value.??

E
PS: You do not have a CAL pot, so ignore that part.

#### Attachments

• SotosElec

#### MrAl

Joined Jun 17, 2014
6,788
The Max Current threw the diode is Id2(max)=P/V=0.25/5,6=44.64mA
The Current it requires to work is Id2=Id2(max)/10=4,464mA
But after that i don't know what to do.
Hi again,

Let's round the min to 5ma, with the max 45ma.

That means the diode must see at least 5ma and cant see more than 45ma.

That in turn means that the bias resistor should be chosen so that it keeps the current in that range, 5 to 45ma, no matter what the rest of the circuit does.

The circuit does various things like switch from one state to the other then back again. So you have to calculate the current draw from the diode and make sure the resistor chosen can provide that current in additon to the current the diode itself needs.

As the circuit switches, the diode sees more current from the circuit which means the current through the didoe goes up. Just make sure that it does not exceed 45ma.

Does that make sense?

I am posting the reference circuit in the next post, the circuit i had been using.

Attached here is the circuit for the diode biasing.
Note Id is the current to watch. Try to set Ir such that Id is always between 5ma and 45ma, trying to stay as low as possible. This means checking all circuit states for sink and source currents, all possibilities, while watching Id. Last edited:
• SotosElec

#### MrAl

Joined Jun 17, 2014
6,788
Hello,

Here is the circuit i had been using.

Note the output resistor is shown as R89. That is the series connection of R8 and R9.
If we use a simple trick, we can make R10 anything we want just about, then size R11 according to that.

The trick is very simple. We choose R89 (R8 and R9) such that when combined with the pullup resistor (say 1k to 10k) provides a HIGH output not of 12v, but of exactly (more or less) 6.26 volts.
This 6.26 volts is another "magic value just like the average LM voltage of 3.13. Note that it is exactly two times the average LM voltage. We never got this far because the conversation turned in other directions so i take a minute to finish up here.

The reason this other magic voltage works so well is:
1. It allows us to choose any value for R11 and then calculate R10 as per the required hysteresis, or shoose R10 and then calculate R11.
2. It provides perfectly symmetrical hysteresis for equal noise immunity for either comparator state.

The idea is simple:
Just make the output high voltage 6.26v by computing:
6.26=12*R89/(R89+R1)

and then choose R11 so that it does not draw too much current from that node. R10 can then be calculated based on the vLM high and Vout low criterion:
3.15=6.26*R10/(R10+R11)

This is actually simpler to do also, and we get to specify R8 and R9.

So the procedure then is:
Calculate R89 after shoosing R1 say 1k.
Choose R11 so it does not draw too much current from the node at the top of R89.
Calculate R10.

Sound simple enough? Try it and see how well it works.

Here is the circuit.
Vref is 3.13 as usual, Vin is vLM.
R89 is optional as per above. • SotosElec