Skip to main content
Associate II
November 5, 2024
Solved

GPIO Read interact with GND or VCC

  • November 5, 2024
  • 2 replies
  • 1646 views

Hi,

I use STM32F103C8T6 a GPIO input pin to read a high or low signal from another GPIO output pin, and connect a 3Mohm resistor between two pins, and I notice touching GND with hand will influence the signal status, than I measure the resistance between GND and GPIO pin, it is around 10Mohm. I want to isolate the signal from GND interference, how should I do? I have to keep 3 Mohm resistor. will it be better if connect a capacitor between input pin and GND? or connect a large resistor in between?

Best answer by PGump.1

Hi,

I would NOT recommend using GPIOs, directly, for that purpose.

In electronics, there are many Interface devices, for many purposes. I recommend finding one suitable for your application.

Many MCUs have integrated interfaces, perhaps there is a MCU with a suitable interface for your application...

I hope this helps.

Kind regards
Pedro

2 replies

Andrew Neil
Super User
November 6, 2024

@ULOK wrote:

I have to keep 3 Mohm resistor. 


Why??

At that level of resistance, it is to be expected that touching with a hand will be significant!

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
ULOKAuthor
Associate II
November 6, 2024

Hi, it is intended for hand detection, but touching GND will also be detected which is surprise. 3Mohm vs. 10(or 6Mohm), I want to increase the resistance to GND so that GND will not influence signal that much.

PGump.1
PGump.1Best answer
Senior II
November 6, 2024

Hi,

I would NOT recommend using GPIOs, directly, for that purpose.

In electronics, there are many Interface devices, for many purposes. I recommend finding one suitable for your application.

Many MCUs have integrated interfaces, perhaps there is a MCU with a suitable interface for your application...

I hope this helps.

Kind regards
Pedro

AI = Artificial Intelligence, NI = No Intelligence, RI = Real Intelligence.
ULOKAuthor
Associate II
November 6, 2024

Hi Pedro,

Can you recommend a MCU with such interface? and better have CAN interface too. STM32 series will be good to use. Thank you!

Andrew Neil
Super User
November 6, 2024

look at capacitive touch sensing - many microcontrollers have it built in, and there are also external chips available.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.