-
1Step 1
First assemble your Arduino and shields. For the shields listed, only the NFC shield has stacking connectors so it has to go in the middle with the relay shield on top. This isn't ideal because it means the NFC antenna is surrounded by the Uno and the Relays and the card is further from the antenna than it could be. However, there is enough range for this arrangement to work well enough.
-
2Step 2
Now load and run the Sketch with the serial monitor in the Arduino IDE active. Hold the card you want to use as a key close to the NFC antenna for a few seconds. The NFC reader will read the ID number from the card and display it on the serial monitor, marked as "invalid". Note the ID number.
-
3Step 3
Now edit the Sketch to add the ID number of your card to the list of valid cards.
Edit the valid_id array declaration to replace one of the 10 digit numbers below or add more numbers as required. For example, the code below establishes two valid ID numbers. 123456790 and 0987654321.
// Set up valid card IDs
uint32_t valid_id[] = {
1234567890,
0987654321
};Re-compile and install your revised Sketch. Present the card again, it should now be identified as "valid".
Note that relays will click for valid and invalid cards. The relays control the LEDs as well as the door.
-
4Step 4
Now you are ready to wire up and install.
You will need to fit the Arduino with shields and the two LEDs to the box and find a location for the regulator board. You could use a bigger case and put it in with the Arduino or put it in a small box close to the door gear. I used Cat5 cable but any r
This picture shows the connections to the motor unit with the original radio receiver connected. The second cable goes to the interior control for door open/close and lights.
Blue 1 Common Green 2 Door Control (3rd wire) Red 3 +24V - Connect +24V and common to the regulator and adjust for 9V output.
- Connect 9V to the power jack on the Arduino.
- Connect +24 to the COM of relays 2 & 3 to drive the LEDs.
- Connect NO on relay 2 to the red LED anode.
- Connect NO on relay 3 to the green LED anode.
- Connect both LED cathodes to common
- Connect COM on relay 4 to common
- Connect NO on relay 4 to the third contact on the door gear
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.