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
  • 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 auto-oscillating Pi gpio pin--Where does it come from, can I stop it?
  • 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
  • Replies 9 replies
  • Subscribers 676 subscribers
  • Views 1367 views
  • Users 0 members are here
  • gpio_gclk
  • gpio
  • raspberry p
  • raspberry_pi_space
  • i
Related

auto-oscillating Pi gpio pin--Where does it come from, can I stop it?

jimjulian
jimjulian over 9 years ago

Hello,

 

  I've been using my Pi for exploration of the idea of a SoC. The only device I've ever connected the Pi to was an eight channel relay board. You've probably seen them, they're almost ubiquitous. They use the Songle relays in groups of 2, 4, 8, and 16.

  I had been trying out different software arrangements, such as MyPi, iControl, pi-blaster, Cayenne, WebIOPi/Weaved, and somewhere along the line my Pi's GPIO_GCLK pin stopped responding. Eventually, I removed the wiring from the relay board end and reconnected. This time, the pin worked...sort of.

  The pin generates a pulsed signal about every ten seconds that lasts two seconds. The two second interval is filled with 50% duty cycle 0.03 second on-off switches.

  I have no idea where the signal is coming from but I'm beginning to suspect that the pin's function as GPIO_GCLK has something to do with the situation.

If anyone knows what is happening, or has any ideas on how to proceed, please feel free to post.  All comments are appreciated.

 

Thank you,

Jim J

  • Sign in to reply
  • Cancel
  • shabaz
    shabaz over 9 years ago

    Hi Jim,

     

    How are you measuring this, with a 'scope?

    Can you show a detailed photo of your set-up, indicating how you are performing the measurement and also a link to the specific board you're using. Some are not designed for 3.3V logic level control. Also an indication of how the relay board is powered (from the Pi?) and which pi you're using and which power supply.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • balearicdynamics
    balearicdynamics over 9 years ago

    Hi Jim,

     

    I try to guess that something almost random may occur if you don't use a pull-up or pull-down resistor to force the default status of the digital pin. I see things like this but more and more frequent happening to the Arduino boards if in some conditions the I/O signal is left floating in one of the two states.

     

    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jimjulian
    jimjulian over 9 years ago in reply to balearicdynamics

    Hello Enrico,

     

       Thanks for responding.

       If the pattern weren't so regular, repetitive, and predictable, I would make that my first theory of cause.

     

    Thank you,

    Jim

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jimjulian
    jimjulian over 9 years ago in reply to shabaz

    Hello shabaz,

       I used my laptop to record the sound created by that relay's signal  that is connected to the GEN_GCLK gpio pin. I used the freeware program, Audacity. I use an Apple iPhone charging plug as a power supply. I also have an Apple iPad charger for heavy duty use. I'm using a Raspberry Pi 3.

     

       I recorded several times to make sure I was getting reproducible results. I then applied the Audacity's frequency analyzer to the waveform and compared that to a zoom on the recording itself.

       I've listened to the pattern well over a dozen times.

       I'm an  electronic engineering technician. There is nothing wrong with the relay board. The board allows connecting, either the 3.3vdc supply, or the 5vdc supply to the relay board. In fact, one user, on YouTube, suggested using the 5vdc for the relay output circuit and the 3.3vdc for the input circuit. I tried all three ways : 5vdc, 3.3vdc, and 2.3vdc + 5vdc. All three work. By input and output, I refer to the opto-coupler that isolates the Pi from the relays'  coils.

       I may have inadvertently damaged a Pi board component. I'm still open to that possibility.

       My  next step is going to switch connections with another gpio on the relay card and see if anything changes. I will probably disconnect that pin from the relay card and try to detect a signal using something like an LED and resistor in series.

       The pin connections follow Broadcom'a function designation :

     

     

     

    Hi Jim,

     

    How are you measuring this, with a 'scope?

    Can you show a detailed photo of your set-up, indicating how you are performing the measurement and also a link to the specific board you're using. Some are not designed for 3.3V logic level control. Also an indication of how the relay board is powered (from the Pi?) and which pi you're using and which power supply.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 9 years ago in reply to jimjulian

    Hi Jim,

     

    We've seen in the past cheap ebay relay boards that are borderline on 3.3V logic levels, and others (I think mcb1 ) suggested swapping out a part (resistor) to make them function well. With no link to the specific parts you're using, it is hard to help. Who knows how the opto-coupler is connected, or the particular opto-coupler specs since there is no schematic and no photo to look up the part number inscribed on it.

    Similarly, what is the rating of the Apple iPad charger, and cable - Apple devices have quite flimsy cables generally (just a personal opinion), and the Pi 3 is very sensitive to its supply (that's a fact unfortunately). Is the relay board powered from the Pi?

    Unfortunately, more detail is needed. Trying the LED+resistor as you suggest is a good idea.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jimjulian
    jimjulian over 9 years ago in reply to shabaz

    Hello shabaz,

     

       As I mentioned previously, I am, or was an electronic engineering technician. My knowledge and experience have lain dormant for awhile but are self-refreshing. I believe I can take the task from here. Thank you for your assistance.

    Jim

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mcb1
    mcb1 over 9 years ago in reply to jimjulian

    I use an Apple iPhone charging plug as a power supply. I also have an Apple iPad charger for heavy duty use

    Unless Apple chargers receive the correct voltage on the USB+ and USB- pins they only supply a limited current.

     

    You need to fool them into thinking they are connected to an apple device.

     

    IMO using a charger designed to reinflate a 3.7v lithium battery, as a power supply was the worst decision Raspberry Pi ever made.

    Do your self a favour and buy one of the inexpensive chargers here on element14 and ensure that power is never a factor.

     

    Mark

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • jimjulian
    jimjulian over 9 years ago in reply to mcb1

    Hello Mark,

     

       The chargers are sufficient for my use.

       A couple of years ago, I owned an Apple iPad 3. I ordered a six foot cord that didn't work. I sent the cord back and asked for a replacement. That cord didn't work either. I searched the web for information and ran across a study someone had done of the iPad charger. I also found a table of the various voltages and how they are interoreted.

       The chargers are intelligent and adjust their outpu based in the two lines that are not power lines.

       The cord was so long that the pedqnce developed allowed the iPad to be misinterpreted and I kept getting error messages. The line losses dropped the voltage below the level acceptable as for an iPad.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jimjulian
    jimjulian over 9 years ago

    Hello,

     

      Since posting this, I've discovered that the pin had been set to input. I installed the Weaved/WebIOPi software and set the pin to output. Everything woorks now.

     

    Jim J

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
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