Close
0%
0%

DMX-84: Calculator-Controlled Lights

Control DMX equipment, such as lights, from a TI-84

Similar projects worth following
DMX-84 is a hardware and software driver for TI-84 calculators to run DMX equipment such as DJ and theater lights. On the hardware side, it uses an Arduino Pro Mini to process commands from the calculator and to send the DMX signal. On the software side, it includes the Arduino firmware as well as the calculator driver, which is an Axe include file that implements the protocol for communicating with the Arduino.

The Arduino uses DmxSimple to handle the DMX output. It can support up to 512 channels simultaneously at the expense of refresh rate. By offloading the DMX output to the Arduino, the calculator's resource usage is greatly reduced so that it can still run intensive programs while operating the DMX. Otherwise, the already-underpowered calculator would optimistically be running at half speed.

This is My First Electronics Project ™. Please critique accordingly.

Overview

DMX-84 is a hardware and software driver for TI-84 calculators to run DMX equipment such as DJ and theater lights. It is currently written as an Axe include program, but it may be rewritten as an Axiom in a later version. The driver requires an Arduino-based adapter to transmit DMX.

How It Works

Concept Video

Block Diagram & System Design

Here is a visual block diagram of how the project communicates.

  • The TI-84 communicates with the Arduino over a modified version of the two-wire TI Link protocol.
  • The Arduino is powered over USB by either the TI-84, a PC, or even a decent quality phone charger (not pictured).
  • Also over USB, the PC can debug the Arduino using a serial console at 115200 baud.
  • The Arduino transmits DMX to the receiver(s).
  • The receivers listen for their respective channel values and provide variable power to the light fixtures. Alternatively, each light could have a receiver built in such that the lights could be daisy chained together directly, but the concept is still the same.

The software

The software driver on the calculator is an implementation of an application-specific protocol. The protocol is designed to be as lightweight as possible to minimize transmission time. To accomplish this, messages consist of a single command byte followed by optional parameters, wrapped in a standard TI link packet. For details on the protocol, see DMX-84/doc/Protocol.md.

The hardware

The hardware driver is an Arduino Pro Mini 328 - 5V/16MHz produced by Sparkfun. I selected this board because its small feature set is perfect for this project, especially because it can be powered by USB Mini B from the calculator (or an external USB power supply). I also selected it because of its small size and relatively low price. The Arduino handles the calculator input and stores the channel values in memory. It transmits DMX packets at 250 kbaud using a slightly modified version of the DmxSimple library. Between the Arduino and the DMX Out jack is a transceiver that converts the +5/0V signal from the Arduino pin to a differential +5/-5V signal.

The adapter connects to the calculator through a combination of a 2.5mm audio jack for the serial data and a USB Mini B to FTDI adapter for power, serial debugging, and firmware updates. The Arduino can also receive power from any normal USB power supply, such as a computer or even a phone charger.

The Arduino transmits DMX packets over a 5-pin XLR female jack. An LED mounted on the enclosure indicates the system status (normal, error, debug, etc.). All of the hardware is housed in a small aluminum enclosure, painted black for theater use.

Theater Demo

Open Source Licenses

DMX-84 uses certain open source hardware and software.

All other software used in the project, as contained in the repository, is open source under the GPL version 3.

