Connect With Us

Crosscol

vrijdag 31 maart 2017

DMX Proto Shield

Allright, here's a project that has been underway for quite a while! Two years ago, I made a set of green LED spotlights. Back then, I wanted to make a proper controller, but due to lack of time I had to settle for an improvised one, consisting of some connectors soldered to a prototyping board plugged into an Arduino controller.
Ever since, I've been planning to build a DMX-based controller, so I can use a PC to program them. Although I quickly had a simple circuit up and running, I've been postponing designing a circuit board and building something that can actually be used for way too long. And here it finally is! This post is going to be a bit technical, some basic knowledge about electronics will come in handy.

Arduino and DMX
The controller uses the DMX protocol and the Arduino platform. I'll explain briefly what these things are. DMX is a system designed for controlling stage lighting. A DMX system consists of a transmitter (the "master") and a series of receivers (the "slaves"). Each receiver has an address between 1 and 512, and can receive one or more channels of data. For example, a simple spotlight will use one channel for brightness, while an RGB spotlight will use three channels. The transmitter can be a DMX console, with knobs and sliders, or a computer running DMX software and a hardware interface.
The Arduino is a simple microcontroller board. It has a series of digital and analog in- and outputs and can be programmed using a USB cable, without the need for additional programming hardware. Programming is done in a Java-like programming language. Expansion boards called "shields" can be plugged into an Arduino board, this controller is such a shield.

The DMX transmitter
The transmitter can be a hardware DMX controller, wich looks like a mixing console, or a PC and an adapter. Commercial DMX-adapters for PC's aren't cheap, but there's an alternative. DMX uses the RS485 electrical protocol. I bought a cheap USB-to-RS485 adapter, wich the DMX software recognizes as a generic controller.


The adapter I bought has an RJ45 connector (the type used for Ethernet cables). Most commercial DMX equipment uses XLR connectors, a round connector with 3 or 5 pins. For my system, I decided to use RJ45 connectors because, first of all, the adapter has an RJ45 connector, and second, it works with regular Ethernet cables instead, wich can be bought in any computer store and are much cheaper. This means, of course, this system can't be used for commercial DMX equipment, although it's possible to put an XLR plug on an Ethernet cable. This website does a good job explaining how to do this.
Besides the adapter, you also need software. There are many different programs, some of wich are free. The one I use is QLC Plus. Not only is it free, it's cross platform. It runs on Windows, Mac, Linux and Raspberry Pi. Since my PC runs Ubuntu, this was the best choice.

The DMX receiver
The receiver circuit is quite simple. It consists of only a single chip (a MAX485) and a few resistors. What the chip does is converting the signal voltage used by the RS485 protocol into a voltage the Arduino can process.


I have designed a simple prototyping shield for this. It plugs into the Arduino, and there's plenty of space on the board for creating a simple circuit. If you're interested in this board, it's for sale in my Tindie store.


You'll need the following additional components to assemble the shield
  • Arduino Duemilanove-compatible headers (2x 8-pin, 2x 6-pin). These also work on the Uno.
  • 8-pin DIL-socket
  • MAX485 RS485-decoder chip
  • 2 10k resistors
  • 2-pin header and jumper
  • 2 RJ-45 sockets
For the RJ-45 sockets, make sure they have the following footprint, or they won't fit on the board:


In the past, I have made PCB's myself, and there are lots of excellent tutorials on how to do this. However, there are so many affordable PCB manufacturers today it's hardly worth the effort anymore. Most are based in China and make double sided PCB's complete with soldering masks and silkscreens, something that's almost impossible to do at home without a big investment in equipment.
Now, the circuit may by quite simple, the firmware for the Arduino is a different story. The DMX signal enters the Arduino through its serial interface, and while the hardware is more than capable of handling the data stream, the default software library for serial connections isn't up to the task.
Luckily, I didn't need to reinvent the wheel. The people at Conceptinetics have written a custom library for handling DMX data, wich they released under the GPL license. I have written my own library on top of that, wich you can find on Github. I've also written a few demo projects, wich are demonstrated in the video below. This library is a work in progress, so check often for new versions.
One thing I have to point out is the jumper near the chip. The DMX data is fed to the Arduino through pin 0. When the firmware is running, it keeps this port busy all the time, and this causes problems when uploading programs to the board. The only way to solve this is unplugging pin 0, wich is what the jumper is for. It allows you to disconnect pin 0 without having to unplug the entire board.


