Skip to content

IDEO-coLAB/demo-blockchain-airbag

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BlokMotiv

A physical/digital tagging system that enables transparency and traceability through aggregated identity and shared truth using a blockchain.

Packages used

Other code references used:

How to Run

  1. Clone this repo and download Arduino IDE

  2. Install Sparkfun Simultaneous RFID Tag Reader Library for Arduino. In Arduino IDE open the Manage Libraries panel (Sketch > Include Library > Manage Libraries). Search for "sparkfun rfid" and install "Sparkfun Simultaneous RFID Tag Reader"

  3. Upload firmware to two Arduinos: point of Manufacture and point of Install. In Arduino IDE, set board to Arduino/Genuino Uno.

For Manufacture

  • File name: ./finalAssets/arduino/arduino.ino
  • Set line 87 to "Serial.println('w')"
  • Upload file to Arduino

For Install

  • File name: ./finalAssets/arduino/arduino.ino (same file as Manufacture)
  • Set line 87 to "Serial.println('r')"
  • Upload file to Arduino
  1. Connect Arduino (w/ RFID readers attached) to computer

  2. Install packages with npm install

  3. Go to ./finalAssets/

  4. Run server

  • In terminal, run "node server.js"
  • Currently, server is running on localhost:8000 You'll know the server is connected to each Arduino when it prints Communication is on! Successfully connected to Arduino in the terminal. The RFID readers can be flakey. If Arduino is connecting but not reading RFID tags, try power cycling and restarting server.
  1. Open index.html in browser

  2. To clear list of parts in interface, delete db.json. When you have an empty db.json, scan all 6 permutations of any particular airbag assembly into the Manufacture Arduino (labelled A). Since each bag has 3 tag, you do so by scanning each tag sequentially, for all possible sequences. This is because in the merkle tree of the three individual RFID tag ids, order matters, so when scanning on the Install reader, you may get a different scan order and hence different merkle root each time, so even a valid airbag might appear invalid if it's constituent tags were scanned in a different order during Manufacture.

  3. Do not scan the airbag labelled B on the Manufacture Arduino - or it will record it as a legitimately manufactured airbag.

Bill of Materials

  1. Arduino Uno - R3 (https://www.sparkfun.com/products/11021)

    • Part: DEV-11021
    • Quantity: 2
  2. SparkFun Simultaneous RFID Reader - M6E Nano (https://www.sparkfun.com/products/14066)

    • Part: SEN-14066
    • Quantity: 2
  3. Arduino Stackable Header Kit (https://www.sparkfun.com/products/10007)

    • Part: PRT-10007
    • Quantity: 2
  4. UHF RFID Tag - Adhesive (Set of 5) (https://www.sparkfun.com/products/14151)

    • Part: WRL-14151
    • Quantity: 2
  5. Cable A to B - 6 Foot (https://www.sparkfun.com/products/512)

    • Part: CAB-00512
    • Quantity: 2
  6. Wall Adapter Power Supply - 5V DC 2A (Barrel Jack) (https://www.sparkfun.com/products/12889)

    • Part: TOL-12889
    • Quantity: 2

Hardware Assembly Instructions

  1. Carefully solder pins from Arduino Stackable Header Kit onto the SparkFun Simultaneous RFID Reader - M6E Nano board

    • For detailed information on the SparkFun Simultaneous RFID Reader - M6E Nano including how to interface with it, check out this guide
    • Please note that the most important pins on the SparkFun Simultaneous RFID Reader - M6E Nano board are as follows:
      • RX (Digital 0), TX (Digital 1), Digital 2, Digital 3 - communication
      • Digital 9, Digital 10 - buzzer
      • 5V + GND - power
  2. Gently mount the SparkFun Simultaneous RFID Reader - M6E Nano shield to the Arduino

    • Pins tend to bend easily, so ensure careful alignment
  3. Plug the cables

    • Connect the Cable A to B - 6 Foot USB cable to the computer and then the Arduino
    • Next plug the Wall Adapter Power Supply - 5V DC 2A (Barrel Jack) into the Arduino
  4. In the Arduino IDE, open the “Read_EPC” example sketch (File → Examples → Sparkfun Simultaneous RFID Tag Reader Library → Example2_Read_EPC)

    • Upload “Read_EPC”
    • Test with the Arduino Serial Monitor
  5. Open our custom software (“arduino.ino”)

    • Upload
    • Test with the Arduino Serial Monitor
    • Follow the "How To Run" section

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 61.6%
  • Other 32.2%
  • HTML 4.4%
  • CSS 1.8%