Renaissance Tech Meets Arduino: the Digital Alberti Cipher Encoder

by nadaelguindy2006 in Circuits > Arduino

298 Views, 3 Favorites, 0 Comments

Renaissance Tech Meets Arduino: the Digital Alberti Cipher Encoder

WhatsApp Image 2026-05-03 at 8.29.01 PM.jpeg

A 550-Year-Old Secret, Digitized

In 1467, the quintessential "Renaissance Man", Leon Battista Alberti, changed the world of secrets forever. I chose to focus on the Renaissance era, specifically the mid-15th century because it represents the birth of modern cryptographic thought. Alberti invented what is now considered the world’s first polyalphabetic cipher: a mechanical device featuring two concentric disks that allowed for encryption far more sophisticated than the simple substitution ciphers that had come before it.

Fast forward to today: I am taking that masterpiece from the 1460s and bringing it firmly into the 21st century for the "On The Line – Design Challenge". By translating Alberti's physical brass rings into an Arduino-powered digital system, this project explores how a tool designed over half a millennium ago can still be evolved using modern electronics.

The Inspiration

A cipher disk works by using two concentric circles—an outer stationary ring and an inner rotating ring—each printed with an alphabet. By rotating the inner disk, you align a "plaintext" letter on one ring with a "ciphertext" letter on the other, creating a simple substitution rule. In more advanced versions, like Leon Battista Alberti's original design, the inner disk is moved periodically during the message, ensuring that the same letter is encrypted differently each time to foil codebreakers.

The original Alberti Disk was a marvel of copper and calligraphy. My inspiration was to preserve that tactile, coarse and fine mechanical interaction while replacing the physical brass with an Arduino Uno and a non-linear digital algorithm.

I’ve replaced the physical rotation of metal disks with:

  1. A 100k Potentiometer for setting the base shift (the "coarse" key).
  2. A Rotary Encoder for high-precision character selection (the "fine" control).
  3. An OLED Display to visualize the math in real-time.


The electronic version takes the physical concept of the cipher disk and turns it into a high-speed mathematical engine. Instead of manually turning a wheel, an Arduino calculates the alignment between the two alphabets using code. To make the encryption incredibly secure, the device doesn't just use one static shift; it uses a non-linear dynamic key. This means that for every few letters you type, the "inner disk" automatically shifts in a complex, constant pattern based on a mathematical formula. Because the key changes as you go, the same letter will be represented by different characters throughout the message, making it nearly impossible for a codebreaker to spot a pattern without knowing the secret starting position!

I attached a short video below to get you excited for the build! Continue to the end to check out the full encode-decode process.

Are you ready to encode like it's 1467? Let's get building.

Supplies

WhatsApp Image 2026-05-03 at 12.33.14 AM.jpeg

To make the Digital Alberti Cipher, you will need a mix of electronics for the logic and crafting materials to bring the Renaissance aesthetic to life.

️ The Supplies

  1. Arduino Uno: The "brain" that calculates the non-linear shifts and drives the UI.
  2. Veroboard (Perfboard): For translating the breadboard prototype into a permanent, soldered circuit.
  3. Rotary Encoder: Provides the high-precision "fine" control for cycling through the alphabet.
  4. 100k Potentiometer: Used for "coarse" adjustment to set the base shift of the cipher.
  5. Thin Cardboard & Printed Paper: The primary materials for the enclosure.
  6. Breadboard & Jumper Wires: Essential for the initial prototyping and code-stability testing.
  7. Soldering Iron & Solder: For making the final connections on the Veroboard.

Prototyping

WhatsApp Image 2026-05-03 at 12.33.15 AM.jpeg

The first and most critical phase of the build is verifying the hardware-software interaction before anything is permanently soldered. For the Digital Alberti Cipher, this stage is where we ensure the feel of the controls—balancing the sensitivity of the alphabet scrolling with the stability of the encryption keys.

The Wiring Layout

  1. OLED Display: Connected via the I2C pins (A4 for SDA, A5 for SCL).
  2. 100k Potentiometer: The center wiper connects to A0 to control the coarse shift.
  3. Rotary Encoder: Phases A and B connect to D2 and D3, while the integrated button connects to D4.
  4. Common Ground: It is vital that all components share a single GND bus on the breadboard to maintain signal integrity.

Stability Check

Once wired, upload the code and observe the screen. We utilize the Arduino’s internal INPUT_PULLUP resistors for the encoder and button, which simplifies the wiring by removing the need for external resistors. If the screen displays the "MODE: ENCODE" header and the characters change only when you physically manipulate the knobs, your circuit is stable and ready for the next step.

note: The code is attached below.

Transitioning to Veroboard

WhatsApp Image 2026-05-03 at 12.33.13 AM (1).jpeg
WhatsApp Image 2026-05-03 at 12.33.13 AM.jpeg
WhatsApp Image 2026-05-03 at 12.33.12 AM.jpeg

