Hi I am having problems with my project. Every thing is working, the RFID reader, not the maglock. If I directly hook up the maglock to 12V, it works. If I hook it into to circuit CORRECTLY it will not turn off so i can open my door, it stays on.
Arduino UNO R3
N-Channel Mosfet IRFZ44N Transistor
Seco-Larm Electromagnetic Lock 80 Lbs
Parallax RFID Reader
3 LEDS 2 Green 1 Red
I have attached the Arduino file. The Master code i have set to: 0000000000 just for this but on my real one it is the actual card, I have changed nothing else.
Original Code: PRFID Mod Parallax RFID reader - Exhibition / Gallery - Arduino Forum
I dont know to much on the Arduino language but everything should be working and the open led turns on so i know the card is reading.
Please help I really want to get this working!
If You need to know any info about this u can email me at firstname.lastname@example.org or reply to this post
RFID_DOOR_OPENER.ino (8.7 KB)
#define ON_TIME 200 //time in milliseconds the relay stays energized
A fifth of a second? You must have the reaction time of Superman!
Can you draw the circuit please?
This is the one I used, and it works fine:
thats the thing though, are you using a electric strike or a maglock buy mainly this is the transistor part that is not working.
i have attached the circuit.
by the way Gate goes to pin 9.
Arduino Rx = RFID SOUT
Arduino D2 = RFID Enable
Arduino GND = RFID GND
Arduino 5v = RFID VCC
D2 means digital pin number 2.
I have everything hooked up exactly like that(and even tried it other ways) but only the maglock wont turn off...
Also i don't have a resistor on Gate.
Do you have a meter? What do you measure on D9?
Are you sure 200 mS is enough?
What do you measure on the lock side (other side of MOSFET)?
Ok on D9 im getting a little less than 4V. 200ms ill change and see if it makes a difference. When D9 is triggered it is only a second on then off. Transistor to lock(If thats what you were talking about) gets nothing but ill change the 200ms to 5000ms and see what happens.
Please watch this will help a lot.
I didn't see any resistors in series with the LEDs. That means they will draw far too much current which probably accounts for why you only get 4V on the MOSFET.
First thing to do is put resistors in series with all LEDs.
You also don't have the resistors I showed for the MOSFET, which are there for a reason.
I got a bit lost half way through, are you saying the maglock does or does not work without being connected to the transistor? If it is locking them some current must be getting through, somewhere.