RANGMANG

RANGMANG is an RGB controller based on the ATmega128 microcontroller, programmed using BASCOM.

Wiring 1

LED Strip Types and Features

The following table introduces various LED strips and their specifications:

LED Strip Model Operating Voltage Control Type Addressable Special Features
WS281112VDigitalYesSuitable for long strips
WS2812B5VDigitalYesBuilt-in chip in each LED
WS28135VDigitalYesResistant to data line failure
WS281512VDigitalYesIndustrial-grade, low voltage drop
SK68125VDigitalYesSupports RGBW (white channel)
SK98225VDigitalYesHigh-speed, similar to APA102
APA1025VDigital (Clock + Data)YesFast animations, dual-wire control
TM181412VDigitalYesRGBW, high-power applications

Atmega 128 support for 999 pixels

Source Code

Download BASCOM Source ZIP

Programming the Microcontroller

Download Programmer ZIP

Official download link for USBasp Programmer: You can find complete files and information about the USBasp programmer on the developer's official website: fischl.de/usbasp.

PCB and Schematic Files

Recommended Converter

RANGMANG Dance Mode Configuration

This configuration defines how the RANGMANG module controls LED dance modes. Each row encodes the following parameters (ADRGBSEM format):

A (Channel) D (Mode) R (Red) G (Green) B (Blue) S (Dance Time 1) E (Dance Time 2) M (Pixel Count)
A01 D12 R251 G251 B251 S001 E001 M128

📦 Download soifgo_rangmang_design

RANGMANG Fixed Color Mode Configuration (ATmega128 – 999 Pixels)

A (Channel) D (Mode) R (Red) G (Green) B (Blue) S (Start Pixel) E (End Pixel) M (Memory Slot)
A01 D00 R200 G050 B100 S001 E120 M010

Power Regulation Notes

Wiring 1

In this version, the microcontroller is ATmega328P with the same specifications, but with support for 480 pixels

📦 Download Atmega 329P ZIP

RANGMANG ATmega328 – 480 Pixels

' 30 inputs
' ADRGBSEM
' A00D00R000G000B000S000E000M000
' A01 TO A98   FOR ADDRESS MODULE   A99 FOR ALL
' IF D00 THEN SOLID COLOR
' R000 TO R255   RED COLOR
' G000 TO G255   GREEN COLOR
' B000 TO B255   BLUE COLOR
' S000 TO S480   RGB STRIP START POSITION FOR COLORED PIXEL
' E000 TO E480   RGB STRIP END POSITION FOR COLORED PIXEL
' M000 TO M098   M000 WITHOUT MEMORY SAVE   M001 SAVE SLOT 1 MEMORY

' IF D01 TO D38   DANCE
' D99   FOR RANDOM SELECT D01 TO D38 DANCE
' R000 TO R250   RED COLOR   R251 TO R255 FOR RANDOM RED COLOR
' G000 TO G250   GREEN COLOR   G251 TO G255 FOR RANDOM GREEN COLOR
' B000 TO B250   BLUE COLOR   B251 TO B255 FOR RANDOM BLUE COLOR
' S000 TO S999   RGB STRIP FIRST DELAY EFFECT (ms)
' E000 TO E999   RGB STRIP SECOND DELAY EFFECT (ms)
' M001 TO M480   SET HOW MANY PIXELS DANCING

RANGMANG ATmega128 – 999 Pixels

' 30 inputs
' ADRGBSEM
' A00D00R000G000B000S000E000M000
' A01 TO A98   FOR ADDRESS MODULE   A99 FOR ALL
' IF D00 THEN SOLID COLOR
' R000 TO R255   RED COLOR
' G000 TO G255   GREEN COLOR
' B000 TO B255   BLUE COLOR
' S000 TO S480   RGB STRIP START POSITION FOR COLORED PIXEL
' E000 TO E480   RGB STRIP END POSITION FOR COLORED PIXEL
' M000 TO M098   M000 WITHOUT MEMORY SAVE   M001 SAVE SLOT 1 MEMORY

' IF D01 TO D38   DANCE
' D99   FOR RANDOM SELECT D01 TO D38 DANCE
' R000 TO R250   RED COLOR   R251 TO R255 FOR RANDOM RED COLOR
' G000 TO G250   GREEN COLOR   G251 TO G255 FOR RANDOM GREEN COLOR
' B000 TO B250   BLUE COLOR   B251 TO B255 FOR RANDOM BLUE COLOR
' S000 TO S999   RGB STRIP FIRST DELAY EFFECT (ms)
' E000 TO E999   RGB STRIP SECOND DELAY EFFECT (ms)
' M001 TO M999   SET HOW MANY PIXELS DANCING

✅ Module Addressing Instructions



To address a module, simply follow the method below.
For example:

Address 2 → CH=02

Address 34 → CH=34

After sending the command, the module will respond and operate according to the specified address.

Please note:

Valid addresses range from 01 to 98.

Address 99 is a shared address that applies to all modules.

Therefore, each module will respond and act to its assigned address (between 01 and 98) as well as to the shared address 99


Rangmang Web Simulator


⬅ Back to Tutorial


⬅ Back to Home