Basic
Electronics
Engineering
Final Report
Arduino / NFC Stuff Keeper!
People
Lose
Their Stuff!
do we need
a
"stuff keeper?"
2.5 stars?!
What?
Arduino NFC
Key and Wallet
Catch System.
PROPOSED:
- Complicated
- Phone Broke
- App-Inventor
Duel NFC Readers
Arduino
Relay
Control
A/C
Plug
Piezo
Film
Sensor
Speaker
Arduino IC Prototyping Board | x 1 | 8,200 (KRW) 7.02 (USD) |
http://gmkt.kr/emLpUf | ||
---|---|---|---|---|---|
RFID-RC522 | x2 | 6,800 5.88 |
http://gmkt.kr/ektM1u | ||
Arduino 4 channel Relay Module | x1 | 7,920 6.85 |
http://gmkt.kr/eos2Tn | ||
Ceramic/Vibraion Sensor. | x1 | 4,250 3.68 |
http://gmkt.kr/evllwJ | ||
Wiring | x1 | 920 0.80 |
http://gmkt.kr/er0x0c | ||
led | x3 | ? | |||
breadboard | x1.5 (?) | ? | |||
misc. scrap | free | ||||
paint | x2 | 2,000 1.71 |
|||
Parts List and Parts Related Information Sources
Contributions:
- Help Those Who Lose Things.
- Keep Me Sane.
- Shared Code!
Publicly Available Code
to
Inspect and Use!
CodeBender.com
#include <MFRC522.h>
MFRC522 mfrc522_1(SS_PIN_1, RST_PIN_1); // Create MFRC522 instance 1.
MFRC522 mfrc522_2(SS_PIN_2, RST_PIN_2); // Create MFRC522 instance 2.
void setup_nfc()
{
SPI.begin(); // Init SPI bus
mfrc522_1.PCD_Init(); // Init NFC card reader one.
mfrc522_2.PCD_Init(); // Init NFC card reader two.
}
void do_activity_done_when_device_senses_activity_be_done_has_been_requested()
{
mfrc522_1.PCD_Init(); // Init NFC card reader one.
mfrc522_2.PCD_Init(); // Init NFC card reader two.
if ( mfrc522_1.PICC_IsNewCardPresent() ) {
if( mfrc522_1.PICC_ReadCardSerial() ) {
mfrc522_2.PICC_HaltA();
var1 = getCardValue(mfrc522_1.uid.uidByte, mfrc522_1.uid.size);
}
}
if ( mfrc522_2.PICC_IsNewCardPresent() ){
if( mfrc522_2.PICC_ReadCardSerial() ) {
mfrc522_1.PICC_HaltA();
var2 = getCardValue(mfrc522_2.uid.uidByte, mfrc522_2.uid.size);
}
}
test_values(var1, var2);
}
void loop()
{
// Read Piezo ADC value in, and convert it to a voltage
int piezoADC = analogRead(PIEZO_PIN);
float piezoV = piezoADC / 1023.0 * 5.0;
if (piezoV > manually_set_threshold_to_activate) {
run_check_on_nfc();
}
else {
if (keys_are_present && wallet_is_present) {
signal_green();
switch_relay(true);
} else
{
signal_red();
switch_relay(false);
}
}
}
The Loop
const int PIEZO_PIN = A0; // Piezo output
float manually_set_threshold_to_activate = 0.40;
void loop()
{
// Read Piezo ADC value in, and convert it to a voltage
int piezoADC = analogRead(PIEZO_PIN);
float piezoV = piezoADC / 1023.0 * 5.0;
if (piezoV > manually_set_threshold_to_activate)
{
// ...
}
}
Source : http://openmolmol.tumblr.com/post/73425634152/using-meas-piezo-sensor-with-arduino-data-sheet
Credit!
DEMO!
TIME
FOR
THE
Conclusion:
- Embedded is Fun.
- Tons of Resources.
- Useful for Prototyping.
- Does What i Want!
Ewha Engineered Excellence!
Basic Electronics Engineering
By koreahaos
Basic Electronics Engineering
- 228