RTC loosing time when 24v load added to relay on same PCB

Hey

I have recently made a custom board out of project which I prototype on arduino.

Without going into to much detail about it just yet it consists of the following

MEGA2560
DS3231 RTC
1x Relay (24v DC, 250V AC, typical relay)
2.8’ ili9325 Touch Screen

It allows your to program relay events from the touch screen.

I have found the RTC very accurate and suitable for my needs, but I have discovered that when I have a 24v load hooked up the the relay it effects the accuracy of the RTC. It goes from +1 / -1 second per month on average to -1 second per week!

My guess is the load being sent through the relay a few times per days for a few seconds at a time is effecting the RTC Crystal leading to time keeping accuracy reduction.

QUESTION FOR THE EXPERTS :slight_smile:
In general terms, what considerations should be made to ISOLATE a relay from the rest of the components on a PCB?

Is my findings on the relays load effecting the RTC crystal plausible?

What component could be added to the properly isolate the RTC / and or Relay?

Hi there,

There is several ways to isolate your relay from the circuit, but first, you could post a schematic from your circuit?

Iv attached the schematic as well as a few other reference pictures

I call the project a Tick Tock Timer.

Thanks again for taking a look.

Horendus: I have found the RTC very accurate and suitable for my needs, but I have discovered that when I have a 24v load hooked up the the relay it effects the accuracy of the RTC. It goes from +1 / -1 second per month on average to -1 second per week!

My guess is the load being sent through the relay a few times per days for a few seconds at a time is effecting the RTC Crystal leading to time keeping accuracy reduction.

Generally you need to keep electrical noise clear of the RTC oscillator and crystal since the oscillator is very sensitive to interference (typically running at about 1uW).

Is U2 the RTC with built-in crystal). I don't think you've a problem there, the relay stuff is pretty distant from it.

It more likely that the heat in the box from the 24V circuitry is affecting the crystal - all crystals are sensitive to temperature, and the shift from 1sec/month to 1sec/week is 1.6ppm, which is, frankly as good as you can get with quartz (unless you use a crystal oven)

QUESTION FOR THE EXPERTS :) In general terms, what considerations should be made to ISOLATE a relay from the rest of the components on a PCB?

Is my findings on the relays load effecting the RTC crystal plausible?

What component could be added to the properly isolate the RTC / and or Relay?

I would mount the heat generating components at the top of the box to localise the heating, and provide better heat sinking to that area to the outside (metal boxes are much better for heat dissipation).

If you want better timekeeping your options are radio time standard, internet time server or 2nd hand rubidium frequency standard.

It might be worth adding a stand-off screen in the box reduce interference anyway to see if it makes a difference, or a screened box over the RTC.

Nice project BTW, top build skills!

Hi,

It could be static or dynamic or both.

Make sure the relay coil current does not flow through the circuit paths that also power the RTC. That should take care of the static part.

You may want to connect a snubber across the relay coil in case it is EMF interfering with the oscillator in the RTC.

If you want to test first, replace the relay coil with a non inductive resistor of the same Ohm value. Yes the relay wont work, but keep the circuit turning on and off for some time as you do with a relay. See if the RTC works ok. If it works ok after that, you should add the snubber. The snubber would be a small value resistor and a capacitor like 10 ohms and 0.1uf, but you may have to go higher on the cap value and the 10 ohms may have to go higher too if it draws too much current.

When inductive loads switch suddenly they do generate RF energy which can radiate into a nearby circuit. See if you can pick up the relay closures/opens on a nearby radio tuned to the AM band.

You should also have adequate bypassing across the RTC chip. As Mark pointed out, heat can change the frequency too although that chip is compensated. If the heat varies too much though that could cause it to go off because it only samples the temperature around once per minute.

In your high side relay driver, R4 should be no higher than 470Ω to ensure saturation of the 2SA812 for 10mA base current, 100mA collector current. Also, there is no relay contact arc suppression and I agree with MrAI's assesment. Might also want to consider an MOV.

Thanks for the responses

MarkT - Regarding heat, the 24v bell signal wires run into the relay and then to the external 24 power supply. The relay is only closed a few times a day so the vast majority of the time there is no voltage/heat coming through the relay and when there is its for around 4 seconds at most.

MrAI - Snubber. Good suggestion, I will give this a try.

dlloyd - Where do you suggestion the MOV is positioned? Regarding the R4 ill double check its value

Oh and thanks MarkT for your kind word! The user interface was by the far most time consuming part, using just an open source Adafruit Ili9325 library.

Iv attached a few more pictures in case you were interested in seeing additional parts of the user interface.

Productio Hardware.png

Nice job ! Looks very good. I agree with the others on the time - 1 second/week, while not ideal, is not bad - especially if it is in an environment where the temperature changes significantly.

You wouldn't need both snubber and MOV, but if you decide on trying MOV they are easy to install. Connect right across the switched contacts (NO and COM). If you need to protect the NC contact, then you would need to connect a second MOV from NC to COM.

I have learned a couple of things by reading this :)

Just for complement the discussion, I offer you all some links:

Extremely Accurate I 2 C-Integrated RTC/TCXO/Crystal (datasheet)

Real-Time Clock calculator from Maxim Integrated