iot

Exploring IoT, My First Build - DMX Revolving Art Installation

For quite some time I have been interested in working with artists to help bridge the gap of technology (specifically hardware and programming) and art, to be able to bring some of the skills and knowledge I have acquired as a software developer and apply these to the art world.

DSC_0464

Recently I had the opportunity to collaborate with two artists in Berlin who were looking to bring a sense of movement to an art installation they had built. The installation (as pictured) was a large and intricate chandelier that was to be hung from the ceiling, and the goal was to hang this chandelier from a motor that would rotate it in different directions with different speeds.

It was important for us that we created a sense of organic movement, something that wasn’t a repeatable loop but instead would appear to have a mind of its own, unable to be predicted.

The end result of all of this would be an installation that could continuously move and change in different ways over an extended period of time without the direct influence of an individual. The board would allow us to store and run the code responsible for the movement, the board would then communicate over a protocol the motor would understand, the motor would then receive this and spin the installation.

Requirements

One important factor was for us to be able to communicate wirelessly with the board. We were going to be hanging this setup from a ceiling, and once it was up, we didn’t want to have to take it down again to make changes to the code or to reboot. An ESP8266 board is a great candidate for this, they are low-cost, programmable, WiFi enabled and had enough pins to achieve what we wanted.

To achieve this feeling of organic movement we needed a board that could store and run code responsible for communicating what kind of movement should happen and a way to communicate that to a motor. We were also considering adding more functionality in the future, so having a board that would allow us to add more code and components later was also important. We decided to go for the Wemos D1 Mini, which is a mini WiFi board based on ESP8266 with 11 pins available to connect to the components we were wanting to use.

d1_mini_v3.1.0_1_16x9

We also needed a motor that was strong enough to hold up the chandelier as well as have enough force to spin it in different directions with different speeds. For this, I had considered building a custom rig with a large servo motor, but for simplicity and time reasons ended up using a disco ball rotator (motor used for hanging and spinning disco balls).

motor_image

Last important requirement was a way for us to communicate with the motor from our microcontroller unit, the Wemos D1 Mini. We chose a motor that was able to receive digital multiplex (DMX) input to control its speed and rotating direction. For our board to communicate with our motor using this standard, we would need to connect a DMX output plug to pins on our board which could then be connected to the input of the motor. Sending different signals on this pin would allow us to tell the motor what speeds and direction it should move in.

What's needed

Hardware List

  • An ESP8266 Board (I used the Wemos D1 mini)
  • MAX485 Module TTL To RS-485 (for the DMX pin)
  • 2-24V to 5V DC-DC Boost-Buck converter (this was used to step down - the voltage that I was receiving from an external power source )
  • 3-pin XLR socket
  • 3-pin XLR cable
  • DC power supply
  • Panel mount 2.1 x 5.5 mm DC barrel jack
  • Solder and wires
  • Disco ball rotator with DMX capabilities

Equipement

  • Soldering Iron

Time to start making

The first step was to find some libraries that I could use to communicate with the motor using the DMX standard. I planned to write my sketch in C++, so taking a look at a few different libraries, I decided on https://github.com/Rickgg/ESP-Dmx. The library was simple and had all the basic functionality I would need, it could write a value out along a channel that could be changed when needed. This would allow us to easily change the speed and direction with a few lines of code.

Before actually soldering all the components together (which can be somewhat difficult to reverse - for a beginner like me at least) I got all the components set up on a breadboard to test that it would actually work. This was a little difficult at times to figure out due to my limited knowledge of breadboards and circuits, so I made a diagram to follow so I knew what goes where. I will definitely do the same for future projects too - makes things a whole lot easier if you have something there to reference.

Screen-Shot-2019-04-23-at-10.57.27

After setting up the breadboard, I got to writing some code to make sure everything was connected properly - and to make sure things worked as I was expecting them to. I tested simply rotating the motor back and forth over DMX. It worked! From here I was able to play around with the code to get a better understanding of how things were actually working and from that I was able to write a small program to control the rotation direction and speed.

breadboarding