View all 19 components

  • Painted Enclosure, Round 3

    Alex Cordonnier08/09/2014 at 19:43 1 comment

    (This log details work from July 2014)

    With nicer weather than the last time I tried to paint the enclosure, I gave it another try. This time, I was careful to sand off all the paint and start fresh. I also tried adding primer, but I didn't realize we were all out.

    I painted two coats of black matte enamel spray paint (same as before), but this time I used two coats of clear gloss enamel hobby spray paint. Last time, I used a different clear coat that wasn't enamel. I also put an extra layer of clear coat on the bottom to prevent scratching.

    The finish ended up having a very nice texture. I did miss a small area painting one of the corners black, and I missed one layer of clear coat on part of the lid, but overall I'm pleased with how it turned out. My fingers are crossed that I don't have to repaint it again (or at least for a long time).

  • Firmware Overhaul

    Alex Cordonnier08/09/2014 at 19:34 0 comments

    (This log details work from June and July 2014)

    After school got out, I was finally able to work more on fixing the firmware properly. I researched possible fixes, and eventually I got it to work by externalizing the array and adding a bit of logic in DmxSimple to allow for digital blackouts.

    With the memory issue fixed, I was able to reimplement the functionality I had to remove for the demo. This time, though, I had much more experience thanks to my co-op/internship over the summer doing embedded C development. I overhauled much of the existing firmware and added features like an LED status indicator and sending debug commands over USB from a PC.

    There is still work to be done, but the firmware is in a much more maintainable state and implements features in better ways than it did before.

  • Engineering Open House

    Alex Cordonnier08/09/2014 at 19:25 0 comments

    In March 2014, I presented the project at Engineering Open House at the University of Illinois at Urbana-Champaign. Mine was one of the few individually presented projects at the event because most were presented by student organizations.

    With the hardware done, I needed to fix the memory issue with the Arduino firmware. I was running into a lot of strange bugs, so I took a hard look at where my memory was being used. It turns out that over 75% of the memory was being used by three arrays - a 512 byte DMX storage area used by DmxSimple, a 512 byte copy of the DmxSimple array so that my firmware could read back DMX values, and a 519 byte buffer used for communicating with the calculator. I only had 2048 bytes to work with, so this was excessive.

    With not much time before the open house, I needed to fix this quickly. I took my basic working firmware from when I tested it in January and added only the calculator commands that I needed for the demo. This way, I could eliminate the 512 byte copy of the DMX universe that I was keeping. I knew this solution was only temporary, but it worked until I had time to implement the fix on the entire firmware.

    Next, I had to write the calculator driver and a control program. The driver took a few days of looking up Z80 assembly opcodes and TI-OS system calls so I could reuse the built-in TI linking functionality. With the driver written, the control program was fairly simple. I made a simple program that could control up to 32 channels individually and also store 16 cues for the demo. (If you're wondering, I chose 32 channels partly because I only needed 21 and partly because 32 is the most I could fit on the screen at one time.)

    After asking around, I was able to borrow five motorized DJ lights from Zach McGinty for the demo. Two of them were only partly functional, so I was left with three nice working Trackspots. I read up on the documentation to figure out how to control them over DMX, and I eventually got them working with the project. I programmed some neat cues that took advantage of the pan/tilt, colors, patterns, and strobes.

    Transporting the lights between buildings was a bit stressful considering they cost several thousand dollars new, but overall the demo was a success. I had a nice mixture of grade school students and adults who seemed interested in seeing how a TI-84 could possibly control complicated, motorized lights.

  • Soldered Board

    Alex Cordonnier08/09/2014 at 19:07 0 comments

    (This log details work from January 2014)

    While I was still on winter break, I needed to verify that my breadboarded circuit actually worked before I went ahead and soldered the board. Luckily, I was able to test it in the school theater after training some students on the lights. It worked, but only after running some bare-minimum firmware instead of the full version I had written. I also had to remove the optocoupler I was originally planning to use. The important part is that the hardware worked, so I could solder the board.

    I had to solder it the next evening because the evening after that, I would be in the theater again to train students and would be able to test the soldered board. This was my only time to test it before going back to college.

    I tried to lay out the board in Eagle, but I didn't get very far without experience using it. I ended up using GIMP to make sure I had everything in reasonable positions.

    I had only soldered three times before. For Electronics merit badge, I had to solder 12 LEDs and a few resistors onto a board that was already mostly populated. Another time was when I made a wireless Wii sensor bar with a 9V battery, some IR LEDs, a green indicator LED, and a switch. Lastly, I had to solder the headers onto the Arduino back in September so it was breadboard-compatible. Clearly I had a bit of experience, but not making a full board.

    First, I soldered the Arduino's male headers onto the protoboard. I wanted to use female headers so I could detach the Arduino later, but that would make it too tall for the enclosure. Then I tried soldering wires to the relevant pins, but doing so proved difficult. I had to wrap the wires around the headers and solder that connection, which meant that I had to skip every other pin to have enough space. I also made some solder messes on the board, which left some of the pads unusable. Eventually, I got it done and put back in the enclosure.

    When I tested it the next day, it failed. Turns out I had forgotten to change the pin numbers in the code. Changing those numbers fixed the problem, so I was good to go.

    Another issue cropped up that I didn't fix until I was back at college: how could I push the LED into its holder when it was soldered to the board? First I had tried putting it in the holder and then soldering it with the board in place, but I couldn't get the pins lined up just right with the protoboard holes. Then I tried soldering it to the board and just pushing it into the holder, but the legs weren't strong enough and kept bending.

    I gave up for a while, but then I thought about using female headers soldered onto the board and putting the leads into that. When I tried it, I ran into the same issue where I couldn't line them up with the headers.

    Next, I tried using some male-to-female jumper cables with the LED leads going in the female ends and the male ends plugging into the female headers on the board. This approach was good because the jumper cables were flexible enough for me to plug the LED in before closing the enclosure. The problem was that the male + female headers on the board were too tall for the enclosure, so I snipped off the male ends and plugged the bare wires in the female headers on the board. Success!

    After opening and closing the enclosure so many times, I had to replace the screws that came with the enclosure because they were getting stripped. In any case, with the LED issue fixed, I finally had the hardware finished.

  • Painted Enclosure

    Alex Cordonnier08/09/2014 at 18:39 0 comments

    (This log details work from January 2014)

    I ran into a bit of a time crunch over winter break. I wanted to demo my project at Engineering Open House in March, but I still needed to:

    • paint the enclosure
    • solder the board
    • write the calculator driver, and
    • reduce the firmware's memory usage.

    I could easily do the code back at college, and I could even solder the board there if necessary in the ACM chapter office. What I could not do was paint the enclosure very easily, so this had to be done over winter break.

    Very shortly after drilling the enclosure, I got to work painting it. I got lucky that the weather was relatively warm compared to the rest of the January. I think it was about 35 degrees F. I put 3 or 4 layers of black matte spray paint and then 2 layers of clear gloss spray paint. I let it dry for a few hours, then began hot gluing the standoffs and LED holder.

    Unfortunately, I didn't wait long enough for the paint to be fully dry. Some of the hot glue got on the paint and pulled it off. I knew I had to repaint the enclosure, but I didn't have much time because that was right about when the temperature was supposed to drop significantly and I wouldn't be able to paint. It was going to snow for a few days, but there was one clear day with reasonable temperatures before it started to drop. That's when I tried the second time.

    I pulled off the hot glue and sanded off some of the paint. I should have sanded it all off, but I got anxious and left some around the LED holder. That was a big mistake because it left rough ridges of paint when I painted over it. I added a couple more layers of the same black and clear paint, but what I didn't anticipate was that the wind was blowing a bit of snow into the wet paint. This left small pockmarks that I didn't discover until it was dry. At this point, I didn't have any choice but to live with the paint job because of the weather.

    This second paint job was what the project had until July when I repainted it a third time.

  • Drilled Enclosure

    Alex Cordonnier08/09/2014 at 16:44 0 comments

    (This log details work from December 2013)

    Since I was home for winter break, I went over to my grandpa's workshop to get some help drilling holes for the enclosure. Before I went, I made sure to measure all the hole dimensions and mark them on the enclosure.

    My grandpa and I used his drill press to make the XLR, link cable, USB, and LED holes. For the USB port, we made two adjacent holes and then filed it down to make it rectangular.

    The XLR jack was the toughest because we didn't have a drill bit large enough, and the largest one we had was rusty. It needed to be 7/8" diameter, but we only had a 1/2" bit.

    While we were drilling, it slipped and tore through the edge of the enclosure, but that is covered by the XLR jack's faceplate anyway. It's actually fortunate because now I can slip the wires in and out of the jack easier. We had to spend a lot of time filing and sanding the hole down to make it big enough for the XLR jack.

    The other slight problem that arose was that the enclosure was warped slightly on the XLR end when it was in the clamp. That's why the lid doesn't mate perfectly anymore, but it still screws together just fine. You can see the warping in this picture:

  • Concept Video

    Alex Cordonnier08/09/2014 at 02:47 0 comments

    I made a video today giving some background and an overview of my project. Check it out:

View all 7 project logs

  • 1
    Step 1

    Solder 12 straight male headers onto both the left and right sides of the Arduino. The long ends should be on the underside of the board.

  • 2
    Step 2

    Solder 6 right-angle male headers onto the side of the Arduino opposite the Reset button. The long ends should be on the underside of the board.

  • 3
    Step 3

    Solder the straight headers onto the side of the protoboard with the square pads. From the square pad side of the protoboard with the logo in the top right corner, they should be soldered as far right as possible and 7 pads from the bottom.

View all 32 instructions

Enjoy this project?

Share

Discussions

circlesaww wrote 11/06/2020 at 13:57 point

I have no lighting fixtures reachable, but I recognize a few those who might permit me borrow a few for a video. Stay tuned, however remember the fact that it gets hard to locate time at some point of the semester and see the project here https://bestaxeguide.com/best-double-bit-axe/

  Are you sure? yes | no

zuul wrote 08/07/2014 at 20:56 point
this looks like "the internet" from the IT crowd

  Are you sure? yes | no

Alex Cordonnier wrote 08/07/2014 at 22:13 point
I've never seen that episode before, but it does look very similar (although much smaller). Good catch!

  Are you sure? yes | no

Jasmine Brackett wrote 08/06/2014 at 16:56 point
Hey Alex, you've tagged your project with 'TheHackadayPrize', but you haven't officially submitted. Did you want to? If so, check out Mike's post which has a video about how to submit, and what requirements you must have by August 20th to be considered for the next round http://hackaday.com/2014/07/26/4-minutes-to-entry/.

Also, did you noticed that this project was featured http://hackaday.com/2014/08/03/thp-entry-a-theatrical-lighting-controller-powered-by-a-calculator/. You might want to add a link to the post in the links section of the project.

Great project. Keep up the good work!

  Are you sure? yes | no

Alex Cordonnier wrote 08/06/2014 at 22:13 point
Jasmine, thanks for the heads up. I haven't officially submitted it yet because I still need to make an actual demonstration video. I'm hoping to get that done this weekend or next (whenever I can get access to a theater). And thanks for the link to the article. I saw it already but didn't think about putting the link on the project page.

  Are you sure? yes | no

Jasmine Brackett wrote 08/07/2014 at 17:14 point
Hello Alex, you don't need the video to submit, so you should do it straight away. You do need the video, at least 4 project logs, and system design doc by August 20th to meet the requirements for the next stage. You should have received an email with more details about that. Good luck.

  Are you sure? yes | no

Alex Cordonnier wrote 08/07/2014 at 22:15 point
Thanks. I'll work on that right away.

  Are you sure? yes | no

Tiago wrote 08/03/2014 at 17:28 point
No demo? :(

  Are you sure? yes | no

Alex Cordonnier wrote 08/06/2014 at 22:14 point
I do plan to do a demo later. I don't have any lights on hand, but I know a few people who might let me borrow some for a video. Stay tuned, but keep in mind that it gets tough to find time during the semester.

  Are you sure? yes | no

Gas' wrote 08/03/2014 at 11:12 point
Great project. I'm looking forward to see the Fibonacci sequence into the light. Cheap connectors is a bad idea. I never saw a Neutrik connector brocken.

  Are you sure? yes | no

Alex Cordonnier wrote 08/06/2014 at 22:14 point
I looked at Neutrik connectors over a year ago, but I believe I bought this connector because the shipping was outrageous for Neutrik. This one seems pretty good so far, although the release button isn't the smoothest.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates