Need example for using optoisolator & FET

I am working with an FTC team and need an example circuit that I can help them get wired up to drive a string of LEDs. We can’t directly connect the power so we need an optoisolator.

(see post #59 here explaining that we have to use an optoisolator
http://ftcforum.usfirst.org/showthread.php?1921-Robot-Electronics-and-Power-Answer-Thread/page6 )

I am not an expert, but the optoisolators I have found can drive 10’s of milliamps and the strings of LEDs I have are in the 200mA range. So I assume I’ll need the optoisolator to drive a MOSFET which will controll the LEDs.

What I could really use are some example part numbers that we can order and get quickly. I know just enough to be dangerous <grin> so when I think I’ve found a part that might work well then I find I can’t get it for 3 weeks. <sigh>

Thanks for any pointers to circuit diagrams and/or part numbers

I would suggest looking at using a relay.

  • They don’t require a lot of current to energize
  • They provide circuit isolation
  • They can source a lot of current from your supply

It seems like they suggested this as a possible option in their response.
I’m not familiar with the FTC rules myself, so I can’t comment to its legality.

Relays can be sourced locally at radio shack. You probably only need a SPST relay.

It looks like the HT SuperPro has 3.3v outputs, so you wont be able to drive the relay directly. Luckily there’s lots of circuits online on how to control a relay from a microcontroller. Like this. One modification to the circuit on that page though - I would suggest adding a diode across the relay coil as shown here.

This page will help you pick your R values.

Common diodes 1N4004, 1N4001
Common NPN transistor 2N3904
This relay should work if you’re switching 5volts to the LEDs.
This one if you’re switching 9volts to the LEDs.

The rules on FTC are much more limiting. We have to use a prototype board for things that aren’t part of the standard control system. And that board has limited power it can source.

I don’t think a relay will work, because I have only about 12mA @ 12V (or 20mA @ 5V) that I can use to drive the coil. I can get some mini relays that are in that range, but then I can drive only 1 at a time and we would like to do several.

I’d use an integrated device, something like this.

Just add an LED current-limiting resistor to the input. Assuming you’re driving with 5v, a 750 ohm resistor should be about right.

-Sasha

Thank you - that is exactly the kind of pointer I needed. I had seen some Solid-State Relays but they were awfully big.

I just ordered 10 of them (want to use 8 plus a couple to screw up with. :slight_smile: )