hello all ,
i am newbie in this forum and this is my first post.
i have some problem when interfacing 5v relay and arduino uno board.
i have connected relay board with arduino as follows.
arduino 5v- relay board 5v (jd-vcc & vcc has jumper ) arduino gnd-relay board gnd arduino 12 pin-relay in1 arduino 9 pin- relay in2
now what happens when i write " pinMode(12,OUTPUT); pinMode(9,OUTPUT); in setup" and
as i upload this code, both of the relays get energised !!!!
i dont understand that without write code "digitalWrite(12,HIGH) " why the relay energised ???
now in second case when declare pinMode(12,LOW); or pinMode(9,LOW); in void loop only then relay is not getting energised. but sometimes randomly gets energised and de-energised !!! its reallly strange operation.
please help me to get rid of this problem.
my application is that i have connected gsm modem to arduino uno pin 2 & 3. and i have wrote code that whenever we calls the gsm modem then arduino energised pin12 connected relay for 3 second. as the relay operation is arbitary on or off is going on. how can i be sure for desired relay operation.
thanks in advance