Page 1 of 1

Possible ground issues

Posted: Tue Dec 07, 2021 12:50 pm
by siliconchip
hi all
I've made a simple circuit to read a resistance using the ADC function, I'm using a 267 Ohm reference resistor with a 0.1% tolerance, when the test switch SW1 is pressed this operates a 5V relay with a coil resistance of 370 Ohms and 0.2 ohms between pole and NC contact to connect the unknown resistor value to ground, however the reading I'm getting on the LCD is around an ohm higher than my fluke shows, if i then connect the unknown resistor from the REF resistor to ground to eliminate the relay side the value is still around an ohm out BUT if i then remove the negative feed to the emitter the circuit reads bang on to the flukes reading, I'm using a 7805 regulator as my 5v feed with a 9v battery I've even tried 2 9v battery's in series so the input is 18v in case of a supply issue but no change, I've also connected the emitter pin directly to the input side of the regulators ground but again no joy, along with a 100nF cap from the analogue input to ground, and the bizarre thing is on the very rare occasion from power up it sometimes reads correct ??

i know that with out the relay connected and the unknown resistor connected to the ref resistor the circuit works bang on comparing to a fluke DMM, there is definitely an issue with the ground side of the relay/transistor that's upsetting the circuit, I've even placed 100 and 220uF caps near the relay in case it was a spike issue but no luck, with a DMM connected to the input supply the voltage is pretty stable when the relay throws, I've attached a schematic of the circuit but not the flowchart as I'm sure the software side works, the schematic shows an RC circuit for debounce and I've also tried this in software adding a debounce time but either didnt resolve the issue, id appreciate any input to try to solve this thanks in advance

PS in case im asked why the relay is needed its part of a future project

Re: Possible ground issues

Posted: Tue Dec 07, 2021 9:35 pm
by stefan.erni
Hi siliconchip

BUT if i then remove the negative feed to the emitter the circuit reads bang on to the flukes reading,
You can add a resistor from basis to emitter to be sure that the transistor turns off better

regards

Stefan
basis_2021-12-07_21-18-00.png
basis_2021-12-07_21-18-00.png (119.42 KiB) Viewed 5040 times

Re: Possible ground issues

Posted: Wed Dec 08, 2021 2:02 pm
by siliconchip
Hi stefan

I have tried this but it made no difference

Bob