You are on page 1of 11

instructables

Artnet LED Pixels With ESP8266

by mtongnz

After the success of my last Instructable, ESP8266 final step, I'll discuss some of the issues I'm currently
Artnet to DMX, I have completely revamped my having and things I'd like to add in the future.
espArtNetNode code, releasing v2 with new features
such as RDM support and WS2812 output. This code The video here will show you very quickly through all
is still in beta and there are a few known bugs - and of these steps. I apologize for the poor sound quality -
probably a few unknown also. I don't have an external microphone and my laptop
fans are really loud.
I have written this Instructable to help with some
common questions on setting this device up to control I'd love to see how you use this. Post some photos,
WS2812 pixels. videos and comments below to let me know your
experience and any suggestions you may have. I
We will quickly look at how I have laid out and wired read all the comments I receive and try to reply in a
my 30 x 15 pixels, then I'll show you which settings timely manner.
you need to get the ESP connected. Next, I'll do a
quick run through how to patch the ESP outputs into Let's get started....
Jinx so we can get some cool effects running. In the

Artnet LED Pixels With ESP8266: Page 1


https://youtu.be/WXv9AU-MPBU

Step 1: Pixel Layout and Wiring

This step is fairly easy but very time consuming. Now wire all the power up. I chose to run 3 power
lines, 1 per 5m of tape, and each with it's own fuse.
Find a board to mount everything to - I used a 6mm When using such a large PSU, I'd recommend fuses
MDF sheet, 600mm x 1200mm in size. to ensure you don't damage anything if there's a
short. I mounted my fuses to a small piece of perf
Work out the best way to lay everything out. I had 3x board to make a basic power distro board. If your
5m rolls of tape so decided to do 15x 1m strips. This runs are longer than about 150 pixels, you'll need to
gave me 200mm at the side for the electronics and "inject" power along the runs to ensure the LED
PSU. I used small bolts and standoffs to mount the brightness and colour doesn't suffer. Make sure you
PSU and PCBs. Measure the hole spacing and drill insulate any connections so you don't get a short.
through the MDF - you might want to make a test
template using scrap paper first. Data can now be connected. My code will allow a
max of 680 ws2812 pixels per port. Wire the ESP to
I spaced the tape so the LEDs are the same distance the data in of the first strip. Wire the data out of the
apart as they are on the tape. I used the adhesive first strip to the data in of the second strip, data out of
already on the LED tape to stick it down. Make sure the second to data in of the third....
you pay attention to the data in and data out for each
strip - have them alternate to make connecting the To finish it off, I ran a strip of black gaff tape to hold
data lines easier, ending up in a snakelike pattern. the end down and protect the small data connections
Also make sure your ESP location is next to the data when I move it around.
in for the first strip.

2
1 1
4 6

2
5

1. ESP8266 on my protoype PCB 1. Orange is data - wired in snaking pattern


2. 5V Power Distro 2. Green is negative
3. 5V 70A PSU Blue is positive
4. Data In. Orange wires are data
5. I ran 3 separate power lines - 5 strips on each
6. Black gaff to hide the data connections and hold the LED tape down

Artnet LED Pixels With ESP8266: Page 2


1

3
2

1. 5V from PSU
2. 3x 5V to LED Strips
3. 2 spare outputs if needed

1 2 1

1. Fuses - just in case. 70A is a lot! 1. 3.3V reg for the ESP. My surface mount regs haven't arrived yet :)
2. 240V mains in
3. 5V power
3x +ve
3x -ve
4. Power to the ESP

Artnet LED Pixels With ESP8266: Page 3


3
1

1. APA106 LEDs for status 1. Voltage regs go here but haven't arrived yet
2. PortA data out - I've bypassed the MAX485 & 2. PCB XLRs also haven't arrived
OK 3. 5V DC-DC for electrical isolation
3. Data in for the strips - and I damaged the 5V
pad when I cut the strip

Artnet LED Pixels With ESP8266: Page 4


2

1. I haven't installed the optocouplers yet as it allows me access to RX/TX for


