element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Raspberry Pi 4 GPIO Leakage Voltage (1.2V) When LOW on Relay Module
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 8 replies
  • Subscribers 695 subscribers
  • Views 391 views
  • Users 0 members are here
Related

Raspberry Pi 4 GPIO Leakage Voltage (1.2V) When LOW on Relay Module

emreeyy
emreeyy 12 days ago

Hi everyone,

I am using a Raspberry Pi 4 Model B to control industrial 24V relay modules. However, I am not using an external 24V power supply; instead, I am routing the Pi's own 3.3V pin to the common power rail of the relays to use them as simple mechanical switches for 3.3V signals.

I have wired the Raspberry Pi GPIO pins directly to the relay signal inputs via a simple terminal block breakout board (no transistors or optocouplers are used yet).

The Problem:

 When the GPIO pin is ⁠HIGH⁠, I read exactly 3.3V on the line, which is correct.

 When the GPIO pin is set to ⁠LOW⁠, instead of 0V, I see a constant 1.2V leakage/floating voltage on the multimeter.

There is currently no common ground (GND) connection between the Raspberry Pi and the panel's internal structure. I suspect this 1.2V is due to a floating ground issue or feedback leakage through the relay's internal coil/status LED.

What is the best way to eliminate this 1.2V leakage and get a clean 0V when the pin is LOW? Should I use an optocoupler module (like PC817) or a transistor driver?

Thanks in advance!

  • Sign in to reply
  • Cancel
Parents
  • geralds
    0 geralds 12 days ago

    Hello,

    1. Do NOT connect a 24V relay directly to an output of the Raspberry Pi. This will damage the Pi's port.

    2. You need an external driver transistor to control the 24V relay. Alternatively, you can use an optocoupler such as the PC817.

    The GND - normally - is the base of each switched schematic, special circuits can have other base voltages.

    A relay has three operating states:

    a) Turn-on voltage: This is the minimum voltage at which the relay turns on.

    b) Hold voltage: This voltage is slightly lower than the turn-on voltage and can be even lower before the relay turns off. This voltage can help save power.

    c) Turn-off voltage: This voltage is so low that the relay turns off. A voltage may still be applied, but it will no longer be held.

    You can find the voltage states of your 24V relay in its datasheet.

    3. You can use an NPN transistor, for example. BC547 or BC546 or similar switching transistors (emitter to GND, collector to the relay) – the relay is connected to the supply voltage (+24 V).

    4. Don't forget the diode, e.g., 1N4007, in parallel with the relay coil; cathode to the positive supply voltage, anode to the switching transistor collector.

    Alternatively:

    There is another option where the relay is connected to ground (GND) and can be switched with a PNP transistor.

    However, this circuit is somewhat more complex and requires a few more components.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • geralds
    0 geralds 12 days ago

    Hello,

    1. Do NOT connect a 24V relay directly to an output of the Raspberry Pi. This will damage the Pi's port.

    2. You need an external driver transistor to control the 24V relay. Alternatively, you can use an optocoupler such as the PC817.

    The GND - normally - is the base of each switched schematic, special circuits can have other base voltages.

    A relay has three operating states:

    a) Turn-on voltage: This is the minimum voltage at which the relay turns on.

    b) Hold voltage: This voltage is slightly lower than the turn-on voltage and can be even lower before the relay turns off. This voltage can help save power.

    c) Turn-off voltage: This voltage is so low that the relay turns off. A voltage may still be applied, but it will no longer be held.

    You can find the voltage states of your 24V relay in its datasheet.

    3. You can use an NPN transistor, for example. BC547 or BC546 or similar switching transistors (emitter to GND, collector to the relay) – the relay is connected to the supply voltage (+24 V).

    4. Don't forget the diode, e.g., 1N4007, in parallel with the relay coil; cathode to the positive supply voltage, anode to the switching transistor collector.

    Alternatively:

    There is another option where the relay is connected to ground (GND) and can be switched with a PNP transistor.

    However, this circuit is somewhat more complex and requires a few more components.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube