2

I decided I would like to start learning how electronics work, so I got myself The art of electronics.

I guess its trivial, but I cannot wrap my head around why is there a wire that I painted with red color. Doesn't it mean, that the LED has voltage all the time because of the red wire? And how would the circuit look as a whole, with battery? Do all the grounds go into the second terminal of battery?

I would understand the circuit without the red wire. If the temperature is higher that 30C, LED circuit gets voltage and starts working.

Could anyone help me with explaining how it works?

Thank you

Figure 1.18

  • 3
    Hoping that AoE will teach you electronics is bad assumption. AoE is more a reference book, for these who already know how things work. – DannyS Jun 05 '18 at 08:08
  • What book would you advise to learn electronics from? Assuming no knowledge – user3048782 Jun 05 '18 at 08:10
  • 2
    I started out with the Electronics for Dummies' book. Explains things really well. Great for beginners – MCG Jun 05 '18 at 08:23
  • Discussion on EE books: https://electronics.stackexchange.com/questions/616/basic-electronics-book – Blair Fonville Jun 09 '18 at 08:04

2 Answers2

1

If the red wire was not there, How would the comparator and LED get any voltage? That entire top line is the 'Power' rail. Usually, power is drawn at the top with GND at the bottom.

The Op-Amp and the LED always have voltage, regardless of the temperature at any time. When the temperature gets high enough, the comparator pulls its output to GND, which allows the LED a path to GND, and allows it to light up. If the comparator output was high, there would be no voltage drop over the LED, so it would be unable to light up.

You are correct that the grounds would go to the negative terminal of the battery (if this were a battery powered circuit).

Think about what would happen if that red wire were absent. Where would the comparator get its supply voltage? Without it, how could it provide a high output? Where would the LED get powered from? Assume it did get power from the comparator, how would it light up? It would be connected the wrong way.

The comparator works so that when the inverting input (-) is below the non inverting (+) input, the comparator output is high. If the inverting input is higher than the non inverting input, the output goes to GND.

Here is how the 2 states would work:

schematic

simulate this circuit – Schematic created using CircuitLab

MCG
  • 11,809
  • 4
  • 34
  • 70
  • Great, thanks :-) Yes, I thought it would get power from the comparator but I didn't realize that comparator itself wouldn't have any power – user3048782 Jun 05 '18 at 07:59
  • You need to understand that 'having a voltage' means there's a voltage DIFFERENCE between a components 2 connections. The LED could be connected to 1000v on one side and still have no voltage if the other leg is left disconnected. The term used commonly is that there is or isn't voltage ACROSS a device. In this circuit, the output of the opamp is 'high' (5v) when the temperature is below 30 degrees, and as such the voltage across the LED+resistor is 5v-5v=0v. Once the output of the opamp goes low (0v) (temperature above 30 degrees), the voltage across the LED+resistor becomes 5v-0v=5v. – RJR Jun 05 '18 at 23:18
  • @MCG The first state you drew is sort of inaccurate, the TL372 has an open drain output. Hence, it doesn't go "high", it goes high-impedance. The reason the comparator output goes high is because it's pulled up to +5VDC via the LED and resistor in series and no current flows when the comparator output is high-impedance. The comparator output either goes to ground when the FET turns on or goes high-impedance when the FET turns off. Some comparators have push-pull topology at the output which does what you're saying. The one described in the circuit does not have that. – mrbean Feb 22 '21 at 08:27
  • @mrbean I'll be honest, I didn't look at the datasheet for that particular comparator, so didn't check the topology. Pretty much works the same way though. By all means, feel free to edit the answer, or I can do it if I remember to later! – MCG Feb 22 '21 at 10:00
0

Current always needs a complete loop to flow, in this case the LED is indeed always connected to the 5V but the cathode of the LED is not always connected to ground. Only when the temperature gets higher as 30C the output of the comparator is pulled to the ground and the loop 5V, led, Ground is complete.

The comparator in this case is being used as a drain for the current, instead of a source.

Remco Vink
  • 673
  • 4
  • 16