Skip to content

dermodmaster/Acebeam-X80-Custom-Firmware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Titleimage

Acebeam X80 25.000lm flashlight – Custom Firmware (PIC16F1823)

Reverse-engineered and fully custom firmware for the Acebeam X80 flashlight, running on a Microchip PIC16F1823.

This project replaces the original Acebeam firmware with an open, documented implementation: single-button UI, multiple white and colour modes, special patterns, safety features and EEPROM persistence – all tailored to the original hardware.


⚠️ Disclaimer

  • This firmware is unofficial and not affiliated with Acebeam or Microchip.
  • Flashing it may void your warranty and can potentially damage your flashlight if misused.
  • The X80 can draw very high currents and produce a lot of heat.
  • You are responsible for everything you do with this code and your hardware.

Do not proceed unless you know what you are doing.

📚 Documentation


✨ Features

Some features could be broken atm. Check the issues.

  • Single-button user interface

    • Single / double / triple click
    • Long press with auto-repeat
    • Child lock (lock/unlock via long press)
  • Main white modes

    • Ultra Low → Low → Mid → High
    • Turbo & Turbo Max (via double click)
    • White Strobe (via triple click)
  • Colour modes

    • Red / Green / Blue / UV
  • Special colour effects

    • Police (blue flashes)
    • Red beacon
    • Red alert (slow blink)
    • Red SOS (Morse-like "SOS")
  • Special white effects

    • White beacon
    • White breathing / pulse mode
  • Safety & protection

    • Undervoltage warning & critical undervoltage shutdown
    • Elevated & critical temperature protection
    • Automatic turbo downgrade when the battery is low
    • Deep-sleep style shutdown
  • Persistent settings

    • Last main mode and submode stored in EEPROM
    • Lock state stored in EEPROM
  • Reverse engineered & documented

    • Hardware mapping and pinout
    • Mode system and UI behaviour
    • Safety logic and timing

🧩 Hardware Overview

Target hardware:

  • MCU: Microchip PIC16F1823
  • Clock: 8 MHz internal oscillator (INTOSC)
  • Main boards:
    • MAIN BOARD-A (power electronics, MOSFETs, boost driver)
    • Controller board with PIC16F1823
    • Front LED PCB with all emitters

Key assumptions (also documented in docs/REVERSE_ENGINEERING.md):

  • All main LEDs (white / red / green / blue / UV) share a common positive rail.
  • A boost driver (LM5085 or clone) + large MOSFET controls the LED current.
  • The PIC:
    • Selects which LED is active via low-side MOSFETs.
    • Controls the boost/current limit using PWM on RC5 and a boost enable pin on RA5.
    • Monitors battery voltage (RA4) and temperature (RC3).
    • Drives red/green status LEDs and interprets button input (RA3).

For detailed reverse engineering notes, photos and pin mapping, see:

📁 Repository Layout

.
├─ docs/
│  ├─ REQUIREMENTS.md        # Software Requirements Specification (SRS)
│  └─ REVERSE_ENGINEERING.md # Hardware reverse engineering notes
│
├─ buttons.c                 # Button event API
├─ config_bits.c             # PIC16F1823 configuration bits
├─ eeprom_utils.c            # EEPROM load/save helpers
├─ firmware.h                # Global types, macros and declarations
├─ hardware.c                # Oscillator, ports, ADC, PWM, Timer0
├─ interrupts.c              # ISR: button debouncing + timing
├─ led_control.c             # LED control, boost control, off-phase logic
├─ main.c                    # Entry point and main loop
├─ patterns.c                # Special light patterns (police, beacon, SOS, pulse, strobe)
├─ power.c                   # Undervoltage shutdown routine
├─ sensors.c                 # Voltage & temperature monitoring
├─ state.c                   # Global state and lookup tables
├─ status.c                  # Status LED patterns
└─ ui.c                      # High-level UI and mode handling

🔧 Building the Firmware

Requirements:

  • Microchip XC8 compiler

  • A suitable build system, e.g.:

    • MPLAB X project using these sources, or
    • Custom Makefile using xc8

MCU configuration:

  • Device: PIC16F1823
  • Clock: 8 MHz INTOSC
  • Config bits are defined in config_bits.c

Typical build steps (conceptual):

# clone
git clone https://github.com/dermodmaster/Acebeam-X80-Custom-Firmware.git
cd acebeam-x80-custom-firmware

# open in MPLAB X:
# - create a new standalone project for PIC16F1823
# - add all .c / .h files to the project
# - select XC8 as compiler, C90 as project language
# - build the project to generate a .hex file

Adjust paths and project settings according to your setup.

🔌 Flashing / Programming

There are two sets of programming pads available:

  • On the main board, next to the V+ spring
  • On the controller board, near the PIC16F1823

See:

  • docs/REVERSE_ENGINEERING.md
  • imgs/mainboard-connections.jpg
  • imgs/picconnected.jpg

You will need:

  • A PIC programmer (e.g. PICkit, Snap, etc.)
  • Soldered wires or a pogo-pin adapter to the pads

I had used MPLAB X IDE v6.05 and PICKIT 3.

Important:

  • Double-check the pin mapping (VPP/MCLR, VDD, VSS, PGD, PGC) before connecting.
  • Make sure the flashlight/battery is in a safe state while programming.
  • Always verify the flashed firmware and test at low modes first.

About

Recreated firmware for 25.000lm Flashlight Acebeam X80 by PCB reverse engineering - with expanded LED animations & smoother transitions. Use at your own risk — no responsibility for damage or injury.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors