MOSFET As a Relay!!!

by sriramrepaka29 in Circuits > Electronics

1884 Views, 2 Favorites, 0 Comments

MOSFET As a Relay!!!

d4184-mosfet-control-module-replacement-relay-1-800x800.jpg

General relays work fine but they are bulky and not very modern. On top that they make sound, so I badly wanted an alternative and I knew that MOSFET's can do the job so searched and found this MOSFET based relay module which works like a charm.


So this module used a Optocoupler to sense the input signals and a MOSFET as a switch to control the output. The input ranges are 3-5V so it works with any microcontroller, it is very cheap but not as cheap as an relay but occupies no space at all (too thin). This module uses a D4184 MOSFET, and it can control voltages up to 40V and current up to 50A crazyy right.


This works fine only for DC voltages.

Supplies

d4184-mosfet-control-module-replacement-relay-1-800x800 (1).jpg
  1. D4184 MOSFET control module.
  2. Microcontroller of your choice I am using an Arduino UNO

https://protosupplies.com/product/d4184-mosfet-control-module/

Downloads

Connections

d4184-mosfet-control-module-replacement-relay-3-800x800.jpg
circuit.png

The figure shows the circuit connections. Now I will explain ho it works. So now if you want to control an 12V LED I will connect the LED pins to the load pin and "-" pin, and 12V battery to "+" and "-" pins. So now to control the LED that is on and off the LED. I used an Arduino UNO it has 3 ,5 ,6 ,9 ,10 ,11 as PWM pins. So use any of those pins to control the output. If you give the PWM signal of duty cycle "n" then the load will get {(battery voltage)/n}V .

With optocoupler isolation, the control signal and the power of the controlled device are isolated, which greatly increases the rigidity of the interference. PWM speed regulation widely used to control the start and stop of the motor. The signal input side can be welded to the terminal or pin itself, compatible breadboard output can be soldered to the terminal or direct wire.

Code

const int controlPin = 3;
float dutycycle = 0.50; \\duty cycle
int i = dutycycle*256;

void setup(){
pinMode(controlPin, OUTPUT);
}

void loop(){
analogWrite(controlPin, i);
}


Connect the connections as shown in the figure and upload the code. Just remember to connect pin 3 of Arduino to PWM pin and GND of Arduino to GND of module.