Transistor Optocoupler MCU Switch

Dec 01, 2006 5 Replies

I created a sort of 'MCU controlled power switch' for AC power source based on the deseigns here:

formatting link
It uses optocouplers and triacs to turn each load on or off. It seems to work to switch anything within reason (like light bulbs of different wattages).



Is it possible to do the same thing with a 12v DC power source, by using transistors and optocouplers with transistor output? Someone told me transistors are more complicated to work with than triacs. I wasn't sure what he was talking about.



not sure I'm reading you correctly . . .

You want to control a triac with a 12 dc signal voltage? using the same kinda optocoupler you used with the MPU output?

YES that's easy to do (assuming I got it right) just put the 12 VDC signal into the opto coupler, to light the LED inside of it, with a dropping resistor to limit the current to the LED . . . and you are done.

IF you're asking if you can just put 12 VDC into a triac gate to turn it on - well you can sort of - but you won't have isolation - the mains will eat the power source if it is referenced to ground - and it will be dangerous if not referenced to ground.

Your question needs clarification.

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----

formatting link
The #1 Newsgroup Service in the World! 120,000+ Newsgroups

----= East and West-Coast Server Farms - Total Privacy via Encryption =----

News==----

Newsgroups

I want to have two DC power sources, 1) 5 volt, and 2) 12 volt. The 5 volt source should turn on an optocoupler which should turn on a transistor which will turn on a 12 volt connection from the other source. Actually the 5 volt MCU will control 6 or more optocouplers with transistor outputs.

So I'm asking if transistors to control the #2 DC power source would work, the same way it is working now with triacs controlling the #2 AC power source.

Based on this question NO. The triac requires that the current through it be reduced to zero (low value) before it will turn off !

In a DC circuit once you turn it on it will stay turned on !

Baron:

News==----

Newsgroups

--- Yes.

The thing you need to watch out for is to make sure your MCU can source/sink enough current to turn on the OPTO's LED hard enough to drive the OPTO's transistor into saturation. If it can't, then you need to do something like this: (View in Courier)

+12 +12 | | [R2] | | S +5 +------G PCH | OPTO | D +---+--------+--+ | | |A C | | | [LED] -> B | [LOAD] | | E | | +---+--------+--+ | | | | [R] | | MCU | +--------+ +-----+ C | | I/O|--[R1]--B 2N3906 12VGND +-----+ E | 5V GND

Where the 2N3906 is used as a current sink in order to allow as much current as necessary through the OPTO LED in order to saturate the OPTO NPN, and the collector of the OPTO's transistor is pulled up to 12 volts through R2.

When the transistor saturates, its collector will be pulled to

12VGND, which is the low side of your 12V supply. The high side of the 12V supply will be connected to the SOURCE terminal of a "P" channel MOSFET and the load will be connected to its DRAIN terminal.

That way, when the MCU's I/O goes high the LED will shine on the transistor, turning it on. When that happens its collector will go low, pulling the gate of the MOSFET low, which will turn on the MOSFET, connecting 12V to the load. For the MOSFET, you'll need to choose one which can handle the current your load will demand and which can stand off 12V when it's off.

Check International Rectifier and Digi-Key, or post what your loads will look like and I'll be happy to help you make a selection.

Have you chosen an OPTO yet?

-- JF

formatting link

you may not need opto-isolators, if you can connect one of the MCUs powewr supply wires to one of the DC supply lines, (typically the negatives are connected, but all possible arrangements can be made to work)

they probably meant that because transistors dont turn all the way on automatically like triacs do you need to make sure that you make them turn fully on otherwise they heat up...

Bye. Jasen

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required