Programming of UNO

Hi All

I am in need of assistance. I purchased a UNO board today with the goal of using it as a timer device.My Scenario is as follows:

Biometric Reader -- Place finger / Verify

-- Triggers a pulse from onboard relay to UNO

-- UNO captures received signal

-- UNO Counts down specified time (e.g 2min)

-- UNO Send an output signal after 2min to a relay to release doorlock .

I have very new to this and dont know where to begin, very overwhelmed by all the info TBH, dnt know where to start!! Assistance will be greatly appreciated

Show us a good schematic of your circuit.
Show us a good image of your wiring.
Give links to components.
Posting images:
https://forum.arduino.cc/index.php?topic=519037.0

Use CTRL T to format your code.
Attach your ‘complete’ sketch between code tags, use the </> icon in the posting menu.
[code]Paste your sketch here[/code]

Read this about planning and implementing.
https://forum.arduino.cc/index.php?topic=261445.0

Diagram

i

OP’s image

Relays should be driven by a transistor.

You will need a reversed biased kick back diode across any DC inductive load.

Your relay and lock need their own power supply.

What does your sensor send out, give us a link.

Relays should be driven by a transistor.

Would this still be a requirement, should I be drawing 12v for the lock from the power supply?

You will need a reversed biased kick back diode across any DC inductive load.

Where in our diagram would there be an inductive load?

Your relay and lock need their own power supply.

Correct

What does your sensor send out, give us a link.

Which sensor is this that you mention?

I am now more confuzzled then ever :slight_smile: Could you point me to the best way possible way to achieve what i am trying to do?

Here goes again, hope this clarifies better...

I have a biometric access reader. Under normal circumstances, i would be verified and the lock would be released. I am now trying to prolongthe release by x minutes.

SO.. Fingerprint verifies, relay on the reader which has a n/c and com contact pulses and opens lock. I would now like to let my fingerprint verify. The n/c and com wpuld now trigger a countdown timer of sorts for x amount of time before the lock opens.

"I have very new to this and dont know where to begin, very overwhelmed by all the info TBH, dnt know where to start!! Assistance will be greatly appreciated"

My introductory message. I need assistance on where to start with coding for this, hence the arduino form

Riyaad786:
I have a biometric access reader. Under normal circumstances, i would be verified and the lock would be released. I am now trying to prolongthe release by x minutes.

While an Arduino (Pro Mini would be the correct one, UNO is ridiculous) can obviously do this, a NE555 would probably be the most appropriate.

That diagram is awful!

If you were to tell us the specifications of that door lock, it may be that one of these could be used to switch it:

They can be useful for switching less than one Amp.

Paul__B:
While an Arduino (Pro Mini would be the correct one, UNO is ridiculous) can obviously do this, a NE555 would probably be the most appropriate.

That diagram is awful!

If you were to tell us the specifications of that door lock, it may be that one of these could be used to switch it:

They can be useful for switching less than one Amp.

Paul__B:
While an Arduino (Pro Mini would be the correct one, UNO is ridiculous) can obviously do this, a NE555 would probably be the most appropriate.

That diagram is awful!

If you were to tell us the specifications of that door lock, it may be that one of these could be used to switch it:

They can be useful for switching less than one Amp.

Hey Paul

This is the relay that i Have, would this be suitable?

OK, that is a relay module. It will be fine for actuating your door lock (makes sure you wire it correctly to the UNO; its Vcc and ground lines must go as a pair directly to the 5 V power supply that you are using to also power the UNO).

I was suggesting that if we know the specifications of the door lock itself, the other module might be suitable instead of the relay module and requires no extra current to operate. The relay module requires at least 80 mA so you have to supply that current as well as the Arduino.

Note that as larryd explains, if you use the relay module to control the door lock, you should have a "kickback" diode across the lock solenoid if that is not already part of the assembly, and it must be wired the correct way around. Again, the wires to the door lock must be kept together as a pair all the way from the 12 V power supply to the lock.

I have now got step one up an running, UNO connected to relay, connected to magnetic door lock, so far so good.

shopping.png

Ok, so i have step 2 sorted..

Now for the timing part?! once i open the circuit, i would like for a timer to delay the opening of the lock by x time, lets call it 2 min. what function could i use to do this? Below is my code thus far...

int pbuttonPin=2;
int relayPin=3;

int val=0;
int magOff=0;
int pushed=0;

void setup() {
// put your setup code here, to run once:
pinMode(pbuttonPin, INPUT_PULLUP);
pinMode(relayPin, OUTPUT);

}

void loop() {
// put your main code here, to run repeatedly:

val = digitalRead(pbuttonPin); // read input value
if (val == HIGH) { // check if the input is HIGH (button released)
digitalWrite(relayPin, LOW); // turn MAGLOCK OFF
} else {
digitalWrite(relayPin, HIGH); // turn MAGLOCK ON
}
}