Skip to main content
Visitor 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?

    This topic has been closed for replies.
    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

    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!

    ULOKAuthor
    Visitor 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.1Answer
    Graduate 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

    ULOKAuthor
    Visitor 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!

    Super User
    November 6, 2024

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