A little demonstration
Finally, here's a little demonstration! I had put together a receiver board with a series of red LED's, an RGB LED and some connectors for servos. The board I used in this video was my first version, wich had a few flaws. The screw terminal connectors didn't fit, and the RJ45 connectors weren't wired properly. In the new version (the one in my Tindie store), this problem is fixed.


The main reason I put this board together was for developing my software library. In the demo video, I test controlling individual LED's, RGB LED's and servos.
So, to recap:
I'm working on lots more projects, so stay tuned for updates, and I hope it won't take so long to finish them as this one!

woensdag 18 januari 2017

Tiff's Axe

This was supposed to be my first video tutorial. I had my camcorder with me all the time while I was working on this, and recorded about 100 gigabytes of raw video footage. However, when I was editing the video, I realized how horrible I am at speaking in front of a camera. At first it didn't sound that bad, but the longer I listened to myself blabbering the more I hated it. Sorry, it's just too embarrassing to put online. Let's just say I sound like a complete jackass. Of course, I didn't take any pictures, so for this post, screenshots of the video footage will have to do!

So what am I building? My wife and me both love the board game Zombicide, and the player characters of the game are perfect for cosplaying. This particular weapon is Tiff's axe, from the "Angry Neighbours" expansion. Besides the axe, she also carries a submachine gun, wich will be the next project! In fact, my next project will be three submachine guns, since I will be going as Doug from the base game (wich I'm pretty sure is based on Michael Douglas' character from Falling Down).

Materials
  • Lumber, about 100x18mm (from my pile of leftovers)
  • Bolts and nuts
  • 2mm Steel rod
  • Acrylic paints
  • Wood varnish
  • EVA foam
  • Contact cement
  • Book binding glue
  • Construction glue
  • Acrylic caulk
  • 4mm PVC foam sheet
