Hi. New to Arduino and not very familiar with electronics.
Trying to control a LED strip's brightness using Arduino's PWM. First i built this scheme (from this topic http://forum.arduino.cc/index.php?topic=15993.15), but it didn't work for me:
I assume it's totally incorrect. For some reason the author connected the FET's gate to the base, not the collector of the phototransistor. Also the load (a motor) is wrongly connected to the FET's source, not the drain. Or perhaps i didn't understand it correctly, and his schematic should work?
Here's my schematics (i made it based on what i have read about how MOSFETs and opto couplings work):
The problem is that even if i analogWrite(9,1), the LEDs are already shining brightly, and I can not get a nice dimming effect, when the light is dim (by gradually incrementing PWM from 0 to 255) analogWrite(9,0) turns LEDs off, which is correct analogWrite(9,255) makes them shine 100%, which is also correct
I just would like for the brightness to increase linearly as i gradually increment PWM from 0 to 255. How can this be achieved? Currently it "jumps" to the bright shining when i change analogWrite(9,0) to analogWrite(9,1), and when i increment the PWM value further, I am getting a slight increment of the brightness.
Are there any possible problems in my schematics?
I would also like to control a DC motor using the same schematic (optocoupling+MOSFET). Would there be any problems in a long run?