Possible ground issues

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
siliconchip
Posts: 392
Joined: Wed Jan 05, 2011 11:24 am
Has thanked: 101 times
Been thanked: 24 times
Contact:

Possible ground issues

Post 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
Attachments
ADC Reader.docx
(35.4 KiB) Downloaded 132 times

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: Possible ground issues

Post 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 4473 times

siliconchip
Posts: 392
Joined: Wed Jan 05, 2011 11:24 am
Has thanked: 101 times
Been thanked: 24 times
Contact:

Re: Possible ground issues

Post by siliconchip »

Hi stefan

I have tried this but it made no difference

Bob

Post Reply