I'm working out to produce water level sensor using a capacitive sensor. The flow will be a voltage will supplied to the capacitive sensor, then the signal from capacitive sensor will be amplified. Lastly, the signal will be read by using analog pin on arduino. At first, I try to find the analog value that I can get from the arduino. So, I'm trying to amplify the voltage supplied by using LM324N, but I got the value of analog value recorded to be 0. I expect that the connection of op amp is wrong. The amplifier operation I used are 2 inverting amplifiers with gain of 3.0.
The circuit I copied into tinkercad (i used two 741 op amp since they dont have LM324N):
ps: (i) the 5v from arduino connected to the +ve part of voltage.
(ii) the output from second inverting op amp is connected to A2 on arduino
(iii) I used capacitor there to resemble as a capacitive sensor.
To what are you referencing your amplifier input? If it is 0V, and you do not have dual polarity supplies, then the inverting stage output can never go below zero.
An inverting op-amp circuit "naturally" has a high-impedance input which can be good with a "weak capacitive signal" but a capacitance doesn't provide a DC reference so you need a high-value resistor to ground, or a high-resistance bias circuit to keep the input from floating to an unknown voltage. It MIGHT be floating to a negative value, forcing the op-amp output to ground (assuming there is no negative supply and it can't go negative),
Forget the display for now, disconnect it and put it aside for later. Connect only the sensor and write some simple code to take readings from it and send them to the serial monitor. Only when you are happy with how that works should you try to get the display working. When you are happy with the display only then try to combine the two.
The input will be from 5v pin on the arduino board. I already add the schematic diagram including the code I used into the post. Hope that it helps you to understand the circuit.
I just learned basic things in classes during my foundation level. But during that, I just copied whatever been told in the tutorial book basically. I can tell you that I'm not quite good in anything related to the electronincs and arduino.
To be clear the break that may need to be bridged is in the center of each power rail in the black "squares" as well as connecting the top and bottom rails.
I connected it in a different which is I made the upper and lower rails connected to two different 5v pin and ground pin on the arduino board. I thought it will be the same.
That circuit is never going to work.
U3 needs a negative signal on it's (-) input to generate a positive output.
U2 can't provide that negative voltage on a single supply.
The cap on U2 seems ornamental.
The cap in a capacitive sensor is normally part of some sort of oscillator, where a change in capacitance changes the frequency or pulse length that can be measured.
I see nothing of that in the circuit provided.
Leo..
I suspected your op amp was connected like that. The output of U2 cannot swing below 0V without a negative power supply. The lowest voltage it can go is 0V, the -ve power supply (actually it is a few hundred millivolts above 0V as the transistor on the op amp output will saturate).
There are two fixes
provide a negative supply – that is a bit of a fiddle.
Or 2) much simpler is to bias the non-inverting inputs of the amplifier to form a sort-of artificial 0V. This could be at half the power supply voltage ~2.5V in your case. However, the LM324 will not swing to the full positive power supply, it needs ~2 x Vbe drops so about 1.4v. The max it can swing is 5-1.4 = 3.6V. So bias the non-inverting inputs to half of this 3.6/2 = 1.8V to give you maximum voltage swing.
I have given a crude sketch of how to modify your circuit. Break the connection to the two i.e both, non-inverting inputs and connect to the junction of the resistors.
I’ll leave it to you to calculate the two resistors. For now you can ignore the LM324’s high bias current.
I would add that I do not understand how your capacitive sensor provide an input. That is probably a separate issue.
Im working for building a water level system by using capacitive sensor right now. My idea is the signal from the capacitive sensor will be read by arduino in term of analog signal. Before this, I have tried to used inverting amplifier for the signal conditioning, but it results the analog signal to be 0. The circuit i have used is as below:
If You post a link to the datasheet of the sensor You might get useful replies. Please read the topic "How to get the best out of this forum', and follow it.