sbolel

We purchased and tested a few different surge protectors on a bunch of different devices. Among the five surge protectors we tested, this one seems to solve the problem. The USB input is nice because if someone needs to use the outlet, they dont have to unplug the arduino.

I'm going to give the capacitor a shot and see what happens. This was just a quick-fix solution. Its been a week since I started using the surge protector, and that device is still alive (where as all the other ones are dead).

sbolel

I tried connecting a 2200uF capacitor 5V>GND, but this did not solve the problem.

I replicated the problem by plugging in a fridge, a microwave, and a water cooler into a power strip and then connecting the arduino usb to the other plug in the same outlet. When I flip the power strip on/off, the arduino eventually hangs and loses connection.

orangeLearner

I tried connecting a 2200uF capacitor 5V>GND, but this did not solve the problem.

I replicated the problem by plugging in a fridge, a microwave, and a water cooler into a power strip and then connecting the arduino usb to the other plug in the same outlet. When I flip the power strip on/off, the arduino eventually hangs and loses connection.

This is a really annoying problem. :/

I think that is going a little far. You only need to simulate with the appliances that will be used there. (and the microwave does not use any energy when plugged in)

I put my cap across the power supply output, not the 5V. Energy stored in a capacitor varies quadratically with voltage. My circuit ran for three days and never reset. Even if it does, I turned on the WDT for two seconds as a redundant safety measure.

sbolel

I think that is going a little far. You only need to simulate with the appliances that will be used there. (and the microwave does not use any energy when plugged in)

I put my cap across the power supply output, not the 5V. Energy stored in a capacitor varies quadratically with voltage. My circuit ran for three days and never reset. Even if it does, I turned on the WDT for two seconds as a redundant safety measure.

How do you do it across the power supply output? I am using a USB adapter (5V, 1A).Also, I have the WDT set for 8 seconds, but even with the WDT the arduino doesnt fix itself once it goes down (which is something I cant understand)

orangeLearner

You will have to use another, higher voltage power supply with your own regulation to reach the stage before the 5V. I used 9V. (this might solve the issue by itself without the giant cap)

The phenomenon we are experiencing resets the Arduino without letting it run any setup code it seems. You need to enable the WDT in hardware so that it is always on by setting the WDTON fuse setting on the ATmega328. You will need an ISP programmer like the AVR ISP mkII for this (preferred) or you can use another Arduino, but the ISP programmer is much cleaner and quicker. After you find your programmer, you can either use the Atmel Studio 6 "Device Programming" panel or just command-line avrdude (quicker but easier to brick your chip). Then the WDT will always be on for I believe 64ms, which you can change in the first line of your setup and throughout your program.

There are several reasons an Arduino might reset, one of them is power drop-out, but its not the only one.

The reset line might pick up EMI and trigger from that - adding a 1k pull-up on the reset line can really help prevent that.

Large currents switching nearby could induce voltage spikes directly into the Arduino circuit via electro-magnetic induction - without knowing the Arduino circuit's layout and what is connected to it its hard to judge this.

Poor PSU isolation could mean the Arduino is riding at a significant fraction of mains voltage (but at high impedance), so that when you bring an earthed object (yourself) nearby there is significant capacitive coupling - if this is picked up by the reset line, could reset.

We know there are heavy currents switching and presumably some voltage spiking (from the switch arcing). I'd like to know a bit more about the layout of the actual circuitry on the Arduino.

You mentioned:

Quote

Some large radio antenna on the nRF24

How large? That could be what's picking up voltage spikes.

[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]