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

Hey man, thank you very much, you are No1, I have readen other topics where you helped other people and I admire your knowledge, right on point :)

I think we fixed crashing. I got 14n431k MOVs and ferrite rings and it worked a few times without any crashes.

Next thing I wanted to say is that my LCD is bothering me, it gets blank fields sometimes and it just might be what you have just said.

So as I got my 5V(5.3V) rail free on my PSU I can use it now to power Mega, should I go directly to Vin or should I use power jack?
Or should I stick strictly to 7.5V?
BTW I was then confused by the official statement, saying that you need from 6 to 12V to power you board, and I went for 12, as of thinking that more would be better, but now I see I was wrong

PS I got LCD16x2, RTC and DHT22 there too, and I plan to add up one or two more relays, but for controlling 12V power about 5A, maybe 10A max

dlloyd

You can use Vin or +5V pin (not both of course) or you could use the USB as an input to provide your 5V power.
If using the +5V pin, note that there will be no overload current protection.
If you use USB to provide the +5V, then this will take advantage of the on-board 0.5A polyfuse.

TomGeorge

Hi,
Welcome to the forum.
Can you post a picture of your project so we can see your component layout.
Wiring layout is very important when using mains AC due to wiring interference.
Have you got your mains wiring away from any of the MEGA and its power supply wires.

Have you got fuses wired into the mains power inlet tot your project, or do you have one in the power plug, as in UK?

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

sone0121

Hello
Yes, my wiring is separated AC from DC, in the pic, it might seem some are contacting each other, but actually small ones for VCC and signals are in the air not touching anything

I'm opting for power jack input then.


Also, this made me thinking what would be the next step of improvement in a similar setup, one set of relays just for control of the other set, with different power sources, like one would be only DC power, controlling AC on the other end?
Or there are just better and more expensive ones to go, and or what about SSR?
Some of my googling in past few weeks indicate that SSR is better, or it is dependant situation to control specific devices? Like where speed would matter?


idk if u can see img, here is it in code
img

sone0121

Totally forgot about drop down on Vin and power jack sides, so it's directly to 5V.
This makes me worry a bit, do I need some capacitor on there or something for protection, considering it varies from 5.2 to 5.3V?

PS I forgot to answer in the previous post, only fuse is in the wall 10A

EDIT: I just found out that switching device off manually, after the relay, it would again cause a crash

sone0121

After going with 5V and few test again I didn't see anything wrong, LCD, Mega works fine

And after some logical thinking about manual switch (in the post before), I'm thinking I would need one more set of MOVs connecting N and G, but I don't know if this would cause any harm or problems considering I already have one before

dlloyd

I think the MOVs would work better if they were connected from each relay Normally Open (NO) and Neutral. This could be across the L1 and N terminals at each load if easier. This should clamp the peak much better like this.
The ferrites work best if there are 4 to 7 turns of wire through each of them.
If the interference problem persists, identify which load is causing it and make sure it also has a ferrite.
If the problem still persists, could try a suitable RC snubber and ferrite.

EDIT: As mentioned by TomGeorge, it would be good to get a picture of your project.

TomGeorge

Hi,
Ops layout;


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

sone0121


I'm posting pic again, I don't know if can see it or whats wrong, but here is THE LINK too

Well that was my first thought when I opened the topic(L and N), but then I followed ur instructions for instal on L only after relay.
I'm going to test that too now. And I also expect a better result too. Just made me thinking what would be better if MOV is placed closer to switch or to power consumer?

dlloyd

There's 6 wires coming from the relay board to the Arduino (should only be 5)
Please remove the ground wire, leaving just +5V, IN1, IN2, IN3, and IN4.
This will enable galvanic (opto) isolation.

The opto IRLED and LED circuit works like this (no ground) ....





dlloyd

Ah, I see ... thanks for the pics. I think you were trying to trick me on that one ... :)

Quote
Well that was my first thought when I opened the topic(L and N), but then I followed ur instructions for instal on L only after relay.
I'm going to test that too now. And I also expect a better result too. Just made me thinking what would be better if MOV is placed closer to switch or to power consumer?
Normally you see them installed across the relay contacts ... but you might need to try the other possibilities and use whatever method works best.

sone0121

So far from tests, where I had most of the crashes with timers, now in 70 events, I had none :) (doesn't matter how MOV is placed)
I need to revert MOV on the fan, across the relay, instead of L and N. If I switch it OFF with or without dimmer it corrupts arduino, not LCD !
Then it can be switched manually if I use it trough my dimmer, where I have pf capacitor and resistor in it. If I switch it off or on with dimmer I can get just LCD error sometimes. Which leads me to the point that RC snubber is needed for fan.

Everything else seems ok with just MOV and ferrite.

PICTURE of LCD while corrupted, arduino still working

EDITED and will do more tests later

TomGeorge

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..... :)
Everything runs on smoke, let the smoke out, it stops running....

dlloyd

Umm ... this might relate back to that same wire:

Quote
I need to revert MOV on the fan, across the relay, instead of L and N. If I switch it OFF with or without dimmer it corrupts arduino, not LCD !
Then it can be switched manually if I use it trough my dimmer, where I have pf capacitor and resistor in it. If I switch it off or on with dimmer I can get just LCD error sometimes. Which leads me to the point that RC snubber is needed for fan.
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.

Go Up