Initially, I was thinking to not put this stuff to a separate article, but then decided to do it in a separate one, since it looked like it worth to do this.
Note: at the moment of translation (2022) I would change this schematic to make it as a current source, rather than making a buffer – repeater.
OK, so we have from a photoresistor the resistance range is 1- 30KOhm.
For the given circuit, the maximum current is when we have 2.5V, for a minimal current 0.7V, so the range is 1.8V. I use the opamp in the inverting amplifier configuration, so I used R5 equal to 1K, which gives the minimal gain equal to 1. Now the other border – 1800/30 = 60mV
Необходимо: для максимального тока достаточно напряжения 2.5в, дальше уже ничего не меняется, для минимального граница 0.7 вольт. Итого, дельта равна 1800 мВ. В данной конфигурации на мой взгляд проще всего было получить коэффициенты усиления 1-30, поэтому R5 = 1 кОм. Осталось посчитать то напряжение, которое нужно усилить, чтобы получить нужные цифры – 1800 / 30 = 60 мВ.
Now we need to form reference dc voltages for inputs, one just a half of the supply with help of two equal resistors:
With the other input need to make a couple of “educated” guesses, in a real world inputs of OA are not ideal and consume the current. For TL062 it consumes about 35uA, so after some experiments I finally settled:
A quick test with measuring of the photoresistance value:
The gain then equal to 11.92 (ideal one of course), so we should get approx. 2.48-60*11.92 = 1.7648
As I mentioned the value I calculated was for the ideal case, in a real life the gain is impacted by the real gain of the OA, which I did not bother to include in the equation to know the deteriorated value.
The video demonstration as usual:
By the way, this video is clearly showing my mistake with a PCB – I had placed a photo-sensor from the same side as a LED of the LCD, so it rather picking combined brightness which is not so good.