Once the logic is confirmed on the breadboard, the next step is to move the circuit to a permanent Veroboard (Perfboard). This transition is essential for ensuring the Digital Alberti Cipher is robust, portable, and reliable for long-term use.

Why Move to Veroboard?

  1. Durability: Unlike breadboard jumpers, soldered connections won't vibrate loose or disconnect during transport.
  2. Compactness: You can arrange the Arduino Uno, OLED, and knobs much more tightly to fit the dimensions of your cardboard enclosure.
  3. Signal Integrity: Permanent soldering reduces the electrical "noise" that can interfere with the sensitivity of the rotary encoder and potentiometer.

Layout and Soldering Strategy

  1. Dry Fit: Place your main components—the Arduino, Rotary Encoder, and 100k Potentiometer—on the board before soldering to check the spacing.
  2. Shared Rails: Create a common GND and 5V bus along the side of the board. This allows you to easily jump power to the OLED, encoder, and pot without a mess of tangled wires.
  3. The "Guts" (Wiring): Use short lengths of solid-core wire for the I2C (SDA/SCL) and digital pin connections (D2, D3, D4) to keep the underside of the board clean.
  4. Header Pins: Consider using female header pins for the OLED so you can easily swap the screen if needed or adjust its height relative to the enclosure face.

Quality Control

After soldering, use a multimeter to check for continuity and ensure there are no accidental bridges between your 5V and GND rails. This professional attention to detail is a hallmark of engineering-focused projects.

Crafting the Enclosure

Screenshot 2026-05-03 204122.png
Screenshot 2026-05-03 204133.png
Screenshot 2026-05-03 204147.png
WhatsApp Image 2026-05-03 at 8.30.39 PM.jpeg
WhatsApp Image 2026-05-03 at 8.30.43 PM.jpeg
WhatsApp Image 2026-05-03 at 8.30.45 PM.jpeg

The final phase of the project is housing the electronics in an enclosure that reflects the historical significance of the Alberti Cipher. This step bridges the gap between modern digital design and traditional "maker" craftsmanship.

The Design Vision

The goal was to create a tactile, three-dimensional representation of the original 1467 device. By utilizing multi-layered cardboard, the enclosure replicates the iconic "disk-on-disk" depth of the mechanical original. While the Arduino and OLED handle the complex mathematics, the physical rings provide a tangible link to the past, making the encryption process feel grounded in history.

The Fabrication Process

  1. 3D Modeling (Fusion 360): Before cutting any material, I designed a precise model in Fusion 360. This allowed me to map out the exact placement for the OLED display, rotary encoder, and potentiometer to ensure everything would fit perfectly within the internal volume.
  2. Material Prep: Using the dimensions from the CAD model, I translated the shapes onto thin cardboard. This material was chosen for its ideal balance of being easy to cut while remaining structurally sound for the control knobs.
  3. Building the Disk Layers: To achieve the 3D cipher look, I cut and glued two distinct layers for the disk.
  4. The Outer Ring: Fixed to the base of the enclosure.
  5. The Inner Ring: Mounted on top to create a physical shadow gap, mimicking the depth of the Renaissance brass originals.
  6. Final Assembly: I wrapped the cardboard structure in printed paper featuring the alphabet rings. The electronics from the Veroboard were then mounted internally, with the knobs and screen protruding through the precision-cut openings in the faceplate.

This layered approach ensures that the "Digital Alberti" is not just a screen and wires, but a physical tribute to the history of cryptography.

Final Demonstration

WhatsApp Image 2026-05-03 at 8.29.03 PM (1).jpeg
WhatsApp Image 2026-05-03 at 8.29.02 PM.jpeg
WhatsApp Image 2026-05-03 at 8.29.01 PM (1).jpeg

With the electronics secured and the enclosure finished, the Digital Alberti Cipher is ready for operation. This final stage brings the Renaissance logic into the modern world, showing how the physical controls and digital math work together to secure a message.

How to Operate the Device

  1. Set the Base Key: Turn the 100k Potentiometer to choose your starting offset. This represents the initial physical alignment of the two rings. The OLED will display this as "K".
  2. Select Your Mode: Use a medium-length press on the Rotary Encoder button to toggle between ENCODE and DECODE.
  3. Compose Your Message: Rotate the encoder to scroll through the alphabet. When you find your letter, give the button a short press to add it to your word.
  4. Observe the Dynamic Shift: As you build your word, notice that the "K" value changes automatically every few letters. This is the non-linear algorithm at work, shifting the "inner disk" in a constant, pre-defined pattern to ensure maximum security.

Proving the Logic

The true test of a cipher is its symmetry. In the demonstration video below, you will see a plaintext word being encoded into a string of ciphertext. By simply switching the mode to DECODE and entering that ciphertext back in, the original message is perfectly recovered. This proves that the dynamic shift pattern is synchronized across both modes, making it a functional, reliable, and "unbreakable" modern-day Alberti disk.