Hi,Can I suggest that using protoboard and jumpers (length of conductors, and connection method) may also be contributing to the resets?Have you got bypass capacitors on the protoboard where 5V and gnd run?Tom.....
Umm ... this might relate back to that same wire:If the fan is "vent" (ventilation relay pin) in your code, then ...It looks like the blue wire (ventilation relay pin) is connected to Mega pin 12, which is IN1 at the relay board. If the grey wire in parallel with it is connected to GND at the relay board, then this wire can cause interference issues through capacitive coupling and inductive coupling. If connected to GND at the relay board (can't tell from the picture), then try a test with it disconnected from GND at the relay board.
You are referring to white(grey) wire you marked in your post #24, which you can see in post #25, in the first pic on the relay, it is hanging in the air, not connected to anything, next pic column on the protoboard is empty and also not connected.
It made me thinking that it may be something with my PSU, as it is an old one and it maybe doesn't have good protection or it is just low quality.Since it is in the same plug as the fan, for example, switching fan ON/OFF may interfere with PSU and its constant and power delivery?
What would you recommend to use/build for common positives and grounds instead of protoboard?Simple empty board, that I should just solder pins with one ground line and one positive?
I have one ceramic 471 on there, if I go larger like 473 I get more LCD problems.
Is it safe to add on more MOV, to protect relay circuit, in a red circle where power comes from the wall in my circuit which looks like this now?
Also, I'm still thinking to add RC to aid MOVs, like 1k ohm Resistor(or 10k) and 275VAC 220nF Capacitor, would this be sufficient or I need higher values?