Go Down

Topic: help connecting Arduino UNO to n-ch MOSFET via Optocoupler (Read 8 times) previous topic - next topic

Terraviper-5

Hi!

I am trying to control a solenoid with Arduino Uno. I want it to go through an optocoupler with darlington driver just in case something goes wrong. Before I try it with solenoid, I wanted to see if everything works with a LED. So I first connected it the same way as in image below, just without the MOSFET (optocoupler acted as transistor, since there isn't so much current) and it worked. Then I tried it with just the MOSFET and without the optocoupler, and again it worked. Then I tried the configuration in the image, and it didnt work. Sometimes the led was on, sometimes off, nothing like Arduino was telling it to do. My guess is that optocoupler doesnt have enough power to turn on the MOSFET, but I really need some help from more experienced users to really identify the problem. Thank you for your time!

Image: https://www.dropbox.com/s/s9jxmo9yb9ae98r/test%20sketches_bb.png

Datasheets:
https://www.dropbox.com/s/3osm1rfnk05ezbn/irlb8721pbf.pdf
https://www.dropbox.com/s/1q9g79o092lpf1b/LTV-8x6.pdf

Grumpy_Mike

The transistor in an opto coupler can only pull down, so there is nothing to supply the voltage to the FETs gate.
You can put a pull up resistor on the gate of the FET to the positive supply.
Alternatively you can put the transistor of the opto between the +ve and the gate and pull down the gate to ground.

Terraviper-5

#2
Oct 28, 2012, 07:26 pm Last Edit: Oct 28, 2012, 07:56 pm by Terraviper-5 Reason: 1
Please excuse my n00bishness, but wont the power from the supply be too much for the gate of the FET? When using solenoid it will be 15V+. Or will the FET take it?


The transistor in an opto coupler can only pull down, so there is nothing to supply the voltage to the FETs gate.


But how come it worked for led? If it pulls down, shouldnt the led then be on when its supposed to be off and off when its supposed to be on?

Edit: Ok, I found this image
But I dont understand how optocoupler will survive the high voltage.

Runaway Pancake

Just wanted to say that's probably going to be OK, but others just looking at it need to know that VG will be about 1/3 of supply: (680?/1680?) * 24V = 9.7V
"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Terraviper-5

Oh my, I didnt know that optocoupler is going to complicate things so much.

Go Up