Furnace AC thermostat wires causing problems?

Is it possible that the 24v AC voltage from my furnace would cause a microcontroller to hang?

My furnace thermostat wire shows 24VAC and its shorted together by a 5VDC relay on my protoshield.

Could that cause RF interference even tho the two circuits are completely electrically isolated?

Let's back up a bit. Is it hanging? If so, details please.

I originally built my thermostat back in 2013 when I lived in CA. It worked fine for a few years. Since buying my house here in MN in March, I have had nothing but problems with the system freezing. Often with the heat stuck on.

The furnace in CA was just a wall furnace. I don't think it was even hooked up to a power source. I have no idea what voltage was on the thermostat wire. Just shorting them together turned the heat on. It's the same at my house now, but its a forced air furnace with a control board.

I have racked my brains trying track down the source of the hanging from completely revamping the code, micromanaging memory, replacing the entire protoshield, switching from a mega2560 with ethernet to a Yun shield on the mega, adding a flyback diode to the relay, pullup resistors on the I2C bus, driving the relay from a transistor instead of from a digital pin.

My question is can the 24vac from the furnace cause RF interference ?

can the 24vac from the furnace cause RF interference ?

It can certainly cause ElectroMagnetic Interference.

I suggest you start by considering things like "Where is ground" and "How long are wires that are directly connected to Arduino".

Here's a page that may help:
http://arduino-info.wikispaces.com/Arduino-Project-Planning-Electrical

You might find that a low-cost optically-isolated relay board like the ones shown here may help:
http://arduino-info.wikispaces.com/ArduinoPower

There are 2-relay boards like that. I have one next to my furnace and twisted-pair wire from my Arduino to the optical-isolated input. I use it to turn the heat up before I get home..

Basic test: if you disconnect the 24VAC wiring does the system work reliably?

I wouldn't think so. It's just 24VAC, stepped from 120VAC typically.

When you revamped your code, did you expunge the String class if you used it?

You might want to step back a minute before you have to buy another control board for the furnace.

There are some micro-volt heaters that use a wall switch to turn ON/OFF, which is just shorting the two wires together.

Forced air furnaces are a different ballgame. and the 24VAC is used to power the relays on the control board. To further complicate things, there are different types of wiring for various furnaces controlling heat pumps, AC, emergency heating, main heat

Perhaps you should include a schematic on how you have this wired up

Also, a thermostat contains the hysteresis mechanism. If you don't have that function in your device, you could damage the furnace.

The current in the 24VAC circuit is probably only 15 to 20 mA (to pick up a relay in the furnace controller) and shouldn't be enough to cause EMI, as @aarg said, you should have an off delay that would prevent a heat pump compressor from restarting before head pressure has enough time to bleed away, also a fuel fired burner should have enough time to cool before trying to restart. I would put a TVS diode or MOV of proper voltage rating across the relay contacts.

Thank you for all the replies. I'm downloading some schematic software right now and I hope to have a schematic for you all soon.

Until then, here is my sketch as a zip file.

An interesting thing occurred this morning. While the relay was closed (heat on), I plugged in the thermostat wire to its socket on the protoshield and the system froze. Instantly. However, I could not replicate this issue by trying it again.

thermostat_yun_8_6.zip (14.3 KB)

Don,t have time to study code (I'm not familiar with Yun) but there's a lot of String statements, may be OK with Yun.

thermostat_yun_8_6.ino (15 KB)

Writing to and from the bridge requires Stringing data.

vulture2600:
Writing to and from the bridge requires Stringing data.

I knew that! :-[

:slight_smile:

vulture2600:
Writing to and from the bridge requires Stringing data.

I seriously doubt that. It looks to me as if the examples are written using String, but I can't find any API functions that use one.

Regardless of all code and hardware changes, the system hangs intermittently.

Did you expunge all use of the String class? If not, then:

  1. it's something you haven't tried
  2. you will never be certain that it won't crash randomly due to the known memory management issues with String.

It doesn't matter how much memory is on the main processor, the 32U4 is still limited.

You do need to post images of your hardware setup.

My original setup was a Mega2560 R3 with an ethernetshield with zero strings. Now I'm using a Dragino Yun Shield and a Mega2560.

It's an improvement. You still don't have Gigs of RAM to play with like on a PC. You could put the String idea on the back burner and focus on hardware because you said you witnessed a wiring related crash.

How often does it crash? A simple attempt to suppress EMI might do it. Have you tried a 0.1uF capacitor across the relay contacts?

Ok heres the schematic as best as I could do.