Go Down

Topic: Arduino-dht freeze, help make/select rc snuber, mov, caps to protect from 220v (Read 1 time) previous topic - next topic

sone0121

Hi,
Can I suggest that using protoboard and jumpers (length of conductors, and connection method) may also be contributing to the resets?

Have you got bypass capacitors on the protoboard where 5V and gnd run?

Tom..... :)
I have one ceramic 471 on there, if I go larger like 473 I get more LCD problems.

Umm ... this might relate back to that same wire:
If the fan is "vent" (ventilation relay pin) in your code, then ...

It looks like the blue wire (ventilation relay pin) is connected to Mega pin 12, which is IN1 at the relay board. If the grey wire in parallel with it is connected to GND at the relay board, then this wire can cause interference issues through capacitive coupling and inductive coupling. If connected to GND at the relay board (can't tell from the picture), then try a test with it disconnected from GND at the relay board.
You are referring to white(grey) wire you marked in your post #24, which you can see in post #25, in the first pic on the relay, it is hanging in the air, not connected to anything, next pic column on the protoboard is empty and also not connected.

Thanks for pointing interference. I have removed and placed further away LCDs positive wire from the negative ones. It was short test, but I didn't saw any corruption so far.

It made me thinking that it may be something with my PSU, as it is an old one and it maybe doesn't have good protection or it is just low quality.
Since it is in the same plug as the fan, for example, switching fan ON/OFF may interfere with PSU and its constant and power delivery?
This leads me to open it again and check if there is a MOV or capacitor in it, as I can't remember if I saw one.

What would you recommend to use/build for common positives and grounds instead of protoboard?
Simple empty board, that I should just solder pins with one ground line and one positive?

UPDATE: I tried different plug for PSU from a different line and its all the same. . .

dlloyd

Quote
You are referring to white(grey) wire you marked in your post #24, which you can see in post #25, in the first pic on the relay, it is hanging in the air, not connected to anything, next pic column on the protoboard is empty and also not connected.
Yes, not connected to anything at both ends is OK.

Quote
It made me thinking that it may be something with my PSU, as it is an old one and it maybe doesn't have good protection or it is just low quality.
Since it is in the same plug as the fan, for example, switching fan ON/OFF may interfere with PSU and its constant and power delivery?
Yes, good quality power supplies and using decoupling/filtering capacitors (see reply #28) are excellent suggestions. Note that its really important that the relay board have its own, completely independent power supply.

Quote
What would you recommend to use/build for common positives and grounds instead of protoboard?
Simple empty board, that I should just solder pins with one ground line and one positive?
My only recommendation would be to use a PCB that has solder mask (green coating) over everything except the copper hole pads. There are PCBs available that mimic a bread board layout.

It seems like you may have everything working. If not, my only other suggestion would be to try moving the relay board and AC wiring at least 1 meter (3ft) away from the Arduino.

sone0121

Yes, everything works, I'm just a bit insecure about stability.
Thank you for your help and time, I owe you a beer or a coffee at least :)

One more thing, why does a higher rated capacitor disturbs my LCD more (471 vs 473)?

Can you show me an example of how would you setup decoupling for my situation? And/or what ratings should I go for. I just have my 471 in between "+" and "-". Do I need a resistor?

Now I just need to find small PSU rated 5V 1A. . . or power adapter could work as well, something from 7V to 9V? (again I'm thinking of the quality of those...)
Also, separate power for relays adds more complication which I'm not so much happy about as I need two sources to actually power one working thing. . . which wasn't my plan at the start of this project...

This made me thinking I shouldn't have gone at all with arduino and I should just have bought a finished product, as it seems in the end this will cost me more than something plug and play. . . And I lost about a month just to make it work.
I say this because it doesn't give me confidence with stability and reliability, I'm afraid one day I might come to find my garden is flooded and some device is fried. . . but we'll see.

I'll keep this updated as I upgrade/downgrade :D down the path and let you know what I came up with. ;)

At least I learned something new from this experience, which isn't that bad at all :) every school has its price ;) is what we say over here :)

TomGeorge

I have one ceramic 471 on there, if I go larger like 473 I get more LCD problems.
Across the 5V to gnd, the LCD has problems?
It sounds like you have some power supply wiring and connection issues, have you checked ALL your jumper connections to and from the protoboard?
Tom.... :)
Everything runs on smoke, let the smoke out, it stops running....

sone0121

It actually runs better without one at all lol

Maybe I'm doing something wrong, I'm supplying arduino with 5V, then from arduino to protoboard. Or it should be the other way around?

TomGeorge

Hi,
To what pins are you supplying 5V?
What is the supply?
Do you have a DMM to monitor the 5V supply when the fault occurs?

Thanks.. Tom.... :)
Everything runs on smoke, let the smoke out, it stops running....

sone0121

I was supplying to power pins, two that are next to each other, 5V and gnd.
I changed now supply to the protoboard and this is how I'm powering arduino now


It is a PC power supply, I think it's switching one, it says on the sticker it has 30A @5V and 20A @12V, but I doubt it

Yes, I monitor it, it shows 5.25V with 471 and it varies from 5.24V to 5.26V, low % of faults
If I go larger like 473 I get jumps from 5.25V to 5.28V, I get high % of faults.

sone0121

I think I solved it, I removed MOV from humidifier terminal and replaced fans MOV from L&N to after switch L&L :)
I didn't see single LCD error in a couple of hours, at least for now :D

Also added one more ground wire from PSUs molex connector and all I see now is stable 5.26V (it may drop to 5.25V if two or more relays are open at the same time)

sone0121

Just to report back, everything works fine with switching circuits, except I found a new problem.

If I plug a new device, for example, a simple table fan, again I get a voltage spike that backfires at relays. I noticed when switching added device, relays LEDs would slightly blink, barely noticeable in dark, but still noticeable. This would cause Mega to crash once in like 10 on/off switches.

Is it safe to add on more MOV, to protect relay circuit, in a red circle where power comes from the wall in my circuit which looks like this now?

Or I need to change rest of MOVs to L&L after switch, and connect just that one to L&N ?

Also, I'm still thinking to add RC to aid MOVs, like 1k ohm Resistor(or 10k) and 275VAC 220nF Capacitor, would this be sufficient or I need higher values?

dlloyd

Quote
Is it safe to add on more MOV, to protect relay circuit, in a red circle where power comes from the wall in my circuit which looks like this now?
Yes (they do this in surge protection devices)

Quote
Also, I'm still thinking to add RC to aid MOVs, like 1k ohm Resistor(or 10k) and 275VAC 220nF Capacitor, would this be sufficient or I need higher values?
For these RC snubber modules rated for 220VAC, they use a 0.1uF/630V capacitor and a 220 ohm 3 or 5W high voltage resistor. They also include an MOV.

sone0121

Thank you very much.
I was looking at the same snubber, I just couldn't find tech info about it.
As I already have MOVs, I will stop by the store tomorrow and get the rest of the components and build it.
Should one be enough on main, or I would have to go for each device alone?

dlloyd

The RC snubbers would work best at each relay, same as where existing MOVs are.

sone0121

Btw do I connect snubber with COM and NO(L&L) or L and N terminals?
I searched around and now I got confused...

dlloyd

Normally across the relay contacts (switched load) which is COM and NO, same terminals as your wiring connections.

sone0121

Thank you. I saw there are two ways to do it so I wasn't sure.
Btw is it ok if I use lower watts resistor? 220 ohm 1/4w 5%? or ceramic one with 5w? what is a better/safe option? Because atm they don't have them at the store, just ceramic ones, but I never went into what is the difference. . .

Go Up