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
Community Hub
Community Hub
Member's Forum Having RPi and arduino connected via USB for a long time causes RPI to hang
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Leaderboard
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Community Hub to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 4 replies
  • Answers 1 answer
  • Subscribers 594 subscribers
  • Views 662 views
  • Users 0 members are here
  • raspberry
  • to
  • pi
  • hang
  • arduino
Related

Having RPi and arduino connected via USB for a long time causes RPI to hang

screamingtiger
screamingtiger over 10 years ago

When I leave my Arduino connected to my RPi (Raspberry Pi) it will hang after a couple hours.  I've had data going in and out, and then I tried it with not data going in and out at all (Empty sketch).  Simply having it connected to the USB will cause the RPi to hang after some time.  It never hangs instantly but takes hours.

There is a wifi adapter connected as well to the other USB.  I've turned off the LogD to save SD card writes I may have to turn it back on but curious if anyone has run into this.

 

I have confirmed without the arduino connected the RPi can run for days with the wifi adapter.

 

I've tried to power the ardunio from the 5V pins of the RPi directly as well so It not sucking current from the USB, with the same issue.  The Rpis and arduino will use I2C but I have the USB connected for debug reasons and it is annoying it is unstable.

 

The only thin I haven't tried yet is external power (not from the RPi).  Is this a power issue?  No servos are connected, no drains from the arduino at all.   I find it odd if it is a power issue it would take so long to hang.

 

It is an arduino Nano and RPi model B if that matters.

 

Thanks for any information!

  • Sign in to reply
  • Cancel

Top Replies

  • jw0752
    jw0752 over 10 years ago +1 suggested
    Hi Joey, I would start by eliminating the power supply as a factor. A simple thing that has worked for me in the past is to add a 1 or 2 ohm resistance in series with the 5 volt supply between the two…
  • jw0752
    0 jw0752 over 10 years ago

    Hi Joey,

    I would start by eliminating the power supply as a factor. A simple thing that has worked for me in the past is to add a 1 or 2 ohm resistance in series with the 5 volt supply between the two boards and decoupling capacitors (perhaps 0.1 uF) from either side of the resistor to ground. I would also measure the voltage that is being supplied to the Arduino to ensure that it is 5V. Sometimes problems like this can be marginally functional and therefore the glitch that triggers the failure may only occasionally cause the lockup. As your equipment is on for longer periods of time heat may also cause some of the components to become more susceptible. As you mentioned you can also try an experiment where you give the Arduino its own power supply but I would be tempted to try to solve the problem as you currently have it hooked up first.

    John

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • screamingtiger
    0 screamingtiger over 10 years ago in reply to jw0752

    I'll try that.  One thing to mention, the arduino never crashes so the voltage to the ardunio must be ok.

    When no connected via serial, just I2C they both run forever.  Something to do with the USB.  I am also going to try leaving it on for a few hous without the wifi adapter connected to the USB.  Just frusterating as the USB serial is a good way to use just 1 arduino and send data back and forth.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • screamingtiger
    0 screamingtiger over 10 years ago

    I did confirm that with the USB not connected, just the 5V and the I2C connections, everything stays stable over night.

    It doesn't matter what I do or don't have connected, if the USB is connected between the two the RPi hangs after a few hours.  I'll turn logging and and see what I can catch.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • screamingtiger
    0 screamingtiger over 10 years ago

    The RPi and arduino have been running a couple days now without the USB connected, but connected via IC2.  So definitely something up with the USB connection.

    Going to turn on logging tonight and hook them together.

     

    It would be nice for some projects to be able to trust the USB to be connected and use that serial interface to send data back and forth, but at this point I don't trust it.


    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • 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