Go Down

Topic: electric door strike help (Read 1 time) previous topic - next topic

dimona

#10
Mar 03, 2013, 08:00 pm Last Edit: Mar 03, 2013, 08:01 pm by dimona Reason: 1
i connect like this :



Uploaded with ImageShack.us

pdf of ULN2803A:
http://www.alldatasheet.com/datasheet-pdf/pdf/169423/ETC2/UNL2803.html

now the lock get power but still the software code not work!

Code: [Select]



void setup()
{
  //Start serial
  Serial.begin(9600);
  pinMode(13,OUTPUT);
}

void loop()
{

   digitalWrite(13,255);
   delay(1000);
   digitalWrite(13,255);
   delay(1000);
}



Can someone direct me?

AWOL

Code: [Select]
digitalWrite(13,255);
   delay(1000);
   digitalWrite(13,255);
what do you expect that to do, other than leave the pin HIGH?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

dimona


AWOL

255 is the same as HIGH, as far as digitalWrite is concerned.
Why write it twice?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Erdin

I think the ULN2803 is already broken, perhaps the Arduino is also damaged.

You have to rewire the connections to the ULN2803. The chip doesn't use a positive voltage, but pin 10 is for the flyback diodes. The pin 10 shoud be connected the + side of the motor (and both should be connected to the (+) of the 9V battery).
The ULN2803 does need a ground. That ground should be connected to the Arduino GND and the (-) of the 9V battery.
Next you have to connect the input and output of the ULN2803 in the right way.

Go Up