flashing the ESP8266
2. Power regs still unpopulated :(

Artnet LED Pixels With ESP8266: Page 5


Step 2: ESP8266 Hardware & Firmware

The PCB in the photos is of the prototype which I'm it. I'm not going to cover this here as it's already been
currently testing. It is not quite finalised so the PCB covered.
files aren't yet public. I have however put the
schematic above. There are also earlier schematics Once you've flashed the ESP, unplug it for a few
available on my github along with a Max485 to Pixel seconds before repowering it. I find a soft reset
schematic needed if you use this schematic in it's doesn't always work for me.
entirety - I bypassed the OK & Max485 in the
schematic above for my testing. The next time you want to flash firmware, you can do
so via the web UI explained in the next step. In the
Ensure you have the latest ESP8266 Arduino Core Arduino IDE, goto Sketch->Export Compiled Binary
files and the latest Arduino IDE version. to generate a .bin file in your sketch directory. Then
goto the ESP web UI, select the firmware tab and
You can get the latest source code and pre-compiled upload it there. This is much easier then connecting a
binaries for this project from my github. You can also USB-serial programmer each time. You can also use
submit bugs or requests using the Issues tab there or pre-compiled bin files from my github when they're
you can post in the comments below. released.

Open the source file, connect the ESP8266 and flash

1. Source code for this project


2. Precompiled binaries for various devices
3. Prizes that are available to people who contribute to this project

1
3
2

1. Firmware - note that beta5g is not up on my github yet


2. Artnet and ESTA codes
3. Uncomment these to set your board type

Artnet LED Pixels With ESP8266: Page 6


Step 3: EspArtNetNode Config

Now that you've got the device firmware installed, we Head to the port A and/or port B settings. Choose
can start getting everything connected. WS2812 as the port type then click save - you should
now have options for your pixel output, filled with the
Your computer should be able to see a WiFi network defaults which should be fine for most people.
called espArtNetNode_xxxxx (the network will have a
random number based on the chip's ID). Connect to it First set the protocol - I use Artnet but you can use
- the default password is byMtongnz2017 which can sACN if desired. sACN will still use Artnet for
be changed later if you wish. discovery and configuration.

Once you're connected, open your browser to 2.0.0.1 Next, set the number of pixels - less pixels per port
and you should see the settings UI shown above. The will make the device faster so it pays to set it to what
first page gives you a run down of your settings. you actually have but leaving it higher wont cause
any issues.
Head to the WiFi settings page. Either enter your
WiFi SSID and password or you could use stand Make sure you have pixel mapping as the mode. 12
alone mode. Click save - the save button should turn channel FX allows you to control all your pixels while
green to indicate the ESP has saved the settings. only using 12 DMX channels. It's explained more on
my github.
If you need, head to the IP settings page and set a
static IP. Once again click save. Finally set the Net, Subnet and Universe settings.
Each DMX universe allows 512 channels, so 170
Now unplug your ESP, wait a few seconds and RGB pixels. Hence why we need 4 universes for 680
repower it. Once again, I find it sometimes doesn't pixels :)
work when using a soft reset.
Once everything is set, click save again. Make sure
Reconnect to your main WiFi and you should be able you click save if you intend to leave the page as the
to now point your browser at your ESPs new IP. If device won't prompt you to save and you'll lose any
you're using DHCP, you may need to check on your changes.
routers config page to find the IP. You should see the
same settings UI.

1. Hidden for obvious reasons :)


2. This allows you to run without connecting to a router

Artnet LED Pixels With ESP8266: Page 7


1

1
2

1. These are sent to Artnet controllers to identify this device 1. Artnet settings
4x Universes = 680 pixels
2. sACN is only if you select sACN as the protocol

Artnet LED Pixels With ESP8266: Page 8


Step 4: Jinx Config

Jinx is a free software for controlling LED matrices. It pixel, green means there is. Click a square and you'll
is not the only software for this - there are heaps of see the device it's patched to and the channel for red,
others available, both free and paid. green and blue. You can manually enter these for
each pixel but that'll take a while.
Start off by unchecking the Start Output option in the
Setup menu. You'll be unable to make any changes Select the top left corner and click the Fast Patch
while this is enabled. button. Select the dimensions for what you're
patching, for me it's X: 30, Y: 6 (180 pixels - it'll only
Now we need to add some Output Devices, also in patch 170 as that's the max per universe). In patch
the Setup menu. Click Add, select Artnet or sACN, mode, select the wiring type you used, for me it's
turn off Broadcast, enter the ESPs IP, enter the Net, snake lines starting top left. Set your pixel order -
Subnet and Universe as per the settings from the normally RBG for ws2812. For the first channel, set it
previous step, and then click OK to save the device. as 0 (Jinx counts from 0, not 1). Select your device -
You need to add a new device for each universe mine is 192.168.0.37 (0 | 0 | 0). Now click OK and
you'll need - I'm using 3 for my 450 pixels. your channels will be patched.

Once you've added all your devices, click Close. Use the fast patch in combination with manual
Open the Matrix Options and enter your pixel patching until your entire matrix is patched. Then click
dimensions - for me it's 30 pixels wide by 15 high. I close on the patch window.
don't touch the other options. Click OK to save the
settings and close the window. Go back to the Setup menu and check the Start
Output option.
Now open the Output Patch. This is the tricky part
and you must match each pixel in the physical world Jinx should now be sending data to your pixels via
with each pixel in Jinx. My pixels are patched in a the ESP - but it's probably all black for now. Have a
snaking pattern, starting at the top left corner but you play with the various effects and find something you
can have them in any configuration you'd like. Start like. Jinx allows you to scroll text, play video, have an
by clicking Clear Patch - the patch should already be EQ running and you can store scenes for later
clear but this makes sure. callback.

Red squares means there's no output patched to that

1. Setup menu

Artnet LED Pixels With ESP8266: Page 9


1

1. Manually set pixel address

Artnet LED Pixels With ESP8266: Page 10


Step 5: Bugs and Future Goals

As you can see here, there are a few bugs and I would like to see a scene storage feature added as I
feature requests that still need to be addressed. I'm have in v1.2 of this device. With the addition of the
going to discuss the main ones below and also ws2812 support, there is a lot more data to store. I'd
mention my give away for people who help me out also like to be able to store chases. This is a feature
with these. for which there is a reward offered.

Main Bug: People would also like to have a hardware button or


screen to select stored scenes. Once scenes storage
The biggest bug at present it a watchdog timer reset is implemented, I think this would be easy to add.
which occurs about 10-20 minutes into operation. I
haven't been able to find the cause of this yet. I'd also like to allow DMX inout to control ws2812
Suggestions for a cause at this stage are that it's output or DMX scenes on the other port. This may be
related to a rouge interrupt or possibly the quite tricky to implement.
WiFi/service routines being blocked for too long. I am
offering a reward for the person(s) who can fix this Give Away
issue.
I am offering a few of my PCBs featured in this
Feature Wish List: Instructable as prizes/rewards for people who
contribute to this project. In addition to the 2
Many of the other issues are more feature requests. mentioned above, I'm giving one to someone who
They range from web UI improvements to support for contributes the most. They will be fully populated and
other pixel types. flashed with the latest firmware. Details are here.

Artnet LED Pixels With ESP8266: Page 11

You might also like