how do i make my own solid state relay?

can i make a solid state relay with an optocoupler and irf840 Mosfet?

how would i go about connecting this?

Solid state relay's are too expensive to buy and i was thinking i could make one my self with components i already have

What voltage and current do you wish to switch with the mosfet and what is the input signal to the opto coupler. jack

the input signal to the optocoupler would be 5volts from an arduino output.

I would be switching appliances on or off like a computer monitor, powered speakers, maybe a lamp or something.

So i'd be swiyching 220volts and up to 3A current.

Well, if you're going to be switching AC then you need a triac, not a MOSFET. Google will reveal tons of example circuits, like this one:

http://computerchristmas.com/christmas/link-how_to/HowToId-7/How_to_build_a_triac_switching_unit_SSR

However....for 220VAC at 3A I would buy an off-the-shelf SSR. The money is worth the reduced risk of hurting yourself or starting a fire. Really.

http://www.ruggedcircuits.com

If you're not too worried about not having them tomorrow, you can buy SSR's from Chinese vendors on Ebay for very little.....

However…for 220VAC at 3A I would buy an off-the-shelf SSR. The money is worth the reduced risk of hurting yourself or starting a fire. Really.

I agree, you most likely won’t be able to do better then carefully shopping for a SSR designed and built by pros. http://business.shop.ebay.com/Electronic-Components-/4659/i.html?LH_BIN=1&_trkparms=65%3A12%7C66%3A2%7C39%3A1%7C72%3A3112&_nkw=SSR&_sticky=1&_trksid=p3286.c0.m14&_sop=15&_sc=1

Lefty

The money is worth the reduced risk of hurting yourself or starting a fire. Really.

Sage advice - don't be "penny-wise and pound-foolish"; it isn't worth it!

:)