OptoIsolator - Using a transistor to control a 6 pin dip relay?

The relay I’m using (LH1156AT)

Transistor (2N222A)
Resistor (1K)
Diode (IN4003)

Supply (5V)
Base (3.3V)

I set up my circuit identical to the picture attached(http://learn.adafruit.com/system/assets/assets/000/002/346/original/breadboard.jpg?1350985513), but instead of controlling a motor, I’m controlling a relay using the high/low state of a pin (8). The output voltage of the pin when High is 3.3V. The 5V source is a separate source from an ESC (~4.99V). Right now I’m trying to light a LED (5V), but want to pass the signal of a servo through the relay in the completed circuit (this is the reason I’m trying to get the relay/optoisolator circuit working).

The problem I’m having is the relay isn’t being triggered. The voltage between the +,- terminals on the collector/diode is ~2.98V

Any suggestions? Observations? I’m new to circuitry - thanks for your help.

Screen shot 2013-12-09 at 8.49.10 AM.png

How about a schematic of what you think you have wired up?

What I’m thinking you want is this, I can’t tell what you have for the pictures.
Your .pdf doesn’t open for me, and a search for LH1156AT is not turning up anything useful.

If LH1156AT is an optoisolator, then something a little different is needed.

CrossRoads:
Your .pdf doesn’t open for me, and a search for LH1156AT is not turning up anything useful.

If LH1156AT is an optoisolator, then something a little different is needed.

the LH1156AT is a relay. i’ve attached the pdf…

I cant really follow your schematic, can you please explain?

lh1156at.pdf (145 KB)

I just had a multimeter on it (collector) and ti dropped from 2.99V to 1.22V when the base voltage increased...

I also switched to a 330ohm resistor.

Okay, datasheet says “relay” but is more like an optoisolator/optocoupler.
You don’t need the transistor, the arduino can drive input LED directly.

Then the switch part of the relay connects the LED cathode or one side of the coil of a small motor, to Gnd.

CrossRoads:
Okay, datasheet says "relay" but is more like an optoisolator/optocoupler.
You don't need the transistor, the arduino can drive input LED directly.

Then the switch part of the relay connects the LED cathode or one side of the coil of a small motor, to Gnd.

when i connect the arduino directly to 3 or more relays it resets. am I drawing too much current?

so i need a diode and a resistor in the input of the relay...im trying to figure out your schematic (im not sure what all the symbols are). I've been learning through youtube and breadboard examples...sorry can you please explain a bit more?

The "relay" has an internal LED between pins 1 & 2, and a switch between pins 4 & 6. You can see that from the LH1156AT datasheet.
A resistor is needed to limit the current from 5V, thru the LED, and into the Arduino pin.
This is shown in my drawing between "arduino pin" and pin 2 of the relay. The resistor could also go between 5V and pin 1.
So: If you are connecting to 3 LEDs, you need 3 resistors, and 3 Arduino pins.

The LED/resistor above pin 6 is the LED you are testing with in place of the motor.
The diode/motor is the small motor that the "relay" will drive.
And I do mean small - 120mA of current max.
The diode lets current generated by the motor get dissipated within the motor vs causing a nasty voltage spike at the switch when the switch is turned off.
Explanation: when you drive current thru an inductor, a magnetic field is created. When you stop driving, the magnetic field collapses, and the changing magnetic field then creates some current. When this current sees a high resistance (the switch in its off state), Ohms law kicks in: Voltage = Current x Resistance. Current x High Resistance = High Voltage. The Diode provide a low resistance path for that current to dissipate.

And I do mean small - 120mA of current max.

Will this work for a servo?

Thank you for the explanation!
I’m going to modify my circuit now.

What I’m trying to accomplish:
I have an RC receiver - Im going to use servo extension cables to attach to male headers on the breadboard (input). then using a separate set of headers (output), control servos. I want to use the “relays” to enable or disable the signal to the servo, and simply jumping the + and GND wires from the “input” to the “output”.

Am I on the right track?

So you will have power & gnd connected to the servos all the time, and only disconnect the servo control line? Yes, that will work.

CrossRoads:
So you will have power & gnd connected to the servos all the time, and only disconnect the servo control line? Yes, that will work.

yes, great! I'll try this tonight.

when i measure the amps from the pin to gnd i get 39mA.

The arduino seems to reset if i trigger three pins. is there any way to trigger 6 pins/relays or some combination, keeping the max power draw to <50mA?