boards freezing

I have two different uno boards in two different projects that have the same problem. The program occcationally freezes in the chip. Sometimes after a couple days, Sometimes after a couple weeks. temporarily unplugging the power to reset them fixes the issue.

one of the projects is a simple thermostat with a relay and a temperature sensor.

I dont see how this could be a coding issue since the boards freeze at uneven intervolds.

has anyone had any similar problems?


Posting tips.

  • Always list the version of the IDE you are using and the board version if applicable.
  • How to insert an image into your post. ( Thanks Robin2 )
  • Add your sketch where applicable but please use CODE TAGS ( </> )
  • Add a SCHEMATIC were needed even if it is hand drawn
  • Add working links to any specific hardware as needed (NOT links to similar items)
  • Guessing is not the best way to describe an issue. Actual facts are the most important.
  • Remember that the people trying to help cannot see your problem so give as much information as you can

there is no circuits or unusual wiring, just one lead that triggers a relay module and a small temperature module. It's powered by the wall plug that came with the board. it's a non-official uno. Just wondering if anyone else has ever had this problem.

Until we know exactly what it is there is little we can offer.

I gave you the posting tips so that's about the best advice you will probably get without details.


Provide a drawing of how everything is connected. Provide links to the relay (board?) and temperature sensor. Provide your code. What are you switching with the relay?

Provide details of your other project; same questions as above.


I didn't think of that but it makes a whole lot of sense. they are cheap wall adapters so they are pry minimal. and I know relays can require a decent amount of power. I want to try spycatcher's solution. if that doesn't work i will get out to the project and post pictures and specifics.

I've never used capacitors before. can someone recommend a size? Anything else I need to know? Is it simple as one lead to ground and one lead to 5v?