-
Demo Video
08/28/2017 at 03:41 • 0 commentsHere's a demo of the stack light monitor in action!
-
Web Config
08/27/2017 at 21:21 • 0 commentsLet me be the first to say that the Arduino makes a pretty bad web server. With only 32KB flash (<28KB available for program memory) and only 2.5KB RAM, there's not much room to store or serve anything. Thankfully, the ENC28J60 can handle a lot of the lower-level stuff and the Ethercard library from [jcw] has some good abstractions for TCP connections. I ended up writing the website as a single file HTML/CSS/JS page that I then minified, GZIP compressed, and converted into a program memory character array in a header file. This enabled the whole webpage to be static and stored in program flash saving valuable ram for other tasks. Since I had a little extra room, I used the Pure css framework to make the site pretty. Oh, and I also made a compressed favicon.ico so everything looks a little more professional.
The webpage itself uses pure Javascript to find jobs available on a server and validate settings before sending everything to the Arduino.
The Arduino uses a RESTful API to interact with the config page. The webpage uses a GET request to retrieve the current configuration of the Arduino, then it uses a PUT request to save new settings. The Arduino does some internal validation before saving settings in EEPROM and sending a http response code to the web page.
The Arduino uses these configuration settings to send HTTP API requests to the Jenkins server. It then parses the JSON returned by the server to set the light pattern.
TL;DR: The Arduino is acting as an HTTP server and HTTP client simultaneously in under 28KB flash and under 2.5K ROM
-
CAD
08/27/2017 at 21:02 • 0 commentsAs a software engineer, CADing the stand was a learning experience. I'd done some modeling of existing objects before, but creating something in the computer first was interesting. It was especiallly challenging to identify and rectify the interferences between the PCB and the CAD model, but my rough assembly (available on GitHub) was a good predictor of the physical assembly.
I did everything in Autodesk Inventor because that's what I had some experience with.
-
PCB
08/27/2017 at 20:56 • 0 commentsI don't want a rectangular base for my round light, so I've decided to design a round PCB this time. Thankfully, OSHPark doesn't care about the shape. I was a little concerned about the rounded-rectangle shaped plated holes for the barrel jack, but it turned out perfectly. I made a couple mistakes on the silkscreen by keeping a label that was supposed to be hidden and swapping the "-" and "I" labels for the regulator. Otherwise I'm pretty happy with how it turned out.