Arduino is hanging when the 5v relay is operated for switching the ceiling fan.except fan the relay works perfectly without any issue, in the circuit

Arduino nano is hanging when the 5v relay is operated for switching the ceiling fan.except fan the relay works perfectly without any issue, in the circuit i am using uln2003 ic to drive the relay.
please help me to get out this issue..the issue was causing only when the fan is opearated.

Welcome to the wonderful world of EMI (ElectroMagnetic Interference) or black magic. Post an annotated schematic with links to technical information on each of the hardware parts. When you say Arduino there are various types of Arduino boards present in the market that includes Arduino UNO, Red Board, LilyPad Arduino, Arduino Mega, Arduino Leonardo. All these Arduino boards are different in specifications, features and uses and are used in different type of electronics project. This does not count the non official ones or clones so which one do I use. Please read the forum guidelines before updating your post.

2 Likes

What is the relay's coil voltage and current? AC or DC?
What is the fan's voltage and current? AC or DC?

1 Like

Common problem.
Happens when you have a poor quality 5volt supply, or didn't separate the fan wiring from the Arduino wiring, or didn't use a snubber circuit across the relay contacts (needed if you switch inductive AC loads).
Leo..

2 Likes

OIP
this relay i am using for 230v ac fan

i have a doubt which diode is best ..ie. 1n4148 or 1n4007 for relay

Is the arduino running off a power source connected to the AC line ?
If so , try isolating it by running it off a battery. If the symptom dissapears then the cause is spikes on the DC supply rails caused by spikes on the input power supplies powered by AC. This can sometimes be eliminated by adding large amounts of capacitance on the DC power rails (470uf to 1000uF) , which suppresses the spikes. Decoupling caps (0.1uF) on all the DC chips also helps.

There are many advantages to solid state relays.

You said you use a ULN2003 to drive the relay.
That chip has diodes built-in for the relay coil.
The coil part is fine if you have connected the common pin9 to 5volt.

What I meant is a snubber circuit across the relay contacts.

I agree that a solid state relay is much easier for mains power than a common relay.
Leo..

1 Like

Thanks ,
i was tried but its not working

what is not working?

Hi,
Can you please post some images of your project?
So we can see your component layout.

You must keep the fan mains voltage wiring AWAY from other low power and signal wiring?

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

Thanks.. Tom... :grinning: :+1: :coffee: :australia:


here i am getting the issue

Hi,
just zoomed a bit better on your complete circuit;

Tom.. :grinning: :+1: :coffee: :australia:

Hi,
This makes no sense'

What are all the wires?
What is fan supply etc etc.

Can I suggest you get a pen(cil) and paper and just draw the relay driving ciruit, the relays and the power supply and the fan.
Your circuit tells us nothing about the fan circuit except that you have some snubbers or series components for fan speed control, but what are they connected to.

Draw a circuit that you can use to troubleshoot.

Sorry but I would review your schematic layout to make it logical and easier to read.

Tom.. :grinning: :+1: :coffee: :australia:

Vin needs to be between 7V and 12V. Won't work with 5V!

You can't connect the nano and nodemcu resets together

V-in and the 5volt pin are joined.

Much of that diagram is hard to follow, because it's not drawn according standard conventions.
Supplies up, grounds down, signal left to right. Supply and ground with symbols, not long lines.
Leo..

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.