8 Channel Relay Board - Proofreading

According to the datasheets:

4N37S has 100mA collector current The relay needs 150mA

codlink: Sorry, but I don't see any difference in the Ebay ckt to mine. The only thing that I see is that I have a LED and a resistor for the LED on the relay.

Also I don't see (nor have I ever seen) pull-up resisitors on the Inputs.

Not trying negative but I would like to understand.

I attached the opto I am using.

The circuit is pretty hard to see for me and I think there is a mistake in it anyway. It looks like the wire shorting out the relay coil shouldn't be there. Notice where the collector of the phototransistor goes and notice that the emitter is not grounded.

The e-bay circuit has the opto collecto connected to +5, and the emitter driving the base of the NPN transistor. Opto LED on = current flowing into the NPN Base. Your design had Otpo LED on turning the NPN base off (low) with nothing to bring it high.

This listing has a clearer picture:

http://www.ebay.com/itm/8-Channel-DC-5V-Relay-Module-for-Arduino-PIC-ARM-DSP-AVR-MSP430-TTL-Logic-/271188081780?pt=LH_DefaultDomain_0&hash=item3f2411bc74

Lefty

retrolefty: This listing has a clearer picture:

http://www.ebay.com/itm/8-Channel-DC-5V-Relay-Module-for-Arduino-PIC-ARM-DSP-AVR-MSP430-TTL-Logic-/271188081780?pt=LH_DefaultDomain_0&hash=item3f2411bc74

Lefty

Ah, much better. No short circuit either. :)

[quote author=Papa G link=topic=160464.msg1201533#msg1201533 date=1365989315]

codlink: Sorry, but I don't see any difference in the Ebay ckt to mine. The only thing that I see is that I have a LED and a resistor for the LED on the relay.

Also I don't see (nor have I ever seen) pull-up resisitors on the Inputs.

Not trying negative but I would like to understand.

I attached the opto I am using.

The circuit is pretty hard to see for me and I think there is a mistake in it anyway. It looks like the wire shorting out the relay coil shouldn't be there. Notice where the collector of the phototransistor goes and notice that the emitter is not grounded.

Edited: Sorry, that was poorly worded. I meant notice how the collector on the ebay circuit is wired to 5 V and their emitter goes to the base of the driver transistor as opposed to the way your circuit is wired. [/quote]

So, for example R16 (T16) needs to be pulled high?

Ah, I understand now. I attached a schematic of which I was basing mine off of.

Now my first sentence on this post would rectify the situation, pulling (T16 for example) high? Since you can’t see (lol), the wire going from the collector to the base of the relay transistor.

I see how you got confused. Notice they are biasing the phototransistor to switch faster rather than act more linearly. I don't know what the purpose of the Olimex circuit is. It's an optically coupled OR-gate that resets the processor for whatever reason I don't know. :)

[quote author=Papa G link=topic=160464.msg1201554#msg1201554 date=1365991113] I see how you got confused. Notice they are biasing the phototransistor to switch faster rather than act more linearly. I don't know what the purpose of the Olimex circuit is. It's an optically coupled OR-gate that resets the processor for whatever reason I don't know. :) [/quote]

Not quite. It's poorly drawn. Note that each opto collector has a I1, I2, I3, or I4 label. These wire over to digital input pins on the processor chip.

How do you say it’s poorly drawn?

retrolefty: [quote author=Papa G link=topic=160464.msg1201554#msg1201554 date=1365991113] I see how you got confused. Notice they are biasing the phototransistor to switch faster rather than act more linearly. I don't know what the purpose of the Olimex circuit is. It's an optically coupled OR-gate that resets the processor for whatever reason I don't know. :)

Not quite. It's poorly drawn. Note that each opto collector has a I1, I2, I3, or I4 label. These wire over to digital input pins on the processor chip. [/quote]

lol, no I mean the schematic posted with reply #26.

so, my question in reply 26, will it work?

codlink: so, my question in reply 26, will it work?

Is you intent still to energize the relay with a LOW on INx?

[quote author=Papa G link=topic=160464.msg1201563#msg1201563 date=1365992311]

codlink: so, my question in reply 26, will it work?

Is you intent still to energize the relay with a LOW on INx? [/quote]

If so, you will use a circuit like http://www.ebay.com/itm/8-Channel-DC-5V-Relay-Module-for-Arduino-PIC-ARM-DSP-AVR-MSP430-TTL-Logic-/271188081780?pt=LH_DefaultDomain_0&hash=item3f2411bc74&autorefresh=true.

To make this easy, I attached just one of my relay circuits. This schematic, from what I can see, is the same as in the link that Papa posted, except for adding a LED (w/resistor) between GND and +5V.

codlink:
To make this easy, I attached just one of my relay circuits. This schematic, from what I can see, is the same as in the link that Papa posted, except for adding a LED (w/resistor) between GND and +5V.

No, more like this.

[quote author=Papa G link=topic=160464.msg1201601#msg1201601 date=1365997457]

codlink: To make this easy, I attached just one of my relay circuits. This schematic, from what I can see, is the same as in the link that Papa posted, except for adding a LED (w/resistor) between GND and +5V.

No, more like this. [/quote]

Yes, that is a proper interface from opto to relay switching transistor. I would not bother with having two visual leds performing the same function, I would eliminate the opto input led indicator and adjust it's series resistor to compensate for it's elimination.

Lefty

Instead of using 8 Arduino pins to drive your board, why no use one a single 74HC595 between the arduino and the optocouplers?

This way you’ll use only 3 arduino pins, instead of 8, and the complexity added to your design will be minimal (and a 595 is pretty cheap).

retrolefty: Yes, that is a proper interface from opto to relay switching transistor. I would not bother with having two visual leds performing the same function, I would eliminate the opto input led indicator and adjust it's series resistor to compensate for it's elimination.

Lefty

Wow, I just noticed the LEDs.. You're right. I will have to change my design for the relay LED. I wanted the LED to light when the relay has power (Not switched on). The LED on the opto would light when the relay switched on. It's not really a necessity to have either LED, but I like seeing the lights. Besides, I have hundreds of 1206 LEDs in a variety of colors..

Thanks Retro and Papa. Just to let you know Papa, I knew how transistors worked, but the symbols stumped me for some reason. Last night (late), it finally sunk in. So, +1 to ya both.

AlxDroidDev: Instead of using 8 Arduino pins to drive your board, why no use one a single 74HC595 between the arduino and the optocouplers?

This way you'll use only 3 arduino pins, instead of 8, and the complexity added to your design will be minimal (and a 595 is pretty cheap).

Good idea, have quite a few of those in SMD that I have been wanting to use.

Thanks Retro and Papa. Just to let you know Papa, I knew how transistors worked, but the symbols stumped me for some reason. Last night (late), it finally sunk in. So, +1 to ya both.

Thanks, codlink, I knew you'd get it if you thought about it long enough.