RANGMANG

RANGMANG is an RGB controller based on the ATmega128 microcontroller, Programmed with serial communication.

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

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 Atmega 128A

Recommended Converter

PCB and Schematic Files Atmega 328P

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

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

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 D55   DANCE
' D99   FOR RANDOM SELECT D01 TO D55 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

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
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
'M996 performs a full pixel wipe on the LED strip and erases all stored memory.
'M997 clears all pixels on the LED strip without affecting any memory
'M998 quickly fills all pixels on the LED strip without using or modifying memory
'M999 colors all pixels on the LED strip and saves it as memory slot 001
  



' IF D01 TO D55   DANCE
' D99   FOR RANDOM SELECT D01 TO D55 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

✅ Module Addressing Instructions


To address a module, simply follow the method below.

For example:

Old address 1   New Address 2  →  CH01=02
Old address 23  New Address 47 →  CH23=47

Important:
After programming, all modules have an initial default address of 01.
Therefore, during the first addressing, the old (current) address is always 01.

Addressing format:


CH  old address  =  new address

For example:
CH01=03

After changing the address, the module will respond using its new address.
For example, if the new address is 03, the module will reply to:
New Address=03

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.

In each microcontroller’s folder, the software directory “dude 6.4” is available. Using the file “Program Chip.bat,” you simply need to connect the USBasp to the microcontroller and then click on “Program Chip.bat” to program the microcontroller.

Recommended Converter

📦 Download soifgo_rangmang_design

Download Atmega128 File

Download Atmega328P File

If you need the module as a single unit, you can use regular sockets. However, when using multiple modules in parallel, only the Bluetooth socket should be connected through long-pin headers so that the remaining modules can receive Bluetooth serial data. Next, it is better to mechanically connect the modules together using spacer screws. For the final module, you can insulate the pins or use a suitable cover. Alternatively, if you are certain that you will not expand the number of modules in the future, you may use short-pin headers instead.

Recommended Converter

When using long RGB strips, make sure to pay attention to the voltage of the microcontroller and Bluetooth. Using an unsuitable regulator or a power supply with insufficient current capacity can cause severe voltage drops, which may lead to the Bluetooth and microcontroller shutting down


Rangmang Web Simulator


⬅ Back to Tutorial


⬅ Back to Home