How to drive relays?

Hello guys,

I am quite newbie in electronic and more or less self-taught in this area.

I would be happy if you take a look into these schematics with Arduino:

http://remoteqth.com/hw/band_decoder_sch.png

I have project completed and digital outputs from Arduino send signal through resistor and led diode, optocoupler and NPN transistor.

There are 12 open collector outputs and I want to drive 12v relays (about 30ma, 360 ohm coil resistance) on the SV2 outputs.

I have applied +12v to the relay, put diode over coil and connected specific output to other side of the coil but relay doesn’t switch, I got only appropriate led diode on but it looks no output for the relay.

What I am missing - appreciate your suggestions. What about pin 13 on the SV2 output, should it be connected somewhere?

Regards,

Robert

The Opto to transistor connections are not correct.

1- you need a series resistor to the base of the transistor from the opto’s emitter.

2- there is a diode across the transistor’s collector to emitter. what is this for?

3- you are not showing the relay coils or any of the power (+/-) connections on the isolated side so don’t know what you’re doing there.

Show a complete schematic of one relay circuit from the processor pin all the way to the relay output (contacts).

What about pin 13 on the SV2 output, should it be connected somewhere?

This looks to be the Relay's power supply return connection.

What is the Arduino’s Vdd? 5V?

If so then the Arduino’s output pins swing between about 0V and 5V.

With two LEDs in series there is a (1.2 + 1.4)V drop across the LEDs (assuming the external LED is Red). The opto’s LED needs at least 5mA so the series resistor should be:

(5 - 1.2 - 1.4) / 0.005 = 480 Ohm.

On the other side of the Opto: Assuming you have 12V on the collectors. When the Opto’s transistor is ON it is trying to apply 12V without any current limiting the the base of the next transistor. This is BAD since a transistor’s Base can never be more than a diode drop above the emitter. Without a series resistor either transistor would burn out.

To turn on the BC547 with 30mA collector current you need about 300uA of base current. So the base resistor is:

(12V - 0.6V)/.0003 = 38k Ohm. This is not too critical and a lower value resistor is ok. I’d use between a 10k to 33k resistor.

The relay coil’s diode should be across the coil and close to the coil terminals. I like soldering the diode right onto the relay’s coil terminals.

Re-do your schematic as requested.