What capacitors to limit noise in project

Hi all,

I am about to assemble the system below that will be used as a central heating regulator. This will end up being a pretty busy enclosure, so I’d like to minimize my chances of running into noise problems. The pieces are:

  • 4-5 ds18b20 temperature sensors (3 wires arriving at the enclosure), some of them at the end of long cat5 cable (that part works fine today with the first, simpler version of the project)

  • an SPDT relay that switches 220V/50Hz. The 220V cables come in into a corner and they are 1cm away from the closest 5V wires or components

  • an SD/RTC module, connected to the pro mini through I2C and SPI

  • an LCD + I2C module, connected to the pro mini through I2C (through the SD). The LCD being in the lid (which I want to be able to open) the cable is about 10cm long

  • 3 push buttons in the lid

Some questions I have:

  • is the power/GND/ds18b20 rail I have a good idea? Should I physically spread the 3 rows apart from each other?
  • should I add capacitors, and if so which ones and where?
  • should I somehow twist / shield the I2C wires coming from the lid?

Regulation_bb.png

Thanks!
Franck

Hi,

franck102:

  • an SPDT relay that switches 220V/50Hz.

Is that a solid-state relay or a mechanical relay ? ('cos if it's mechanical you'll probably need a transistor to drive it)

  • is the power/GND/ds18b20 rail I have a good idea? Should I physically spread the 3 rows apart from each other?

Yes and Yes... I'd suggest you get something like Solder-able Breadboard or regular stripboard and put your Pro Mini in the middle of it to hold it in place.

  • should I add capacitors, and if so which ones and where?

Yes, if the +5V power comes into a 'barrel jack', mount that on the breadboard and add, say, 220uF capacitor. Along the GND, +5V rails add a couple of 0.1uF capacitors.

  • should I somehow twist / shield the I2C wires coming from the lid?

Don't think that will be necessary. Adding 0.1uF across GND, +5V on the LCD would be worth doing.

Yours,
TonyWilk

Hi Tony,

The relay is this module: Carte d'Interface Relais 5V 2 Canaux avec Optocoupleur Module Shield pour PIC Pi | eBay

... and btw I have assuming it has a reddish smd flywheel diode.

I will separate the rails and add the capacitors you mention, thanks!

Franck

Hi,

franck102:
The relay is this module: Carte d'Interface Relais 5V 2 Canaux avec Optocoupleur Module Shield pour PIC Pi | eBay

Ah, that looks ok.
In your diagram you don't show the +5V that this module will need (I guess you just used some relay in Fritzing).
It does look like the board has flyback diodes fitted.

Just be careful bolting it down since it will have mains on it.

Yours,
TonyWilk

TonyWilk:
Hi,Ah, that looks ok.
In your diagram you don't show the +5V that this module will need (I guess you just used some relay in Fritzing).

Oh yes, my bad, the relay is currently in the version 1 box and I had forgotten about that...

Thanks!
Franck

franck102:
Hmmm, I trusted the ebay description that said 15-20mA needed for the coil...

Don't trust any ebay seller.

No resistor between Arduino output pin and relay IN pin needed. The IN pin only needs 2mA (sink).
The relay coils however draw about 75mA each, but that comes directly from the 5volt supply (VCC pin).

That relay board has the option of opto isolation (for extra safety).
That can only be achieved with a separate relay coil supply.
Leo..

Lowest cost parts and reliability don't always work well together. I would also like to nominate the fritzing diagram as the most dizzying of the week.

I'm not busting on you personally, just that those diagrams are very hard to follow. The schematic view is so much easier to follow, which also allows better comments without missed items.

Right, I am using that view to try and get a sense of the physical layout of the wires, that definitely doesn’t make it easy to follow. So far that has proven to be the hardest part of a project to get right for me, closing my first project box was a 15mn operation every time :slight_smile:

I haven’t had any bad experience with cheap part yet, keeping my fingers crossed...

Franck

I always get concerned when people use those relay modules to handle line voltages. They look at the top of the relay an just assume the rest of the boards also has that voltage and current limits. Your peak voltage will be at least 311 volts. Be sure your enclosure has a a vent for the smoke if the traces on the circuit board arc. And you have proper fuses.

Paul

Paul_KD7HB:
I always get concerned when people use those relay modules to handle line voltages. They look at the top of the relay an just assume the rest of the boards also has that voltage and current limits. Your peak voltage will be at least 311 volts. Be sure your enclosure has a a vent for the smoke if the traces on the circuit board arc. And you have proper fuses.

Paul

Good point, I'll check the traces. But if any arcing takes place, only the power line comes into the box (neutral stays outside) so any short would be the same as the relay being closed. Dangerous for the project box of course, but not for the 220V network as far as I can tell (the line does have proper fuses & differential protection that being said).
There are also no inductors connected, just a fuel furnace.

Franck

franck102:
Good point, I'll check the traces.

I did look earlier... assuming the board you get is like the photo in the ad, they don't look bad - those isolation slots are the saving grace.

Generally I'm not keen on that pinout of relay. IMHO it seems pretty stupid to have one common relay contact pin between the coil pins.

Oh, and don't miss Paul_KD7HB's advice and make sure "you have proper fuses."

Yours,
TonyWilk

P.S. I get to fix industrial control stuff from time to time, had a 'solid state relay' (triac) board recently that had gone pop in a circuit where some joker had jammed some huge value fuse in the circuit (could've been a bolt for all I know)... the copper tracks had completely vaporised, covered half the board in a combination of shiny copper and soot. Looked like secondary arcing then ate most of the pcb before the input terminals melted off, must've been quite spectacular :o

TonyWilk:
I did look earlier... assuming the board you get is like the photo in the ad, they don't look bad - those isolation slots are the saving grace.

Generally I'm not keen on that pinout of relay. IMHO it seems pretty stupid to have one common relay contact pin between the coil pins.

Oh, and don't miss Paul_KD7HB's advice and make sure "you have proper fuses."

Yours,
TonyWilk

P.S. I get to fix industrial control stuff from time to time, had a 'solid state relay' (triac) board recently that had gone pop in a circuit where some joker had jammed some huge value fuse in the circuit (could've been a bolt for all I know)... the copper tracks had completely vaporised, covered half the board in a combination of shiny copper and soot. Looked like secondary arcing then ate most of the pcb before the input terminals melted off, must've been quite spectacular :o

Well, just for my education: the only current that could go through an arc here would be current that the fuel furnace would try to draw, right? I mean this isn't a short, it's just closing the circuit that powers the furnace?
I understand that voltages can spike, but the intensity should remain under control?

Franck

Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

A fritzy is not very clear about your comonents.

Why have you got three transistor in parallel, and why a 220R resistor in series with the relay coil.

Please a hand drawn schematic, showing all your components including DC and AC wiring.

Thanks.. Tom.. :slight_smile:

The transistors are in fact ds18b20 temperature sensors, here is a schematic (only 2 sensors shown, 3 more are connected in a start network):

There was no good reason for the 220 ohms resistor btw, just me wanting to be safe, I'll remove it.

Franck

franck102:
Well, just for my education: the only current that could go through an arc here would be current that the fuel furnace would try to draw, right? I mean this isn't a short, it's just closing the circuit that powers the furnace?
I understand that voltages can spike, but the intensity should remain under control?

You are correct, it is "just closing the circuit that powers the furnace".
In normal operation the current will be limited by whatever the furnace takes.

The reason for stressing about adding a fuse was to guard against any fault condition, not in your relay circuit, but in the furnace... if it went 'short' without a fuse anywhere then... pop!

Sorry if this is too simple and too obvious... but on these forums you can only guess what people might know.

Yours,
TonyWilk