Bought a 4 relays optocoupler board...but strange schematics..

Hi to all guys!it's my first topic i open here,i'm an arduino owner only from 2\3 weeks.
I bought some days ago a relays board from chinese ebay seller(THIS---http://www.ebay.co.uk/itm/300801443412?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649),and after had a look at various schematics out there(for others model,but similar)i choosed mine without do a read specifically at that schematics (thinked all relays boards were the same)
Yesterday evening i wanted to read it,but found something strange,or at least for a not-skilled person like me.
I'm an electrician,i know how works a relay etc,but:
take a look at mine relay board schematics,especially the input (that come to arduino outputs) you can find the schematics down in attachment
here--http://img687.imageshack.us/img687/6281/pictureuw.jpg a photo of the board
HERE--http://arduino-info.wikispaces.com/RelayIsolation and HERE--http://arduino-info.wikispaces.com/ArduinoPower and HERE--http://yourduino.com/sunshop2/index.php?l=product_detail&p=218there are some schematics and tips for others model of same board.i know 100% what these last 2 link say,and no problem reading the schematics.what i don't know is how to read\how it works the model i own.
I red of the fact there are some board with extra-function,where you can use total isolation protection by pulling a jumper,connect 5v from arduino on vcc1,not connect the gnd,and use external 5v supply on jd-vcc1 and connect its gnd.i choosed an optoisolated board because i red it's better for use with high voltage things.
Mine board has:
4 input pin (1\2\3\4..related to every relay onboard)
vcc1 and gnd1
vcc2 and gnd2
why 2 power supply?(with the jumper to short-circuit them)
why that difference in the schematics from mine and others?i don't understand the fact of using in2 and in3 on same relay...and others relays with vcc1 and gnd...
i'm very in doubts after seeing it...
i read and understand all about relays board,apart the model i bought mine!it seems i choosed a strange model rather that others on ebay\web
thanks for all who can help me out,it would be very appreciated!ps..don't know if usefull for you,but i want to interface my arduino controlling 220v things;i know how to do it electrically speaking,but want to do the same with arduino and electronic(i'm studiyng the c programming myself at home in last weeks)
i think i'l use also an uln2803a between the arduino and relay board.(only because i have some at home and never used it)if it's useless let me say guys!
:slight_smile:

4 relay module schematic.pdf (23.4 KB)

Hi, The relay board you have looks somewhat like this, right??
http://yourduino.com/sunshop2/index.php?l=product_detail&p=155

See the schematic on that page...

But I believe it has optoisolators and is like this one (Except yours has different arrangement of jumpers):
http://yourduino.com/sunshop2/index.php?l=product_detail&p=201

See the http://ArduinoInfo.Info WIKI here: http://arduino-info.wikispaces.com/ArduinoPower#4-8 Your board is probably able to be tested with the example code there.
Try it:

/* YourDuino Example: Relay Control 1.10
  Handles "Relay is active-low" to assure
  no relay activation from reset until
  application is ready.
   terry@yourduino.com */

/*-----( Import needed libraries )-----*/
/*-----( Declare Constants )-----*/
#define RELAY_ON 0
#define RELAY_OFF 1
/*-----( Declare objects )-----*/
/*-----( Declare Variables )-----*/
#define Relay_1  2  // Arduino Digital I/O pin number
#define Relay_2  3
#define Relay_3  4
#define Relay_4  5

void setup()   /****** SETUP: RUNS ONCE ******/
{
//-------( Initialize Pins so relays are inactive at reset)----
  digitalWrite(Relay_1, RELAY_OFF);
  digitalWrite(Relay_2, RELAY_OFF);
  digitalWrite(Relay_3, RELAY_OFF);
  digitalWrite(Relay_4, RELAY_OFF);  
  
//---( THEN set pins as outputs )----  
  pinMode(Relay_1, OUTPUT);   
  pinMode(Relay_2, OUTPUT);  
  pinMode(Relay_3, OUTPUT);  
  pinMode(Relay_4, OUTPUT);    
  delay(4000); //Check that all relays are inactive at Reset

}//--(end setup )---


