uln board
Please allow me to inject some correct information here. In order to use the MCT2E opto device shown above, you do NOT feed the LED side 3 volts.
The LED side needs to have a controlled electrical current flowing through the LED in a forward biased fashion. Saying feed 3 volts through a resistor to the LED inside the MCT2E you are effectively accomplishing this but to think of the LED as a voltage operated device is bad thinking. Better to say pass a current not to exceed 60 millamps through the LED side of the MCT2E.
By the way that is a odd looking diode in the above picture. Pin 1 is the anode and pin 2 is the cathode, but the cathode in the picture has a line missing.
~~~~~~~~~~~
If the original poster must control a electromechanical relay who's coil voltage rating is 12 volts DC from a logic circuit who's supply voltage is only 3 volts, then a "level shifter is in order". A "current" from the logic that is 3 volts can be used to turn on a bipolar transistor (passing current though the base emitter junction) to switch current through the collector emitter. A 2N2222 NPN transistor (or equiv.) can be used, no need for a MCT2E opto isolator (unless you need electrical isolation as well).
My point in getting involved in this thread is to point out to all readers that LEDs are current controlled, and so are bipolar transistors. If you think of them as devices that turn on and off with voltages you are never gonna understand these solid state devices, and you'll destroy them in a microsecond. You must control the "current" flowing through these parts. Talking about them as if they are like light bulbs does no one a service.
The ULN2803 is basically 8 bipolar NPN transistors in a 18 pin package. (They are darlington transistors but please don't dwell on that).
Using one of the 8 transistors in the ULN2803 to "level shift" from 5 volt logic to 12 volt logic is great. ULN2803 internal transistors have the gain to take tiny current from the 5 volt logic, and switch heavy currents (upto 500mA) on the 12 volt board and are set up internally to deal with 5 volt logic. HOWEVER, the original poster said they had 3 volt logic, not 5 volt.......so, the transistor array you mentioned is NOT the best array choice. Look at the ULN2801...the difference is that the ULN2803 you mentioned has 2.7K resistors on the transistor bases, all ready for 5 volt logic. The ULN2801 I mentioned has no base resistors in the package so you put one in your circuit and you calculate the proper resistor for your 3 volt logic to get the proper behavior from the darlington inside the ULN2801. If you don't need 8 transistors in the array look at the ULN2001 chip. It costs much less and has only 7 transistors. If you only need to switch one 12 volt relay from 3 volts, use a single transistor like 2N2222 or equiv. biased properly with the appropriate base current drive. The ULN2803, 2801, 2001 are arrays for when you need to switch 7 or 8 different things on and off. If you use the 2N2222 device, don't neglect to put a snubbing diode across the relay coil ! If you use the ULN2xxx array be sure to tie the clamping diode pin to +12v to snub back EMF.
Per the MCT2E.... that can be used as a level shifter (for logic) but it is not going to have enough current gain capability to drive the relay coil directly on the transistor side of that part. A transistor is going to be required anyway, so unless (electrical) isolation is required (and the original poster did not say it was) then the MCT2E is basically useless.
If the original poster needs to produce 12 volts from 3 volts, then he needs charge pumps or a DC to DC switching converter / up switching power supply, but I don't think that is what he meant.