กลับไปหน้ารวมไฟล์
predator-counter-d42713-en.md

In this project, Predator Numbers, I wanted to create the famous counter present in the first Predator and AVP movies.

The Predator's counter in the movie

For the project I've created a PCB that joins two 16-segments in order to make one "alien digit". The PCB makes all the soldering job more pleasing, but it is posible to make this project without a PCB if you find the through-hole equivalence from the SMD components.

You have available (in the GitHub of the project) the schematic if you want to check it. You can check there for the components.

What it does?

This project is a counter, displaying the remaining time on a 4-digits display. The initial value can be setted with BTN0 and BTN1.

As I've said, the objective is to use the Predator style. I've used the image from below as reference (I've only used digits, and the '0' is turning off that digit).

Predator font

I've seen some other people creating this kind of project, but what they does is simply transform our numeric system into this other font and print it. I didn't want to use that approach because our numeric system is boring (most of the time it only changes one digit: the last one), so in order to get this Predator feeling of all 4 digits changing each second I've created my own numeric system (it was kinda rushed, so I'm open to hear other alternatives, maybe more loyal to the original numeric system).

What I've done is creating a formula to get the value. Assume 4 digits: 'a', 'b', 'c' and 'd'; the current value will correspond with the following formula: a + a*b^2 + b*c + b^2*d. This formula gives a lot of changes, being the only downside that the maximum number represented is 1,548 (instead of 9,999).

To add some tension, the delay waited for a number to go to the next step isn't constant. If the number is larger than 60, then it will take 1 second to go to the next step, but if it's lower it will change faster the closer it is to 0 (it will go from 1 second/number to 0.5 seconds/number).

Additionally, as this counter is not easy to know the remaining time, you have available a website to check the current number (the 'a', 'b', 'c', 'd' digits in base-10) and how much time does it take to reach 0000.

EXPANDED TECHNICAL DETAILS

The core of the project is the custom display driver and multiplexing logic. The alien digits are formed by two 16-segment displays joined on a custom PCB. To control all segments across four digits without an excessive number of pins, the Arduino uses a multiplexing technique. This means it rapidly cycles power through each digit one at a time, relying on persistence of vision to make all four appear lit simultaneously. This is why flicker can sometimes be seen in videos, as shown in the demo GIF above, though it is imperceptible to the human eye.

The timing logic for the countdown is managed by the millis() function to create non-blocking delays, allowing the multiplexing to continue smoothly. The formula a + a*b^2 + b*c + b^2*d is calculated each cycle to determine the current base-10 value from the four alien digits. This value is then used to dynamically adjust the delay between counts, creating a sense of accelerating tension as the counter approaches zero.

For persistent storage—such as saving the initial countdown value if power is lost—the project can leverage the Arduino's internal EEPROM (Electrically Erasable Programmable Read-Only Memory). By including the EEPROM.h library, critical variables like the starting count can be written to and read from this non-volatile memory, ensuring the counter retains its state across power cycles.

Demo

You have here a demo video. Please note that I drive the displays with multiplexing (taking advantage of the human-eye "refresh rate"), and sometimes this technique messes with cameras (that's why in the video you can see some flickering, but in reality it was fine).

I hope you like it!

ข้อมูล Frontmatter ดั้งเดิม

apps:
  - "1x PlatformIO"
author: "rogermiranda1000"
category: "Security & Monitoring"
components:
  - "1x Arduino Nano 33 IoT"
  - "1x Soldering kit"
  - "1x Predator Numbers PCB"
description: "Agricultural tracking arrays! Calculate explicit intrusion telemetry dynamically by interlocking physical break-beam laser matrices with an Arduino to permanently record and index the exact infiltration timings of devastating barn predators."
difficulty: "Intermediate"
documentationLinks: []
downloadableFiles:
  - "https://github.com/rogermiranda1000/PredatorNumbers"
encryptedPayload: "U2FsdGVkX1/cV6asR9q1B01v91UDGMQqzlWkZmJAwME/or6ULWzpHqdO0lAI4OIDgpA4Cv5xks91MRrX7FqezffKZYjHiT4AoK+QhhUerxQ="
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/predator-counter-d42713_cover.gif"
lang: "en"
likes: 1
passwordHash: "b322376a9ddfe9368fed7e0cf18de6cfe1cd0526db031afafa1bf544ee1571fb"
price: 1499
seoDescription: "Build a DIY Predator Counter with Arduino. A movie-inspired replica using electronic sensors and modules."
tags:
  - "Toys"
  - "Lights"
title: "Predator Counter"
tools: []
videoLinks:
  - "https://youtu.be/_QwOZDd4uf0"
views: 2740