Using DMXSimple and OctoWS2811 libraries together, possible hardware timer conflict?

Status
Not open for further replies.

Maru

Member
Dear all,

I recently switched most from the Arduino Atmega platform to the Teensy platform as I was running into processing power limitations. And what a difference did that made! Wow! I had a teensy 3.0 from a kickstarter laying around but never used I was used to working with the Atmega....how stupid could I have been.. @Paul, if you read this and before prompting my question, I would like to thank you for all your hard work. Amazing hardware and integration in the Arduino platform!

Without further ado. I am working on a 4D experience with Unreal doing the display part and a Teensy 3.5 (over serial) doing all the physical effects around that, and I am planning to use many LED strips and a smoke machine. The smoke machine requires DMX and for the Leds I opted for a circuit that would use the OctoWS2811 library (I used the exact adapter schematics (except for the sync part) because I wanted to have everything on one board and connect most of the external things with RJ45 connectors). But now I run into the potential issue that both the DMXSimple and OctoWS2811 library seem to use Hardware Timer 2. Before building the circuit I was wondering if this will give issues and if there is a hardware or software solution to tell one of the libraries to use a different timer? I believe I ran into a similar issue with the Atmega when I used DMX and a RF module together on similar hardware timers, and that did not work (but it might have been something different).

I attached the proto schematics, but I guess this question is not so much a hardware issue per se. (Some connections are doubled, leading to external connectors, these are just for prototyping and won't actually be connected, and can be ignored)

Thank you in advance for your input :)

Edit: Added component names to schematic

U4DX206MK.jpg
 

Attachments

  • U4DX206MK.jpg
    U4DX206MK.jpg
    144.3 KB · Views: 71
Last edited:
Dear Paul,

Thank you so much for you quick response and feedback, absolutely amazing :)! Currently looking into TeensyDMX.
As I am not insanely versed when it comes to programming, but I understand that the following should work:

1. I can use the schematics that I currently have: Using the MAX487 pin 4 connected to pin 10/TX2 on the Teensy ( I attached schematics of this)
2. Use the following code to turn channel 4 to 255 to (I do not have the DMX at home, but it would be great to see if it could work before I start debugging on site):

Code:
#include <TeensyDMX.h>

namespace teensydmx = ::qindesign::teensydmx;

// Create the DMX sender on Serial2 - Pin 10.
teensydmx::Sender dmxTx{Serial2};

void setup() {
  dmxTx.begin();
  // Setting channel 4 to 255
  dmxTx.set(4, 255);
}

Because that would be even simpler than using SimpleDMX.
The example code also includes the following about an enabling pin, but I cannot really figure out if this is necessary in my case (e.g. can I use this or should I reserve it if I use TeensyDMX):

Code:
// Pin for enabling or disabling the transmitter.
constexpr uint8_t kTXPin = 17;

void setup() {
  // Set the pin that enables the transmitter
   pinMode(kTXPin, OUTPUT);
   digitalWriteFast(kTXPin, HIGH);
}

Apologies for what is perhaps a stupid question, but feedback is much appreciated (have to built some confidence in this, hehe ) :).

Screen Shot 2019-06-09 at 19.32.35.png
 
One small question, does the OctoWS2811 support ws2813 Led strips? or only ws2811 and ws2812B? Thx :)
 
Hi, Maru. I just noticed your post. You only need to use a TX-enable pin if your transceiver requires it. From your schematic, it looks like you don't need one. Your TX-enable pin is already driven high (pin 3).

How is the library working for you? Are you able to successfully drive the LEDs and operate DMX?
 
Last edited:
Hi, Maru. I just noticed your post. You only need to use a TX-enable pin if your transceiver requires it. From your schematic, it looks like you don't need one. Your TX-enable pin is already driven high (pin 3).

How is the library working for you? Are you able to successfully drive the LEDs and operate DMX?

Hi shawn, thanks for your reply:)! The library is absolutely fantastic and has been working flawlessly together with the FastLED library on the above schematics. I kept the TX-enable pin free, but I did indeed not need it.
I did have some issues with the SimpleDMX library from time to time (on a Mega), but with the TeensyDMX library, I have yet to accounter any. Thanks for your great work! :)!
I'm convinced and moved all my prototyping to the Teensy platform (will try to populate a board by myself soon, seems doable), so Paul, also thanks for all the work you have been doing and congrats on the 600MHz monster!

IMG_3357.jpg
 
Status
Not open for further replies.
Back
Top