

This simply allows the Raspberry Pi to control the solenoid, which requires more power than the Raspberry Pi’s GPIO can output.įigure 2: Circuit Schematic w/ SolenoidThe RC522 RFID module uses SPI (Serial Peripheral Interface Bus) to interface to the Raspberry Pi.

The TIP120 is a Darlington Array power transistor. This is the circuit you want to implement the design as a door lock or a doggy door. The second circuit is with a solenoid as an actuator. The LED will turn on when a correct reading is made by the RFID module. The first schematic is of the circuit I am building with an LED as an actuator. You can download Fritzing using the following link (optional): I always like to make a wiring diagram (Figure 1: Circuit Schematic w/ LED) using Fritzing, an open-sources schematic capture and PCB routing software. Step-by-Step Guide to Integrating an RFID Module with Raspberry Pi I discuss how this design can be implemented as an RFID doggy door. This actuator can be a solenoid lock, a speaker, or even a web interface that logs data. I also show how to integrate an actuator, in this case an LED, to respond to a correct reading from the RFID module.

In this tutorial, I go over how to integrate the RC522 RFID module with a Raspberry Pi board. The basic principles discussed lay the foundation to make an RFID doggy door.

The purpose of this tutorial is show how to integrate an RFID reader and an actuator with a Raspberry Pi. Considerations if Implementing as a Doggy Door.Step-by-Step Guide to Integrating an RFID Module with Raspberry Pi.The following code will blink each LED on in turn.Originally published by Table of Contents PinNumber should be between 2 and 9, and val should be 1 to turn the LED on, and 0 to turn it off. Then run the following command to open the Serial port (note to change the serial port if not on a Raspberry Pi): DeviceWrite On the Raspberry Pi, start up the wolfram engine by typing: ~ $ wolfram One easy way to find the correct serial port is to open up the Arduino software and under Tools -> Serial Port will be a list of serial ports the Arduino could be on. On the Raspberry Pi the default serial port is "/dev/ttyACM0", but on Windows or Mac it will be different. Now connect the Arduino to your Raspberry Pi (or alternatively you can connect it directly to your computer with Mathematica 10). Connect each LED to a resistor and a pin from the Arduino. Now configure the Arduino as shown below in the Fritzing diagram. The first is a pin Number, (from 2 to 9) and an on/off value (0 or 1). This configures the Arduino to expect a pair of byte values. Raspberry Pi (or desktop version of Wolfram Language)įirst we need to upload the following sketch to the Arduino Uno so that it will listen over serial for commands from the Wolfram Language.This post will demonstrate how to talk with an Arduino Uno over a serial connection using the Wolfram Language.
