Skip to main content
Version: ACS CC

Pico Access and Cloning System (PACS)

A compact embedded solution for secure credential cloning and local access control

info

Author: Abdulkadir Gobena DENBOBA
GitHub Project Link: https://github.com/UPB-PMRust-Students/proiect-denboba

Description

PACS (Pico Access and Cloning System) is a compact and cost-effective embedded system designed to facilitate secure credential cloning and local access control. Built on the Wi-Fi-capable Raspberry Pi Pico 2W, PACS serves as a versatile solution for managing physical access to secured environments such as residences, offices, and dormitories.

The system supports cloning of contactless smart cards (e.g., MIFARE Classic) and enables the configuration of authorized credentials for entry control. It can be used in two modes: User Mode acting ass access system or Admin Mode acting as cloning system. it can also be used with a smartphone giving users more convenience

Motivation

For my PM project, I wanted to work on a practical and real-world-relevant solution, and I could not find something more suitable for my level than PACS. In many institutions—such as student dormitories—each resident is issued a smart card to gain entry. Replacing or duplicating these cards is often costly (typically 20 RON per card) and time-consuming. PACS addresses this by allowing trusted users or administrators to securely clone authorized cards directly from the device and even use smartphones (via card emulation) as digital credentials with no cost. This not only saves time and money but also enhances convenience and security by eliminating unnecessary intermediaries.

Architecture

Schematic Diagram

Architecture

Components and Connections

Raspberry Pi Pico and RC522 RFID Module

RFID (RC522)Raspberry Pi Pico 2WNotes
VCC3.3V
GNDGND
RSTGP6Reset
SDA (SS)GP5SPI Chip Select
MOSIGP3SPI Data Out
MISOGP4SPI Data In
SCKGP2SPI Clock
note

The RFID module is used for reading and cloning card credentials. It communicates with the Raspberry Pi Pico via SPI. Raspberry Pi Pico is the main controller that manages the entire system.

Relay Module AND Raspberry Pi Pico

Relay ModuleRaspberry Pi Pico 2WNotes
INGP7Activates solenoid
VCCVSYS (5V)Power for relay module
GNDGNDCommon ground
NO (Normally Open)Solenoid (-)Activates lock when relay is triggered
COM (Common)12V Power Source (-)Shared ground for solenoid and relay
Flyback DiodeAcross solenoid terminals1N4007: Cathode → 12V+, Anode → GND
note

The relay module is used to control the solenoid lock. The Raspberry Pi Pico sends a signal to the relay to activate the lock.

Display Module and Raspberry Pi Pico

OLED (I2C)Raspberry Pi Pico 2WNotes
VCC3.3V
GNDGND
SDAGP16 (I^2C1)Avoid GP0/GP1 (debug conflict)
SCLGP17 (I^2C1)
note

The display module is used for user interaction and feedback. It communicates with the Raspberry Pi Pico via I2C.

Buzzer Module and Raspberry Pi Pico

BuzzerRaspberry Pi Pico 2WNotes
+GP8
-GND
note

The buzzer module provides audio feedback for various events in the system, such as successful cloning or access denial.

Push Button and Raspberry Pi Pico

ButtonRaspberry Pi Pico 2WNotes
User (GP12)→ GNDInternal pull-up
Admin (GP13)→ GND
note

The push button is used to switch between user and admin modes. The Raspberry Pi Pico uses internal pull-up resistors for the button inputs.

LED connection and Raspberry Pi Pico with resistor

LEDRaspberry Pi Pico 2WPurpose
GreenGP9 → 220Ω → GNDAccess granted
RedGP10 → 220Ω → GNDAccess denied
BlueGP11 → 220Ω → GNDCloning mode
note

The LEDs provide visual feedback for different system states. The resistors limit the current to the LEDs to prevent damage.

power supply and Raspberry Pi Pico

Power SupplyRaspberry Pi Pico 2WNotes
USB CableMicro-USB5V (VSYS) + 3.3V logic power
12V Power SourceSolenoid Lock (+)External 12V adapter/battery
note

The Raspberry Pi Pico is powered via a USB cable, while the solenoid lock requires a separate 12V power source.

