I found the schematic here: http://electronics-diy.com/electronic_schematic.php?id=1012
I plan to use a microcontroller to control several things, mostly changing lights. In order to get around the problem of current draw I figured I would use a p-channel mosfet.
Later I learn that optoisolators are a good idea, though I'm not really sure why so I order some and try to use them. The specific ones I got were Sharp PC900V's Looking at the schematic it looks just like an NPN transistor. I try to use it and it works. Great. I put another one on, and the first one will no longer turn off, and in fact nor will the second one.
Through trial and error I've narrowed it down to some sort of interaction between the two. I'm not quite sure what the problem is, how to avoid or what I need to research. I learn best by doing, and so I'm doing, and I think I'm doing this wrong. If I've missed something basic, please feel free to point out what I should try to reread.
I can rework the circuit to go from the optoisolator to an npn to the p channel mosfet, but to me that just seems silly, unless that is the only way to do it.
Some things I've noticed
If I remove the second LED, the first light will go out, unless its on using the optoisolator.
If its on by itself (without the optoisolator) then it is notably brighter.
Removing the vcc or ground from the optoisolator will turn that LED off, but leave the other one on. I suspect its an interaction from mosfet to mosfet somehow.
If the second one is removed from the board, I can touch the positive side and it will turn the light, I can turn it off by turning it on using the optoisolator, and then off again. When I do this it will go dim when its turned on, then go off, unless I touch the lead in doing so.
Thank you in advance for helping me out with this, I've been pulling my hair out for a couple weeks just trying to figure out how to get the optoisolators to do anything...
I plan to use a microcontroller to control several things, mostly changing lights. In order to get around the problem of current draw I figured I would use a p-channel mosfet.
Later I learn that optoisolators are a good idea, though I'm not really sure why so I order some and try to use them. The specific ones I got were Sharp PC900V's Looking at the schematic it looks just like an NPN transistor. I try to use it and it works. Great. I put another one on, and the first one will no longer turn off, and in fact nor will the second one.
Through trial and error I've narrowed it down to some sort of interaction between the two. I'm not quite sure what the problem is, how to avoid or what I need to research. I learn best by doing, and so I'm doing, and I think I'm doing this wrong. If I've missed something basic, please feel free to point out what I should try to reread.
I can rework the circuit to go from the optoisolator to an npn to the p channel mosfet, but to me that just seems silly, unless that is the only way to do it.
Some things I've noticed
If I remove the second LED, the first light will go out, unless its on using the optoisolator.
If its on by itself (without the optoisolator) then it is notably brighter.
Removing the vcc or ground from the optoisolator will turn that LED off, but leave the other one on. I suspect its an interaction from mosfet to mosfet somehow.
If the second one is removed from the board, I can touch the positive side and it will turn the light, I can turn it off by turning it on using the optoisolator, and then off again. When I do this it will go dim when its turned on, then go off, unless I touch the lead in doing so.
Thank you in advance for helping me out with this, I've been pulling my hair out for a couple weeks just trying to figure out how to get the optoisolators to do anything...