Good day everybody,
Im currently building a set of line detection sensors using infrared sensors and a comparators which output are connected to a PIC microcontroller for a line following robot. The figure below is a schematic I found online which uses a LM358 OP AMP, however I thought of using 2 LM324N OP AMPs instead of 3 LM358 as its more cost effective.
The figure below shows a schematic of 4 sets of IR sensors connected to a LM324N which operating principle is based on the schematic above.
+5V = from LM7805 voltage regulator
Tx = IR transmitter
Rx = IR receiver
R = resistors
RV = 25 multiturn 10k trimmer (3296)
D = LEDs to indicate output high or low
U = LM324N OP AMP
J = single female pin header to connect to input ports of PIC microcontroller
I have built this configuration on a breadboard and generally there are no problems.
However, when I fine tune the circuit to detect the black and white surface at a close distance (2cm) by adjusting the 25 multiturn trimmers, I will encounter a problem. Adjusting 1 or 2 trimmers will not give me any problems but adjusting the 3rd or 4th trimmers will cause the output of the previous 2 sensors to become either LOW or HIGH (opposite value from previous adjustment).
Therefore now Im stuck in a never ending cycle of adjusting the exact value of the trimmer every time I power it and this is not a practical way. I have run out of ideas on how to solve it as I do not know what is the problem.
Any suggestion/ improvements are welcomed