I've just gotten into electronics and PCB design. I am working on an automated hydroponic system. It basically consists of a mainboard and a sensor board connected via a 10-wire flat ribbon cable.
The mainboard's heart is an ESP32-WROVER-IE that reads all the sensors and controls some LEDs, whilst communicating via BLE.
The sensor board hosts several sensors for water level, humidity, temperature and most crucially an analog circuit to measure the conductivity of the water-nutrient-solution.
This circuit is the one I am having trouble with.
It is designed using a [CD4060] to generate an AC-signal, a 4 channel op-amp ([LMV324],) a standardized probe (just 2 wires with a fixed distance,) and some peripherals. I am sorry there are no links here, I am limited to 8 of those.
I know it is easy to achieve an AC signal just using your microcontroller and the 4 channel OP-amp is probably overkill as well, but I have tried this circuit successfully with a DFRobots breakout board and didn't want to reinvent the wheel. Now I have implemented the design with what I thought were only minor changes to the power supplies but those changes seem to have broken the design.
The original circuit uses 3V from an LDO and a voltage inverter to generate -3V:
Here is the actual DFRobot schematic.
Since I also need 2.85V for one of my sensors I decided to swap the rather exotic LDO for a dual output one: TOREX XC6421AB26ER-G.
Since the TI-Inverter seems to be impossible to get your hands on before 2023 (Jesus Christ), I've settled for an alternative: the LTC1044A.
If everything worked as it should, there should be a voltage of 0-2.3V on the output pin going to my ESP32s ADC, correlating to the resistance of the probe inside the water. Grabbing my multimeter and replacing the probe with actual resistors, the DFRobotboard spits out the following:
Resistance value | Voltage |
---|---|
1Mohm | 0V |
470Kohm | 0V |
220Kohm | 0V |
100Kohm | 0V |
47Kohm | 0.01V |
22Kohm | 0.04V |
4.7Kohm | 0.23V |
2.2Kohm | 0.49V |
1Kohm | 1.1V |
470ohm | 2.3V |
My own iteration of the board is slightly off:
Resistance value | Voltage |
---|---|
1Mohm | 2.41V |
470Kohm | 2.38V |
220Kohm | 2.39 |
100Kohm | 2.40V |
47Kohm | 2.38V |
22Kohm | 2.38V |
4.7Kohm | 2.39V |
2.2Kohm | 2.38V |
1Kohm | 2.42V |
470ohm | 2.42V |
I have realised some things measuring the board:
The output voltage of the Torex drops from +3V to +2.6V when I put on the load (only the mentioned circuit relies on +3V.)
The LTC1044A only outputs about -1V instead of -3V or at least -2.6V.
The LMV324 gets pretty hot right away.
Both the Torex and the LTC1044A provide the right voltages when disconnected from their load.
I have had people check the circuit and the PCB, and although the layout of the peripherals was amateurish at best, I am sure they are at least wired up correct. I have already cleaned that up for the next iteration (also made a 4-Layer PCB instead of 2,) but I am afraid this is not going to solve the issue.
Any ideas why this could be happening? Is the LTC1044A maybe just not powerful enough?
Attached you can find my schematic and PCB-layout:
It was done using Easy EDA, like a true amateur. I can also share the JSON files or export to various actual EDA-tools if need be.
Edit: Doublechecked the footprint and wiring, measured every resistor on the board: only R14 seems to be off. 680K instead of 1M. Also here is a picture of the actual PCB: (Had to delete the picture due to link limitations)
Unfortunately swapping the resistor, as expected, doesnt make a difference.
Edit: I Have desoldered the LMV324 and replaced it with the one from the DFRobot board. Following measurements were taken:
Resistance value | Voltage |
---|---|
1Mohm | 0V |
470Kohm | 0V |
220Kohm | 0V |
100Kohm | 0V |
47Kohm | 0.01V |
22Kohm | 0.04V |
4.7Kohm | 0.23V |
2.2Kohm | 0.50V |
1Kohm | 1.1.V |
470ohm | 2.3V |
This is very promising, but unfortunately it does only work with resistors, not with the probe. Even very salty water won't trigger it. Shorting the probe with the spoon inside the measurement container immediately puts out 2.3V. Shorting it with my multimeter in order to measure the current yields 5.6mA.
Any clue what I ran into here?