The handle
The axe handle is shaped like a bass guitar neck, complete with frets and tuning posts. To create a template, I used a picture of a bass guitar as a reference, along with the dimensions. I traced it in Inkscape, printed it and cut it out. Next, I traced the outline on a board of wood I had lying around and cut it out with a jig saw (wich I borrowed from my dad, since I don't have one myself).


The back of the handle had to be rounded with a hand plane. I had never used a hand plane before, and I was a bit clumsy with it from time to time. Luckily, the wood I used was quite soft and easy to plane. After planing, I used my bench sander to smooth the wood.


Like on a real guitar, the handle needed frets; simply painting on some lines wouldn't be good enough. I experimented with steel wire, nails and toothpicks a bit, without success. Then I found the perfect material in a local craft store: thin spring steel rods, about 2 mm. Very hard to cut (don't try wire cutters, it won't work, you need a grinding wheel), but it doesn't bend easily like normal steel wire. I cut slots in the handle where the frets would go with a hand saw and widened them a bit with a file.


Before I installed the frets, I painted the wood. I used regular acrylic paints, thinned down enough so the wood grain would still show through. The fretboard is painted in a dark brown, the rest in a lighter brown. I also painted on the markings on the fretboard and a biohazard symbol on the headstock using masking tape and a biohazard logo printed out and transferred with carbon paper.



Next, I gave the wood its first clearcoat and put the frets in place. I first cut lengths of the steel rods with my Dremel and a grinding wheel, and then rounded the ends a bit so there wouldn't be any sharp edges. To secure them into the slots I cut I used Tec 7, a construction adhesive that's strong enough to build skyscrapers. It comes in several colors, including brown, wich was perfect! I used a toothpick to put a bit in the slots, pushed the frets in and wiped away any excess that squeezed out. When they were all in place, I clamped another board on top of it and let it dry.


At this point, it still looked way too clean (not at all like something you've been carrying around in Zombieland for a while), so I applied some aging techniques. First, a dark brown wash all over the wood. This is the reason I clearcoated it first, because without it, the diluted paint would stain the wood too much. I just wanted a thin wash over the wood. After the wash, I drybrushed some light brown on the fretboard to make the color look a bit more fadedand when that had dried, a final clearcoat.


The blade
The axe blade is made out of 10 mm EVA foam floor mats, 4 layers sandwiched together. I had drawn a template in Inkscape, printed it (I'm so glad I have access to an A3-size printer) and transferred it to my foam. I cut the shapes out roughly and sanded the texture on the back away on my belt sander.


When the foam was sanded, I cut the pieces out a bit more precise (a few millimeters from the line I drew) and made a hole for the handle in two of the four pieces. To make sure the glue would stick to the handle properly, I sanded a bit of the paint off again.


For large surfaces like this, contact cement from a spray can works best. Also, the liquid cement I thought I still had had completely hardened because I didn't seal the can properly, so I didn't really have a choice. I first glued the two middle pieces, the ones with the hole for the handle, together, then one of the outer pieces, put the handle into place and finally the fourth layer.


The blade now was a single, solid block of foam. There was still a little gap around the handle, though. I fixed this with a bit of acrylic caulk. And I've probably already mentioned this before, but I'll say it again: make sure you've got acrylic caulk and not silicone, because you can't paint over silicone! Next came the messy task of sanding the blade into shape. Outer edges were done on the belt sander, inner edges with my Dremel and a sanding drum.



After the blade was sanded into the right shape, there were two things left. One, the cutting edge. I first cut away some foam with a knife, and then again to the belt sander. Two, there's a groove that runs across the blade. This was made by lightly scoring the foam with a knife, and then heating it with a heat gun, causing the cut to open up.



Painting
With the blade finished, there was one thing left to do: painting. As always with EVA foam, the most important thing is a good primer. There are lots of different methods, the most popular one being Plasti Dip, wich is hard to find here in Belgium, but my preferred method is a mixture of acrylic gesso and book binding glue. This adheres to the foam very well, and stays flexible so it doesn't crack.


I applied three layers of primer with a paint roller, and then a few layers of pure acrylic gesso over it. After it had fully dried, I sanded the entire blade, starting with 100 grit sandpaper and working my way up to 400 grit. That's why I used gesso on top of the primer. It's perfectly possible to paint directly over the primer, but the glue mixture, due to it's flexibility, can't be sanded very well.
After sanding and cleaning up the base coat, it was time for the actual paint job. First, a layer of gray spray paint, followed by a wash of dark gray. This was then clearcoated with a layer of matte varnish. On one of my previous projects, I painted on my metallic finish first and then clearcoated it, but this took away the metallic effect a bit, so this time, I clearcoated it first, and then drybrushed a thin layer of silver paint over it.


After the silver paint had dried, one last finishing - and messy - touch was needed: blood! I mixed some red and brown paint (pure red is way too bright and not really convincing), thinned it to a creamy consistency and then splattered it on with a brush. This is a messy process, and paint flies everywhere, so old clothes and lots of newspaper are a must for this!



The final result
There's one detail I added but forgot to document. My wife pointed out I forgot the tuning screws. I made these out of 4mm thick PVC foam sheet. I glued three layers together, carved and sanded them into shape, painted them and glued them in place.



And here's the finished axe in all it's bloody glory! Too bad the video I wanted to make didn't turn out the way I wanted it to. I still plan to make video tutorials in the future, though, but they probably won't involve me talking in front of the camera.

woensdag 4 januari 2017

Creating a vortex in Gimp

About a year ago, I did a tutorial on how to make eyes using Gimp. Here's my second Gimp tutorial, and this time I'm going to show how to create a vortex.



Start by creating a new image sized 1000x1000, and fill the background layer with solid black. Create a new layer and name it "Vortex Base".



Next, go to Filters->Render->Clouds->Plasma, and set "Turbulence" to 3. This will create a colorful plasma, turn this into black and white using Colors->Desaturate, with the default settings.


You now have a black and white plasma effect, we're gonna apply a motion blur effect to this. Go to Filters->Blur->Motion Blur. For "Blur Type", select "Zoom", set "Blur Center" to the center of your image (500-500 in this case), and "Length" to 100.


Finally, I adjusted brightness and contrast a bit. I set both brightness and contrast to 20. You want zoomed blur effect with plenty of contrast, but without large dark areas, so tweak the values a bit depending on your initial plasma effect.


From here on, we're not gonna touch the layer "Vortex Base" anymore, and work on copies of the layer instead. Create a copy of "Vortex Base" and rename it to "Vortex Whirl 1". Go to Filters->Distorts->Whirl and Pinch. Set "Whirl Angle" to 180, "Pinch Amount" to -1 and "Radius" to 2. This will create a hurricane-like vortex effect. Setting "Pinch Amount" to -1 makes all the difference here, it's this setting that creates the "eye" in the center.


Next, create another copy of "Vortex Base", rename it "Vortex Whirl 2" and put it on top of the layer stack. Apply the same whirl effect as on the first layer, only this time set "Whirl Angle" to 360. Hide the "Vortex Base" layer.


For the next step, you need the grid. Go to Image->Configure grid, set the grid size to 50 x 50 and the grid foreground color to orange. Enable the grid (View->Show Grid) and snapping (View->Snap to Grid).


Both vortex layers will get a layer mask. We're going to start with "Vortex Whirl 1", so hide "Vortex Whirl 2". Right click on the layer and select "Add Layer Mask". Initialize the mask to white (the default setting).


Now select the blend tool, set the shape to "Radial", the foreground color to white and the background color to black. With the blend tool, draw a radial gradient from the center (500-500) to coördinates 150-150 (this is where the grid comes in handy).


Repeat the same steps for "Vortex Whirl 2" and hide the grid again.


This still looks boring as hell, but the next step brings it to life. Set the layer mode of "Vortex Whirl 2" to "Divide", and the boring spiral turns into a glowing vortex.


This grayscale vortex will be the base for a colored, glowing vortex. The problem is, you can't merge the layers or the effect of the layer mode will be lost. How are we going to solve this? Go to the "Channels" tab, right click on one of the color channels (doesn't matter wich one) and select "Channel to Selection".


Go back to the layers tab, hide both "Vortex Whirl" layers and create a new layer titled "Vortex New". Set the foreground color to pure green and fill the layer. Keep the selection active for all the next steps!


The next step makes the vortex a lot denser. Create another new layer titled "Vortex Glow", set the foreground color to blue and fill the selection again. Set the layer mode to "Divide".


And finally, we're going to give the vortex a bright white glowing core. Create a new layer titled "Vortex Core" (keep the selection active!), set the foreground color to white and fill the selection. Ok, now you can go ahead and cancel the selection.


Add a layer mask to the "Vortex Core" layer (the same way you did with the "Vortex Whirl" layers), and with the blend tool, draw a radial gradient from the center out. In this example, I drew it from the center out about 3/4 horizontally to the left. This gives the vortex a bright, glowing core, but a dimmer outer edge.


As with my Eye tutorial, all these steps are open to experimentation. Blur effects, distortions, colors, layer modes, ... What I usually do when experimenting is wearing a headset and record everything I say, so if I stumble upon a cool effect, at least I can recall how I did it!