Hi all,
I am currently working on a microwave sensor for which I am using a relay to open and close and drive an LED. The switching mechanism is a 5V relay. The circuit's main control unit is a microcontroller which reads the state of the output of a comparator and uses it to detect whether there is motion or not. If it detects motion, the microcontroller will send an ON signal to a MOSFET which drives the relay. My main issue is the following:
Whenever the microcontroller detects motion, it opens the MOSFET, if I probe the main 5V power line which powers both the relay and a 3.3V LDO which feeds the MCU, the oscilloscope shows a huge dip in voltage (almost down to 1.5V) which is about enough for the microcontroller to shutdown and restart after power is restored. This causes something similar to an oscillation effect where the microcontroller acts as if nothing ever happened and sends the ON signal again so on and so forth...
I know there are considerations when driving inductive loads such as relays when it comes to reverse voltages for which I attached a flyback diode between both ends of the relay (reverse biased with respect to the main +5V). This, howveer, seems to not fix the problem at all.
I tested the relay without being driven by motion detection and by just turning the MOSFET on to see how it affected the main power line. The result was some sort of oscillation of almost 3V peak-to-peak at the main power line.
Would anybody know what the issue could be?
I am currently working on a microwave sensor for which I am using a relay to open and close and drive an LED. The switching mechanism is a 5V relay. The circuit's main control unit is a microcontroller which reads the state of the output of a comparator and uses it to detect whether there is motion or not. If it detects motion, the microcontroller will send an ON signal to a MOSFET which drives the relay. My main issue is the following:
Whenever the microcontroller detects motion, it opens the MOSFET, if I probe the main 5V power line which powers both the relay and a 3.3V LDO which feeds the MCU, the oscilloscope shows a huge dip in voltage (almost down to 1.5V) which is about enough for the microcontroller to shutdown and restart after power is restored. This causes something similar to an oscillation effect where the microcontroller acts as if nothing ever happened and sends the ON signal again so on and so forth...
I know there are considerations when driving inductive loads such as relays when it comes to reverse voltages for which I attached a flyback diode between both ends of the relay (reverse biased with respect to the main +5V). This, howveer, seems to not fix the problem at all.
I tested the relay without being driven by motion detection and by just turning the MOSFET on to see how it affected the main power line. The result was some sort of oscillation of almost 3V peak-to-peak at the main power line.
Would anybody know what the issue could be?