Go Down

Topic: Sudden unreliability with my network-enabled Arduino project [SOLVED] (Read 19893 times) previous topic - next topic


Aug 27, 2012, 03:50 pm Last Edit: Aug 27, 2012, 04:33 pm by SurferTim Reason: 1
Are you still using the 9v wall wart from Sparkfun? It is regulated (switching) to 9V output as long as the input is greater than 100vac. Is it possible the refrigerator and/or some other device (A/C?) is causing the line voltage to sag below 100v long enough to shut down the regulator momentarily?

An o-scope would be really helpful at this point.

add: I noticed you even moved the power to your room where it worked, and it fails in the garage. Just out of curiosity, do you have a memory card in the microSD slot? You had mentioned in your code posted that you had planned to use the SD card to log stuff.

Your code appears to have no timeout function if the connection breaks (not closed). That could cause it to fail.


Hi SurferTim,

Yes, I'm still using the same 9V wall wart from Sparkfun...that has not changed. Maybe the refrigerator, I don't know. I don't think it's the A/C because the problem started happening way before we started turning on the A/C this summer.

I don't have an oscilloscope, nor do I know how to use one. :(

Correct - moving the power to my bedroom is the latest thing I've done, and haven't had a problem since (although I've had to pull the power a couple times as I mentioned, so this 'test' hasn't actually ran for much more than a week a time). No card in the SD slot.

Yeah, I remember ?you? or someone mentioning that about my code. I'll have to look more into that.


One thing that nobody else has suggested--is it possible that the orientation of the circuitry is affecting the connections? I notice that the board is upside-down on your ceiling, but I presume that when you take it down to test it, you're putting it right-side up on your workbench. Perhaps a connection is coming loose when it's upside-down but falls back into place when it's rightside-up?


Actually the board is vertical in the garage. But I tried it vertical in my room, and never had the problem, and tried it horizontal in the garage, and still had the problem. I did actually think of that one too.

Thanks for the idea!


Could fluorescent lighting (I have 3 separate fluorescent lights) cause the problem?


I think fluorescents (or their ballasts) create RF interference, but I don't know whether it would be enough to disrupt an Arduino. Are you using servos or other libraries which use hardware timers?


I don't think so - I'm using the 'Ethernet' and 'SPI' libraries.


Fluorescent lights might cause trouble anyway, I don't know. I'm asking because I had some trouble with a project which wouldn't run on mains power, but ran on a battery or from USB. Other projects (such as the blink project) ran fine on mains power. I eventually discovered that the transformer I was using wasn't filtered and it was introducing just enough noise to break some, but not all, parts of the chip.


So was the transformer that you are referring to powering your Arduino? How do you know it wasn't filtered? How did you filter it? Or did you buy a new known filtered one? If so, which one specifically?



Yes, the transformer was powering the Arduino. I hooked it up to a speaker and got some humming--if it's filtered you shouldn't be able to hear anything. I believe you can filter power supplies by using a capacitor, but in my case I just left it hooked up to my computer or ran it off of a 9V battery. (It wasn't a project meant for long-term unattended use.)


Florescent lights do emit a RF signal that could possibly be harmful. Does your networking cable run near these lights? I am a amateur radio operator and i know that the ballast in those lights can cause audible noise on certain frequencies.... but will also create unwanted "noise" in data cables.


Definitely run it off a battery, assuming you have one that will last several days. Clean power is important.

I haven't looked at your code but have you checked for memory leaks? If you use the String functions you might be leaking memory. There are sample code snippets out there that you can drop in to report free memory. That might help with debugging.

Connect it up to a serial monitor (eg laptop) and get it to send you diag info regularly. Make it print out the value of one of your variables at regular time intervals. Note what happens when you send it a failed command. Does the output pause? Does the value of that variable make sense?

Checking for humidity: if you can't measure humidity easily, package your board up into a plastic box, sealed as best you can, and put a packet of Do Not Eat in there to absorb as much moisture as possible.

Since you have apparently had it working in the garage for up to five days, the fact it seemed to work fine in your room is not to be trusted. The fault is so intermittent that you'd need to run it for several weeks before you can be reasonably sure it is ok.


Shown below is my device, installed in my permanent location, and circled in red. Also notice the 3 fluorescent lights, which I believe is on the same circuit.

This image shows where the Ethernet cable crosses the electrical cable for the lights. I've always understood that as long as they cross like this (are perpendicular), it's ok...you just never want to have them running in parallel.

I currently have it connected to an extension cord (orange, hanging down) which as I mentioned in a previous post, goes to inside my house, and it works fine when connected like this. However, when I have it plugged into the black power strip (where I want it to be plugged in long-term/permanently), I have the problem previously mentioned.

Anyway, in answer to your question, dswan75, the ethernet cable does run within a couple of feet of the middle lights, but I don't know if it's an 'air'/'airwave' problem...it seems to be inside the actual electrical lines themselves that's going into the power of my device wouldn't it? Because again, that ethernet cable never moves through my testing.

@Hugepedlar - I don't know if I have a battery that could power it for very long...a 9V wouldn't last very long, would it?

I don't know how to check for memory leaks yet. I still tend to think it's a hardware issue, but I will look into it. Yeah, I've been thinking of hooking it up to the Arduino serial monitor, but have been putting it off as I will have to modify the circuit in order to be able to do that I think.

I'll see if I can find something like that to put the project in.

Well when I had it in my room, it did work for weeks if I remember right. And when I have the device in the garage, and the power running to inside the house (in my room specifically), it worked for weeks also.

Thanks everyone so far...maybe the pictures will reveal something I'm missing...


See http://makeprojects.com/Project/Instant+AC+Power+Filtering/2922/1 for a quick way to filter your power supply. If it's a power problem, that should fix it.


Looking at the picture the screw heads that you used may be shorting traces on the circuit board. This would have taken time to wear through the silk screen . remove the screws and use a wire tie ( or plastic stand offs ) to hold the board and re-test. if it works reliably , you can use plastic standoffs to fasten the board securely. I use #4-40 standoffs with a small #4 lock washer and the screw heads don't touch any traces on the board.

Hope this helps !

Go Up