Selenoid Lock connection

Solenoid LockComponentNote
(+)12V Power SourceExternal 12V supply
(-)Relay NORelay breaks ground (safety)
Flyback DiodeAcross solenoid terminals1N4007: Cathode → 12V+, Anode → GND
note

The solenoid lock is connected to the relay module, which controls its activation. The common ground is shared between the solenoid and the relay.

The system consists of two main functional modules:

  • Cloning Module – Reads and replicates card credentials (UID-based).
  • Access Control Module – Validates presented credentials and manages door lock mechanisms.

Core components are orchestrated via the Raspberry Pi Pico 2W and communicate through GPIO, I2C, and SPI interfaces.

Log

Week 5 - 11 May

In this initial phase, I focused on identifying and acquiring the essential components required for the project, as well as designing the initial system architecture. The key tasks accomplished during this phase are:

  • Selected and acquired the necessary components
  • Drafted the initial architecture and schematic diagrams
  • Identified a potential software library for use in the project
  • Documented the initial project structure

Week 12 - 18 May

Week 19 - 25 May

Hardware

Raspberry Pi Pico 2W

  • Usage: Main controller
  • Function: Processes all logic and manages peripherals

RC522 RFID Module

  • Usage: Card reader
  • Function: Reads/writes RFID card UIDs

5V Relay Module

  • Usage: Lock controller
  • Function: Switches 12V solenoid circuit

12V Solenoid Lock

  • Usage: Door lock
  • Function: Physically secures entry point

SSD1306 OLED Display

  • Usage: User interface
  • Function: Shows system status/messages

Active Buzzer

  • Usage: Audio feedback
  • Function: Signals operations/errors

RGB LEDs

  • Usage: Visual indicators
  • Function:
    • Green: Access granted
    • Red: Access denied
    • Blue: Cloning mode active

Tactile Buttons

  • Usage: Mode selection
  • Function: Toggle between user/admin modes

1N4007 Diode

  • Usage: Circuit protection
  • Function: Prevents voltage spikes

220Ω Resistors

  • Usage: LED protection
  • Function: Limits current to LEDs

MIFARE Classic Cards

  • Usage: Test credentials
  • Function: Authentication testing

Schematics

Schematic

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico WCore microcontroller35 RON
RC522 RFID ModuleRFID card reading and cloning (via SPI)10 RON
Solenoid LockPhysical locking mechanism34 RON
5V Relay ModuleControls power to solenoid lock15 RON
Active Buzzer ModuleAudio feedback for events1 RON
LEDs (RGB)Visual feedback for status2 RON
Push ButtonMode switch (admin/user)~1 RON
12V Duracell Battery + HolderPower source for relay/lock11 RON
1N4007 DiodeFlyback and polarity protection0.5 RON
220Ω ResistorsCurrent limiting for LEDs0.76 RON
OLED DisplayDisplays messages or status15 RON
PCB BoardBoard for mounting components15 RON
RFID and NFC CardsCards used for unlocking system(15 cards )11 RON

Software

LibraryDescriptionUsage
embassy-rpRP2350 Hardware Abstraction LayerMandatory for Pico W (GPIO, SPI, I2C, Wi-Fi control)
cyw43 + cyw43-pioCYW43439 Wi-Fi driver for Pico WRequired for Wi-Fi connectivity
embassy-syncAsync synchronization primitives (Mutex, Channels)Thread-safe sharing of RFID data between tasks
embedded-hal-asyncAsync hardware traits (SPI/I2C)Non-blocking RFID (RC522) communication
heaplessStack-allocated collections (no_std)Stores UIDs (e.g., Vec<Uid, 32>) without heap
defmt + defmt-rttLightweight logging over RTTEfficient debugging with minimal overhead
panic-probeCrash logging with defmt integrationGraceful panic handling during development
embedded-graphics2D drawing library for embedded displaysRenders UI on OLED (text/icons for access status)
ssd1306I2C/SPI driver for SSD1306 OLED displaysInterfaces with the OLED screen
embedded-storageTraits for non-volatile storageSaves authorized UIDs to flash (persistent storage)
  1. link
  2. link ...