Now that everything was tested and proven that it would work, I felt confident to solder all of the components together. This was my first time doing some proper soldering and I was lucky to have somebody there to show me some techniques and tricks. If anybody else is attempting this for the first time then I would highly recommend watching some youtube videos or similar and then practice a bit before soldering anything important. With everything soldered together, it was now ready to be set up properly with the chandelier.

soldered

Next step was actually hanging the chandelier off the disco ball rotator and do some live tests.

first_test-1

With the chandelier now hanging up, we were able to test everything and tweak the code to produce the effects we were wanting - the right speeds and the right amount of turns in rotation and how often these changes would happen. We didn’t want to have to climb up and plug the Arduino into the computer every time we wanted to make a change, so we made this whole process much easier by using over the air updates (OTA’s). With the OTA’s we were able to change the code as we like and upload it over a shared WiFi connection without having to think about disconnecting the whole setup.

Some learnings

Breadboarding is really important. It allows you to set up and test the circuit and see if it works as expected and to confirm some assumptions. Having it all set up on a breadboard means you are able to tweak and modify it quite easily during the initial development stages. It can be difficult to reverse some soldering, so it’s best to get everything set up as you would like it before you make things more permanent.

Soldering has a technique. I hadn’t really done much soldering before, and I was lucky to have somebody close by to show me the ways. It’s not too difficult to learn, but I would definitely recommend watching some videos before you try or getting a hand from somebody who has done it before.

Hardware is different from software. I’ve mainly just worked with software in the past and with software one has the power of “undo”. And if there is anything that needs changing or fixing in the code, then it usually doesn’t take too much to fix this. Hardware, on the other hand, is much less forgiving. If you make a mistake you are at risk of burning out your board or components, or if you solder the wrong wires and want to change, it’s not as simple as hitting a shortcut on your computer.

Next time?

This was my first time building something like this, and so with that were a few learnings along the way. If I undertook a project like this again there would be a few things I would do differently.

One thing I learnt quickly was to buy 3 of everything. When I was purchasing my components, I bought exactly everything I thought I needed for the project. What I didn’t factor in though was potentially badly manufactured components, or that I may break some components when I was putting everything together. I had a couple of pieces break on me, which meant I had to order some replacements each time. Next time, I’ll be ordering a few of each of these components. Generally, these components are inexpensive, and you’ll usually get a discount when you buy in bulk rather than singles. The last thing I want is having delays in the project because I’m having to go back to the store constantly. The added bonus is you now have some components on hand for your future projects!

I learnt that it was important to be patient with soldering. I spent a lot of time getting everything set up and writing the code, but then I didn’t take time with the soldering. As a result, I ended up with a bit of a messy collection of boards and wires. Next time, I’ll make sure I spent some time thinking about a good setup for the wires before diving into the soldering.

When I was in the process of all of this making and building I forgot to take a minute to snap some pictures of what I was doing. Fewer memories for me to look back on, and fewer things I can share with others.

Wrapping up

The project was completed! I set out with little understanding of these technologies and ended up with a working project that was able to do what I had planned for it. The “Hello World” moment of having the code I had written spin this motor was a really rewarding feeling.

Before I started, I had only tinkered here and there with these kinds of projects. I wasn’t sure how it would all turn out, but with a bit of research, tutorials and help from some friends along the way, I was able to complete this. For anybody who is wanting to get involved with these sorts of projects, I say go for it. It can seem daunting at the start but pick something simple and go from there.

I’m super excited to be working on my next IoT projects. This experience has shown me what sorts of things can be achieved through these projects. Having some knowledge and skills of putting together hardware along with a software background opens up the potential for lots of exciting projects.

DSC_0456

Photos of the installation credited to Andrea Rojas

Enjoyed this article? There's more...

We send out a small, valuable newsletter with the best stories, app design & development resources every month.

No spam, no giving your data away, unsubscribe anytime.

About Novoda

We plan, design, and develop the world’s most desirable software products. Our team’s expertise helps brands like Sony, Motorola, Tesco, Channel4, BBC, and News Corp build fully customized Android devices or simply make their mobile experiences the best on the market. Since 2008, our full in-house teams work from London, Liverpool, Berlin, Barcelona, and NYC.

Let’s get in contact