FINISHED PROJECT: ATTiny13A DMX Receiver, to WS2813 LED controller in 962 bytes

Hello imayoda

I am working on a much better DMX RX to WS controller, there were flaws in this design, which now I understand them I will be improving, most of the code is written, about 95% in AVR assembler

This will shortly be an "ATTiny85 to WS2801/11/12 NRZ & SPI converter", using the full 512 bytes (170 Pixels) and should be fully compliant with DMX512 (but not RDM)

Thanks for your comments

Bob

with this project, you are able to send DMX and change the led lights?

I would like to control these leds via an existing DMX controller. red green and blue faders.
Where in the code does it tell the LEDs what color to be?

j_dunavin:
with this project, you are able to send DMX and change the led lights?

Yes, that is the idea

I would like to control these leds via an existing DMX controller. red green and blue faders.
Where in the code does it tell the LEDs what color to be?

if you are using WS2812 leds then following would occur:
DMX chan 1 = Pixel 1 Green
DMX chan 2 = Pixel 1 Red
DMX chan 3 = Pixel 1 Blue
DMX chan 4 = Pixel 2 Green
DMX chan 5 = Pixel 2 Red
DMX chan 6 = Pixel 2 Blue
etc....

This project really needs a bit more thought and improvement
The ones I made work fine, but some controllers may cause this to go screwy.. on reflection it really needs an overhaul, perhaps all written in asm

thank you for your reply. That would take up a lot of channels if I planned on using several strips.

The ATTiny13A has only a very small amount of RAM, 60 bytes from memory, therefore I only used 12 channels (4 RGB Pixels) to allow me left over bytes to run my program, it is very tight !!

Hi Bob, Have been reading several posts around DMX on Arduino.

I can confirm an answer to a question you asked sometime ago... DUE doesnt work with TinkerKit DMX Shield...

I have a project that I can get two halves to work, but need to interface them together.

Environment: Start lights and track signals for a Slot Car setup (havenwoodraceway.co.uk)

Objective: To control 2 x Banks of 5 x PAR CANs to simulate the start sequence of races
(Imagine PAR CANS doing the job of the LED's in this video
RCS64 v3 - START LIGHTS with ARDUINO UNO - YouTube)

Current Situation:
I have a PC running an application RCS 64 (rcs64.com) which controls a UNO for the lighting of individual LEDs'. The developers of this application are not prepared to open their source as they want to control the installation of their application from a single exe (understandable as they have a lot of development stuff going on that they are trying to support).

Approach:
My current thought was to implement an UNO driven by RCS64 and for it to connect to a DUE with Tinkerkit DMX Shield on, which would sniff the PWM output and then translate to DMX signals to the PAR CANS.

Status:
Cant get DUE to work with DMX Shield. So thinking of getting another UNO to do the DMX job.

But having seen your work I wonder if you have some other suggestions on how to achieve the objective? Grateful for any thoughts...

Best regards
Paul

Hi Paul

Google "MAX485 DMX"

The Max485 is a single chip solution to convert the serial data into differential data required for DMX.
I make these little convertor boards for next to nothing as you can buy MAX485 very cheaply, and you only need 0v/5v supply and the serial connection to TX from the Arduino

Bob

Thank you very much Bob. Chip has been ordered...
Suspect I might be coming back to you at a later stage to sanity check my thoughts on next steps.

Best regards for now
Paul

And a general question...

In my logic the 5 DMX cans, hooked together in a serial fashion with XLR (3 pin), should each be addressed with their own first channel... i.e. 1st can (master) is channel 1 - red, can 2 - Channel 16 - red, Can 3 - Channel 24 etc

When using the DMX Shield I can only get action on the first can and first channel. My send strings from "Serial Monitor" have no effect on the subsequent cans....

Any suggestions?
Cheers
Paul

woody072:
And a general question...

In my logic the 5 DMX cans, hooked together in a serial fashion with XLR (3 pin), should each be addressed with their own first channel... i.e. 1st can (master) is channel 1 - red, can 2 - Channel 16 - red, Can 3 - Channel 24 etc

When using the DMX Shield I can only get action on the first can and first channel. My send strings from "Serial Monitor" have no effect on the subsequent cans....

Any suggestions?
Cheers
Paul

Hi Paul
You are right about the addressing, but im not sure why you are getting that results
Personally I would try the information at the following link, it works perfectly and alot of people use it

Will not work. I connected the kernel tiny. But it's new and the project is being compiled with an overabundance of memory

Maybe the Kernel has been changed since I first posted this project
It was very very tight to fit the code into 1K, so perhaps this is the problem

It reality, this project need to be rewritten in assembler, not C

Bob

Can someone have left the compiled code for firmware microcontroller?
Thank you

No one can help me?

I would like to help, but it not a project I have been working on for quite some time, not sure that I am even set up for it

Bob

If your code is too big, I suggest trying a newer version of avr-gcc. I found that newer versions generate significantly smaller code. The version included with winavr if you are using that is quite old

I do not have any programming experience at all, I found this project very compact and functional for installing something inside the DMX controller for the signal monitor.
Help me please .

why not just buy one of these

Hi Bob,

mcnobby:
I thought I would publish this for all those who are interested in DMX and those clever little WS2812 RGB leds

Its written to fit in an ATTiny13A which has 1k of flash space and 64 bytes of Ram

While searching the internet for a simple (and small) implementation of something to control a RGB LED via DMX, I stumbled over this thread.

A suggestion for improvement (in case someone is skilled enough to do the merge of the programming), is to implement the gammacorrection in the code, and maybe change the way to set the DMX address as done in the code on https://www.pcdimmer.de/downloads/Firmware_Treiber/DMX512/pc_dimmer_dmx512_rgbled.zip ?

The chip might have to be changed to a version with more memory - but due to the simplicity of the circuit (and size of components), it can probably be put on a really small PCB... :slight_smile:

Brian