void loop()   /****** LOOP: RUNS CONSTANTLY ******/
{
//---( Turn all 4 relays ON in sequence)---
  digitalWrite(Relay_1, RELAY_ON);// set the Relay ON
  delay(1000);              // wait for a second
  digitalWrite(Relay_2, RELAY_ON);// set the Relay ON
  delay(1000);              // wait for a second  
  digitalWrite(Relay_3, RELAY_ON);// set the Relay ON
  delay(1000);              // wait for a second
  digitalWrite(Relay_4, RELAY_ON);// set the Relay ON
  delay(4000);              // wait see all relays ON
  
//---( Turn all 4 relays OFF in sequence)---  
  digitalWrite(Relay_1, RELAY_OFF);// set the Relay OFF
  delay(1000);              // wait for a second
  digitalWrite(Relay_2, RELAY_OFF);// set the Relay OFF
  delay(1000);              // wait for a second  
  digitalWrite(Relay_3, RELAY_OFF);// set the Relay OFF
  delay(1000);              // wait for a second
  digitalWrite(Relay_4, RELAY_OFF);// set the Relay OFF
  delay(4000);              // wait see all relays OFF  
  

}//--(end main loop )---



//*********( THE END )***********

Let us know what happens...

hi!thanks for the reply first,Terryking!
I saw what you linked yesterday,and i thought mine was like the optoisolator one you linked(the second)..but there are some differences:
1.jumpers like you sad,but this is not a big diff
2.if you look at mine pins,and look at yourduino one pins..you will notice mine have 2 more pins (the vcc2 and gnd2)
3.the big thing,and what it drive me crazy to understand.if you compare schematics,you will notice something strange in mine.
comparing mine with the yourduino ptoisolator schematics you see:
YOURDUINO---all the labelled input pins (in1-in2-in3-in4)goes one by one in every relays,passing through a led,then transistor etc..
MINE--what i thinked to see yesterday,was the same layout than what i already did in the phrase above..instead(look in my schematics linked at first link)my input 1 is free,input2 and input3 goes to the same relay(1)with similar method than the yourduino one.input4 goes in the relay2,then ??vcc1?? to the relay3 and ??gnd1?? to relay4...what i don't understand is that.why not every input(4 in total)goes relatively to every relays like all the others relay board?and why it has 2 vvc\gnd (4 in total) with the possbilities to short-circuit them?
I'm out for work from half a day and i'll come back home not before 4\5 days,obviously i haven't my arduino with me,but when i'll return i'll try the code you linked,but for now i wanted only to make things more clear about these doubts i say above,if anyone of you more skilled than me have something to say!
Many thanks for that man!i read what you linked more deeply tomorrow after work,now time to go bed (2.30 am here..)
When possible i'll let you know how goes with the sketch,but in the meantime i'm open to suggestions about schematics..

I think the board you have has separate Vcc and Gnd for the input section (The optoisolator LED section) and the Relay Driver transistors and the relays).

If you leave the jumpers on then all the circuitry runs from the same (Arduino) +5V and Gnd.

If you remove the jumpers then you can supply separate 5V and Gnd to the output/relay section for complete isolation.

Where did you buy these? DO not use ZippyShare for this; they install malware and their search bar or something...

ok sorry,not use zippyshare anymore.
I bought it on ebay,in the first post there's the link!
Not being so sleepy,i continued the search, i noticed this photo on the ebay link of it...and after seeing it i think that the strange thing about the input in schematics is an error..it can't works so.For the dedicated power supply it's what i myself think..and that's what you say..remains only the "errors" about input pins.in this photo you'll notice (also if reversed)that first 4 pins trace (exscuse the name,do my best with english)goes respectively to every relays (and the schematics didn't say that,but like i sad in precedent post)My only thought is an error in schemtics.what do you think?
thanks
-simo-

EDIT--changed the zippyshare link in first post to schematics.attached in the forum.thanks for the tips terryking!

I came back home this morning,and after uploading the sketch i tried the example code you provided,and it works as expected.definetly a wrong schematics sended me by the seller of this relay board.
It works good,but when i tried giving external power the relays after the cycles began doing some strange things,like on-off on-off etc very speedly,i have to pull power for not broke something.
my setup was:
power addons on breadboard,with separate 5v supply
removed jumpers on relay board
inputs 1\2\3\4 of relay board with arduino digital outputs (d2\d3\d4\d5),and between it a uln2803a wired in this mode:
input 1-2-3-4 at top left side,output 1-2-3-4 on top right side to relay input
gnd of arduino in the last down in left side
??COM pin on uln2803a,the last down on right side,connected to external supply GND
5v from external supply,and its gnd,to vcc2 and gnd2

All that,but without separate 5v (i mean with arduino 5v and gnd directly on gnd1 and vcc1 of relay board,jumper inserted)and COM of uln2803a not connected (last pin down on right side)works well,without strange behaviours (like i sad before,it do strange on-off switch very rapidly))