5V relay/switch

Ok, I'll keep it short. I need a [u]device to switch ON/OFF a 24V low current (100mA - 250mA) load[/u] using the Arduino. Someone suggested that I use an SSR, but they're expensive and also switch AC current. I need this only for a full DC line. My idea currently is to use an optocoupler because there are 2 supplies, 5V powering the arduino and 24V powering something else. I cannot use the 24V to power the arduino because it's a very low current (1A) compared to the 5V (10A) supply I'm using to power several other devices. So, optocoupler is it then. On one end I'm using the 5V signal through a resistor to power the Opto, since it's technically an LED switching ON. The other end is where I'm stuck. [u]This is what I'm following -[/u] Opto side: 5V --- resistor --- opto LED (power) --- GND Switching side: 24V --- resistor --- opto --- 24V Input The 24V device here takes 24V inputs as signals. So when the arduino pulses a 5V signal, the 24V line gets switched on. So, it's basically a 5V solid state relay, but the voltage is 5V to actuate and 24V Load. The method I'm using looks right 8) , opto side resistor to to limit current into LED, switching side resistor to limit current entering photo-detector. But I'm sure there are loopholes somewhere.

Help out People !!!! =(

What's wrong with a MOSFET?

fungus: What's wrong with a MOSFET?

I really don't know how to wire a MOSFET. So I'm just working with what I currently know :P .Will definitely check it out, but for the moment I have an opto already with me, so can I try using an OPTO ?

vikramnayak:

I really don’t know how to wire a MOSFET. So I’m just working with what I currently know :stuck_out_tongue: .Will definitely check it out, but for the moment I have an opto already with me, so can I try using an OPTO ?
[/quote]

Here is a relay interfacing model I used in my project. Hope it will be helpful to you…

Replace the opto isolator with an N-channel "Logic Level" MOSFET, keeping the rest of the circuit (just loose the ground connection on the gate side) exactly as it is.

Are GND 1 connected to GND 2 ? IF not is it possible to do so?

Pelle

Yes, you can connect both of the grounds, I did use 2 different power supplies & wanted to COMPLETELY isolate the relay circuit from the arduino... thats why I mentioned them as GND1 & GND2.

a picture you will find whenever you search for

Arduino MOSFET

(as shown in the post above, it is considered good practice to have a resistor on the gate)

Peter_I: a picture you will find whenever you search for

Arduino MOSFET

(as shown in the post above, it is considered good practice to have a resistor on the gate)

A picture which should be deleted from the entire internet, as it could cause you to blow pin 3 of your arduino due to the gate inrush / outrush current depending on the gate capacitance.

There should be a small resistor (say 150?) in the gate connection between pin 3 and the pull-down resistor.

What is the 24V device you will be switching? I ask because if it is inductive, then you will need to use a flyback diode, but you can use a simple transistor (with or without the optocoupler) to do the switching. If it is capacitive (e.g. an electronic device with an input capacitor), then whatever does the switching needs to cope with the surge current when the capacitor charges, and in this case a mosfet (with or without the optocoupler) would be a better choice.