DMX Lighting Project

DMX Lighting

I came across some RGB LED’s the other day on oomlout ( and wondered what I could create with them. Having been a light jock in the past I decided I’d like to create my own little lighting show (to be possibly used as part of a larger project in around 12 months time… watch this space). I secured 12 for the price of £9.72 including delivery and they turned up within a couple of days.

I quickly set to work mounting them on their own little PCB with current limiting resistors & header.

From RGB / DMX Lighting Project

The plan is to drive them with an Arduino, MAX485 receiver to handle DMX interface duties & PWM Shield (from Practical Maker : Here’s the test code to check the LED’s, and my soldering skills. Notice i’m using PWM pins 9,10 & 11 for each colour:

int redLedPin = 11;
int greenLedPin = 10;
int blueLedPin  = 9;  
void setup()  {
void loop()  { 
  // All values are inverted. We'll need to deal with this later on.
    // Red
      analogWrite(redLedPin, 1);
      analogWrite(greenLedPin, 255);
      analogWrite(blueLedPin, 255);
    // Green
      analogWrite(redLedPin, 255);
      analogWrite(greenLedPin, 1);
      analogWrite(blueLedPin, 255);
    // Blue
      analogWrite(redLedPin, 255);
      analogWrite(greenLedPin, 255);
      analogWrite(blueLedPin, 1);

Here’s a quick video of the test in action. You can tell that the LED is quite bright, as it’s saturating the image.


Here’s some slow shutter pics I took of the LED in action:


From RGB / DMX Lighting Project
From RGB / DMX Lighting Project

I think the next stage is to encase the PCB’s in either hot melt glue or sillicone sealant, to afford them a little protection. Next up will be testing with the PWM shield, as soon as it turns up.

I’ll be using Q Light Controller (, and an Enttec Open DMX USB Interface ( to control my little show.


Update 09-11-2011:

I covered the top and bottom of the PCB’s with hot melt glue. It’s not perfect, but I’m not going for IP68 😉

From Instant Upload


Update 17-11-2011:

The MAX485 Transceiver chips arrived – in a GIANT box I might add – so I got busy soldering them into a piece of stripboard (that was a little oversized…) and wired them to the Arduino PCB. With a little code, and help, from, I got the second part of the project up and running, namely receiving DMX. At the moment I’m just outputting to the serial console . But eventually the DMX values will be piped along to the LED’s via the PWM Shield, as and when it turns up.

As the code from the blog above has been released under the WTFPL license (yeah, I had to look it up: I’ll be posting the finished code, but at this moment in time it’s pretty pointless due to the fact that I haven’t changed much from the original source.

Thanks to Max Pierson of Winged Victory Design for the help here – go visit his site, it’s been pretty useful for my project

Sharepoint File Upload via VB.NET

I recently had reason to upload a lot of files to Sharepoint 2010. Unfortunately the Upload item in the menu would only allow me to do this in batches of 100.  Fortunately however, you can do this from code.

    Public Function UploadToSharepoint(ByVal localFile As String, ByVal remoteFilename As String, spUrl As String, username As String, password As String, domain As String) As Byte()
        ' Ensure that we've got a valid URL.
        If Not spUrl.EndsWith("/") Then spUrl &= "/"
        ' Build the remote url, escape spaces and replace backslashes.
        Dim rfURL As String = String.Format("{0}{1}", spUrl, remoteFilename).Replace(" ", "%20").Replace("\", "/")
        ' Create a webclient.
        Dim wc As New WebClient
        wc.Credentials = New System.Net.NetworkCredential(username, password, domain)
        ' Attempt the upload.
            Using s As New System.IO.FileStream(localFile, IO.FileMode.Open, IO.FileAccess.Read)
                Using reader As New System.IO.BinaryReader(s)
                    UploadToSharepoint = wc.UploadData(rfURL, "PUT", reader.ReadBytes(CInt(s.Length)))
                End Using
            End Using
        Catch ex As Exception
            UploadToSharepoint = Nothing
        End Try
    End Function