Here is my circuit schematic :
I need to power ON/OFF a 230VAC fan using a relay. The relay is powered by a 5V DC power supply. Digital pin on the Arduino board open or close the circuit in PNP as it is HIGH or LOW; If it's HIGH, the relay is switched ON, otherwise it is OFF. There is also a snubber diode to avoid current from relay induction.
The digital pin is controlled by RX message.
This is working very well when 230V AC is powered OFF, but when it'is ON the Arduino crashes, and gets unable to receive RX messages.
I think something is wrong in my circuit. Can you help me please?
Here is my new schematic : I've removed the transistor and the snubber diode The digital pin is directly linked to the command pin on the relay with 2.2k resistor and a simple led
RX/TX is still crashing, and the arduino seems to act very slowly