<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Photons, Electrons, and Dirt &#187; Ethernet</title>
	<atom:link href="https://bikerglen.com/blog/category/ethernet/feed/" rel="self" type="application/rss+xml" />
	<link>https://bikerglen.com/blog</link>
	<description>A blog by Glen Akins</description>
	<lastBuildDate>Mon, 16 Feb 2026 00:47:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<item>
		<title>Build a DMX FeatherWing to Control Lights with a Feather M0</title>
		<link>https://bikerglen.com/blog/dmx-featherwing-light-controller/</link>
		<comments>https://bikerglen.com/blog/dmx-featherwing-light-controller/#comments</comments>
		<pubDate>Tue, 25 Feb 2020 01:59:40 +0000</pubDate>
		<dc:creator><![CDATA[Glen]]></dc:creator>
				<category><![CDATA[DMX / Art-Net]]></category>
		<category><![CDATA[Ethernet]]></category>
		<category><![CDATA[Lighting]]></category>
		<category><![CDATA[Microchip]]></category>
		<category><![CDATA[Power over Ethernet (PoE)]]></category>
		<category><![CDATA[SAMD21]]></category>

		<guid isPermaLink="false">https://bikerglen.com/blog/?p=2296</guid>
		<description><![CDATA[This project uses an Adafruit Feather M0 board to control a group of RGB lights using the DMX-512 protocol. We'll build a DMX-512 FeatherWing and connect it to the Feather M0 and a Particle Ethernet FeatherWing. Finally, we'll develop a web-based GUI to select different RGB lighting effects and control the lights. <a href="https://bikerglen.com/blog/dmx-featherwing-light-controller/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="attachment_2383" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/cover-photo-one.jpg"><img class="size-large wp-image-2383" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/cover-photo-one-1024x682.jpg" alt="Playing around with the DMX FeatherWing, a Particle Ethernew FeatherWing, an Adafruit Feather M0 Basic Proto, the official Nanoleaf DMX interface, and a Nanoleaf Aurora tile." width="640" height="426" /></a><p class="wp-caption-text">Playing around with the DMX FeatherWing, a Particle Ethernet FeatherWing, an Adafruit Feather M0 Basic Proto, the official Nanoleaf DMX interface, and a Nanoleaf Aurora tile. The GUI on the iPad tells the Feather M0 which light program to run. The program output is sent via DMX-512 to the Nanoleaf setup.</p></div>
<p>This project uses an Adafruit Feather M0 Basic Proto board to control a group of Color Kinetics or other RGB light fixtures using the DMX-512 protocol. We&#8217;ll build a DMX-512 interface FeatherWing then connect it to the Feather M0 using a Particle Ethernet FeatherWing. Once the hardware is built and assembled, we&#8217;ll write software with a web-based GUI to generate RGB lighting effects and control the attached RGB lights using the DMX protocol. By modifying the software on the Feather M0, different effects can be generated and added to the web-based GUI.</p>
<p><span id="more-2296"></span></p>
<h2>Required Materials</h2>
<p>The materials required for this project are:</p>
<ul>
<li>DMX FeatherWing board and parts. We&#8217;ll discuss ordering the board, the required parts, and the assembly in the next section.</li>
<li><a href="https://www.adafruit.com/product/2772">Adafruit Feather M0 Basic Proto</a></li>
<li><a href="https://www.adafruit.com/product/4003">Particle Ethernet FeatherWing</a></li>
<li><a href="https://store.particle.io/products/power-over-ethernet-module">Particle Ethernet FeatherWing PoE Adapter</a> (optional). Note: The PoE adapter has been discontinued. If you want to make your own version, the Eagle design files are available <a href="https://github.com/particle-iot/ethernet-wing/tree/master/eagle/PoE-adapter-v0.2">here</a> but the header sockets on the module <a href="https://community.particle.io/t/ethernet-featherwing-power-over-ethernet-poe/45130/9">need to be moved</a> to align with the headers on the Ethernet FeatherWing board.</li>
</ul>
<h2>The DMX FeatherWing</h2>
<div id="attachment_2377" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/dmx-featherwing-2.jpg"><img class="wp-image-2377 size-large" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/dmx-featherwing-2-1024x682.jpg" alt="dmx-featherwing-2" width="640" height="426" /></a><p class="wp-caption-text">The assembled DMX FeatherWing board. I fixed the location of the DIR silkscreen label in the Eagle design files and on the board order link at OSH Park.</p></div>
<p>The photo above shows the assembled DMX FeatherWing. The next few sections are dedicated to describing and building the DMX FeatherWing hardware.</p>
<h3>Circuit Design and Schematic</h3>
<div id="attachment_2319" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/dmx-featherwing-schematic1.png"><img class="size-large wp-image-2319" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/dmx-featherwing-schematic1-1024x764.png" alt="DMX-512 FeatherWing schematic." width="640" height="478" /></a><p class="wp-caption-text">DMX-512 FeatherWing schematic.</p></div>
<p>To make sure everything conformed to the FeatherWing form factor, I started with the Eagle design for the <a href="https://github.com/adafruit/Adafruit-Power-Relay-FeatherWing-PCB">Adafruit Power Relay FeatherWing</a>. I deleted everything from the schematic and board except for the FeatherWing symbol and dimension lines. The FeatherWing symbol includes the board outline layer and the holes for the 0.1&#8243; pitch, 0.025&#8243; square post headers that connect the FeatherWing to other boards. I saved this as a new file then started my design.</p>
<p>U1 is a Ti 3.3V differential transceiver. Its transmit data input is connected to the Feather&#8217;s transmit data output pin. Its receive data output is connected to the Feather&#8217;s receive data input. The direction line is connected to a GPIO pin. I only plan on transmitting data so I could have tied the direction pin high to permanently enable the transmitter and disable the receiver but connecting it to a GPIO allows me to control the direction in software and could be useful for future projects.</p>
<p>J1 is a plastic RJ-45 8P8C jack. It&#8217;s wired to connect to <a href="https://www.docs.colorkinetics.com/support/appnotes/notes/rj45_to_rj45.pdf">Philips Color Kinetics&#8217; lights and controllers</a>. Other DMX lights with RJ-45 jacks may use different pin outs. Typically pins 1 and 2 are swapped or the shield is on a different pin on these lights. R1 is the 120 ohm termination resistor required at the transmitter by the DMX specification. Another 120 ohm termination resistor should be placed at the last fixture in the chain of fixtures.</p>
<p>The rest of the parts are for decoupling, EMC compatibility, and ESD protection. C1 is a decoupling capacitor to filter voltage transients on the supply to the differential transceiver. C2 grounds high frequency noise on the shield line while preventing a DC current loop between the board and any connected light fixtures. This should help with EMC compatibility but still provide isolation between the hardware at either end of the DMX cable.</p>
<p>D1 and D2 provide additional ESD protection beyond the ESD protection built into the differential receiver. Their function is described in the TI application note <a href="http://Protecting RS-485 Interfaces Against Lethal Electrical Transients">Protecting RS-485 Interfaces Against Lethal Electrical Transients</a>.</p>
<h3>Board Design</h3>
<div id="attachment_2330" style="width: 887px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/dmx-featherwing-board1.png"><img class="size-full wp-image-2330" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/dmx-featherwing-board1.png" alt="DMX-512 FeatherWing board design." width="877" height="662" /></a><p class="wp-caption-text">DMX-512 FeatherWing board design.</p></div>
<p>Components were placed on the board to minimize the length of the signal traces. The differential data lines between J1 and U1 contain a small loop to equalize their lengths. The termination resistor and ESD components connect straight from these pins to the pins on the differential transceiver. C1 is located as close as possible to U1&#8217;s 3.3 V supply line. The direction, transmit data, and receive data lines are routed to the FeatherWing headers.</p>
<div id="attachment_2331" style="width: 1011px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/dmx-featherwing-render-top1.png"><img class="size-full wp-image-2331" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/dmx-featherwing-render-top1.png" alt="DMX-512 FeatherWing top side board render." width="1001" height="451" /></a><p class="wp-caption-text">DMX-512 FeatherWing top side board render.</p></div>
<div id="attachment_2332" style="width: 1011px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/dmx-featherwing-render-bottom1.png"><img class="size-full wp-image-2332" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/dmx-featherwing-render-bottom1.png" alt="DMX-512 FeatherWing bottom side board render." width="1001" height="451" /></a><p class="wp-caption-text">DMX-512 FeatherWing bottom side board render.</p></div>
<p>Once the board design was done, I uploaded the Gerber files to OSH Park and checked the renders to make sure everything looked OK. Once I was happy, I ordered the boards from OSH Park.</p>
<h3>Ordering Boards</h3>
<p>If you wish to use the board exactly as designed, you can order a blank board from OSH Park <a href="https://oshpark.com/shared_projects/xnTMPyYn">here</a>. If not, you can download the Eagle <a href="https://github.com/bikerglen/atsamd21-poe-dmx-controller/tree/master/boards/dmx-featherwing">design files</a> from Github, make your desired modifications, create Gerbers, and order boards from your favorite PCB manufacturer. My top and bottom silkscreens are located on layers 121 and 122 respectively so you may need to alter your CAM processor script to output these layers to the silkscreen Gerber files.</p>
<h3>Bill of Materials</h3>
<p>The bill of materials is available in the Github repository as an <a href="https://github.com/bikerglen/atsamd21-poe-dmx-controller/blob/master/boards/dmx-featherwing/dmx-feather-wing-v1-bom.xlsx">Excel spreadsheet</a>. It&#8217;s also reproduced below for your convenience. All the parts are available from Digi-Key.</p>
<table border="0" width="1005" cellspacing="0" cellpadding="0">
<colgroup>
<col style="mso-width-source: userset; mso-width-alt: 2218; width: 47pt;" width="62" />
<col style="mso-width-source: userset; mso-width-alt: 4266; width: 90pt;" width="120" />
<col style="mso-width-source: userset; mso-width-alt: 10865; width: 229pt;" width="306" />
<col style="mso-width-source: userset; mso-width-alt: 5660; width: 119pt;" width="159" />
<col style="mso-width-source: userset; mso-width-alt: 6172; width: 130pt;" width="174" />
<col style="mso-width-source: userset; mso-width-alt: 6542; width: 138pt;" width="184" /> </colgroup>
<tbody>
<tr style="height: 14.4pt;">
<td style="height: 14.4pt; width: 47pt;" width="62" height="19">Qty</td>
<td style="width: 90pt;" width="120">Parts</td>
<td style="width: 229pt;" width="306">Description</td>
<td style="width: 119pt;" width="159">Mfr</td>
<td style="width: 130pt;" width="174">Mfr Part #</td>
<td style="width: 138pt;" width="184">Digi-Key Part #</td>
</tr>
<tr style="height: 14.4pt;">
<td class="xl66" style="height: 14.4pt;" height="19">1</td>
<td>C1</td>
<td>CAP CER 0.1UF 10V X7R 0805</td>
<td>Kemet</td>
<td>C0805C104K8RACTU</td>
<td>399-7999-1-ND</td>
</tr>
<tr style="height: 14.4pt;">
<td class="xl66" style="height: 14.4pt;" height="19">1</td>
<td>C2</td>
<td>CAP CER 1000pF 2KV 10% X7R SMD 1206</td>
<td>Johanson Dielectrics</td>
<td>202R18W102KV4E</td>
<td>709-1036-1-ND</td>
</tr>
<tr style="height: 14.4pt;">
<td class="xl66" style="height: 14.4pt;" height="19">1</td>
<td>D1</td>
<td>TVS DIODE 12V 29.5V SOD323</td>
<td>Bourns Inc.</td>
<td>CDSOD323-T12SC</td>
<td>CDSOD323-T12SCCT-ND</td>
</tr>
<tr style="height: 14.4pt;">
<td class="xl66" style="height: 14.4pt;" height="19">1</td>
<td>D2</td>
<td>TVS DIODE 7V/12V 14V/26V SOT23-3</td>
<td>Bourns Inc.</td>
<td>CDSOT23-SM712</td>
<td>CDSOT23-SM712CT-ND</td>
</tr>
<tr style="height: 14.4pt;">
<td class="xl66" style="height: 14.4pt;" height="19">1</td>
<td>J1</td>
<td>CONN MOD JACK 8P8C R/A UNSHLD</td>
<td>TE Connectivity</td>
<td>5520251-4</td>
<td>A31407-ND</td>
</tr>
<tr style="height: 14.4pt;">
<td class="xl66" style="height: 14.4pt;" height="19">1</td>
<td>R1</td>
<td>RES SMD 120 OHM 5% 1/8W 0805</td>
<td>Panasonic</td>
<td>ERJ-6GEYJ121V</td>
<td>P120ACT-ND</td>
</tr>
<tr style="height: 14.4pt;">
<td class="xl66" style="height: 14.4pt;" height="19">1</td>
<td>U1</td>
<td>IC TRANSCEIVER HALF 1/1 8SOIC</td>
<td>Texas Instruments</td>
<td>SN65HVD11DR</td>
<td>296-31717-1-ND</td>
</tr>
<tr style="height: 14.4pt;">
<td class="xl66" style="height: 14.4pt;" height="19">1</td>
<td class="xl67"><span style="mso-spacerun: yes;"> </span>&#8212;</td>
<td class="xl68">CONN HEADER VERT 50POS 2.54MM</td>
<td class="xl68">Samtec Inc.</td>
<td class="xl68">TSW-150-07-G-S</td>
<td class="xl68">SAM1029-50-ND</td>
</tr>
</tbody>
</table>
<h3>DMX FeatherWing Assembly</h3>
<p>To assemble the board, solder all the surface mount components first starting with U1. Once the surface mount components are soldered, solder the headers to the bottom of the board. It can be helpful to place the headers in a breadboard to hold them in place while soldering them to the DMX FeatherWing. This technique is described in detail on Adafruit&#8217;s website <a href="https://learn.adafruit.com/adafruit-feather-m0-adalogger/assembly#soldering-in-plain-headers-3-7">here</a>. Finally, insert the RJ-45 connector into the top of the board, flip the board over, and solder the connector in place.</p>
<h2>Assemble the Board Stack</h2>
<div id="attachment_2374" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/assembled-board-stack-no-poe1.jpg"><img class="size-large wp-image-2374" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/assembled-board-stack-no-poe1-1024x682.jpg" alt="The assembled stack of boards. Do not connect the PoE module at this time." width="640" height="426" /></a><p class="wp-caption-text">The assembled stack of boards. Do not connect the PoE module at this time.</p></div>
<p>Once the DMX FeatherWing is assembled, it&#8217;s time to connect all three boards together. Holding the Particle Ethernet FeatherWing board with the Ethernet circuitry on my left, I placed the Adafruit Feather M0 Basic Proto in the middle of the board and the DMX FeatherWing on the right of the board. If you have the optional PoE module, do NOT install it at this time!</p>
<p>We&#8217;re going to be using the USB cable to power the stack of boards and download software to the ATSAMD21. Powering the boards from both the PoE supply and the USB cable can result in damage to your boards and/or your computer. Never use both the PoE module and the USB cable at the same time.</p>
<h2>Install Software Environment and Libraries</h2>
<p>This project uses the Arduino integrated development environment for the Adafruit Feather M0 Basic Proto. Follow the instructions <a href="https://learn.adafruit.com/adafruit-feather-m0-basic-proto/setup">on the Feather M0 Basic Proto tutorial page</a> to install the Arduino IDE and additional boards manager URL. Once those are installed, install the libraries required for the Feather M0 boards and the ATSAMD21 as instructed on the <a href="https://learn.adafruit.com/adafruit-feather-m0-basic-proto/using-with-arduino-ide">next page of the same tutorial</a>.</p>
<p>This project also uses the Arduino Ethernet and Timer libraries. Follow <a href="https://learn.adafruit.com/adafruit-wiz5500-wiznet-ethernet-featherwing/usage#install-ethernet-library-4-3">these instructions</a> to install the Ethernet library. After installing the Ethernet library, install the Arduino Timer library. It&#8217;s the same process as for the Ethernet library except search for the arduino-timer library by Michael Contreras v2.0.1. Once you&#8217;ve found it in the GUI, install the library and perform one last restart of the Arduino IDE.</p>
<h2>Test the Software Installation</h2>
<p>I recommend testing the software installation by building and running the WebServer example for the Ethernet library. In the Arduino IDE, click Tools -&gt; Board -&gt; Adafruit Feather M0. Once the board is selected, click on File -&gt; Examples -&gt; Ethernet -&gt; WebServer to open a new window with the example WebServer project. Be sure to pick Ethernet and not Ethernet2.</p>
<p>Now select File -&gt; Save As to save a copy of the WebServer example in your Arduino projects directory. Find the IPAddress ip (&#8230;) line and change the IP address to a valid static IP address for your network. Finally uncomment the line Ethernet.init(10) to pick the correct chip select for the combination of the Particle Ethernet FeatherWing and Adafruit Feather M0 Basic Proto boards.</p>
<div id="attachment_2380" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/debugging-code-setup.jpg"><img class="size-large wp-image-2380" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/debugging-code-setup-1024x682.jpg" alt="The boards set up to download and test the code." width="640" height="426" /></a><p class="wp-caption-text">The boards set up to download and test the code.</p></div>
<p>Connect the RJ-45 Ethernet jack to an Ethernet switch on the same network as your computer. Make sure the optional PoE module is NOT installed then connect the micro USB connector on the Feather M0 board to a free USB port on the computer.</p>
<p>Go to Tools -&gt; Port and select the COM port connected to the Feather M0. Now launch the serial monitor by selecting Tools -&gt; Serial Monitor. Finally build the example and download the code to the board by selecting Sketch -&gt; Upload in the Arduino IDE.</p>
<p>If everything is successful, you should see something similar to the following in the serial monitor window:</p>
<div id="attachment_2342" style="width: 1013px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/serial-monitor-1.png"><img class="size-full wp-image-2342" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/serial-monitor-1.png" alt="Build and download success!" width="1003" height="591" /></a><p class="wp-caption-text">Build and download success!</p></div>
<p>Use your favorite web browser to navigate to the specified IP address. You may need to prepend http:// to the IP address for some browsers. You should get something similar to the following:</p>
<div id="attachment_2343" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/web-browser-1.png"><img class="size-large wp-image-2343" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/web-browser-1-1024x696.png" alt="Web server test successful!" width="640" height="435" /></a><p class="wp-caption-text">Web server test successful!</p></div>
<p>And the serial monitor will update with some debugging info every time the browser is refreshed:</p>
<div id="attachment_2344" style="width: 1013px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/serial-monitor-2.png"><img class="size-full wp-image-2344" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/serial-monitor-2.png" alt="The serial monitor after sending a web page to the web browser." width="1003" height="591" /></a><p class="wp-caption-text">The serial monitor after sending a web page to the web browser.</p></div>
<p>At this point, the test is successful and it&#8217;s time to try to control some lights with the real software.</p>
<h2>Connect Some RGB DMX Lights</h2>
<div id="attachment_2375" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/dmx-light-channel-one.jpg"><img class="size-large wp-image-2375" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/dmx-light-channel-one-1024x682.jpg" alt="An inexpensive light like this one with an RJ-45 to XLR 3-pin adapter cable makes a good fixture for testing the hardware and software." width="640" height="426" /></a><p class="wp-caption-text">An inexpensive light like this one with a homemade RJ-45 to XLR 3-pin adapter cable makes a good fixture for testing the hardware and software.</p></div>
<p>Connect some RGB DMX lights to the DMX FeatherWing&#8217;s RJ-45 jack. The software in its default configuration controls 24 RGB lights using DMX channels 1 to 72. Make sure your connected lights are in this range and the red channels start with 1, 4, 7, etc.</p>
<h2>Download and Run the DMX Controller Software</h2>
<h3>Download the DMX Controller Source Code from Github</h3>
<p>My latest DMX controller software can be downloaded from Github <a href="https://github.com/bikerglen/atsamd21-poe-dmx-controller/tree/master/sw/dmx-controller">here</a>. Download these files into a new folder. This folder must be named dmx-controller and must be inside the Arduino projects folder. This is a constraint of the Arduino IDE.</p>
<h3>Set the IP Address</h3>
<p>Just like for the example WebServer project, the IP address must be set to a valid static IP address for your network. Find the IPAddress ip (&#8230;) line in the dmx-controller.ino file and set it to a suitable IP address.</p>
<h3>Build and Download the Code to the Feather M0</h3>
<p>If the serial monitor window is not already open, open it again by selecting Tools -&gt; Serial Monitor. Now build and download the code by selecting Sketch -&gt; Upload.</p>
<h3>Using the Web Interface</h3>
<p>Enter the IP address from above into your favorite web browser and you should get the following web page:</p>
<div id="attachment_2346" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/web-browser-2.png"><img class="size-large wp-image-2346" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/web-browser-2-1024x696.png" alt="Opening page of the web-based GUI for controlling the attached lights." width="640" height="435" /></a><p class="wp-caption-text">Opening page of the web-based GUI for controlling the attached lights.</p></div>
<p>Now click the Fixed Color tab. The web page will update to display this screen:</p>
<div id="attachment_2347" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/web-browser-3.png"><img class="size-large wp-image-2347" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/web-browser-3-1024x696.png" alt="Fixed color tab." width="640" height="435" /></a><p class="wp-caption-text">Fixed color tab.</p></div>
<p>Clicking on a color should change the color of the connected lights to the selected color. Once this is working, experiment with some of the other tabs and settings.</p>
<div id="attachment_2367" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/red-wall-wash.jpg"><img class="size-large wp-image-2367" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/red-wall-wash-683x1024.jpg" alt="My living room wall washed in red light using the fixed color mode on the controller." width="640" height="960" /></a><p class="wp-caption-text">My living room wall washed in red light using the fixed color mode on the controller.</p></div>
<p>Congratulations if you&#8217;ve made it this far! At this point the project works. The following sections are for those who wish to dive deeper into the controller&#8217;s functionality or modify the software or hardware.</p>
<h2>Software Details</h2>
<h3>Sending DMX Data with the ATSAMD21</h3>
<p>To send DMX-512 data with the ATSAMD21 microcontroller, I used the <a href="https://github.com/claudeheintz/LXSAMD21DMX">LXSAMD21MDX library</a> by Claude Heintz as a starting point. Unfortunately, this library sends DMX data continuously so as soon as a packet is done being sent, it immediately starts sending the next packet.</p>
<p>This causes a problem because there&#8217;s no way to guarantee that I won&#8217;t update the RGB values for a light in the middle of those values being sent. For example, if I were updating the RGB values for a light and the library sent the new red and new green values before I could update the blue value, this could cause a light to flash a wrong color for a brief instant.</p>
<p>Next I tried stopping the DMX transmission using the stop function in the library. Calling this function completely disabled the serial port and, as a result, the transmit data line was no longer driven. This caused a very long low / break signal to be transmitted between packets which is against the DMX-512 specification that requires the line to be held in the high / mark state between packets.</p>
<div id="attachment_2356" style="width: 810px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/scope_0.png"><img class="size-full wp-image-2356" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/scope_0.png" alt="Screen capture from my scope showing DMX packets being transmitted at 50 Hz. The transmit data line is held high between packets which is the idle state for the serial interface." width="800" height="632" /></a><p class="wp-caption-text">Screen capture from my scope. The yellow trace shows DMX packets being transmitted at 50 Hz (20 ms between the start of each packet). The transmit data line is held high between packets which is the idle state for the serial interface. The green trace was connected to a GPIO that was set upon entry to the SERCOM2 interrupt handler and cleared upon exit.</p></div>
<p>I decided to rewrite the DMX library and to use a double buffering scheme. The light levels are calculated and stored in an effects buffer. When it&#8217;s time to send a packet, the light levels are copied from the effects buffer to a transmit data buffer. The library is then called to transmit a single DMX packet using the values in the transmit data buffer.</p>
<p>While the DMX packet is being sent, the effects generation code is called to generate the next set of light levels and store them in the effects data buffer. This happens at a 50 Hz rate and completely prevents partially modified data from being sent to the lights. I used a scope to verify the packet rate, the DMX-512 break period, and the bit rate on the interface.</p>
<div id="attachment_2357" style="width: 810px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/scope_3.png"><img class="wp-image-2357 size-full" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/scope_3.png" alt="blah blah blah" width="800" height="632" /></a><p class="wp-caption-text">The DMX packet starts with a break of 100 us (yellow trace). This is much longer than a normal 250,000 bps break character. The scope was set to trigger on a negative pulse with a pulse width greater than 80.0 us. The green trace was connected to a GPIO that was set upon entry to the SERCOM2 interrupt handler and cleared upon exit.</p></div>
<p>While I was prototyping the project, I left the microcontroller&#8217;s receive data pin unconnected. This resulted in the microcontroller receiving errored characters and generating both receive character and error interrupts. Since I wasn&#8217;t expecting or handling these interrupts, this resulted in the microcontroller being stuck in the interrupt handler.</p>
<p>I traced the cause of this behavior to the begin method in the Arduino Uart class which enables the receive character and error interrupts. I disabled these interrupts by adding the following code immediately after calling the Uart class&#8217;s begin method and everything started working:</p>
<pre>     SERCOM2-&gt;USART.INTENCLR.reg = SERCOM_USART_INTENCLR_RXC | 
                                 SERCOM_USART_INTENCLR_ERROR;</pre>
<p>This likely isn&#8217;t an issue with the real hardware because the receive data pin is not left floating. I&#8217;m not using the receive portion of the USART, however, so I might as well disable the interrupts to avoid any chance of them causing problems in the future. I could probably even disable the USART&#8217;s receiver altogether if I wanted.</p>
<h3>Modifying the Built-In Effects or Adding New Effects</h3>
<p>Adding a new effect to the code requires defining a new mode, adding some HTML to display the options for the mode, parsing the HTTP request to get the options for the mode, and adding code to run the mode.</p>
<h4>effects.ino</h4>
<p>The effects.ino file contains code to run the effects and change options associated with each effect. This file requires several additions to create a new mode.</p>
<ol>
<li>The enum at the very top of the effects.ino file defines the available modes. To add a mode, add another definition to this enum.</li>
<li>Scroll down the file a bit and look for the global variables starting with the effects_ prefix. Add any variables to store options associated with the new mode here.</li>
<li>Inside the effects_Init function, add code to initialize the options associated with the new mode to reasonable default values.</li>
<li>Inside the effects_Run function, add another case statement to the switch block to call a new function to generate the mode&#8217;s effects.</li>
<li>Under the EFFECTS GENERATORS heading, add a new function to generate the effect. This function should be named the same as the function added in step 4 above. This function will be called once every 20 ms and should use the effects_ global variables added in step 2 to calculate the next step in the effect. The RGB values should then be written to the effects_data array. This array contains DMX_SLOTS values which corresponds to DMX_SLOTS / 3 RGB lighting fixtures.</li>
<li>Under the COMMANDS FROM UI heading, add any functions that will be called by the HTTP request parsing code to modify the effects_ global variables.</li>
</ol>
<h4>dmx-controller.ino</h4>
<p>The dmx-controller.ino file contains the code to parse the HTTP GET request from the web browser. The HTTP GET request is parsed by the ParseRequest function.</p>
<ol>
<li>Add any new key value pairs to the long if-else block about half way through this code.</li>
<li>Add code to call the functions defined in step 6 in the previous section to modify the effects_ global variables under the Set Parameters comment.</li>
</ol>
<h4>html.ino</h4>
<p>The html.ino file contains C/C++ code that emits HTML to the web browser to permit the user to change the mode and configure any options associated with the mode. The function SendHtmlPage is the function that is called to emit the HTML.</p>
<ol>
<li>Add an additional call to the Tab function with the mode number and name in SendHtmlPage. This creates an additional tab pane for the options for the new mode.</li>
<li>Add a case statement to the switch block in SendHtmlPage with a call to a function to generate the HTML that fills the options tab for the new mode.</li>
<li>Add the function called in step 2 above to generate the HTML to the bottom of the file.</li>
</ol>
<h4> style.ino</h4>
<p>If you need additional CSS style code, add C code to generate it in the style.ino file.</p>
<h4>samd21dmx.cpp and samd21dmx.h</h4>
<p>These files send the DMX packets. If you have more than 24 RGB lights or need more than 72 DMX channels, adjust the DMX_SLOTS define in samd21dmx.h.</p>
<h2>Next Steps</h2>
<p>Here are some ideas for future enhancements to the project.</p>
<h3>Use PoE</h3>
<div id="attachment_2379" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/ethernet-poe-dmx-no-usb.jpg"><img class="size-large wp-image-2379" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/ethernet-poe-dmx-no-usb-1024x683.jpg" alt="Once the software is debugged, the USB cable can be disconnected and the boards powered using the optional PoE module." width="640" height="427" /></a><p class="wp-caption-text">Once the software is debugged, the USB cable can be disconnected and the boards powered using the optional PoE module.</p></div>
<p>If you have the PoE module for the Particle Ethernet FeatherWing, now would be a good time to try it out. Disconnect both the USB cable and Ethernet cable from the stack of boards. Install the PoE module then connect the Ethernet cable. Do not connect the USB cable.</p>
<p>After a brief handshake with the Ethernet switch the board should power up and function just like when it was powered using the USB connection to the computer. Just remember never to connect the Feather M0 to a computer using the USB cable while the PoE module is installed.</p>
<h3>Add Art-Net Receive</h3>
<p>This functionality is left as an exercise to the reader. Since this project has both Ethernet and DMX, it would be possible to re-purpose the project as an Art-Net to DMX converter. In my proposed implementation, the board would send its own internally generated DMX data and packets until it received an Art-Net packet. Each time an Art-Net packet was received, it would output the levels in the Art-Net packet over DMX. After a timeout of around 30 to 60 seconds, the controller would revert back to sending its own DMX data and packets.</p>
<h3>Custom Board and Enclosure Design</h3>
<div id="attachment_2363" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/poe-dmx-controller-v1b-v6-2.png"><img class="size-large wp-image-2363" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/poe-dmx-controller-v1b-v6-2-1024x819.png" alt="Render of the board design which integrates all three boards ." width="640" height="512" /></a><p class="wp-caption-text">Render of the board design which integrates the functionality of all three boards used in this project.</p></div>
<p>My personal next step for this project is to build a board that encompasses all the functionality of the three board stack and make it small enough to fit in a Hammond Manufacturing 1455C801 50 mm x 80 mm extruded aluminum enclosure. The render above shows an almost final version of the proposed circuit board. The renders below show the finished enclosure with the board mounted inside.</p>
<div id="attachment_2364" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/1.png"><img class="size-large wp-image-2364" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/1-1024x819.png" alt="Board mounted inside Hammond Manufacturing 1455C801 extruded aluminum enclosure." width="640" height="512" /></a><p class="wp-caption-text">Board mounted inside Hammond Manufacturing 1455C801 extruded aluminum enclosure.</p></div>
<div id="attachment_2365" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/2.png"><img class="size-large wp-image-2365" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/2-1024x819.png" alt="Board mounted inside Hammond Manufacturing 1455C801 extruded aluminum enclosure." width="640" height="512" /></a><p class="wp-caption-text">Board mounted inside Hammond Manufacturing 1455C801 extruded aluminum enclosure.</p></div>
<h2>Questions or Comments</h2>
<p>If you have any questions or comments about this project, I can be reached on <a href="https://twitter.com/bikerglen">Twitter</a>. In the meantime, stay tuned for updates on the integrated version of this project.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://bikerglen.com/blog/dmx-featherwing-light-controller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PoE-Powered RGB LED Floodlight</title>
		<link>https://bikerglen.com/blog/poe-powered-led-floodlight/</link>
		<comments>https://bikerglen.com/blog/poe-powered-led-floodlight/#comments</comments>
		<pubDate>Sun, 02 Feb 2020 18:38:05 +0000</pubDate>
		<dc:creator><![CDATA[Glen]]></dc:creator>
				<category><![CDATA[DMX / Art-Net]]></category>
		<category><![CDATA[Ethernet]]></category>
		<category><![CDATA[Lighting]]></category>
		<category><![CDATA[Microchip]]></category>
		<category><![CDATA[PIC18]]></category>
		<category><![CDATA[Power over Ethernet (PoE)]]></category>
		<category><![CDATA[RGB LED]]></category>

		<guid isPermaLink="false">https://bikerglen.com/blog/?p=2169</guid>
		<description><![CDATA[This project uses a Silvertel 802.3at Ag5300 PoE+ module with a built-in isolated 24 V DC/DC converter to power  a 10 W ColorKinetics ColorBurst 4 RGB LED floodlight. The Ethernet cable and light plug into a small power / control board and PoE+ powers the floodlight and Art-Net UDP packets control the light.  <a href="https://bikerglen.com/blog/poe-powered-led-floodlight/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="attachment_1977" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/IMG_20191217_224903-2000.jpg"><img class="size-large wp-image-1977" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/IMG_20191217_224903-2000-1024x682.jpg" alt="Philip Color Kinetics ColorBurst 4 10 watt RGB LED flood light controlled and powered over the network." width="640" height="426" /></a><p class="wp-caption-text">Philip Color Kinetics ColorBurst 4 10 watt RGB LED flood light controlled and powered over the network.</p></div>
<p>Time for another PoE project! This project uses a Silvertel 802.3at Ag5300 PoE+ module with a built-in isolated 24 V DC/DC converter to power  a 10 W ColorKinetics ColorBurst 4 RGB LED floodlight. The Ethernet cable and light plug into a small power / control board and PoE+ powers the floodlight and Art-Net UDP packets control the light. If this were a real product, the power / control board would be integrated into the fixture and the Ethernet cable would then plug directly into the back of the light.</p>
<p><span id="more-2169"></span></p>
<h2>The Silvertel Ag5300 PoE+ Module</h2>
<div id="attachment_2229" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/silvertel-module.jpg"><img class="size-large wp-image-2229" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/silvertel-module-1024x683.jpg" alt="Silvertel Ag5324 PoE PD module with integrated isolated 24 V DC/DC converter." width="640" height="427" /></a><p class="wp-caption-text">Silvertel Ag5324 PoE PD module with integrated isolated 24 V DC/DC converter.</p></div>
<p>My previous PoE projects <a href="https://bikerglen.com/blog/ethernet-powered-pixels/">here</a> and <a href="https://bikerglen.com/blog/poe-vfd-tube-clock/">here</a> used a discrete Texas Instruments TPS2378 PoE+ classification IC and a Molex Ethernet jack with integrated magnetics and PoE+ classification circuitry. The TI TPS2378 is the lowest cost solution. The downside is it requires quite a other components to operate. The Molex jack is the highest cost solution but requires very few external components to operate.</p>
<div id="attachment_2224" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/three-solutions.png"><img class="size-large wp-image-2224" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/three-solutions-1024x792.png" alt="Three different isolated PoE PD designs. The top left design uses a Molex Ethernet jack with integrated magnetics and PoE PD classification circuitry." width="640" height="495" /></a><p class="wp-caption-text">Three different isolated PoE PD designs. The top left design uses a Molex Ethernet jack with integrated magnetics and PoE PD classification circuitry. The bottom design uses an Ethernet jack, separate magnetics, and a TI PoE PD classification IC. The top right design, which is the design used in this project, uses an Ethernet jack, separate magnetics, and a Silvertel PoE module. The Silvertel module lies somewhere in the middle in terms of complexity. In the two more complicated designs, the transformer and Bob Smith termination network could be replaced with an Ethernet jack with integrated magnetics.</p></div>
<p>The Silvertel module sits somewhere in the middle of these other two solutions. It still requires a jack, magnetics, two bridge rectifiers, and a transient suppressor like the discrete TI solution, but, unlike the TI and Molex solutions, it includes an isolated 12 V or 24 V DC/DC converter. The integrated DC/DC converter can be a big cost savings and help to reduce the overall parts count.</p>
<h2>The Plan</h2>
<p>I have a box of Color Kinetics ColorBurst 4 lights sitting in my basement. These lights run from 24 volts, draw a maximum of 10 watts, and use a funky 24 volt version of the DMX-512 protocol. I tore down a larger <a href="https://bikerglen.com/blog/color-kinetics-colorburst-6-teardown/">ColorBurst 6 fixture a few years ago</a> which is very similar in design and operation to the ColorBurst 4.</p>
<div id="attachment_2232" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/pds-150e-cb4-setup.jpg"><img class="size-large wp-image-2232" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/pds-150e-cb4-setup-1024x682.jpg" alt="A Color Kinetics PDS-150e power data supply next to a single ColorBurst 4 fixture." width="640" height="426" /></a><p class="wp-caption-text">A Color Kinetics PDS-150e power data supply next to a single ColorBurst 4 fixture.</p></div>
<p>These lights are normally powered and controlled using a Color Kinetics power data supply like the PDS-150e shown in the photograph above. The PDS-150e contains a 24 volt, 150 watt DC power supply powered from the AC mains and a microprocessor that can control the lights using a Color Kinetics proprietary Ethernet-based protocol or DMX-512. This power data supply can power and control up to 12 ColorBurst 4 lights.</p>
<div id="attachment_2217" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/giant-neopixels.jpg"><img class="size-large wp-image-2217" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/giant-neopixels-1024x576.jpg" alt="With enough of these fixtures in a row, they're almost like giant Neopixels!" width="640" height="360" /></a><p class="wp-caption-text">With enough of these fixtures in a row, they&#8217;re almost like giant Neopixels!</p></div>
<p>For this project, I&#8217;m going to replace the PDS-150e with a small power / control board that can directly power and control a single 10 watt ColorBurst 4 fixture from any 802.3at / PoE+ capable switch and an industry-standard Art-Net controller sitting anywhere on the network. I&#8217;ll use Synthe-FX&#8217;s Luminair 3 software running on an iPad Mini to send Art-Net packets to the board and control the light.</p>
<p>A Silvertel PoE module will handle the 802.3at classification and supply a regulated and isolated 24 volts for powering the fixture. A PIC18F67J60 will handle the data side of the project by accepting Art-Net packets and converting them to a serial DMX-512 stream to control the light. Finally, the project will use a line driver to step up the inverted 3.3 volt DMX-512 serial bitstream to a 24 volt version that is compatible with the fixture.</p>
<h2>The Schematic</h2>
<div id="attachment_2220" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/giant-pixpoe-schematic-page-1.png"><img class="size-large wp-image-2220" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/giant-pixpoe-schematic-page-1-1024x681.png" alt="Schematic page one." width="640" height="426" /></a><p class="wp-caption-text">Schematic page one.</p></div>
<p>Page one of the schematic is shown above. It&#8217;s basically the same as page one of the schematic for the Ethernet-powered pixels project except the Texas Instrument PoE classification IC and the Cui 5 volt DC/DC converter have been replaced by the Silvertel Ag5324 PoE module.</p>
<div id="attachment_2221" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/giant-pixpoe-schematic-page-2.png"><img class="size-large wp-image-2221" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/giant-pixpoe-schematic-page-2-1024x681.png" alt="Schematic page two." width="640" height="426" /></a><p class="wp-caption-text">Schematic page two.</p></div>
<p>Page two of the schematic is shown above. It&#8217;s basically the same as page two of the schematic for the Ethernet-powered pixels project except the WS2812 5 volt level shifter and ESD protection circuitry has been removed. In its place is a circuit reverse engineered from a Color Kinetics PDS-60 24 volt power supply to drive the 24 volt inverted DMX protocol to the ColorBurst 4 fixture from the microcontrollers&#8217; 3.3 volt output.</p>
<p>If you have questions about the parts used on this project, I highly recommend reviewing the <a href="https://bikerglen.com/blog/ethernet-powered-pixels/">Ethernet-powered pixels project</a>. It goes in-depth on the selection of parts used for that project, most of which are also used on this project.</p>
<h2>The Board Layout</h2>
<div id="attachment_2222" style="width: 949px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/02/giant-pixpoe-board-layout.png"><img class="size-full wp-image-2222" src="https://bikerglen.com/wp/wp-content/uploads/2020/02/giant-pixpoe-board-layout.png" alt="Finished board layout." width="939" height="562" /></a><p class="wp-caption-text">Finished board layout.</p></div>
<p>After finishing the schematic, I designed the circuit board. I attempted to place the components a bit closer together on this project versus the Ethernet-powered pixels project.</p>
<p>A primary concern while designing this board was to maintain at least 50 to 60 mils separation between the PoE power circuitry and the microcontroller circuitry. I don&#8217;t have the equipment to test whether this board layout successfully passes the 802.3 isolation requirements but with this separation, it at least stands a chance.</p>
<p>I ordered the boards from OSH Park and put together a bill-of-materials with their corresponding Digi-Key part numbers. Once I received notification that the boards had shipped from OSH Park, I ordered the parts from Digi-Key. This way I&#8217;d get the boards and the parts around the same time.</p>
<h2>Power Supply Bring Up</h2>
<div id="attachment_1971" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/more-poe-adventures.jpg"><img class="size-large wp-image-1971" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/more-poe-adventures-1024x575.jpg" alt="blah, blah, blah" width="640" height="359" /></a><p class="wp-caption-text">The PoE-powered RGB LED floodlight controller with the PoE and power supply circuitry populated.</p></div>
<p>After receiving the boards back from OSH Park, I brought up the PoE and power supply circuitry first. Since I learned on the Ethernet-powered pixels project not to put an LED across the rectified power from the Ethernet transformer, this board came up immediately. I used a DMM to verify the output of the Silvertel PoE module was 24 volts and I verified the board showed up as an unknown 802.3at / PoE+ device on my switch port.</p>
<h2>Microcontroller Bring Up</h2>
<div id="attachment_1960" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/GiantPixPoE-Top-2000.jpg"><img class="wp-image-1960 size-large" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/GiantPixPoE-Top-2000-1024x682.jpg" alt="circuit board with ethernet jack, magnetics, power supply, micrcontroller, and line driver stuffed." width="640" height="426" /></a><p class="wp-caption-text">The fully populated PoE-powered RGB LED floodlight controller board.</p></div>
<p>My parts order for the rest of the board arrived a bit late but I had enough parts on hand to populate the 3.3 volt power supply and the PIC18F67J60 microcontroller. I did not have the parts for the Ethernet signals or the 25 MHz oscillator so the Ethernet bring up would have to wait for later.</p>
<p>I created a new XC8 project in MPLAB X IDE that used the internal oscillator on the PIC to blink the four LEDs slowly in succession. This was enough software to verify the microcontroller could be programmed and debugged. I downloaded the software and the lights blinked exactly as expected.</p>
<p>Once the rest of the parts arrived, I populated the remainder of the board including the Ethernet circuitry, the SiTime MEMS 25 MHz oscillator, the EUI-48 serial EEPROM, and the 3.3 volt inverted serial to 24 volt inverted serial driver.</p>
<p>To verify the Ethernet circuitry worked, I downloaded the build of the software for the Ethernet-powered pixels project to this board. This build could not control the ColorBurst 4 LED floodlight but it would attempt to get an IP address using DHCP from my router which was enough functionality to verify the Ethernet circuitry functioned correctly.</p>
<p>When I plugged the board into my switch, the board powered up and received an IP address from my router. I noted that a new MAC address had appeared on my network and this MAC address was the same MAC address as the one programmed in the EUI-48. The Ethernet circuitry works!</p>
<p>The next step was to clone the software for the Ethernet-powered pixels project to a new project and modify the Art-Net UDP receive routine to send the first three channels of level data to the ColorBurst 4 fixture as DMX data. I wrote the quick DMX send routine shown below then downloaded the code to the board.</p>
<pre>        INTERRUPT_GlobalInterruptDisable();
        INTERRUPT_PeripheralInterruptDisable();
        
        // send break
        TRISCbits.TRISC6 = 0;
        LATCbits.LATC6 = 0;
        RCSTA1bits.SPEN = 0;

        __delay_us (88);

        // send mark after break
        RCSTA1bits.SPEN = 1;

        __delay_us (8);
        
        // send 0x00 followed by three art-net data bytes
        EUSART1_Write (0x00);
        EUSART1_Write (giantR);
        EUSART1_Write (giantG);
        EUSART1_Write (giantB);
        
        INTERRUPT_GlobalInterruptEnable();
        INTERRUPT_PeripheralInterruptEnable();</pre>
<p>I used an oscilloscope to verify the serial data ranged from 0 to 24 volts and the baud rate was correct. After that, I connected the ColorBurst 4 fixture to the board. The light powered up but did not respond to the levels set on my Art-Net controller. Using the scope I could see DMX packets being sent to the light with transmitted levels corresponding to the levels set by the Art-Net controller but the light did not respond.</p>
<p>Finally, I looked at the DMX-512 spec again. It requires two stop bits. The PIC18F67J60 doesn&#8217;t support two stop bits but it does support a 9-bit data transmission mode. I enabled the mode and set the 9th bit to always be a &#8216;1&#8217;. That generates a signal identical to a signal with two stop bits.</p>
<pre>        // enable 9 bit mode
        TXSTA1bits.TX9 = 1;
        TXSTA1bits.TX9D = 1;</pre>
<p>I downloaded the code to the board again and this time, success! The ColorBurst 4 responded as I varied the level sliders on my Art-Net controller software.</p>
<h2>Putting It All Together</h2>
<div id="attachment_1974" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/IMG_20191217_224700-2000.jpg"><img class="size-large wp-image-1974" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/IMG_20191217_224700-2000-1024x682.jpg" alt="blah, blah, blah" width="640" height="426" /></a><p class="wp-caption-text">The RGB LED floodlight being powered and controlled over the network. I&#8217;m using Luminair 3 by Synthe-FX on an iPad mini to send the Art-Net packets and control the LED fixture.</p></div>
<p>This project was successful. I could use software running on my iPad Mini to control the brightness and color of the light emitted by the ColorBurst 4 LED fixture and the fixture was powered using 802.3at PoE+ from my Ethernet switch.</p>
<p>A possible future iteration of this project might be to build my own RGB LED fixture, integrate the PoE+ power supply and Art-Net control circuitry in to the fixture, and design an enclosure to hold and cool everything. The enclosure would need to have a means for aiming it and securing it in position, a transparent or frosted window for the light, and an Ethernet jack on the back or bottom for powering and controlling the light.</p>
<div id="attachment_332" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2014/06/DSC_0824_2560.jpg"><img class="size-large wp-image-332" src="https://bikerglen.com/wp/wp-content/uploads/2014/06/DSC_0824_2560-1024x683.jpg" alt="Color Kinetics C200 RGB LED track fixtures hacked to be usable without the track." width="640" height="427" /></a><p class="wp-caption-text">Color Kinetics C200 RGB LED track fixtures hacked to be usable without the track.</p></div>
<p>Another thought would be to replace the control board in one of the older style Color Kinetics C-200 fixtures shown above with a board of my own design that includes PoE and controller functionality then cut a new rear panel for the light with just an opening for an Ethernet jack on it. This could be tricky depending on the amount of space available in the fixture.</p>
<h2>Design Files</h2>
<p>The design files for this project are on <a href="https://github.com/bikerglen/poe-ckcb4-floodlight">Github</a>. You can reach me about any missing files or other questions on Twitter <a href="https://twitter.com/bikerglen">@bikerglen</a>.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://bikerglen.com/blog/poe-powered-led-floodlight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PoE-Powered VFD Tube Clock</title>
		<link>https://bikerglen.com/blog/poe-vfd-tube-clock/</link>
		<comments>https://bikerglen.com/blog/poe-vfd-tube-clock/#comments</comments>
		<pubDate>Sat, 25 Jan 2020 00:54:24 +0000</pubDate>
		<dc:creator><![CDATA[Glen]]></dc:creator>
				<category><![CDATA[Ethernet]]></category>
		<category><![CDATA[Microchip]]></category>
		<category><![CDATA[PIC18]]></category>
		<category><![CDATA[Power over Ethernet (PoE)]]></category>

		<guid isPermaLink="false">https://bikerglen.com/blog/?p=2079</guid>
		<description><![CDATA[This is a vintage VFD tube clock that uses Ethernet for both power and data. The power is provided using 802.3at PoE+ and a Molex PD Jack that contains both integrated magnetics and a PoE Type 2 PD controller. The IP stack runs on a Microchip PIC18F67J60 microcontroller that has an integrated Ethernet MAC and PHY. The IP stack includes DHCP, DNS, NTP, and LLDP functionality. <a href="https://bikerglen.com/blog/poe-vfd-tube-clock/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="attachment_2083" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/5.jpg"><img class="size-large wp-image-2083" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/5-1024x682.jpg" alt="The completed and assembled PoE-powered vintage VFD tube clock." width="640" height="426" /></a><p class="wp-caption-text">The completed and assembled PoE-powered vintage VFD tube clock.</p></div>
<p>This is a vintage VFD tube clock that uses Ethernet for both power and data. The power is provided using 802.3at PoE+ and a Molex PD Jack that contains both integrated magnetics and a PoE Type 2 PD controller. The IP stack runs on a Microchip PIC18F67J60 microcontroller that has an integrated Ethernet MAC and PHY. The IP stack includes DHCP, DNS, NTP, and LLDP functionality.</p>
<p><span id="more-2079"></span></p>
<p>The clock powers up and receives its IP address and a DNS server address via DHCP. LLDP is used to negotiate 7.5 Watts of power. The clock performs a DNS lookup to get an NTP server address from <a href="http://pool.ntp.org" target="_blank" rel="noopener noreferrer">pool.ntp.org</a>. Once the clock has the address of an NTP server, it uses NTP to set the date and time. With the date and time set, the clock displays the time using the 6 VFD tubes and three MIcrochip HV5812 high-voltage display drivers. Once an hour, the clock corrects any drift using NTP.</p>
<h2>Vacuum Fluorescent Displays</h2>
<div id="attachment_2096" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/DSC01131_2000px.jpg"><img class="size-large wp-image-2096" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/DSC01131_2000px-1024x682.jpg" alt="A modern vacuum fluorescent dot matrix character display module. Circa 2008." width="640" height="426" /></a><p class="wp-caption-text">A modern vacuum fluorescent dot matrix character display module circa 2008.</p></div>
<p><a href="https://en.wikipedia.org/wiki/Vacuum_fluorescent_display">Vacuum fluorescent displays</a> occupy a niche in history between their high-voltage Nixie predecessors and their expensive-at-the-time LED successors. They can be identified by their relatively fast response times, wide viewing angles, and characteristic blue-green glow.</p>
<p>The dual-axis inclinometer photo above shows a relatively modern vacuum fluorescent display. This display is a drop-in replacement for a character LCD module. It&#8217;s visible at night, in bright sunlight, and from any angle unlike the LCD it replaced. This display module is circa 2008. Thisinclinometer was built to show the pitch and roll of my Jeep long before vehicles included this features in their instrument clusters.</p>
<div id="attachment_2094" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/DSC01124_2000px.jpg"><img class="wp-image-2094 size-large" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/DSC01124_2000px-1024x682.jpg" alt="An IV-11 VFD tube from 1989 on the left and an IV-12 VFD tube from 1992 on the right." width="640" height="426" /></a><p class="wp-caption-text">An IV-11 VFD tube from 1989 on the left and an IV-12 VFD tube from 1992 on the right.</p></div>
<p>This clock project uses even older VFD tubes. The tubes are available in a variety of formats. In the photo above are two styles of VFD tubes. The tube on the left is an IV-11 display tube from 1989. The tube on the right is an IV-12 display tube from 1991. The only real difference between these tubes is the IV-11 on the left has a right-hand decimal point and wire leads while the IV-12 tube on the right lacks a decimal point altogether and has pins to mount the tube in a socket.</p>
<p>A Nixie tube requires 170 V DC to drive the tube&#8217;s anode. Vacuum fluorescent display tubes only require 25 V DC. As a result, they&#8217;re much easier to drive. Both tubes have a grid, a heater, and an anode per display segment. The electrical requirements for each are displayed in the table below:</p>
<table>
<tbody>
<tr>
<th></th>
<th>Volts</th>
<th>Minimum Current</th>
<th>Nominal Current</th>
<th>Maximum Current</th>
</tr>
<tr>
<td>Heater</td>
<td>1.5 V</td>
<td>90 mA</td>
<td>100 mA</td>
<td>110 mA</td>
</tr>
<tr>
<td>Grid</td>
<td>25 V</td>
<td>12 mA</td>
<td>&#8212;</td>
<td>17 mA</td>
</tr>
<tr>
<td>Anode / Display Segment</td>
<td>25 V</td>
<td>3 mA</td>
<td>&#8212;</td>
<td>5 mA</td>
</tr>
</tbody>
</table>
<p>With six tubes, the worst case heater current consumption is 6 tubes * 1.5 V * 0.110 A = 0.99 W. With six tubes, the worst case grid power consumption is 6 tubes * 25 V * 0.017 A = 2.55 W. With six tubes, the worst case segment power consumption is 6 tubes * 7 segments * 25 V * 0.005 A = 5.25 W. A six digit clock is then going to need a 1.5 V power supply capable of supplying 0.99 Watts and a 25 V power supply capable of supplying 7.8 Watts.</p>
<p>I decided to use the IV-12 tubes with the pins for sockets on their base. In the event of a mistake on one of my PCBs, I could unplug the tubes and re-use them on a corrected board. In the event of a failed tube, I could swap tubes on the project without significant PCB rework.</p>
<h2>VFD Tube PCB Footprint</h2>
<div id="attachment_2086" style="width: 528px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/iv-12_s.jpg"><img class="size-full wp-image-2086" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/iv-12_s.jpg" alt="This is the only IV-12 tube diagram I could find showing the positions of the pins on the bottom of the tube." width="518" height="478" /></a><p class="wp-caption-text">This is the only IV-12 tube diagram I could find showing the positions of the pins on the bottom of the tube.</p></div>
<p>After deciding on a tube to use for the clock project, the next step was to generate a schematic symbol and PCB footprint for the tube. I had a very hard time finding the diameter and spacing of the tube&#8217;s pins. I finally found a single low resolution image (reproduced above) on an eBay listing for the tubes. Of course, it doesn&#8217;t say if that&#8217;s a top or bottom view of the tube or which direction the front of the tube faces.</p>
<div id="attachment_2088" style="width: 600px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/iv-12-symbol.png"><img class="wp-image-2088 size-full" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/iv-12-symbol.png" alt="iv-12 symbol" width="590" height="284" /></a><p class="wp-caption-text">IV-12 VFD tube schematic symbol. I have no idea which anode pin corresponds to which display segment but I will be able to remap them in software so it doesn&#8217;t really matter.</p></div>
<p>I created a schematic symbol for the VFD tube. The left pin is the grid anode, the bottom two pins are the heater pins, and the top seven pins are the segment anodes.</p>
<p>After creating the schematic symbol, I created a PCB footprint for the part. I used the geometry from the data sheet and visual inspection of the base of the tube to create a Matlab / Octave script that creates an Eagle script to place the 11 pins and label them with their pin numbers. Here&#8217;s the Matlab / Octave code:</p>
<pre>first = -(180-(360-306)/2);
increment = +34;
count = 10;
radius = 11.9 / 2;
text_radius = radius - 2;
drill = 1.95;

fprintf (1, 'grid mm;\n');
fprintf (1, 'change align bottom-center;\n');
fprintf (1, 'change size 32mil;\n');
fprintf (1, 'change font vector;\n');
fprintf (1, 'change ratio 16;\n');
fprintf (1, 'change drill %5.2f;\n', drill);

for i=1:count
  angle = first + (i-1) * increment;
  x = cos (angle / 180 * pi);
  y = sin (angle / 180 * pi);
  xp = x * radius;
  yp = y * radius;
  xt = x * text_radius;
  yt = y * text_radius;
  at = 90 + angle;
  %fprintf (1, "%4d %8.4f %8.4f\n", angle, x, y);
  fprintf (1, "pad '%d' round 0 (%8.4f %8.4f);\n", i, xp, yp);
  if (angle &gt;= 0) 
    fprintf (1, "text '%d' sr%d (%8.4f %8.4f);\n", i, round(at), xt, yt);
  else
    fprintf (1, "text '%d' r%d (%8.4f %8.4f);\n", i, round(at), xt, yt);
  endif
endfor</pre>
<p>Running this code produces the following Eagle script:</p>
<pre>grid mm;
change align bottom-center;
change size 32mil;
change font vector;
change ratio 16;
change drill  1.95;
pad '1' round 0 ( -5.3015  -2.7012);
text '1' r-63 ( -3.5195  -1.7933);
pad '2' round 0 ( -2.8846  -5.2040);
text '2' r-29 ( -1.9150  -3.4547);
pad '3' round 0 (  0.5186  -5.9274);
text '3' r5 (  0.3443  -3.9350);
pad '4' round 0 (  3.7445  -4.6240);
text '4' r39 (  2.4858  -3.0697);
pad '5' round 0 (  5.6900  -1.7396);
text '5' r73 (  3.7774  -1.1549);
pad '6' round 0 (  5.6900   1.7396);
text '6' sr107 (  3.7774   1.1549);
pad '7' round 0 (  3.7445   4.6240);
text '7' sr141 (  2.4858   3.0697);
pad '8' round 0 (  0.5186   5.9274);
text '8' sr175 (  0.3443   3.9350);
pad '9' round 0 ( -2.8846   5.2040);
text '9' sr209 ( -1.9150   3.4547);
pad '10' round 0 ( -5.3015   2.7012);
text '10' sr243 ( -3.5195   1.7933);</pre>
<p>Running this script in the Eagle PCB library editor produced the bulk of the following footprint:</p>
<div id="attachment_2089" style="width: 479px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/iv-12-package.png"><img class="wp-image-2089 size-full" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/iv-12-package.png" alt="iv-12 package" width="469" height="479" /></a><p class="wp-caption-text">Finished IV-12 VFD tube PCB footprint.</p></div>
<p>After running the script,  I added an outline of the tube, labeled the front, and added some notes about which pins should be connected to which supplies. While researching this project, I came across one note that said the displays appeared brighter when 1.5 V is connected to pin 2 and ground is connected to pin 3 rather than the other way around. I did not verify that guidance but decided to follow it anyway.</p>
<p>The drills for the pads are 1.95 or 2.00 mm in diameter. These holes accommodate Harwin H3161-01 pin sockets for 1 mm pins. These are press fit into the holes in the PCB then soldered into place. The tube pins are 1 mm in diameter and fit in these pins easily. I used 1.95 mm drills on the clock but would use 2.00 mm drills on future versions.</p>
<h2>VFD Tube Socket Test Board</h2>
<div id="attachment_2091" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/IMG_20200102_180018_2000px.jpg"><img class="wp-image-2091 size-large" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/IMG_20200102_180018_2000px-1024x576.jpg" alt="IMG_20200102_180018_2000px" width="640" height="360" /></a><p class="wp-caption-text">Test board to verify the placement of the sockets and how well the tube fits in the sockets.</p></div>
<p>After designing the schematic symbol and PCB footprint, I created a small test board to verify the placement of the sockets and how well the tube fits in the sockets. I powered on a segment on the tube to verify the location of the ground, heater, grid, and segment pins. Everything fit so I knew I had a good PCB footprint to use on the final clock board.</p>
<p>I included a <a href="https://www.microchip.com/wwwproducts/en/HV5812">Microchip HV5812</a> high-voltage display driver and <a href="http://Texas Instruments SN74LVC8T245">Texas Instruments SN74LVC8T245</a> level shifter on the test board to test my circuit for controlling the tube but ultimately skipped testing the circuit before releasing the real boards.</p>
<h2>Designing the Clock</h2>
<h3>Mechanical Design</h3>
<div id="attachment_2105" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/DSC_2115_2000px.jpg"><img class="size-large wp-image-2105" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/DSC_2115_2000px-1024x681.jpg" alt="My six tube IN-18 Nixie tube clock from 2018." width="640" height="426" /></a><p class="wp-caption-text">My six tube IN-18 Nixie tube clock from 2018.</p></div>
<p>With the ground work out of the way, it was time to start designing the clock. I wanted to give it a similar aesthetic to the six-digit IN-18 Nixie tube clock shown above that I designed in 2018. The IN-18 clock uses a <a href="https://www.frontpanelexpress.com/housings">CNC&#8217;d anodized aluminum enclosure with some extruded aluminum profiles</a> on either end to hold everything together. The dimensions of the end profiles are shown in the diagram below.</p>
<div id="attachment_2110" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/profile1.png"><img class="size-large wp-image-2110" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/profile1-1024x593.png" alt="Front Panel Express enclosure profile #1 dimensions." width="640" height="371" /></a><p class="wp-caption-text">Front Panel Express enclosure profile #1 dimensions.</p></div>
<p>The &#8220;A&#8221; slots in the profiles are designed to hold 1.6 mm thick circuit boards. I wanted to decrease the depth and width of the VFD clock versus the Nixie clock. This would require using the slots in the profiles to hold the circuit board versus using screws through the top panel like I did on the Nixie clock. You can see the four screws to be eliminated on the top panel in the photo of the Nixie clock above.</p>
<h3>Electrical Design</h3>
<p>Next I turned my attention to the electrical hardware. The clock would require a microcontroller with Ethernet capable of using NTP to set the date and time, a display driver capable of sourcing 25 Volts, a bunch of power supplies, and use 802.3af/at for PoE/PoE+ for power.</p>
<h4>Microcontroller</h4>
<div id="attachment_2028" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/minimal-ethernet-circuit.png"><img class="size-large wp-image-2028" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/minimal-ethernet-circuit-1024x771.png" alt="PIC18F67J60 minimal Ethernet circuit." width="640" height="482" /></a><p class="wp-caption-text">PIC18F67J60 minimal Ethernet circuit.</p></div>
<p>I decided to use the <a href="https://www.microchip.com/wwwproducts/en/PIC18F67J60">Microchip PIC18F67J60</a> for a microcontroller. The Microchip PIC18F67J60 includes both an internal Ethernet MAC and PHY and the Microchip Code Configurator includes software libraries for NTP. Most importantly, I had good luck with this microcontroller on my <a href="https://bikerglen.com/blog/ethernet-powered-pixels/">Ethernet-Powered Pixels project</a>. This microcontroller requires a 3.3 V supply.</p>
<h4>Display Segment Driver</h4>
<div id="attachment_2112" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/hv5812-high-voltage-outputs.png"><img class="size-large wp-image-2112" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/hv5812-high-voltage-outputs-1024x931.png" alt="HV5812 high-voltage output configuration." width="640" height="582" /></a><p class="wp-caption-text">HV5812 high-voltage output configuration.</p></div>
<p>To drive the segments on the VFD tubes, I used a <a href="https://www.microchip.com/wwwproducts/en/HV5812">Microchip HV5812</a> 20-channel serial-input display driver. These display drivers have full totem-pole outputs and are rated for 80 V. The data sheet implies each output is capable of sourcing at least 25 mA. Since each segment requires only 3 to 5 mA at 25 V, these parts are more than adequate for driving the VFD tube segments. One HV5812 would be used for every two tubes.</p>
<p>The only downside is these parts require a 5 V supply and their inputs are referenced to this supply. If these parts were capable of running from 3.3 V, that would have eliminated the need for a 5 V power supply and level translator in this design.</p>
<h4>Power Supplies</h4>
<p>This design requires four power supply voltages. The tubes require 25 V and 1.5 V, the HV5812 drivers require 5 V, and the microcontroller requires 3.3 V. The 1.5 V, 3.3 V, and 5 V supplies will be powered from the 25 V supply. The 25 V supply will be powered from the 37 to 57 volt PoE supply.</p>
<p>I used CUI point-of-load, non-isolated DC/DC converters for the 1.5 V, 3.3 V, and 5 V supplies. The 3.3 V supply is a through-hole V7805-500 module. For the 1.5 V and 5 V supplies, I needed a shorter package than the V780x-500 and V780x-1000 modules so that the modules could fit between two boards separated by 11 mm. I used a V78E01-1000-SMT and V7805-500-SMT for the 1.5 V and 5 V supplies respectively. These are only 8.25 mm tall so they&#8217;ll easily fit between the two boards.</p>
<p>For the 25 V supply, I used a CUI PDQE20-Q48-S24-D isolated DC/DC converter. This module is a 24 V, 20 W converter and has a wide input voltage range of 18 to 75 V that will work with the PoE supply voltage of 37 to 57 V. This supply also has an adjustment input for fine tuning the voltage output. I ran through the math on the data sheet and figured with a resistor somewhere in the range of 55k, I could adjust the voltage output up to 25 V.</p>
<h4> 802.3af PoE / 802.3at PoE+ Power</h4>
<div id="attachment_2057" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/poe-pd-devices.jpg"><img class="size-large wp-image-2057" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/poe-pd-devices-1024x684.jpg" alt="A bunch of different PoE+ PD components including two Molex PD jacks, two TI TPS2378 ICs, a TI TPS2378 evaluation board, and a Silvertel PoE+ PD 24 VDC module." width="640" height="428" /></a><p class="wp-caption-text">A bunch of different PoE+ PD components including two Molex PD jacks, two TI TPS2378 ICs, a TI TPS2378 evaluation board, and a Silvertel PoE+ PD 24 VDC module.</p></div>
<p>For this project, I decided to use a <a href="https://www.molex.com/molex/products/datasheet.jsp;jsessionid=iF_MJ_iUK_6EHRKKXtnSSxIiYIpPB7SB6O8dgCzx.molex1?part=active/0857914020_MODULAR_JACKS_PLUG.xml">Molex 85791-4020 PD Jack</a> for the 802.3at / PoE+ functionality. This Ethernet jack contains both integrated magnetics and Type 2 / Class 4 PoE+ classification circuitry. This one jack, shown on the left in the photo above, replaces most of the components on the evaluation board shown in the top-right of the photo.</p>
<div id="attachment_2125" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/pd-jack-block-diagram.png"><img class="size-large wp-image-2125" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/pd-jack-block-diagram-1024x278.png" alt="Molex 85791-x020 PD Jack block diagram." width="640" height="174" /></a><p class="wp-caption-text">Molex 85791-x020 PD Jack block diagram.</p></div>
<p>The jack, in addition to the integrated Ethernet magnetics, contains all the circuitry required to perform 802.3at / PoE+ classification. This includes the bridge rectifiers, transient suppression diodes, detection capacitance, detection resistance, and an integrated <a href="https://www.microsemi.com/product-directory/poe-pd-front-end-w-pwm-controller/4783-pd70200">Microchip PD70200 PoE classification IC</a>. The block diagram from the datasheet is shown above. These jacks are bulky and expensive but for a one-off, hand-built prototype like this VFD clock, the reduction in parts count and assembly time was worth it to me.</p>
<h2>Power / Control Board Function Split</h2>
<div id="attachment_2123" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/block-diagram.png"><img class="size-large wp-image-2123" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/block-diagram-1024x521.png" alt="Block diagram of the clock project. The power / controller board contains the functions left of the dotted line. The tube / driver board contains the functions right of the dotted line." width="640" height="326" /></a><p class="wp-caption-text">Block diagram of the clock project. The power / controller board contains the functions left of the dotted line. The tube / driver board contains the functions right of the dotted line.</p></div>
<p>Based on my experience designing the Nixie IN-18 clock, I knew the tube sockets, segment drivers, microcontroller, and power supplies would not fit on a single board and a two board stack would be required to hold all the components.</p>
<p>I decided to place the PoE and microcontroller circuitry and the 25 V and 3.3 V power supplies on a power / controller board and the level translator, segment drivers, tube sockets, and 1.5 V and 5 V power supplies on a tube / driver board. The boards are connected together using headers. The headers supply 25 V, a SPI interface, and the reference voltage for the SPI interface from the power / controller board to the tube / driver board.</p>
<p>This split would prove advantageous during board bring up because the power / controller board contains everything needed to run the microcontroller and the tube / driver board contains everything needed to power and control the tubes with a single 25 V supply and a SPI interface.</p>
<h2>Tube / Driver Board Design</h2>
<h3>Schematic</h3>
<div id="attachment_2127" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/tube-board-page-1.png"><img class="size-large wp-image-2127" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/tube-board-page-1-1024x681.png" alt="Schematic of the tube / driver board." width="640" height="426" /></a><p class="wp-caption-text">Schematic of the tube / driver board.</p></div>
<p>The schematic for the tube / driver board is shown above. It consists of three main sections: power input, data input, and the tubes and drivers.</p>
<p>The main power input is 25 VDC on J1. This voltage feeds the 1.5 V and 5 V converters to generate the voltages needed for the tubes&#8217; heaters and the display drivers.</p>
<p>The data input on J2 consists of clock, data, latch, and blank signals. The logic levels of these signals are referenced to the voltage on J2-6 which can range from 1.8 to 5 V. In the case of our design, this is 3.3 V. This board could be used unmodified with a 5 V output microcontroller like the one on an Arduino by connecting J2-6 to +5 V instead of +3.3 V.</p>
<p>The tube drivers are Microchip HV5812 serial input high-voltage display drivers. The data signals are daisy chained between the three parts while the clock, latch, and blank signals are connected in parallel to all the parts. The tubes use the tube library symbol and footprint previously designed and tested on the tube socket test board.</p>
<h3>Board</h3>
<div id="attachment_2131" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/tube-board.png"><img class="size-large wp-image-2131" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/tube-board-1024x245.png" alt="Finished tube / driver board layout." width="640" height="153" /></a><p class="wp-caption-text">Finished tube / driver board layout.</p></div>
<p>Once the schematic was done, I designed a board in Eagle PCB. The tube pin sockets are located on the bottom of the board and the tubes extend into the screen with their fronts facing toward the bottom of the screen. The power supplies, display drivers, connectors and passives are located on the top of the board. After the design was done, the board&#8217;s width was extended to mount the board in the slots on the extruded aluminum profiles that form the sides of the enclosure.</p>
<div id="attachment_2132" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/e9bcbd5fe15f64bbe79c2febc33f3669.png"><img class="size-large wp-image-2132" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/e9bcbd5fe15f64bbe79c2febc33f3669-1024x207.png" alt="Tube board top." width="640" height="129" /></a><p class="wp-caption-text">Tube board top.</p></div>
<p>I uploaded the design files to OSH Park and checked the board renders. Above is a render of the top side of the board.</p>
<div id="attachment_2134" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/1319b0c1de78b8adad725ed08438f4dc.png"><img class="size-large wp-image-2134" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/1319b0c1de78b8adad725ed08438f4dc-1024x207.png" alt="Tube board bottom." width="640" height="129" /></a><p class="wp-caption-text">Tube board bottom.</p></div>
<p>Above is a render of the bottom side of the board. Once I was happy with the renders and had verified the boards and their components fit in the enclosure using Fusion 360, I placed an order for the boards at OSH Park.</p>
<h2>A Complication and Another Test Board</h2>
<div id="attachment_2139" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/pgood-test-board.jpg"><img class="size-large wp-image-2139" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/pgood-test-board-1024x683.jpg" alt="Open-drain, active-low power good to open-drain, active-low converter disable test board. Rated for 60 V operation." width="640" height="427" /></a><p class="wp-caption-text">Open-drain, active-low power good to open-drain, active-low converter disable test board. Rated for 60 V operation.</p></div>
<p>One wrinkle to be solved before designing the power / control board was how to connect the Molex PD jack&#8217;s open-drain, active-low power good signal to the 24 V DC/DC converter&#8217;s active-low converter disable input.</p>
<p>The PD jack pulls its power good output low to indicate that the power is good and the external DC/DC converter should be enabled. The DC/DC converter has a converter disable input that disables the converter when it is pulled low.</p>
<p>I needed a circuit that will hold the converter disable input low while the power good signal is not pulled low and will release the converter disable input when the power good signal is pulled low. And the only power supply rail available is the 37 to 57 V PoE power.</p>
<div id="attachment_2140" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/power-good-test-board-schematic.png"><img class="size-large wp-image-2140" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/power-good-test-board-schematic-1024x363.png" alt="Open-drain, active-low power good to open-drain, active-low converter disable test board schematic. Rated for 60 V operation." width="640" height="227" /></a><p class="wp-caption-text">Open-drain, active-low power good to open-drain, active-low converter disable test board schematic. Rated for 60 V operation.</p></div>
<p>I solved this problem by designing the circuit shown in the schematic above. Ignore R1, D1, C1, D3, and R4. When /PGOOD is open, it&#8217;s pulled high by R2. Zener diode D2 limits the voltage when /PGOOD is pulled high to 5.1 V so as not exceed Q1&#8217;s maximum VGS. In this case, Q1 conducts and connects the /CDB output to ground thus disabling the DC/DC converter. When /PGOOD is pulled low, the gate of Q1 is pulled low and Q1 stops conducting. The allows the /CDB output to float high and enables the DC/DC converter.</p>
<p>To test the circuit, I built a small test board. Only D2, R2, R3, and Q1 were stuffed on the test board. I connected the V+ and V- rails on the test board (TP1 and TP3 respectively) to a bench power supply set for 60 V. I connected the power outputs (TP4 and TP6) to the converter&#8217;s DC input and the /CDB output (TP5) to the converter&#8217;s converter disable input.</p>
<p>I then turned on the bench power supply and verified the converter&#8217;s output was disabled. After placing a jumper between /PGOOD (TP2) and V- (TP3), I verified the converter&#8217;s output was enabled. I disconnected and connected the jumper a few more times to verified the converter&#8217;s output was on only when the /PGOOD signal was connected to V-.</p>
<h2>Power / Controller Board Design</h2>
<h3>Schematic</h3>
<div id="attachment_2128" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/control-board-page-1.png"><img class="size-large wp-image-2128" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/control-board-page-1-1024x681.png" alt="First page of the schematic for the power / control board." width="640" height="426" /></a><p class="wp-caption-text">First page of the schematic for the power / control board.</p></div>
<p>After designing the tube board and verifying the converter enable/disable circuit, I designed the schematic for the power / control board. Page 1 of the schematic is shown above and page 2 of the schematic is shown below.</p>
<div id="attachment_2129" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/control-board-page-2.png"><img class="size-large wp-image-2129" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/control-board-page-2-1024x681.png" alt="Second page of the schematic for the power / control board." width="640" height="426" /></a><p class="wp-caption-text">Second page of the schematic for the power / control board.</p></div>
<p>This is basically the same circuit that I used for the <a href="https://bikerglen.com/blog/ethernet-powered-pixels/">Ethernet-powered pixels</a> project but with the following changes:</p>
<ol>
<li>Ethernet jack, magnetics, and PoE classification circuitry have been replaced by the Molex PD Jack.</li>
<li>The addition of the /PGOOD to /CDB active-low, open-drain inverter circuit.</li>
<li>The 5 V, 20 W converter is now a 24 V, 20 W converter and its adjustment pin is connected to a variable resistor to permit adjustment of the output voltage up to 25 V.</li>
<li>The 25 V and 3.3 V power rails, the SPI data and clock, and two GPIO signals are routed to header sockets that connect to the tube / driver board.</li>
</ol>
<p>After the schematic was complete I moved on to designing the board.</p>
<h3>Board</h3>
<div id="attachment_2136" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/control-board.png"><img class="size-large wp-image-2136" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/control-board-1024x317.png" alt="Finished control board layout." width="640" height="198" /></a><p class="wp-caption-text">Finished control board layout.</p></div>
<p>On the initial revision of the board, I had the power supply circuitry next to the Ethernet jack and the microcontroller on the right hand side of the board. I decided the Ethernet traces between the jack and the microcontroller were too long so I moved the microcontroller to the center of the board and moved the power supply circuitry to the right-hand side of the board.</p>
<p>The thick dashed white line is a 56 mil isolation gap between the PoE power circuitry and the isolated microcontroller circuitry. This board is less wide than the tube / driver board because it needs to fit between the extruded aluminum side profiles rather in the slots on the profiles.</p>
<div id="attachment_2135" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/ce289e122b221a78ad8664e465654bac.png"><img class="size-large wp-image-2135" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/ce289e122b221a78ad8664e465654bac-1024x236.png" alt="Controller board top." width="640" height="148" /></a><p class="wp-caption-text">Controller board top.</p></div>
<p>I uploaded the design files to OSH Park and checked the board renders. Above is a render of the top side of the board.</p>
<div id="attachment_2133" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/825885b0465ec7412896a6f7fe7fa5b8.png"><img class="size-large wp-image-2133" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/825885b0465ec7412896a6f7fe7fa5b8-1024x236.png" alt="Controller board bottom." width="640" height="148" /></a><p class="wp-caption-text">Controller board bottom.</p></div>
<p>Above is a render of the bottom side of the board. Once I was happy with the renders and had verified the boards and their components fit in the enclosure using Fusion 360, I placed an order for the boards at OSH Park.</p>
<h2>Enclosure Design</h2>
<div id="attachment_2066" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/clock-2-v11-cropped-jpg.jpg"><img class="size-large wp-image-2066" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/clock-2-v11-cropped-jpg-1024x683.jpg" alt="Rear view of the PoE-powered VFD tube clock enclosure." width="640" height="427" /></a><p class="wp-caption-text">Rear view of the PoE-powered VFD tube clock enclosure.</p></div>
<p>The enclosure was designed using Front Panel Express&#8217;s software, their enclosure design manual, and the side profile enclosure macros built into the software. Once the enclosure was designed, I exported DXF files from their software and imported them into Fusion 360.</p>
<p>Inside Fusion 360, I extruded the shapes in the DXF files into bodies with their actual thicknesses and assembled the enclosure. I used Eagle PCB&#8217;s integration with Fusion 360 to import my empty circuit boards into Fusion 360 and placed the boards in the enclosure. Rather than model all the components on the board, I placed only the larger components that I thought might cause interference with the boards or the enclosure.</p>
<div id="attachment_2148" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/clock-2-v11.png"><img class="size-large wp-image-2148" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/clock-2-v11-1024x819.png" alt="Enclosure design showing boards and their position in the enclosure." width="640" height="512" /></a><p class="wp-caption-text">Enclosure design showing boards and their position in the enclosure.</p></div>
<p>Above is an image captured in Fusion 360 showing the enclosure, the placement of the boards inside the enclosure, and the placement of the lager components on the boards. Once I was happy with the enclosure design, I ordered the panels from Front Panel Express.</p>
<h2>Enclosure Test Fit</h2>
<div id="attachment_2138" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/DSC01051-cropped.jpg"><img class="size-large wp-image-2138" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/DSC01051-cropped-1024x682.jpg" alt="Test fit of the enclosure panels, boards, and Ethernet jack." width="640" height="426" /></a><p class="wp-caption-text">Test fit of the enclosure panels, boards, and Ethernet jack.</p></div>
<p>After what seemed like an eternity, my enclosure panels and circuit boards arrived. I assembled the enclosure but left the front panel off then bolted the two boards together using M3 x 11 mm spacers and placed the Ethernet jack in its footprint on the power / control board. I slid the boards into the top slot of the enclosure and the Ethernet jack aligned perfectly with the cut out in the rear panel.</p>
<p>I failed to account for the tabs that OSH Park uses to panelize their customers&#8217; boards together though. I had to use a file to file down the tabs to get a smooth edge on all the boards for them to fit in the enclosure. Next time I would bring each of the two long edges in 0.25 mm (0.5 mm narrower total) to cut down on the amount of filing I had to do and account for OSH Park&#8217;s manufacturing tolerances.</p>
<h2>Tube / Driver Board Bring Up</h2>
<p><iframe src="https://www.youtube.com/embed/TnCH3Bg95Ik" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<p>I decided to stuff and bring up the tube / driver board first. I populated the ICs, followed by the DC/DC converters, passives, and pin headers. While soldering these, I taped off the pin socket holes so I wouldn&#8217;t accidentally drag the iron across them and fill any of the holes with solder. Cleaning them out well enough to insert the socket pins would be difficult.</p>
<p>Once all the other parts were soldered on the board, I pushed the 60 pin sockets through the holes on the board. I had to use a make shift tool (broken chopstick) and some force to seat them in their holes. Next time, I&#8217;d use at least a 2.00 mm drill instead of a 1.95 mm drill for the holes to make inserting the pin sockets easier. Lastly, I soldered the pins in place.</p>
<p>To bring up and test the board, I used my Keysight bench power supply and a Particle Photon board. I set the bench power supply to supply 25 V at 100 mA and 5 V at 350 mA. I connected the 25 V to the power header on the tube / driver board and the 5 V to the micro USB connector on the Particle Photon.</p>
<p>I then connected the ground, SPI clock and data lines, and two GPIOs from the Particle Photon to the data connector on the tube board. I also connected the Particle Photon&#8217;s 3.3 V output to the 3.3 V input on the data connector to supply the input side of the level translator IC on the tube / driver board.</p>
<p>With the hardware connections complete, I turned to writing some software to permit the display of numeric strings on the tubes. The hardest part of this was mapping the 64 bits sent using the SPI interface to the 42 segments of the VFD tubes.</p>
<p>After figuring out the mapping, I wrote a function to display a numeric string on the tubes and registered it with the Particle Cloud. I could then use the Particle Console to send a string like &#8220;123456,&#8221; &#8220;&#8212;&#8212;,&#8221; or &#8220;******&#8221; to display on the tubes. Any character place with a &#8216;*&#8217; shows the spinning segments animation. The result of this effort is shown in the video above. Success!</p>
<h2>Power Supply Bring Up and Adjustment</h2>
<div id="attachment_2142" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/DSC01064-cropped.jpg"><img class="size-large wp-image-2142" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/DSC01064-cropped-1024x682.jpg" alt="Power supply bring up successful!" width="640" height="426" /></a><p class="wp-caption-text">Power supply bring up successful!</p></div>
<p>After bringing up the tube / driver board successfully, I decided it was time to focus on the PoE and power supply circuitry. I stuffed the PoE and power supply components on the power / control board and attached a DMM to the +24 V and ground test points.</p>
<p>I connected the board to my Ethernet switch. After a second or two, the LEDs lit indicating the 24 V and 3.3 V supplies were operating. I used a small screwdriver to adjust the 25-turn variable resistor until the DMM read 25 volts. I then moved the DMM to the +3.3 V test point and verified the 3.3 V supply was really 3.3 volts.</p>
<h2>Power / Control Board Bring Up</h2>
<div id="attachment_2143" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/4.jpg"><img class="size-large wp-image-2143" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/4-1024x682.jpg" alt="Power / control board microcontroller bringup successful!" width="640" height="426" /></a><p class="wp-caption-text">Power / control board microcontroller bring up successful!</p></div>
<p>Finally it was time to stuff the microcontroller and Ethernet parts on the power / control board. This is a tedious process because of the sheer number of passives. To aid in the process, I put the reference designators from the schematic in the customer data field when placing my Digi-Key order. This way each of the bags of passives was labeled with where they went on the circuit board. Genius.</p>
<p>After stuffing the board, I connected my MPLAB REAL ICE programmer and a 3.3 V serial cable to the board and downloaded the software from the Ethernet-powered pixels project to the board. I watched on the serial console as the board booted and obtained an IP address via DHCP from my router.</p>
<p>This was enough to prove almost all of the hardware worked. I connected the boards together and placed them inside the enclosure. I left the front of the enclosure off so that the serial cable and debugger could stay connected. It was all software now.</p>
<h2>The Software</h2>
<p><iframe src="https://www.youtube.com/embed/RXZ56NHuO3g" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<p>I used the Microchip Code Configurator to build a new project for the PIC18F67J60 microcontroller. I enabled all the Ethernet protocols this time: DHCP, DNS, UDP, TCP, NTP, and LLDP. To make the code that handles the interaction between the display tubes and the IP protocols easier to follow, I moved some of the higher-level code that deals with the sequencing of DHCP, DNS, NTP, and LLDP operations out of the network_manage function and in to the main function.</p>
<p>At boot, the software initializes the microcontroller&#8217;s peripherals, turns all the VFD tube segments off, and reads its Ethernet MAC address from a <a href="https://www.microchip.com/wwwproducts/en/25AA02E48">Microchip 25AA02E48</a> serial EEPROM with built-in globally unique Ethernet MAC address. After initialization is complete, the software spins the segments on the tubes until an IP address and DNS server IP address are assigned to the clock using DHCP. The software then displays the IP address twice and the DNS server IP address twice. The video above shows an early version of the software that gets an IP address for the clock via DHCP and displays it three times.</p>
<p>While the IP addresses are scrolling, the software is performing a DNS query to pool.ntp.org to get the IP address of an NTP time server. Once received, the NTP server IP adresss is displayed and the NTP server is queried for the current date and time. The received date and time is set then updated once per second using the 25 MHz SiTime MEMS oscillator for the time base.</p>
<p>The software applies time zone and daylight savings time correction to the received time and scrolls that across the tubes. After two scrolls of the date and time, the clock goes into &#8220;be a clock&#8221; mode where it displays the current TZ and DST corrected time on the tubes until the next reboot. Once an hour, a new NTP server is requested from pool.ntp.org and the time is re-synchronized.</p>
<h2>The Finished Clock</h2>
<div id="attachment_2144" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/1.jpg"><img class="size-large wp-image-2144" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/1-1024x682.jpg" alt="Finished and assembled clock. Front view." width="640" height="426" /></a><p class="wp-caption-text">Finished and assembled clock. Front view.</p></div>
<p>Front view of the finished clock with the Ethernet cable connected.</p>
<div id="attachment_2145" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/2.jpg"><img class="size-large wp-image-2145" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/2-1024x682.jpg" alt="Finished and assembled clock. Rear view." width="640" height="426" /></a><p class="wp-caption-text">Finished and assembled clock. Rear view.</p></div>
<p>Rear view of the finished clock with the Ethernet cable connected.</p>
<div id="attachment_2147" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2020/01/3.jpg"><img class="size-large wp-image-2147" src="https://bikerglen.com/wp/wp-content/uploads/2020/01/3-1024x682.jpg" alt="Internal view of the clock with the debugger and serial console cable still connected." width="640" height="426" /></a><p class="wp-caption-text">Internal view of the clock with the debugger and serial console cable still connected.</p></div>
<p>Interior view of the finished clock with the Ethernet cable connected.</p>
<h2>Ideas for the Future</h2>
<p>I&#8217;m thinking about upgrading the power / control board to use an ATSAMD21 with the Wiznet W5500 Ethernet PHY/MAC. This processor would have enough power to allow the clock to make RESTful queries to NOAA and the NWS to display the current temperature or forecast temperatures in addition to the time. The PIC18F67J60 could make these queries too but the XML formatted responses might be tough to parse with the limited memory on the PIC18.</p>
<h2>Design Files</h2>
<p>The design files for this project are on <a href="https://github.com/bikerglen/poe-vfd-clock">Github</a>. You can reach me about any missing files or other questions on Twitter <a href="https://twitter.com/bikerglen">@bikerglen</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://bikerglen.com/blog/poe-vfd-tube-clock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s an Ethernet-Powered Christmas Tree!</title>
		<link>https://bikerglen.com/blog/ethernet-powered-pixels/</link>
		<comments>https://bikerglen.com/blog/ethernet-powered-pixels/#comments</comments>
		<pubDate>Sun, 29 Dec 2019 20:45:21 +0000</pubDate>
		<dc:creator><![CDATA[Glen]]></dc:creator>
				<category><![CDATA[DMX / Art-Net]]></category>
		<category><![CDATA[Ethernet]]></category>
		<category><![CDATA[Lighting]]></category>
		<category><![CDATA[Microchip]]></category>
		<category><![CDATA[PIC18]]></category>
		<category><![CDATA[Power over Ethernet (PoE)]]></category>
		<category><![CDATA[RGB LED]]></category>

		<guid isPermaLink="false">https://bikerglen.com/blog/?p=1979</guid>
		<description><![CDATA[The lighted tree in the video above gets both the power and data for its RGB LED pixels using a single Ethernet cable. Power for the pixels is supplied from an Ethernet switch using the 802.3at PoE+ standard. Data for &#8230; <a href="https://bikerglen.com/blog/ethernet-powered-pixels/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><iframe src="https://www.youtube.com/embed/0Oo144LTxu4" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe><br />
The lighted tree in the video above gets both the power and data for its RGB LED pixels using a single Ethernet cable. Power for the pixels is supplied from an Ethernet switch using the 802.3at PoE+ standard. Data for the pixels comes from software running on a PC that generates Art-Net packets at 40 Hz. Each Art-Net packet contains the RGB levels for all the pixels on the tree. Let&#8217;s take a closer look at the technical details and how this tree came into existence.</p>
<p><span id="more-1979"></span></p>
<h2>Motivation</h2>
<div id="attachment_1997" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/goalz.jpg"><img class="size-large wp-image-1997" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/goalz-1024x682.jpg" alt="Philips Color Kinetics iColor Flex LMX setup with the AC power data supply, proprietary leader cable, and 50 pixels." width="640" height="426" /></a><p class="wp-caption-text">Philips Color Kinetics iColor Flex LMX setup with the AC power data supply, proprietary leader cable, and 50 pixels.</p></div>
<p>A few weeks ago, I wrote a post where I <a href="https://bikerglen.com/blog/reverse-engineering-the-icolor-flex-protocol/">reversed engineered</a> some Philips Color Kinetics iColor Flex RGB LED string lights. These lights require an AC power data supply that supplies 24 volts to power the pixels and transforms DMX or UDP packets of pixel data into the protocol used by the pixels. In addition to the power supply, the pixels require a proprietary leader cable to connect them to the power supply.</p>
<p>In a typical setup, you have to run AC mains power and Ethernet data to the power supply then run the leader cable to the pixels. To avoid having a large stack of power data supplies in larger setups, Color Kinetics makes a rack mount power supply that can power up to eight strings of lights. This rack mount power supply still requires a leader cable for each string of lights.</p>
<p>I&#8217;ve been wanting to build an 802.3af/at/bt Power over Ethernet design for a few years now and have always come up short on ideas and then it hit me, what if the Ethernet cable could connect closer to the pixels in the photo above? With a small box of electronics between the Ethernet cable and the connector on the end of the pixels, the pixels could receive both power and data from the Ethernet switch. No more AC mains wiring and no more proprietary leader cables.</p>
<h2>802.3af/at/bt Power over Ethernet</h2>
<p>Many Power over Ethernet schemes involve connecting the spare pairs in an Ethernet cable to an always-on 12 VDC or 24 VDC power supply. At the other end of the Ethernet wiring, the spare pairs are connected to a DC/DC converter that generates the voltages required by the device. This is fraught with problems and is not real Power over Ethernet!</p>
<p>802.3af/at/bt Power over Ethernet only supplies power to a device once a device detection and classification process completes. This process is a hardware handshake between the power sourcing equipment (PSE) and the powered device (PD). During the handshake, the PSE communicates its power sourcing capabilities to the PD and the PD communicates its power requirements to the PSE. If the PSE is capable of supplying the amount of power required by the PD, power is connected to the PD.</p>
<p>While the PD is powered, the PSE continuously monitors the current draw of the PD. If the current draw drops too low for too long, the PSE assumes the PD was disconnected and shuts down power to the PD. This process ensures power is only supplied to standards-compliant devices and only while those devices are connected.</p>
<p>In addition to the hardware handshake, Power over Ethernet can use Link Layer Discovery Protocol (LLDP) to communicate a PD&#8217;s power requirement to the PSE with greater resolution than permitted by the hardware handshake. For example, a device could complete the handshake indicating it is an 802.3at PoE+ compliant device but use LLDP to tell the connected switch it only requires 20 watts instead of the maximum 25.5 watts. This can potentially reduce the number of Ethernet switches required in large installations if the switches do not need to assume every device will always consume its maximum power.</p>
<table class="wikitable">
<tbody>
<tr>
<th>Property</th>
<th>802.3af <span class="nowrap">(802.3at Type 1)</span> &#8220;PoE&#8221;</th>
<th><span class="nowrap">802.3at Type 2</span> &#8220;PoE+&#8221;</th>
<th><span class="nowrap">802.3bt Type 3</span> &#8220;4PPoE&#8221;</th>
<th><span class="nowrap">802.3bt Type 4</span></th>
</tr>
<tr>
<td>Power available at PD<sup id="cite_ref-25" class="reference"><a href="https://en.wikipedia.org/wiki/Power_over_Ethernet#cite_note-25">[note 1]</a></sup></td>
<td><span class="nowrap">12.95 W</span></td>
<td><span class="nowrap">25.50 W</span></td>
<td><span class="nowrap">51 W</span></td>
<td><span class="nowrap">71 W</span></td>
</tr>
<tr>
<td>Maximum power delivered by PSE</td>
<td><span class="nowrap">15.40 W</span></td>
<td><span class="nowrap">30.0 W</span></td>
<td><span class="nowrap">60 W</span></td>
<td><span class="nowrap">100 W</span></td>
</tr>
<tr>
<td>Voltage range (at PSE)</td>
<td><span class="nowrap">44.0–57.0 V</span></td>
<td><span class="nowrap">50.0–57.0 V</span></td>
<td><span class="nowrap">50.0–57.0 V</span></td>
<td><span class="nowrap">52.0–57.0 V</span></td>
</tr>
<tr>
<td>Voltage range (at PD)</td>
<td><span class="nowrap">37.0–57.0 V</span></td>
<td><span class="nowrap">42.5–57.0 V</span></td>
<td><span class="nowrap">42.5–57.0 V</span></td>
<td><span class="nowrap">41.1–57.0 V</span></td>
</tr>
<tr>
<td>Maximum current I<sub>max</sub></td>
<td><span class="nowrap">350 mA</span></td>
<td><span class="nowrap">600 mA</span></td>
<td><span class="nowrap">600 mA</span> per pair</td>
<td><span class="nowrap">960 mA</span> per pair</td>
</tr>
</tbody>
</table>
<p>The table above is copied from the <a href="https://en.wikipedia.org/wiki/Power_over_Ethernet">Wikipedia page</a> on Power over Ethernet. It shows the 4 main types of Power over Ethernet and the amount of power each is capable of delivering to a PD. Also shown are the voltages a PD will see at its Ethernet jack based on the voltage supplied by the PSE, the maximum current draw of the PD, and the maximum resistance in 100 meters of Cat 3 (Type 1) or Cat 5 (Type 2 to 4) Ethernet cabling.</p>
<p>Type 1 and Type 2 PoE can use either the 10/100 Mbps data pairs or the 10/100 Mbps spare pairs for supplying power. It&#8217;s up to the switch to decide which set of pairs so the powered device must support using either set. Type 3 and Type 4 PoE use all four pairs for supplying power. All four PoE types work with all speeds of Ethernet, 10/100 Mbps as well as 1/2.5/5/10 Gbps.</p>
<p>For more information on Power over Ethernet, I highly recommend the Power over Ethernet <a href="https://en.wikipedia.org/wiki/Power_over_Ethernet">Wikipedia page</a>, section 7.4.1 of the Texas Instruments TPS2378 IEEE 802.3at PoE+ Interface <a href="http://www.ti.com/lit/ds/symlink/tps2378.pdf">data sheet</a> (PDF), and the Silicon Labs Si3404/06x <a href="https://www.silabs.com/documents/public/application-notes/an1130-si3404-06x-dg.pdf">PoE-PD Controller Design Guide</a> (PDF).</p>
<h2>Feasibility and Scaling Back Ambitions</h2>
<div id="attachment_2002" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/box1-v4.png"><img class="size-large wp-image-2002" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/box1-v4-1024x819.png" alt="Artist's depiction of two Ethernet to iColor Flex PoE power data supplies." width="640" height="512" /></a><p class="wp-caption-text">Artist&#8217;s depiction of two Ethernet to iColor Flex PoE power data supplies.</p></div>
<p>Getting back to my design, I pictured a small box with a waterproof Ethernet connector on one end and an Amphenol LTW waterproof connector for the pixels on the other end like the boxes in the artist&#8217;s rendering above. Inside the box would be 802.3af/at/bt classification circuitry, a power supply capable of delivering 62 watts at 24 volts, a microcontroller with Ethernet, and an FPGA to generate the Chromasic protocol data for the lights.</p>
<p>Referring to the chart of PoE capabilities in the previous section on standards-compliant Power over Ethernet, supplying 62 watts to the iColor Flex lights would require using 802.3bt Type 4 PoE and having an efficiency exceeding 87%. I felt this was certainly technically feasible but a bit too ambitious for my first PoE design. I also do not have an 802.3bt capable Ethernet switch yet. Time to scale back my ambitions a bit.</p>
<p>The next thought was to scale back to using iColor Flex MX pixels that require 22.5 watts at 7.5 volts. This could be powered using 802.3at PoE which is capable of delivering 25.5 watts to the powered device. This would require being over 88% efficient and I&#8217;d have to design a 7.5 volt wide input range buck converter too. I still felt this was a bit too ambitious.</p>
<div id="attachment_2006" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/pixels.jpg"><img class="size-large wp-image-2006" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/pixels-1024x666.jpg" alt="A string of 50 RGB pixels on the left and a strip of 60 RGB pixles on the right." width="640" height="416" /></a><p class="wp-caption-text">A string of 50 RGB pixels on the left and a strip of 60 RGB pixels on the right.</p></div>
<p>The next step down in power consumption and complexity were the ubiquitous WS2812 RGB LEDs. Adafruit sells these in <a href="https://www.adafruit.com/product/1138?length=1">one meter strips of 60 RGB LEDs</a> and Light-O-Rama sells these as <a href="http://store.lightorama.com/50sqpi5vbl.html">five meter strings of 50 RGB pixels</a>. Both of these consume 60 mA per bulb at 5 volts which is 0.3 watt per LED. A strip of 60 Neopixels consumes 18 watts maximum. The string of 50 from Light-O-Rama consumes 15 watts maximum.</p>
<p>15 and 18 watts easily falls within the 25.5 watt maximum for <span class="nowrap">802.3at</span> PoE+. In addition, the WS2812 LEDs have significantly relaxed timing requirements compared to the iColor Flex LEDs. This allows the pixels to be controlled in software and eliminates the requirement for an FPGA to drive the pixels. Finally, the pixels run from 5 VDC. Since 5 VDC isolated switching DC/DC converter modules are common, I will not need to design a custom power supply as part of the project.</p>
<p>Over the course of a few hours, I talked myself down from building an 802.3bt 62 watt PD with an FPGA in a waterproof enclosure to building a much simpler proof-of-concept that uses 802.3at PoE+ for power and controls up to 60 WS2812 pixels in software. WS2812 pixels will be a great starting point for a project that can both power and control a string or strip of lights over Ethernet.</p>
<h2>Electrical Isolation</h2>
<p>The 802.3af/at/bt PoE standards require electrical isolation between the power interface and all user-accessible conductors including the frame ground. In a large commercial building, there could be 100 meters of Ethernet cable between the switch and the powered device with the result that the grounds at each end of the Ethernet cable have a large voltage difference between them. Without isolation, current would flow over the Ethernet cable which is both a safety issue and an electrical noise issue.</p>
<p>A lot of designs like PoE-enabled network cameras, Wi-Fi access points with internal antennas, and ceiling troffer LED lights have no user accessible conductors and therefore can use a non-isolated design. In this case, the enclosure and the lack of user-accessible conductors acts as the isolation required by the standard.</p>
<p>Other designs like Wi-Fi access points with external antenna connectors or building access controls with connections for locks and card readers require an isolated design. My design is going to have a connector for the WS2812 pixels so technically it requires an isolated design.</p>
<p>For both isolated and non-isolated designs, the 802.3 Ethernet standards require a transformer between the Ethernet jack and the Ethernet PHY. For isolated PoE designs, isolation is also required in the board layout, in the feedback loop in the power supply circuit, and in any status indicators between the PoE classification circuitry and the microcontroller. Isolated designs are therefore more complicated and more expensive than non-isolated designs.</p>
<p>Isolated designs do have an advantage during development and testing though. Programmers, debuggers, logic analyzers, oscilloscopes, and other test equipment can be connected to the isolated portions of the design without risk to the user or equipment. With a non-isolated design (or to debug the power interface side of an isolated design), you might need a battery-powered laptop to connect the debugger to the microcontroller, high-voltage differential probes for an oscilloscope, or a handheld oscilloscope with isolated input channels.</p>
<h2>Design Requirements</h2>
<p>Taking into account the selected pixels and the need for an isolated PoE design, here&#8217;s the basic list of requirements for my design:</p>
<ul>
<li>Use standards-compliant 802.3at PoE+ classification circuitry.</li>
<li>Use less than 25.5 watts total power to stay within the 802.3at PoE+ power envelope.</li>
<li>Use an isolated power supply design capable of supplying 20 watts at 5 volts. 15 to 18 watts will be available for the WS2812 pixels. Two watts will be available for the support circuitry including the microcontroller.</li>
<li>Use transformers, optocouplers, and appropriate trace spacing to maintain isolation between the power interface circuitry and the remainder of the device.</li>
<li>Use an Ethernet-capable microcontroller to reduce parts count and design complexity.</li>
<li>Use easy to hand-solder SMD packages with no inaccessible pins, leads, or pads. One of these days, I&#8217;ll have to learn to solder/reflow DFN/QFN packages with exposed thermal pads, but I&#8217;m not there yet.</li>
</ul>
<h2>Selecting the PoE Controller</h2>
<div id="attachment_2057" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/poe-pd-devices.jpg"><img class="size-large wp-image-2057" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/poe-pd-devices-1024x684.jpg" alt="A bunch of different PoE+ PD components including two Molex PD jacks, two TI TPS2378 ICs, a TI TPS2378 evaluation board, and a Silvertel PoE+ PD 24 VDC module." width="640" height="428" /></a><p class="wp-caption-text">A bunch of different PoE+ PD components including two Molex PD jacks, two TI TPS2378 ICs, a TI TPS2378 evaluation board, and a Silvertel PoE+ PD 24 VDC module.</p></div>
<p>The 802.3af PoE standard was ratified in 2003 and the 802.3at PoE+ standard was ratified in 2009. The relative age of the standards means there&#8217;s tons of great PoE/PoE+ silicon and modules on the market.</p>
<p><a href="http://www.ti.com/power-management/power-over-ethernet-poe/overview.html">Texas Instruments</a>, <a href="https://www.analog.com/en/products/monitor-control-protection/power-over-ethernet-poe-interface-controllers/poe-powered-device.html#">Analog Devices</a>, <a href="https://www.microsemi.com/product-directory/power-over-ethernet/847-poe-pd-front-end-w-pwm-controller">Microchip Technology</a>, and <a href="https://www.silabs.com/power-over-ethernet/powered-devices">Silicon Labs</a> all make PoE PD controller silicon. All these chips handle classification. Many of these chips include integrated transistor switches to control power to the user&#8217;s circuitry. Some of these chips even include switch mode power supply controllers to step down the incoming voltage to the user&#8217;s required voltage.</p>
<p>Silvertel makes complete <a href="https://silvertel.com/poe-power-over-ethernet-html/">PoE modules</a> capable of delivering from 13W to 99W to a PD. These modules handle classification, isolation, and include a DC/DC converter to step the input voltage down to a more usable 12 or 24 volts. Molex even makes <a href="https://www.molex.com/molex/products/datasheet.jsp;jsessionid=05oiS64RT1IkXnHXuryno-eThRG8f2tOemOF-xbW.molex0?part=active/0857913020_MODULAR_JACKS_PLUG.xml">Ethernet jacks</a> with integrated magnetics and PoE/PoE+ classification circuitry. These jacks use the Microchip / Microsemi <span class=""><a href="https://www.microsemi.com/product-directory/poe-pd-front-end-w-pwm-controller/4783-pd70200">PD70200</a></span> controller.</p>
<div id="attachment_2024" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/poe-pd-controller-circuit.png"><img class="size-large wp-image-2024" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/poe-pd-controller-circuit-1024x227.png" alt="802.3at PoE+ powered device controller and classification circuit." width="640" height="142" /></a><p class="wp-caption-text">802.3at PoE+ powered device controller and classification circuit.</p></div>
<p>After reading datasheets for what felt like weeks, I settled on the TI TPS2378 802.3at PoE+ PD controller. It performs PoE+ detection and classification, includes an internal pass MOSFET with inrush current limiting, comes in a relatively easy to solder SOIC-8 package with an exposed thermal pad, and requires minimum external components.</p>
<p>The schematic above shows the basic circuit. Bridge rectifiers BR1 and BR2 rectify the voltage from the Ethernet jack since the input voltage is of unknown polarity. C1, L1, and L2 are an EMI/EMC filter. Zener diode D1 provides transient protection. C2 provides the minimum load capacitance required by the PoE specifications. R1 and R2 set the detection current and classification current respectively.</p>
<div id="attachment_2040" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/tps2378-startup.png"><img class="wp-image-2040 size-large" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/tps2378-startup-1024x775.png" alt="tps2378-startup" width="640" height="484" /></a><p class="wp-caption-text">TI TPS2378 startup sequence from the datasheet.</p></div>
<p>Figure 19 from section 7.4.3 of the TPS2378 datasheet (reproduced above) shows the detection, classification, inrush current limiting, and startup sequence. When the input voltage is between 1.4 and 10.9 volts, the TPS2378 generates a detection signature. Once the PSE sees the detection signature, the PSE supplies a voltage between 10.9 and 22 volts. This is the classification phase and the TPS2378 generates a classification current between 36 and 44 mA to indicate it is a 802.3at PoE+ Type 2 / Class 4 device. For 802.3at this step is performed twice with a mandatory return to the detection current between each classification pulse.</p>
<p>Once classification is complete, the PSE supplies full power to the PD and the TPS2378 turns on the internal pass MOSFET but in an inrush current limiting mode. This limits the input current to about 140 mA and allows the bulk capacitors in the downstream power supply circuit to charge. Once the current through the pass MOSFET drops below 125 mA, inrush current limiting is turned off, the converter disable pin is de-asserted, and the user&#8217;s circuitry can run.</p>
<p>If 802.3at/PoE+ classification was successful, the T2P pin will be asserted and the user&#8217;s circuitry can run at full power. If 802.3at/PoE+ classification was not successful, the T2P pin will be de-asserted and the user&#8217;s circuitry must stay within the 802.3af PoE power envelope.</p>
<h2>Selecting the Power Supplies</h2>
<div id="attachment_2026" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/poe-power-supply-circuits.png"><img class="size-large wp-image-2026" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/poe-power-supply-circuits-1024x568.png" alt="Isolated wide-input range to 5 VDC switching power supply module (top) and 3.3 VDC non-isolated switching power supply module (bottom)." width="640" height="355" /></a><p class="wp-caption-text">Isolated wide-input range to 5 VDC switching power supply module (top) and 3.3 VDC non-isolated switching power supply module (bottom).</p></div>
<p>The next step was to select an isolated DC/DC converter that has an input range of 37 to 57 VDC, a 5 VDC output, and a 20 watt power rating. The CUI PDQE20-Q48-S5-D meets these specifications. It has a nominal input voltage of 48 volts but works with a range from 18 to 75 volts. It is rated for 20 watts, is isolated, and has an efficiency of 90%. It comes in a 1&#8243; by 1&#8243; form factor module. The converter requires a 100 uF input capacitor and a 100 uF output capacitor for stable operation. It also has an active-low disable input that can be connected directly to the TPS2378&#8217;s CDB pin to keep the converter disabled until the bulk input capacitor is charged.</p>
<p>The microcontroller requires 3.3 VDC at about 250 mA. to operate. This is supplied by a CUI V7803-500 non-isolated switching regulator. It has an input range from 4.75 to 28 VDC and is connected to the output of the 5 VDC isolated converter. It requires a few capacitors to operate as well. I included a few LEDs to indicate the 5 VDC and 3.3 VDC power supplies are operational.</p>
<h2>Selecting the Ethernet Microcontroller</h2>
<div id="attachment_2028" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/minimal-ethernet-circuit.png"><img class="size-large wp-image-2028" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/minimal-ethernet-circuit-1024x771.png" alt="PIC18F67J60 minimal Ethernet circuit." width="640" height="482" /></a><p class="wp-caption-text">PIC18F67J60 minimal Ethernet circuit. Pay particular attention to Note 4 for Power over Ethernet applications.</p></div>
<p>The next step was to select a microcontroller to receive Art-Net UDP packets of pixel data and output the pixel data to the WS2812 LEDs. Most Ethernet microcontrollers only include Ethernet MAC functionality and require an external Ethernet PHY. The Microchip PIC18F67J60 microcontroller includes both an internal Ethernet MAC and PHY. This reduces the parts count and board area needed by the design.</p>
<p>The basic schematic from the data sheet is shown in the schematic above. I added some ESD protection circuitry as shown in the Microchip Ethernet of Everything <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/40001930A.pdf">reference design</a> (PDF). The PIC18F67J60 is limited to 10 Mbps Ethernet but sixty 24-bit WS2812 pixels updated at 40 Hz only require 57,600 bits per second of data to operate.</p>
<h2>Other Circuitry of Note</h2>
<p>Here&#8217;s a brief examination of some of the other circuitry in the design.</p>
<h3>Optically Isolated AT Classification Indicator</h3>
<div id="attachment_2044" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/poe-t2p-isolation.png"><img class="size-large wp-image-2044" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/poe-t2p-isolation-1024x401.png" alt="T2P flag isolation circuitry." width="640" height="251" /></a><p class="wp-caption-text">T2P flag isolation circuitry.</p></div>
<p>The TPS2378 asserts T2P low if 802.3at/PoE+ classification is successful. An optoisolator is used to isolate this signal and make it available to the microcontroller. When ISO_T2P is asserted low indicating the PD can draw up to 25.5 watts of power, the microcontroller can enable the WS2812 pixels.</p>
<h3>3.3 VDC to 5 VDC Level Translator for WS2812 LEDs</h3>
<div id="attachment_2045" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/poe-ws2812-driver.png"><img class="size-large wp-image-2045" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/poe-ws2812-driver-1024x485.png" alt="The 3.3 VDC to 5 VDC level translator and transient protection circuitry used to drive the WS2812 LEDs." width="640" height="303" /></a><p class="wp-caption-text">The 3.3 VDC to 5 VDC level translator and transient protection circuitry used to drive the WS2812 LEDs.</p></div>
<p>The microcontroller has 3.3 VDC outputs but the WS2812 LEDs have inputs referenced to 5 VDC. These generally work ok from 3.3 VDC but I added a Texas Instruments Little Logic single gate buffer to translate the 3.3 VDC output from the microcontroller up to 5 VDC. The resistor and diode array protect the microcontroller and buffer from transients on the WS2812 data line.</p>
<h3>SiTime MEMS Oscillator</h3>
<p>I&#8217;m using a <a href="https://www.sitime.com/products/automotive-high-temp-oscillators/sit2024">SiTime MEMS oscillator</a> to generate the 25 MHz clock for the microcontroller. This oscillator comes in a small but still easy-to-solder SOT23-5 package. Digi-Key programs them to the purchaser&#8217;s needed frequency on demand or you can buy a stock of blank parts and use the SiTime programmer to program them as needed.</p>
<h3>Globally Unique MAC Address</h3>
<p>Purchasing a block of MAC addresses for maker projects is not feasible. Instead I&#8217;m using a <a href="https://www.microchip.com/design-centers/memory/serial-eeprom/mac-address-and-unique-id-eeproms">Microchip EUI-48 serial EEPROM</a> that contains a pre-provisioned, globally-unique, and write-protected MAC address. The alternative for devices that will not be used outside your local network is to use a locally administered address from one of the <a href="https://serverfault.com/questions/40712/what-range-of-mac-addresses-can-i-safely-use-for-my-virtual-machines">locally administered address pools</a>.</p>
<h2>Finished Schematic</h2>
<p>Here is the finished schematic. It&#8217;s two pages. Page 1:</p>
<div id="attachment_2048" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/pixpoe-schematic-page-1.png"><img class="size-large wp-image-2048" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/pixpoe-schematic-page-1-1024x682.png" alt="Finished schematic, page one." width="640" height="426" /></a><p class="wp-caption-text">Finished schematic, page one.</p></div>
<p>Page 2:</p>
<div id="attachment_2049" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/pixpoe-schematic-page-2.png"><img class="size-large wp-image-2049" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/pixpoe-schematic-page-2-1024x682.png" alt="Finished schematic, page two." width="640" height="426" /></a><p class="wp-caption-text">Finished schematic, page two.</p></div>
<h2>Finished Board</h2>
<div id="attachment_2050" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/pixpoe-board.png"><img class="size-large wp-image-2050" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/pixpoe-board-1024x607.png" alt="The finished board." width="640" height="379" /></a><p class="wp-caption-text">The finished board.</p></div>
<p>The image above shows the finished board. The thick dashed line shows the 56 mil space required to isolate the power interface circuitry on the left of the line from the user circuitry on the right of the line. The only components crossing the line are a filter capacitor rated for 2000 volts, the Ethernet magnetics, the T2P optocoupler, and the isolated DC/DC converter. All these parts provide DC isolation between the two halves of the board.</p>
<p>The next step was to upload the boards to <a href="https://oshpark.com/">OSH Park</a>, check the renders, and order the boards.</p>
<div id="attachment_2052" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/pixpoe-top.png"><img class="size-large wp-image-2052" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/pixpoe-top-1024x569.png" alt="OSH Park render of the top of the board." width="640" height="356" /></a><p class="wp-caption-text">OSH Park render of the top of the board.</p></div>
<p>The image above is an OSH Park render of the top of the board.</p>
<div id="attachment_2053" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/pixpoe-bottom.png"><img class="size-large wp-image-2053" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/pixpoe-bottom-1024x569.png" alt="OSH Park render of the bottom of the board." width="640" height="356" /></a><p class="wp-caption-text">OSH Park render of the bottom of the board.</p></div>
<p>The image above is an OSH Park render of the bottom of the board.</p>
<h2>Future Board Revisions</h2>
<p>While these boards were being manufactured, a helpful Twitter user pointed out some revisions I could make to improve the EMI/EMC performance and some other minor changes to the board. Here&#8217;s the list of changes for future board versions:</p>
<ul>
<li>Change PIC18 ground traces to vias to 9 mil width.</li>
<li>Change all other ground traces to vias to 20 mil width.</li>
<li>Change the 3.3 V bridges between 3.3 V fills to 20 mil width.</li>
<li>Change PIC18 pin 10 (VDDCORE) and 9 (GND) traces to 9 mil width.</li>
<li>Move PIC18 pin 9 (GND) via to far side of capacitor. Make the trace 20 mil wide.</li>
<li>Change TD_CT / filtered 3.3 V traces to 8 mil width between caps and PIC18.</li>
<li>Changed 5V trace to a pour / fill.</li>
<li>Increase separation of VPPIN to RTN to 25 mil per section 7.3.9 of TPS2378 data sheet.</li>
<li>More vias on thermal pad.</li>
<li>Use schottky diodes instead of bridge rectifiers for greater efficiency.</li>
<li>Investigate routing 3.3 V power on top layer and adding a ground fill / pour on the top layer stitched to the bottom layer.</li>
<li>Use jack with integrated magnetics or integrated magnetics and PD circuitry.</li>
<li>Improve isolation / spacing between power interface circuitry and frame ground.</li>
</ul>
<h2>Software Development</h2>
<div id="attachment_2055" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/olimex-pic-web.jpg"><img class="size-large wp-image-2055" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/olimex-pic-web-1024x684.jpg" alt="The Olimex PIC-WEB board I used for software development while waiting for my boards." width="640" height="428" /></a><p class="wp-caption-text">The Olimex PIC-WEB board I used for software development while waiting for my boards.</p></div>
<p>While the boards were being manufactured, I started software development using an <a href="https://www.olimex.com/Products/PIC/Development/PIC-WEB/">Olimex PIC WEB development board</a>. The Ethernet hardware and software on this board is functionally identical to the Ethernet hardware and software on my board so it was a good platform to use for software development until my boards were available.</p>
<h3>Microchip Code Configurator</h3>
<p>I created a new PIC18F67J60 project in the MPLAB X IDE then used the Microchip Code Configurator (MCC) to generate the basic timer, EUSART, and TCP/IP Ethernet code for the project.</p>
<p>In the system tab, I enabled TMR1 interrupts, assigned the EUSART1 TX1 and RX1 pins, and configured an external 25 MHz clock on the primary OSC pins. In the libraries tab, I added the TCP/IP Lite library and enabled the UDP, DHCP, IPV4, ICMP, and ARP protocols. In the MAC tab, I selected ETHxxJ6x since I&#8217;m using the Ethernet MAC built into the device. I also configured a locally administered MAC address until I had an opportunity to enable the EUI-48 serial EEPROM. I added the TMR1 and EUSART1 peripherals then enabled the TMR1 interrupt to occur every 40 ms and the callback function to be called once per second. The EUSART was configured for 9600 bps and STDIO was redirected to USART. I clicked the generate tab to generate the initial code base.</p>
<p>Once the code was generated, I opened up main.c, removed the comments to enable interrupts, and added a call to Network_Manage () inside the while loop inside the main function. I built the project and downloaded it to the PIC-WEB board. It started running and eventually grabbed an IP address from my DHCP server. At this point I could ping the board but that&#8217;s about it.</p>
<h3>Adding Art-Net UDP Receive</h3>
<p>Next I added code to receive Art-Net packets over the network to the project. I created a udp_rx_artnet.h file with the following code:</p>
<pre>#ifndef _UDP_RX_ARTNET_H
#define _UDP_RX_ARTNET_H

void UdpRxArtNetInit (void);
void UdpRxArtNetRecv (int16_t length);

#endif    //_UDP_DEMO_H</pre>
<p>Then I created a udp_rx_artnet.c file with the following code:</p>
<pre>#include &lt;stdint.h&gt;
#include "udp_rx_artnet.h"
#include "ws2812b.h"
#include "mcc_generated_files/TCPIPLibrary/udpv4.h"
#include "mcc_generated_files/TCPIPLibrary/tcpip_config.h"
#include "mcc_generated_files/pin_manager.h"


void UdpRxArtNetInit (void)
{
    // nothing to do here
}


void UdpRxArtNetRecv (int16_t length)
{
    uint8_t i;
    uint8_t leds;
    uint8_t r, g, b;
    
    if (length &gt;= 18) {
        for (i = 0; i &lt; 18; i++) {
            UDP_Read8 ();
        }
        
        length = length - 18;
        if (length &gt; NUM_CHANS) {
            length = NUM_CHANS;
        }
        leds = length / 3;
        length = 3 * leds;
        
        for (i = 0; i &lt; length; i+=3) {
            r = UDP_Read8 ();
            g = UDP_Read8 ();
            b = UDP_Read8 ();
            ledData[i+0] = gamma8[g];
            ledData[i+1] = gamma8[r];
            ledData[i+2] = gamma8[b];
            
        }
        
        for (; i &lt; 150; i++) {
            ledData[i] = 0;
        }
        
        WS2812b_Write ();
        printf ("+");
        LATEbits.LATE4 = ~LATEbits.LATE4;
    }
}</pre>
<p>It&#8217;s not the world&#8217;s most robust Art-Net receive code but it&#8217;ll work for proof of concept purposes. Next I added the UdpRxArtNetRecv function to the UDP callback table in MCC_Generated_Files/TCPIPLibrary/udpv4_port_handler_table.c:</p>
<pre>const udp_handler_t UDP_CallBackTable[] = \
{    
    {68, DHCP_Handler},     
    {0x1936, UdpRxArtNetRecv},
};</pre>
<p>Then inside main.c I added a call to UdpRxArtNetInit () to initialize the Art-Net receiver. I rebuilt the project and downloaded the code. (The first version of the code called printf&#8217;s to display the first few bytes of received RGB data rather than calling WS2812b_Write as shown in the listing above.) I then used my PC to generate Art-Net packets with 60 LEDs (180 channels) of data and send those to the PIC-WEB board. The printf&#8217;s showed the sent levels and it was time to move on to controlling the pixels.</p>
<h3>Controlling the Pixels</h3>
<p>In the past, I&#8217;ve used an FPGA to generate perfect WS2812 LED pixel timing. I did not use an FPGA on this project and instead used software to bit bang the protocol to the LEDs. Fortunately, the LEDs are quite tolerant to deviations from the timing specified in the data sheet and I had no issues controlling them.</p>
<p>The ws2812b.h header file:</p>
<pre>#ifndef WS2812B_H
#define    WS2812B_H

#ifdef    __cplusplus
extern "C" {
#endif

#define NUM_LEDS 60
#define NUM_CHANS (3*NUM_LEDS)
    
#define WS2812b_LAT LATBbits.LB2
#define WS2812b_TRIS TRISBbits.TRISB2

void WS2812b_Init (void);
void WS2812b_Write (void);

extern uint8_t ledData[NUM_CHANS];
extern const uint8_t gamma8[256];

#ifdef    __cplusplus
}
#endif

#endif    /* WS2812B_H */</pre>
<p>The ws2812b.c source file:</p>
<pre>#include &lt;stdint.h&gt;
#include "mcc_generated_files/mcc.h"
#include "ws2812b.h"


const uint8_t gamma8[] = {
    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,
    1,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,  2,  2,
    2,  3,  3,  3,  3,  3,  3,  3,  4,  4,  4,  4,  4,  5,  5,  5,
    5,  6,  6,  6,  6,  7,  7,  7,  7,  8,  8,  8,  9,  9,  9, 10,
   10, 10, 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 16, 16,
   17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 24, 24, 25,
   25, 26, 27, 27, 28, 29, 29, 30, 31, 32, 32, 33, 34, 35, 35, 36,
   37, 38, 39, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50,
   51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68,
   69, 70, 72, 73, 74, 75, 77, 78, 79, 81, 82, 83, 85, 86, 87, 89,
   90, 92, 93, 95, 96, 98, 99,101,102,104,105,107,109,110,112,114,
  115,117,119,120,122,124,126,127,129,131,133,135,137,138,140,142,
  144,146,148,150,152,154,156,158,160,162,164,167,169,171,173,175,
  177,180,182,184,186,189,191,193,196,198,200,203,205,208,210,213,
  215,218,220,223,225,228,231,233,236,239,241,244,247,249,252,255 };

uint8_t ledData[NUM_CHANS];


void WS2812b_Init (void)
{
    WS2812b_LAT = 0;
    WS2812b_TRIS = 0;
}


void WS2812b_Write (void)
{
    uint8_t i, j, a;
    
    INTERRUPT_GlobalInterruptDisable();
    INTERRUPT_PeripheralInterruptDisable();

    for (i = 0; i &lt; NUM_CHANS; i++) {
        a = ledData[i];

        // 7
        if (a &amp; 0x80) {
            WS2812b_LAT = 1;
            NOP();
            NOP();
            NOP();
            NOP();
        } else {
            WS2812b_LAT = 1;
            NOP();
        }
        WS2812b_LAT = 0;

        // 6
        if (a &amp; 0x40) {
            WS2812b_LAT = 1;
            NOP();
            NOP();
            NOP();
            NOP();
        } else {
            WS2812b_LAT = 1;
            NOP();
        }
        WS2812b_LAT = 0;

        // 5
        if (a &amp; 0x20) {
            WS2812b_LAT = 1;
            NOP();
            NOP();
            NOP();
            NOP();
        } else {
            WS2812b_LAT = 1;
            NOP();
        }
        WS2812b_LAT = 0;

        // 4
        if (a &amp; 0x10) {
            WS2812b_LAT = 1;
            NOP();
            NOP();
            NOP();
            NOP();
        } else {
            WS2812b_LAT = 1;
            NOP();
        }
        WS2812b_LAT = 0;

        // 3
        if (a &amp; 0x08) {
            WS2812b_LAT = 1;
            NOP();
            NOP();
            NOP();
            NOP();
        } else {
            WS2812b_LAT = 1;
            NOP();
        }
        WS2812b_LAT = 0;

        // 2
        if (a &amp; 0x04) {
            WS2812b_LAT = 1;
            NOP();
            NOP();
            NOP();
            NOP();
        } else {
            WS2812b_LAT = 1;
            NOP();
        }
        WS2812b_LAT = 0;

        // 1
        if (a &amp; 0x02) {
            WS2812b_LAT = 1;
            NOP();
            NOP();
            NOP();
            NOP();
        } else {
            WS2812b_LAT = 1;
            NOP();
        }
        WS2812b_LAT = 0;

        // 0
        if (a &amp; 0x01) {
            WS2812b_LAT = 1;
            NOP();
            NOP();
            NOP();
            NOP();
        } else {
            WS2812b_LAT = 1;
            NOP();
        }
        WS2812b_LAT = 0;
    }

    INTERRUPT_GlobalInterruptEnable();
    INTERRUPT_PeripheralInterruptEnable();
}</pre>
<p>I placed the call to WS2812b_Write inside the Art-Net UDP receive function and a call to WS2812b_Init inside my main function. The lights did not work quite right on the first try. This code required an oscilloscope and a few tries to get the timing good enough to reliably control the LEDs. Eventually though, I could reliably control the LED colors and brightness from Art-Net UDP packets sent from either my PC or my iPad.</p>
<h3>Serial EEPROM and MAC Address</h3>
<p>The PIC-WEB board does not have an EUI-48 serial EEPROM so I had to use a locally administered MAC address for the initial software development. Once I got my boards back, I wrote some SPI code to read the MAC address from the serial EEPROM and use this address instead of the MAC address configured in the MCC generated header file.</p>
<p>spi1.h:</p>
<pre>#ifndef SPI1_H
#define    SPI1_H

#ifdef    __cplusplus
extern "C" {
#endif

void spi1_Init (void);
uint8_t spi1_ExchangeByte (uint8_t in);

#ifdef    __cplusplus
}
#endif

#endif    /* SPI1_H */</pre>
<p>spi1.c:</p>
<pre>#include &lt;xc.h&gt;
#include &lt;stdint.h&gt;
#include &lt;stdio.h&gt;
#include "spi1.h"

void spi1_Init (void)
{
    SSP1CON1bits.SSPEN1 = 0;

    TRISBbits.TRISB4 = 0; // e48 csb - output
    LATBbits.LATB4   = 1; // e48 csb - set to high / not asserted
    TRISCbits.TRISC3 = 0; // sck     - output
    TRISCbits.TRISC4 = 1; // miso    - input
    TRISCbits.TRISC5 = 0; // mosi    - output

    SSP1STATbits.CKE = 1;
    SSP1STATbits.SMP = 1;    
    SSP1CON1 = 0x02;
    SSP1CON2 = 0x00;
    SSP1CON1bits.SSPEN = 1;
}

uint8_t spi1_ExchangeByte (uint8_t data )
{
    SSP1BUF = data;
    while(!PIR1bits.SSP1IF);
    PIR1bits.SSP1IF = 0;
    return SSP1BUF;
}</pre>
<p>Finally the code to read the MAC address from the serial EEPROM.</p>
<p>mac_eeprom.h:</p>
<pre>#ifndef MAC_EEPROM_H
#define    MAC_EEPROM_H

#ifdef    __cplusplus
extern "C" {
#endif

#define MAC_ADDR_48                 0xFA
#define MAC_ADDR_64                 0xF8

/***************** 25AA02E48 Instruction Set Summary *********************/
#define MAC_EE_READ     0x03
#define MAC_EE_WRITE    0x02
#define MAC_EE_WRDI     0x04
#define MAC_EE_WREN     0x06
#define MAC_EE_RDSR     0x05
#define MAC_EE_WRSR     0x01

void e48_read_mac(uint8_t *mac);

#ifdef    __cplusplus
}
#endif

#endif    /* MAC_EEPROM_H */</pre>
<p>mac_eeprom.c:</p>
<pre>#include &lt;xc.h&gt;
#include &lt;stdint.h&gt;
#include &lt;stdio.h&gt;
#include "spi1.h"
#include "mac_eeprom.h"

// e48_Csb on RB4
// SCK on SCK1/RC3
// MISO on SDI1/RC4
// MOSI on SDO1/RC5

void e48_read_mac(uint8_t *mac)
{
    uint8_t i;
    
    // set cs low
    LATBbits.LATB4   = 0;
    
    spi1_ExchangeByte (MAC_EE_READ);
    spi1_ExchangeByte (MAC_ADDR_48);
    
    for (i = 0; i &lt; 6; i++) {
        mac[i] = spi1_ExchangeByte (0x00);
    }
    
    // set high low
    LATBbits.LATB4   = 1;
    
    // printf("macAddr:%.2X:%.2X:%.2X:%.2X:%.2X:%.2X \r\n", mac[0],mac[1],mac[2],mac[3],mac[4],mac[5]);
}</pre>
<p>That&#8217;s a brief summary of the code I have written for this project to date. Eventually, I will need to add LLDP to specify the power requirements of my board with a bit more granularity. A follow on project may require HTTP requests and NTP as well.</p>
<h2>Bring Up and Testing</h2>
<div id="attachment_1972" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/poe-works.jpg"><img class="size-large wp-image-1972" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/poe-works-1024x576.jpg" alt="Bringing up the PoE+ PD circuitry and power supplies." width="640" height="360" /></a><p class="wp-caption-text">Bringing up the PoE+ PD circuitry and power supplies.</p></div>
<p>Once the boards arrived, I mounted the components required for PoE+ classification and the power supplies to the board as shown in the photo above. Initially the PoE classification failed every time. The switch would try twice about every three seconds. Some LEDs on the board would light briefly but classification would fail and the power supplies would not be turned on.</p>
<p>Eventually I traced the problem to a resistor and an LED I put across the output of the bridge rectifiers to try to indicate when the switch was supplying power to the board. <strong>This does not work.</strong> The current consumed by the LED in parallel with the detection and classification currents is not within the specs required for the detection and classification currents.</p>
<p>I removed the resistor and LED then detection and classification completed successfully. The 802.3at / PoE+ T2P LED lit then the 5 VDC and 3.3 VDC power supply LEDs lit. I used a multimeter to measure the 5 VDC and 3.3 VDC outputs. They were in spec so I proceeded to mount the microcontroller and the rest of the components.</p>
<div id="attachment_2062" style="width: 866px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/poe-alive.png"><img class="size-full wp-image-2062" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/poe-alive.png" alt="My switch indicating the board is receiving power and has a valid IP address. This was before I was using the EUI-48 serial EEPROM to configure a MAC address." width="856" height="353" /></a><p class="wp-caption-text">My switch indicating the board is receiving power and has a valid IP address. This was before I was using the EUI-48 serial EEPROM to configure a MAC address.</p></div>
<p>Once the rest of the components were mounted, I downloaded the software I developed using the Olimex PIC-WEB board to my board. Everything more or less worked perfectly! My network switch indicated the power advertised by the board, the power consumed by the board, and the IP address assigned to the board by the DHCP server.</p>
<p>There were some small tweaks to the software that came later like adding code to get a real MAC address from the serial EEPROM and adding code to turn LEDs on and off to indicate the status of the DHCP client and when an Art-Net packet was received.</p>
<div id="attachment_1973" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/IMG_20191207_120244-2000.jpg"><img class="size-large wp-image-1973" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/IMG_20191207_120244-2000-1024x682.jpg" alt="Completed board with a one meter strip of 60 WS2812 LEDs connected." width="640" height="426" /></a><p class="wp-caption-text">Completed board with a one meter strip of 60 WS2812 LEDs connected.</p></div>
<p>The photograph above shows the finished board driving a strip of 60 WS2812 LEDs. The power for the LEDs is delivered from an 802.3at / PoE+ capable network switch. The data for the LEDs comes from Art-Net packets generated by my PC.</p>
<div id="attachment_1962" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/PixPoE-Top-2000.jpg"><img class="size-large wp-image-1962" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/PixPoE-Top-2000-1024x682.jpg" alt="Photograph of the top of the completed board. " width="640" height="426" /></a><p class="wp-caption-text">Photograph of the top of the completed board.</p></div>
<p>Above is a close up photo of the top of the finished board.</p>
<div id="attachment_1961" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/PixPoE-Bottom-2000.jpg"><img class="size-large wp-image-1961" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/PixPoE-Bottom-2000-1024x682.jpg" alt="Photograph of the bottom of the completed board." width="640" height="426" /></a><p class="wp-caption-text">Photograph of the bottom of the completed board.</p></div>
<p>Above is a close up photo of the bottom of the finished board.</p>
<h2>Decorating the Tree</h2>
<div id="attachment_1963" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/LEDs.jpg"><img class="size-large wp-image-1963" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/LEDs-1024x682.jpg" alt="A circuit board in a (fake) pine tree." width="640" height="426" /></a><p class="wp-caption-text">A circuit board in a (fake) pine tree.</p></div>
<p>I initially used the one meter strip of sixty WS2812 pixels rather than the string of 50 pixels because the strip fit entirely on my desk and it was very easy to look and see if the pixels were displaying the patterns from my PC properly or not. Once the code was running properly, it was time to go bigger!</p>
<p>I grabbed the five meter string of 50 pixels and a cheap $20 fake tree from Michael&#8217;s and proceeded to string the lights on the tree. I stuffed the board in the tree then shot the quick video at the top of this post. I&#8217;m pretty sure the tree is not an ESD-safe location for the circuit board.</p>
<div id="attachment_2059" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/thumbnail.jpg"><img class="size-large wp-image-2059" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/thumbnail-1024x576.jpg" alt="The decorated tree." width="640" height="360" /></a><p class="wp-caption-text">The decorated tree.</p></div>
<p>Above is a thumbnail from the video showing the decorated tree in my home office.</p>
<h2>Future Power over Ethernet Projects</h2>
<div id="attachment_1977" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/IMG_20191217_224903-2000.jpg"><img class="size-large wp-image-1977" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/IMG_20191217_224903-2000-1024x682.jpg" alt="Philip Color Kinetics ColorBurst 4 10 watt RGB LED flood light controlled and powered over the network." width="640" height="426" /></a><p class="wp-caption-text">Philip Color Kinetics ColorBurst 4 10 watt RGB LED flood light controlled and powered over the network.</p></div>
<p>I have two more Power over Ethernet projects in progress. The first one is almost complete. It uses a Silvertel 24 volt isolated PoE+ module to power a Philips Color Kinetics ColorBurst 4 10-watt RGB LED flood light. Control data for the light comes from Synthe-Fx&#8217;s Luminair 3 software running on an iPad.</p>
<div id="attachment_2066" style="width: 650px" class="wp-caption alignnone"><a href="https://bikerglen.com/wp/wp-content/uploads/2019/12/clock-2-v11-cropped-jpg.jpg"><img class="size-large wp-image-2066" src="https://bikerglen.com/wp/wp-content/uploads/2019/12/clock-2-v11-cropped-jpg-1024x683.jpg" alt="Rear view of the PoE-powered VFD tube clock enclosure." width="640" height="427" /></a><p class="wp-caption-text">Rear view of the PoE-powered VFD tube clock enclosure.</p></div>
<p>The second project is an IV-12 VFD tube display that gets both power and time or other data for display over the network. This second project uses one of the Molex Ethernet jacks with integrated magnetics and 802.3at PoE+ classification circuitry. This project is in progress. I&#8217;ve ordered the aluminum panels for the enclosure shown above but am waiting on my VFD tubes to arrive before ordering the circuit boards for the project.</p>
<h2>Design Files</h2>
<p>Design files for this project are in the <a href="https://github.com/bikerglen/pixpoe">PixPoE repository</a> in my github account. If anything&#8217;s missing or you have a question about something, you can find me on Twitter @bikerglen.</p>
]]></content:encoded>
			<wfw:commentRss>https://bikerglen.com/blog/ethernet-powered-pixels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
