Sudden unreliability with my network-enabled Arduino project [SOLVED]

But even though it was working fine, I still added an LED/resistor to one of the pins on the Arduino and updated the code in the sketch to turn on and off that LED whenever it received a garage door open or close command.

but please remember, I'm a noob, so the more detail, the better.

That works both ways. "one of the pins" is not a lot of detail, I think you'll agree.

If if works on the bench, and not in the garage, then I would suspect a wiring issue.

Touche. You got me there. I just didn't think that it would be relevant, so I didn't mention that I put the new LED on Aruino pin 8 (so ATMega pin 14).

You know, it's funny. Shortly before you replied about the possible wiring issue, I remembered that I've been having another issue with another device. I purchased the parts for an OpenSprinkler device and put it all together last year, and have had problems with it ever since - from time to time it would just 'lock up' and i couldn't ping it or anything. It's driven me nuts for a long time and have not been able to figure it out...I just figured that it's something that I did (like something I broke while soldering everything in place). And I have an VoIP IP (PoE) phone that locks up from time to time. I just chalked the phone's problem to being cheap. But what I recently realized is that all 3 of these devices (the 3rd is my problem device that I'm most currently troubleshooting) are on the same switch - a NetGear 8-port (w/4 PoE ports) switch. So I'm wondering if this switch is bad.

What I did a few minutes ago is take that switch off of my network and moved things around to plug those devices into my other switches. So far, my garage door opener device is working great. (But that's how it usually starts off)

But we'll see, and I'll definitely be posting any updates (good or bad)...

Well that sure didn't last very long. Today my device was having the same problem, right off the bat in the morning so it wasn't even that warm yet. So when I got home from work I tested the cable and it tested fine. I used an STM-8 ({{ngMeta.title}}) cable tester. All 8 conductors came back fine with continuity, and no wires were crossed or anything.

The only thing I can think of I can do next is 'modify' my circuit/device even further and wire up an FT232R breakout board (SparkFun USB to Serial Breakout - FT232RL - BOB-12731 - SparkFun Electronics) so that I can hook it up to my laptop in the garage via USB and start outputting to the serial monitor what it's receiving when I attempt to send command to open/close the door from my Android app.

Even if I do this, I wouldn't know what to do next regardless of what I find - if I find that for some reason that characters/packets/whatever are getting dropped, I wouldn't know what to do, or if it appears everything is coming through fine, wouldn't know what to do.

Am I going in the next logical direction though as far as the best thing to do to troubleshoot my problem? Or should I try something else / look elsewhere?

I brought my device into my room, am powering it with the same power supply (9V purchased from Sparkfun) and I have it on my desk vertically, just like when it's mounted/installed in the garage. (When I did all my testing in my room prior to originally installing into my garage I had it laying flat/horizontally). Should that even matter?

It seemed to work last night flawlessly (of course this was only over the span of a few hours), but I have a feeling it's not going to give me a problem in my room. Are there any other 'variables' that I should be looking out for?

I don't know where you are, or the environment in the garage, but how hot is it in the garage where it is mounted?

Is there a specific time of day it starts to fail?

Just a thought...

I thought the same thing because I didn't start having the problem (had it installed, running successfully with no problems for a couple of months) until we had a really hot week upper 90s Fahrenheit. And I'm sure it's even hotter in my garage.
(I live in the Bar Area, CA, USA)

However, it gives me trouble in the mornings sometimes too when it is not hot at all - maybe like around the 70s.

Considering the location, how is the humidity in the garage?

How about the mains power in the garage? Any chance that could cause a problem? Like big power-eaters closeby? A/C or the like that would cause voltage spikes or sags?

How about the garage door opener motor? Is that closeby? Maybe a shielded box might help?

There has to be something different if it does ok inside and not in the garage.

Just another few thoughts...

edit: How about the CAT5 cable? Is that run into the house? If the connection breaks, that could cause the ethernet shield code to lock up if not written correctly. Maybe a timeout routine on the connection?

I don't know the humidity in the garage...I think I'm going to stop by and by a thermostat on the way home and install it in the garage.

I'm pretty sure all the big guys - AC, Heater, Furnace are all on separate circuits. The furnace/heater/blower is inside the garage, but I'm pretty sure on a separate circuit. I do have a medium sized freezer inside the garage, but that might be on a different circuit, but I can check when I get home if you think that might be a problem.

I do have a lot of network/phone/security devices running on the same circuit inside the garage however. Would this cause a problem?

Yes, the garage door opener itself (the main unit with motor I guess) is pretty close by, yes. So this could cause a problem even if the motor is not 'spinning'? If so, maybe that's it! How far away does it need to be? When my device is mounted in the garage, it's probably within 12" or less of the actual opener/motor.

No, the CAT5 cable is running to my network equipment within the garage, and I tested it already - tested ok.

Maybe you could elaborate more or send me somewhere that would have more information on the proper code procedure to handle a possible broken connection?

I haven't seen your code, but here is mine.

The first downloads Google home page every 10 seconds, but has no timeout.

Here is the timeout code for the Google code above:

You must put them together. Shouldn't be that difficult. I did it. :wink:

Thanks for the code links...

Any thoughts on my replies to your questions? Particularly the proximity of my device to the actual garage door opener?

Thanks.

It would be best for you to post your code. This is your project, and I don't know how you are doing things. If I can take a look, maybe I can help.

I would test it a piece at a time. Try it in the garage not connected to the motor. Does it still fail? It isn't connected to the motor in the house, is it?

A link to my code on pastebin is in my first posting, but here it is:

Ok, I see...thanks. I will install it back into my garage this evening, but not hook up the wires that connect to the actual opener.

You're right - when it's in my house, no it's not connected to the opener.

Well, it seemed to have worked well back in the garage without the 2 wires connected to the garage door opener for several days, but it stopped working again. :frowning:

So should I physically move the device further away from the actual opener?

Would being plugged into the same power strip/outlet pose a problem?

Shortly after my last posting (the one on the 20th of July), I decided just to try and move the power cords around to see if that would help (but still keeping the wires that goes from my device to the actual garage door opener disconnected). The existing setup was as follows:

I have an electrical outlet on the ceiling of my garage. I have a power strip/surge protector plugged into one of the 2 'plugs' of that outlet. I have my actual garage door opener plugged into that power strip/surge protector, and my 'device' plugged into the same power strip.

My change that I made on the 20th:
What I did was unplug the actual garage door opener from the power strip/surge protector and plug it into the 2nd 'plug' of the outlet on the ceiling (so no longer on the power strip/surge protector), leaving my device plugged into the power strip/surge protector all by itself.

5 days later (yesterday), I started experiencing the same problem as I described in my very first posting of this thread, so my change did not seem to help. :frowning:

I guess my next test would be to move my device physically further away from the actual garage door opener as hinted at by SurferTim...I will do this this evening.

Well that didn't really help (moving the device physically further away from the garage door). Now I'm going to run an extension cord from my device to another outlet in the garage, and we'll see how that goes.

Messed up again last night. :frowning: So I unplugged the two wires that are leading to the magnetic/reed switch...we'll see how that goes.

Hi Domiflichi,
Seems like to me you spent so much time troubleshooting the circuit, perhaps it would take lesser time to build a new circuit :slight_smile: parts are cheap and arduino is reusable, might just work that way (and maybe enclose it in a protective casing?) and you get to keep the old one as a relic.
Ps, sent a message in your pm.
Cheers

Well, I am almost down to nothing else to test. It messed up yesterday. What I did when I got home from work this evening is I ran an extension cord (actually I have to have 2 in order to reach) from my device (still in the garage) to inside my house, in my room where I was testing it. I actually plugged it into the same exact power strip that it was plugged into when it was working inside my room.

So if it fails again, the only thing I have left that I can do is run a network cable from the device in the garage to my room and plug it in the switch that it was plugged into when it was in the room working.

(Just thought I'd give another update)

Wow, you've done a lot of debugging so far. You mentioned humidity as a potential problem. This is probably a long shot, but maybe the wood is absorbing moisture and causing a problem. Do you have plastic stand-offs you could use to keep the circuit board from touching anything. Another thing you might try is heat things up with a blow dryer - not too hot though - and see if things start failing. You could also plug it into a UPS to make sure you have nice clean power.
Any chance the problem is with the garage door and not your circuit?

Tell me about it, I just wish this thing was figured out and working.

I'm sure I can find some sort of plastic standoffs for the board to be away from the wood.

If I do the blow dryer thing, won't that only tell me if heat is an issue? I don't think that's the problem anymore as my device has problems in the (cool) mornings sometimes, not just the (hot) afternoon/evenings (although it seems like the problem rears its ugly head more in the late afternoon/evening).

That UPS thing is a good idea...I purchased an OpenSprinkler device from Rayshobby.net (actually I sourced all the parts online from Digikey and Mouser and just bought the circuit board from his site), soldered it all together and have had problems with it locking up and other weird things every 1-3 weeks. Ever since I put it on a UPS, I haven't had any problems with it. Or maybe it was after moving the ethernet cable off of the PoE switch, I can't remember.

The garage door can't be the problem as my device has been messing up even when it's not connected to the garage door.

If my 'current' test fails, and my 'last' test fails, I will try one or more of your suggestions.

Thank you for the new ideas.

And thank everyone for all their help so far. This is a great forum.