Arduino freezes after 30-90min

I've tried placing the sensor closer again, still freezing.
Wires need to be that long, else i wouldn't have correct readings.

I'm fairly certain it has something to do with the power and relay.

FYI, readings won't change when transmitted digitally over longer distances. If what you mean is your sensor needs to be that far from your Arduino, fine, but if you can't test the shorter bus scenario by moving the sensor, move the Arduino. Otherwise, we're quite possibly chasing something that can't be fixed.

What is the 5 volt power source you're using when not using your laptop? If you have a multi meter, does it have a low function where you can monitor the 5 volt line to see if it dips low at any point? Try charging your phone from it, see if you can draw it down and kill it that way.

image

It runs perfectly when i unplug the heater.
I'm using a phone charger with USB cable to power the arduino.

U asked for a full schematic so here it is:

I connected the MOV like this for once but it's still not freezing, maybe it's a defect MOV? I got it from an old broken heater anyway.
Naamloos

1 Like

What is the MOV's voltage rating? You are putting a peak voltage of 325 across it. Your relay wiring cannot work you are showiing the diodes in series with the loads and the polarity reversed.

What would be the best way to eliminate voltage spikes over the relay?

My friend just came by too take a look at it, but even after hours of trying different things, we have concluded that it may be caused by the relay. We can't find any issues with program or wiring, so maybe the relay would be defect, i'm ordering a new one.

I'm also looking into using a watchdogtimer, but have no idea how it works.
Would this be a way of resetting the arduino after it has stopped working, or are there any other ways to programmaticly reset the arduino uno?

Do you understand this drawing?

New-Project

Always told to do that by my electronics book (Art of Electronics 3rd Edition).
:grin:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.