Furnace AC thermostat wires causing problems?

I have not tried a capacitor across the relay contacts. I just added a flyback diode tho.

Do you mean across the coil or across the output contacts?

String is only used when writing to the bridge for web support.

How is the relay connected to the HVAC system? What wires are connected to what? Inside the cover of the furnace, there is usually a schematic printed out.

The relay output contacts are connected to the furnace thermostat wires.

Those thermostat wires shorted together turns the heat on.

vulture2600:
The relay output contacts are connected to the furnace thermostat wires.

Is this an old system that only has on/off heat with only 2 wires?

vulture2600:
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?

If you get a second (or third arduino), and then wire a few of the same inputs to it ..... you could then see whether or not the second arduino also gets affected (ie. hung up) whenever your original arduino 'glitches'. You don't necessarily need to run the same software on the second arduino. Just operate both at the same time - and see if the second one also hangs (when the first one halts).

And use a oscilloscope etc to see if the power supply voltage supplying the arduino is nice and clean.

Look at how NPN transistors are used to drive a relay.

Normally they are used as a low side switch.

Is this an old system that only has on/off heat with only 2 wires?

Yes, only two wires. Shorting them together turns heat on. There are other wires coming out of the furnace in the basement but they are presumably for AC control and not used. The house has a spring loaded thermostat and was the only thing controlling the heat. It is currently wired in parallel as a low temp cut-in so the house doesnt freeze.. I thought of adding another one wired in series to these two as a high cutout but I'd like solve this problem!!

Look at how NPN transistors are used to drive a relay.

Normally they are used as a low side switch.

Adding the transistor was very recent. It always "worked" by driving the relay right off a digital pin. I added the transistor so its powered by the 7805 to see if maybe the system was being browned out. The relay only draws ~35 ma or so.

If you get a second (or third arduino), and then wire a few of the same inputs to it ..... you could then see whether or not the second arduino also gets affected (ie. hung up) whenever your original arduino 'glitches'.

Good idea. I had toyed with adding a micro that would "ping" the mega over serial. The nano had a digital pin tied to the mega's reset pin and bring it low for 50ms if a response wasn't recieved but I never got that working.

I can try adding another arduino/lcd shield that just displays millis() and tie them together via vin and gnd.

updated schematic:

I have not tried a capacitor across the relay contacts. I just added a flyback diode tho.

Don't put a diode across the CONTACTS, it will conduct on HALF the AC cycles when contacts are open and may burn the furnace relay out.

The diode is across the coil, not the contacts.

Hi,
Have you measured the AC current that flows though the thermostat wires when you connect them to turn the furnace ON?

As pointed out earlier by @justone

You are HIGH side switching the thermostat relay with and NPN transistor.
You should be LOW side switching with the NPN to make sure the Relay coil gets full current.
OPs, relay circuit.
ThermoRelay.jpg

The Thermostat wire should run straight from the relay terminals and away from the rest of the controller, the wires should not run next to any power wires or low voltage wires associated with the controller.

Tom.. :slight_smile:

You mean 5v -> relay coil/diode -> NPN -> gnd?

Why does it matter? The relay seems to switch on and fine. It's very small and only draws 35 or so milliamps. It's small enough to be run via a digital pin with no other circuitry.

The thermostat wires do run near everything else. I will fix that asap. I'm going to use the relay to remotely power ANOTHER relay near the furnace itself so all voltage to and from my thermostat is DC. only the 24vac from the furnace will go thru the second relay which will have its own local power source. another level of isolation.

Another thought I had is that the thermostat is mounted on the wall near AC wires and a dimmer switch that doesnt dim any more. Its only on or off. That will be much harder to fix as moving the thermostat involves moving a LOT of cables.

photos attached. Im currently using a second LCD shield with RGB for now. The other two photos are of the original LCD shield with LED's attached and the cover i printed.

IMG_2295.JPG

vulture2600:
Why does it matter?

Because when something is manufactured and specified, it is a synthesis of design and testing that is not totally accessible to the user (also incorporating many factors that are usually beyond the understanding of the user). The specification is like a contract between the manufacturer and the user. If you want to deviate from it, you are basically attempting to second guess the engineers without having the complete picture that they do.

You can drive a relay with an emitter follower (common collector) circuit as you have, but you will lose 0.7V at the relay, so that it is running on 4.3V. If you check with the specifications and find evidence that it is okay, then there is nothing extremely wrong with it other than that it isn't optimum. Since you can power the relay with a common emitter circuit as has been described in a previous post, it makes no sense to do it unless you have a compelling reason for it.

Frequently, a system is as strong as its weakest link so we try to make all the links in the chain as robust as possible, especially if there is no cost or component saving in deviating from it.

Thank you for the reply.
I have a very limited understanding of transistors. All I know is that in an NPN, a small voltage at the base allows current to flow from the emitter to the collector. I dont understand why it matters if the load is before or after the transistor as this seems like it would be in series. Anyway, it works for now.

As per Paul__B's private message :

In that case, what you need is a "snubber" circuit across the contacts of your relay which connect to that control line. This would typically be a 0.47 µF capacitor in series with a 100 Ohm resistor.

I have added a .1uf ceramic capacitor (its the largest I had) in series with a 100ohm resistor ACROSS the control wires to the furnace as shown in the newest schematic. Honestly I was skeptical this would work at all because (in my VERY limited understanding of electronics) AC passes through capacitors and with a low resistance value I thought this would be the same as shorting the two wires.
I have installed them temporarily in the spring loaded thermostat and the relay is currently working fine to switch the heat on and off. I will keep you posted on if the arduino freezes. I will also try to move all AC away from it tomorrow (stores are closed, merry xmas!).

here is a photo of the spring thermostat with the R/C across its terminals:

again, these terminals and the arduino's relay are wired in parallel.

vulture2600:
Thank you for the reply.
I have a very limited understanding of transistors. All I know is that in an NPN, a small voltage at the base allows current to flow from the emitter to the collector. I dont understand why it matters if the load is before or after the transistor as this seems like it would be in series. Anyway, it works for now.

I thought I explained that. There is a 0.7V voltage drop across the EB junction (I'm simplifying things somewhat, this is just a rule of thumb). In the common emitter circuit, that voltage is not in the output current path. In a common collector circuit, it is, and so the 0.7V drop is in series with the load. Hence the output voltage will be VCC-0.7V = 4.3V

Regarding the "it works for now"... the whole point of engineering is to ensure that it not only works now, but later too.

Hi,
I think you need to realise that a BJT is a current input an current output device.

When conducting current, a voltage of 0.7V is dropped across the Base - Emitter junction.

How did you arrive at 10R as your base resistor?

Tom.... :slight_smile: