Anyone care to explain how this piece of circuit work?

enter image description here

I already build it and it works wonders but I can't figure it out.


The LM317 is used to provide a trim voltage - it's output will be around 1.25V or whatever it's internal reference voltage is, then the resistor/pot is used to derive a trim range of something like 0-140mV.
The PNP transistor to increase the current capability (the LM35 cannot provide 20mA by itself)

If we look at the numbers, we want a 16mA increase for 100°C. So this is 0.16mA per °C. We know the output of the LM35 is 10mV°C, so we can calculate the current through the 62.5Ω resistor:

10mV / 62.5Ω = 0.16mA, just what we need as the LM35 outputs 10mV/°C, which produces 0.16mA thorugh the resistor. Since the range is from 4-20mA, we need 4mA drawn to start with though. The LM317 will sink around 2.8mA (1.25V / 452Ω) so we just need another 1.2mA. 1.2mA * 62.5Ω = 75mV, so we trim the pot to about halfway for out zero °C reference at 4mA.

Then the voltage/current across/through the resistor increases. The LM317 current will stay static, so once trimmed it's just the output and PNP sinking the rest of the current. I'm not sure exactly how the LM35 is desinged internally, but it probably involves a compensated feedback amplifier stage to provide a low impedance output.
Roughly, the LM35 will sink current through it's supply pin, some of which comes through the base of the transistor and turns it on, until it's voltage at the output is the desired point.

| improve this answer | |
  • \$\begingroup\$ Well thank you very much, your answer was very complete and really helped me understand not only this circuity but increased my microelectronics knowledge in general. However There is one last thing the I am not quite understanding: is there any reason for using specifically an 402 Ω resistor? I understand that the 62.5 Ω one is needed to properly convert the voltage in current but I couldn't see why the other one needs to have such an odd value. instead of a more normal one, for example 400 Ω. \$\endgroup\$ – Pedro Dreyer Apr 24 '13 at 4:32
  • 3
    \$\begingroup\$ The 402 ohm resistor is probably a hint that this application circuit (from a NatSemi datasheet) is a Jim Williams design, from the days before he went to Linear Technology... An odd value and unobtainable resistor was his signature... \$\endgroup\$ – Brian Drummond Apr 24 '13 at 8:40
  • \$\begingroup\$ @PedroDreyer - No particular reason for the 402 value - I agree with Brian, it's very possible it's a Jim Williams design. You can use a 400 Ohm resistor here. If you think about it, a 402 resistor with a +-1% tolerance could be anywhere from ~398 to 406~ ohms anyway. \$\endgroup\$ – Oli Glaser Apr 24 '13 at 15:04
  • \$\begingroup\$ @BrianDrummond Thank you for the information. I think I would never figure it out by myself. \$\endgroup\$ – Pedro Dreyer Apr 24 '13 at 16:16

LM317 needs 3,5..5mA minimal load. The beter serial resistor value between LM317 out/adj pin is about 360..380ohms, which guarantees about 3,5mA load for LM317. Use 300ohms fixed +68 ohm var. resistor, for example. About the adjustment ot zero point (4mA). LM35 outs 0V at 0 degrees C. With pot. 50( or 68 Ohms) you can apply fixed NEGATIVE voltage between LM35 output and 62.5 ohms resistor. Because output voltage of LM35 at 0 degrees must be 0V, it will sinc current to achieve simetrical positive voltage over 62.5 Ohms resistor. Thanks to this you can add 0.5mA to total line consumptions and get 4mA value for 0 degrees. Sorry for bad english. Cheers

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.