Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
Tiwato

Registered:
Posts: 8
Reply with quote  #1 
[RbXOYbs] 

I've configured a 1 meter/60 LED long string to be controlled wirelessly with Artemis Bridge Tools. 

Total cost is < $45:
LED Strip  $16 (https://www.sparkfun.com/products/14015)
Level Shifter $3 (https://www.sparkfun.com/products/12009)
ESP32 Wifi Micro $20 (https://www.sparkfun.com/products/13907)
5V 4A supply $5 (local surplus store)

Basic soldering skills are involved (just through hole, nothing fine pitch, or SMD).

It's programmed using Arduino tools. It automatically connects to my wifi when powered on, and can be driven from Bridge Tools with each LED being a artnet-3ch device.  (4ch works too, though not worth burning the extra channels)

It should be expandable up to ~170 LEDs long, since at that point you hit the 512 channel limit of Bridge Tools. Multiples of the above setup should be able to be controlled from different bridge stations however.


Build instructions:
All pin names are silkscreened on the boards.

Connect your 5v adapter to the red/yellow leads on the LEDs

Wire the LEDs to the level shifter as follows
Yellow Wire ->GND
Red Wire -> HV
Blue Wire(CLK) -> HV1
Green Wire(DATA) -> HV2

Wire the level shifter to the ESP32 as follows:

HV->VBAT
LV->3V3
GND->GND
LV1->pin 18
LV2->pin 23


Setup the ESP32 Arduino framework. There are a number of guides out there, but start with the one listed on the Sparkfun product page.


And the source code is here: https://github.com/tcflanag/artnet-apa102


Also, mounted it in a florescent tube protector, with parchment sheet paper as a diffusor. 
  


notsabbat

Avatar / Picture

Registered:
Posts: 1,166
Reply with quote  #2 
that's awesome!
__________________
-Captain of the TSN Gungnir JN-001
-Eastern Front online group member
-My continuing bridge build:
http://artemis.forumchitchat.com/post/immersion-bridge-build-in-progress-7335195?pid=1290158413
AurelTristen

Registered:
Posts: 15
Reply with quote  #3 
This is awesome! I want to try this.  I was just coming here to see if I could find some info about RGB LED control, and here it is.  Now if I can somehow get this thing to talk to IFTTT/Google Home, I'll really be set.
Cabe

Registered:
Posts: 2
Reply with quote  #4 

Oh thats nice!

 

Update : Parts bought....

Tiwato

Registered:
Posts: 8
Reply with quote  #5 
I cleaned up the code to use the latest ESP32 framework, and moved it to github, instead of pastebin. I'm still seeing intermittent crashes after a couple of hours, though I think that's related to the ESP32 framework.  I'm building some test cases to debug that further. A quick tap of the reset button gets it back up and running, though that's not ideal.
Tiwato

Registered:
Posts: 8
Reply with quote  #6 
Just an update, I've think I've cleaned up the intermittent crashes I was seeing.  It's been up and running for 8+ hours straight now.
PhilXu

Registered:
Posts: 1
Reply with quote  #7 
it is cool,
I want to get the wireless controller too,
what is the ic chips of that digital led strips pls?
could it use to control the dc5v ws2812b and the dc12v gs8208 individual pixel led strips?


__________________

addressable led strip manufacturer
http://addressable-led.com/

Tiwato

Registered:
Posts: 8
Reply with quote  #8 
I used the APA102 series of LEDs. Hardware wise, it should work fine with the ws2812b LEDs, but the software definitely won't work as is, since the protocol is quite different. You will need to do some programming work to impliment one of the standard Arduino LED modules. For the 12V module, you'd also need a separate 3.3-5V supply for the arduino, since the voltage regulator looks to max out at 6V in.



e4mafia

Registered:
Posts: 50
Reply with quote  #9 
Seems like this is actually a simpler implementation than trying to do it over Artemis native DMX and an FTDI usb connection. Thoughts?

-Bob

e4mafia

Registered:
Posts: 50
Reply with quote  #10 
Quote:
Originally Posted by Tiwato
I cleaned up the code to use the latest ESP32 framework, and moved it to github, instead of pastebin. I'm still seeing intermittent crashes after a couple of hours, though I think that's related to the ESP32 framework.  I'm building some test cases to debug that further. A quick tap of the reset button gets it back up and running, though that's not ideal.


Any chance you'd share your code?

-Bob
Tiwato

Registered:
Posts: 8
Reply with quote  #11 
Yup, all the code is on github:  https://github.com/tcflanag/artnet-apa102

Also, the previously mentioned instability is gone. It actually was a bug with the esp32 framework. 

I've actually never used the native dmx + FTDI.  I think it really depends on the effect you are going for.  If you want larger room level effects with spot lights, and things like smoke, straight DMX is probably the way to go.  Smaller effects, with finer detail may work better with the addressable LEDs I used.  



e4mafia

Registered:
Posts: 50
Reply with quote  #12 
Playing around with it, but your method of outputting to the lights is very different than what I'm going to be doing. I'll be looking for basic, binary on/off items in the DMX stream, which I'll configure in Artemis DMX tools. The arduino needs to parse those and will run various functions in response. I'm having trouble deciphering the udp.read process. When I check the length of the array in packetBuffer, I get 24, which is way too small, as the first 2 channels alone take up 32 bytes, so it can't be a different byte per array member. I don't see anything in the documentation for the UDP class that has been helpful in figuring out the structure. . I'm looking at a Wireshark trace, but I'm only getting more confused between what I see in the frame decode there, and what I get on the arduino,

Would you mind walking me through the process you used to get the channel data in your code?
Tiwato

Registered:
Posts: 8
Reply with quote  #13 
I considered doing it that way, but decided to keeping the logic off of the arduino would be better for sharing.  If I even pick up some big LED panels from alibaba, I might have to shift the logic to the arduino.

The Art-Net protocol that I'm receiving is pretty simple:

https://en.wikipedia.org/wiki/Art-Net

Bridge Tools mostly followed the spec, however note that the length will data length in bytes 16:17 will always be 2. I just solve that by ignoring it, but beware if you try and write your own protocol decoder.

I'm not really doing much to decode the packet.  I do have a initial sanity check to see that the start of the packet is "Art-Net", but then I jump to the data section and immediately being sending it out to the LEDs. Each 1-byte channel coming in, is assigned to 1 byte of RGB data for the LED protocol.


The packet length for me seems to always be 530 bytes. (18 bytes of header + 512 channels of 8-bit data). How are you checking the length of the data?  Are you looking at numBytes returned from Udp.packetParse()?
e4mafia

Registered:
Posts: 50
Reply with quote  #14 
I've made a LOT of progress since posting this. I'm going to hold myself accountable to sharing it soon. Just been heads down in development and testing, and manufacturing the prototype controller and receiver units. I'll be running the lights via Cat5, and am using Teknynja's concept at https://www.teknynja.com/2014/02/driving-ws2812neopixels-rgb-leds-over.html using a combination of SN75174 and SN75176 transceivers to keep the data signal clean across the longish connections. I plan on having lights in various places around the bridge. Shields and Energy status up by the main screen, for the captains reference, a pair of overhead or side lights running effects based on speed (different coloring for impulse vs warp), another overhead for environmentals such as docked, in nebula, taking damage, etc. and another (not sure where to place it) for red alert and other alert conditions. Its pretty damned elaborate, but all prototyping has passed muster so far. I've tested SN75176 to SN75176 comms, but not SN75174 to SN75176.

I've also not tested the full power distributions. Will be using a 10Amp 5v line coming off of a repurposed ATX power supply. The Computer case will also contain the arduino, power distribution bus, and 6 x cat 5 connections for driving the lights. Power will be sent over the Cat5 as well, with 3 pairs carrying + and -, and the 4th pair carrying the SN7517x A and B signals.

Code for red alert, warp, and (not yet satisfactory) impulse effects is done. Shields and energy are up next. Then environmentals. hopefully by that time I'll also have all of the components to begin build out of the receiver units. Started one of them today.
e4mafia

Registered:
Posts: 50
Reply with quote  #15 
Basic logic and power distribution test was successful. Ran everything off of the ATX supply, and after working out some idiot bugs in my code, got all six of them up and running!



Pay no attention to the rats nets of wiring. Its only temporary 😉
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.