Introduction: Club Lighting System With MadMapper & Teensy 3.2

In 2018 I made the first version of this low budget club lighting system for a New Years Eve Party in Ramallah Palestine with my collective The UNION, more about the story and the collective at the end of this article. The system was based on WS2812B addressable LEDs running on a loop and powered by an Arduino Mega, the effect could be changed by pressing a button on the control console. This setup had a few problems:

  1. Not being flexible; there were a fixed amount of effects pre-programmed and they could be changed manually by interrupting a loop
  2. The system was hard to change physically and hard to transport since all the cables were soldered for the measured lengths
  3. The system was not synced to the beat
  4. The system was fragile
  5. No brightness control
  6. Hard to fix/troubleshoot
  7. Max Distance without data interference or noticeable voltage drop was 10m from the Mikrocontroller and 4m from the power supply
  8. Max # of LEDs was 700 LEDs

For those reasons, we decided to build version 2.0 of this system. I made sure that those problems should be solved by having the following points on mind:

  1. Easy to mount and dismount
  2. Easy to operate by anyone. I don't live in Palestine where this system is being used. Thus, it is mostly operated by The UNION team when Im not there. This tutorial is also for them in order to troubleshoot and understand any part of the system when needed.
  3. Easy to repair (when needed) by 3rd parties

  4. Low energy consumption

  5. Uses Addressable LEDs

  6. Maximum Budget 500€

  7. Works over long distances with minimal interference

  8. Uses a Projection Mapping software to sync it with the music/BPM, do effects with it, and use it simultaneously with a projector for the visuals

  9. Could be configured for 1200+ LEDs

After long research I found a document from a projection mapping software called MadMapper explaining how to connect a Teensy 3.2 Microcontroller with the software over Art-Net. The file is attached in this link from MadMapper website.

This project is meant for people with sufficient knowledge of Microcontrollers (Teensy 3.2) , Addressable LEDs, Embedded systems and basic knowledge of using Ethernet to transfer Data. The attached links might be helpful.

I did not find many projects or documents for a lighting system used in that purpose. Lighting up a club. That is why I decided to make my own tutorial and share it with any clubbers, makers or technicians. Free and open source to everyone. I hope I can see people redoing and re purposing this project for their own uses in their own spaces.
Please contact me on arori.yazan@gmail.com If you have any question, see any possible Improvements, wrong Information or simply want to know more about the project, the collective, the clubbing scene in Palestine.

Supplies

Materials Bought online (From Germany- Amazon and China- Banggood)

TOTAL: 228.2

Materials Bought Locally (From Palestine- Prices might be higher than in Europe)

  • 10m X CAT 6 Cable
    1m = 0.5€
    10m = 5.0€
  • 2 X 15m Male to Male CAT 6 Cable
    15m = 9.0 €
    30m = 18.0€
  • 3 X 1m Male to Male CAT 6 Cable
    1m = 1.2€
    3m = 3.6€
  • 1 X 5m Male to Male CAT 6 Cable
    5m = 6.0 €

  • 30m X Insulated double 16AWG solid electricity cable (LowVoltage- High Ampere)
    1m = 0.7€
    30m = 21.0€

  • 300 X Ziptie
    300 = 15€

  • 5 X Aluminium LED Profile with Milky screen (2m Length X 10mm inner Height X 10mm inner Width)
    1 = 9.5€
    5 = 47.5€

  • 5 X Metal Hanging cable (Kit) for hanging the Aluminium Profile on the celling
    1 = 4.25€
    5 = 21.25€

  • 15m X Double sided Foam Tape
    5m = 3.0€
    15m = 9.0€

  • 1 X Gorilla Clear Epoxy Glue
    1 = 3.7€

  • 5 X Hot Glue Gun Sticks
    5 = 2.0€

TOTAL: 152.05

Tools:

  • 70W Soldering Iron
  • 50g Soldering Tin
  • Solder Weck
  • Solder fan
  • Helping Hand
  • Wire Cutter
  • Wire stripper pistol
  • Network Wire Punch Down Tool
  • Digital Dot Starter Cap SK6812 Controller
  • Rotary tool
  • Hammer Drill
  • Powered Screwdriver
  • Hot Glue Gun
  • Multimeter
  • A laptop with a good graphic

I had most tools, had to buy a couple of tools that costed me almost 40€. If you have to buy everything it might cost 120-150€.

I also had to rent the projection mapping software MadMapper for a month for 45€ including German Taxes. You could rent it for 3 months or a year for a better deal. If you have the money for it, buy the software and support the developers!

Total Budget= 465.25.

Step 1: Understand Your Space and Sketch a Design

Weather you are planning to rebuild this project for a club, a bar or even your own room you'd have to understand its dynamic and sketch a design before buying any of the materials.


Points to look after when designing your system:

  1. How big is the space, and how much light do you wanna have in this space. It depends on what is the space used for.
  2. The shape of the space. Is it a quadratic room? Does it have a high celling? How many windows are there if any.... etc
  3. In case of a club or a Bar, what kind of music is gonna be spinning there? This will give you ideas for the general design
  4. Do not leave a long distance between the LEDs to one another and/or the LEDs to the power supply. Since we are working on high frequency data transfer, signal could be distributed through long distances. Likewise, when using low voltage (5V in this case) The voltage drop across the distance of the cable increases drastically when the distance increases. This tool helped me calculate the voltage drop and helped me decide which cables should I use for supplying my LED fixtures with power. I got a 7.5% voltage Drop when using 12AWG cables at 5V running 7.2A. This could be hacked by increasing the voltage from the power supply itself and getting higher voltage drop and longer distance. (If increased to 7.5V, A 14AWG could deliver till 5.11V at a distance of 20m). Find what fits you and use it.

In our case, we found a kitchen under a pool (literary underground) that wasn't operating in the winter. We removed everything from it and left the appliances that would add something to the aesthetic. It was 9m long X 3m wide as shown in the sketch. The idea of the initial design was to make something that moves you towards the Dj and will get you into the loop. The stretched rectangle shaped room, the white kitchen tiles on the walls and floor helped inspiring the design. The final result was a combination of long straight LED strips and zig zag shaped LEDs was chosen for the final design. 5 light fixtures were used. Each was 2m long. Total LEDs used-> 10m @60 psc per meter the total of LEDs was 600 LEDs.


The power supply (PWR) was screwed to the celling in the middle of space to decrease the voltage drop across the 5 LED fixtures.

Step 2: Gather Your Parts and Prepare Your Workspace

After drawing a sketch and knowing how much materials you would need, get all of the materials (With extras) and start preparing for your build. This step is important since it could save you tons of money if you did your research well and will minimize unused materials.
Always buy your micro controller from its producer and any parts related to it. Its the only reliable source. I choose the Teensy 3.2 for this project as the brain of the whole system because of the relatively big flash memory of 256 Kb, 64Kb RAM, 72 MHz clockspeed (Important for operating ART-NET). Teensy 3.6, 4 or LC could be used for this project but I suggest sticking to 3.2 or 3.1. Specially if you are going to use OctoWS2811 Adaptor.

When it comes to the addressable LEDs, I choose the WS2812B since they were the cheapest option to what they offer. You can control every LED color (RGB) individually. Running only 1 data cable for the whole line and using 5V. It is hard to find 5V power supplies, specially those that got 40+Amperes. Check its availability locally before you proceed. If you are using different number of LEDs you can calculate how big your power supply should be. Running 5V, one WS2182B LED draws 60mA (20mA Green, 20mA Red, 20mA Blue) when running on full brightness. Doing the math; 100LEDs draw a Maximum of 6A. In our case, we used 600LED expandable to 1200LEDs meaning that a 70A power supply was needed (60mA X 1200LEDs =72A).

Buying the LEDs is a bit tricky. They are pretty popular now and alot of big retails are providing the LEDs for a cheap price. I found that Aliexpress was a reliable source when it comes to how much it costed. BTF Lighting provide really nice LED, that I had no problems with. They are however relatively more expansive from amazon or ebay than Aliexpress.

I used Ethernet cables to transfer data between the Teensy and the fixtures and between the fixtures with one another. This was done for the following reasons 1) mounting/dismounting the whole system becomes way easier 2)Data loss throw long distances decrease. With ethernet cables, you can connect the last LED dot about 50m away from the microcontroller 3)compatible with OctoWS2811 Adaptor as shown in the picture
Rj45 Cat6 Keystone jack was used to make this connection possible.


After planning everything out and getting your materials, make sure you have a nice clean workspace to make all the soldering and building easier and smoother.

Step 3: The Brain of the System- Teensy 3.2 and OctoWS2811 Adapter

The WS2812B LEDs work with 5V. The Teensy is unfortunately not 5V tolerant. PJRC thought about this and made the OctoWS2811 Adapter. This adapter has a 74HCT245 buffer chip or logic shifter. This chip shift the 3.3V Output data (coming from the Teensy) to 5V to make it WS2812B tolerant. In addition to that, the adapter has 8x 100ohm resistors for higher data quality. They choose a CAT6 RJ45 as the output port which a good choice for sending high quality- low interference data over long distances for a cheap price. The schematic of this adapter is shown above. There are two RJ45 output ports, each having 8 connections, 4 of which are Data and 4 are ground. Every Data cable is meant to be connected to an LED data port and the ground should be connected to each fixture to close the electrical circuit and allow data communication between the LED fixtures and the Teensy. This connection also allows Microcontroller Independence from the main power supply. This is a safety measure is case of power supply failure or over voltage.
I soldered long male headers to the teensy and female headers to the adapter. This way, the connection is strong and secure, but the teensy or the adapter could be replaced at any time.

To understand how the Teensy work, I found this good article by the producer PJRC.

PJRC also provided good documentation for the OctoWS2811 Adapter.

Step 4: LED Fixtures-Aluminium Profile

The Aluminium profile used had the following dimensions 2m Length X 14mm OuterWidth(10mm Innerwidth) X10mm Height. Those were the only available option locally. Lucky they fit perfectly with the WS2812B (IP30). It wasn't deep enough though to fit the CAT6 cable and the LED strip. I had to fix the LED strip with a double sided foam tape and the CAT6 had to be attached externally with zipties with a distance of 50cm between each ziptie as shown in the draw above (Im sorry for my bad vector drawing skills)
In addition, two holes were made on the back to be able to insert a metal rope that will make them attachable to the ceiling.

Step 5: LED Fixtures-WS2812B

The LED strips that I bought were 6m long which is perfect if we divide that by 3 will get 2m without any extras. I made 6 LED fixtures with the 12m of LEDs that I bought. One LED fixture was extra in case of a damage and we had to change any of the other 5 fixtures.
Every 50cm there was a soldering point, I desoldered the led strip at those points making 3 perfect 2m long LED strips.

Step 6: LED Fixtures-XT60 & Voltage Supply

XT60 was my choice of electrical connector because its popular, easy to get, cheap, handles high ampere on low voltage, easy to connect/disconnect while remaining reliable and well attached when its connected. I soldered small Extension jumpers between the LED strip and the XT60 connector so that the connector can be outside of the Aluminium profile. All the XT60 connectors on the LEDs were female connectors and all the cables that went from the power supply to the LEDs were male connectors. I had a female connector attached to each end of the LED fixture.
Using a solid core copper 18AWG cable, the power supply cables were soldered to the XT60 male connectors at different lengths. (2x 5m, 3x2m) for them to connect the power Supply with the LED fixture.

Step 7: LED Fixtures-Data Connection With CAT6 & RJ45

The middle port on the addressable LEDs is the Data port. The LED fixture will get the data for all 120LEDs from this port. In every LED piece there is an integrated chip that translates the data coming according to the address given to it from the Micro controller, each LED receives 3 bytes. Those are the color bytes (Red, Green, Blue). With those 3 bytes, the brightness, color and effect could be controlled for every LED of the system using 1 data cable or multiple data outputs. For every LED fixture (120 LED PSC) I soldered one CAT 6 cable to the data port as shown in the photo. Please be aware that the WS2812B Led strip has a direction for data flow, it is shown by an arrow. I soldered data cable one from one side where the arrow points away from it.

After soldering the data cable, a ground cable was soldered from ground and both cables were connected to the RJ45 keystone port using the Network Wire Punch Down Tool as shown in the photo. The keystone port has color coded Palette to how the connection should be done. I used the CAT6 T568B Termination. After soldering the data cable to the LED strip and pinching it down. I took 2m long CAT6 cables and pinched down all of the other pins to the keystone port (for the first LED the orange color from the CAT6 cable was used. By the other end of the LED strip I pinched down the reminder of the cables; blue green and brown). This way all of the data coming from the Mikrocontroller is being transfer using the LED fixture. One Data cable out of the 4 that the CAT6 holds is being used by the fixture, the other 3 are extended by the fixture and extra CAT6 cable. This extra CAT6 with the reminding 3 data connections has a keystone port on both sides, is 2m long and is on the outside of the aluminum profile fixed by zipties. The zipties go through the holes made earlier from both sides of the Aluminium profile.

Step 8: LED Fixtures-Finalizing

After soldering the power connectors and the Data connectors, I marked every LED fixture according to the Data pin that it was using (The color according to the CAT6 T568B Termination) and the number of the LEDs and also the number of the fixture according to its position from the design.
Before fixing the LEDs I screwed the mounting kit and the metal cable that would be mounted to the celling in the holes that were made earlier on the back of the fixtures. I mounted the LEDs with double sided foam tape to the Aluminium profile for extra rigidity. The RJ45 keystone ports and the XT60 connectors were fixed in position with the Gorilla epoxy glue. Extra epoxy was added to the sides of the Aluminium profile lip to prevent a short circuit between the XT60 and the Aluminium.
After this was done, I mounted the milky screen to diffuse the light from the LEDs. Those screens were sold with the aluminium profiles.
The 5 LED fixtures were set on the ground and were ready for the first test.

Step 9: Set Up the Sound System

This process might not be necessary in every case. If its not, rethink your choices.
It ain't no good party without a good sound system. Invest In getting a good one
WITH ALOT OF BASSSSSSSSSSSSSSS

Step 10: Software- General

Check out this tutorial to connect your Teensy to your laptop and use it with the Arduino IDE software. For that you need to download Arduino IDE and Teensyduino and walkthrough the tutorial to configure them together.
After doing that, run test code to make sure that the connectivity is available between the software and hardware. Try the easy blinky sketch code. The Teensy usually doesn't give any signs of life while its running, no light or sound or anything. That shouldn't worry you, its working. After successfully using blinky code to get the communication ready between arduino and Teensy, I used the code from Madmapper to check the connection between Teensy OctoWS2811 and the LEDS. The Prototyping and testing process took the longest time of all (about two months).


Madmapper uploaded a really good instructions for how to use their software with Teensy and the WS2812B Addressable LEDs. Find it in the attached folders.
After downloading the simple test sketch code attached, configure it to your needs with small portion of the LEDs that your gonna work with (60LEDs-> 1meter) Check the pin number, remove the clock pin (If you are using LEDs that doesn't require clock), the number of LEDs and the LED chip model. For this you'd also need to download the FASTLed Library.

After that working and connecting it directly with a CAT6 cable to the OctoWS2811 to the LED strip and a power supply. I downloaded the demo version of Madmapper and used the FastLED-serial-only-single-line.ino file and changed the LED configuration and ran a test with Madmapper. This is documented in MadMapper LED output tutorial.
As soon as that worked successfully I played with it a bit as shown in the videos and purchased my one month MadMapper License.

Step 11: Software- Arduino

MadMapper also provided a bit of code for Arduino and Teensy and how they should work with the MadMapper protocol and ART-Net to create an acutal connection between the Teensy and Madmapper. They also included FastLED-serial-only-two-lines.ino which connects 2 or more LED signal lines to the Teensy. I edited this code to make it possible to connect 5+ Lines.
My code and the one from MadMapper are both provided above.
The important steps are also shown of what you should and shouldn't change in the code. The new pinout that I changed was declared according to OctoWS2811 and Teensy Diagram.

To change the code/Add more LEDs :

  1. change the #define NUM_LEDS_LINEX to the amount of LEDs your gonna have per line output
  2. change the#define DATA_PIN_LINEX XX to the right number from schematic above. if youre not using OctoWS2811 adapter, you can choose which ports do you wanna declare as an output pin.
  3. Remove the clock if the chip dont require it
  4. Change the Chip type
  5. Add the #if NUM_LEDS_LINE0 > NUM_LEDS_LINE1
    #define NUM_LEDS_IN_LONGEST_LINE NUM_LEDS_LINE0
    To as much LED lines you have
  6. Add more FasLED Buffers

Once that is done and your happy with the code. Upload it to the Teensy and open MadMapper.

Step 12: Software-MadMapper

Here comes the most interesting part.
After uploading the code to the teensy, connect it to your laptop and open MadMapper.
After running MadMapper and entering your Serial Number, follow these steps:

  1. Open a new project
  2. Go to tools -> preferences
  3. Select DMXout -> ArtNet
  4. Setup LED Devices -> then the Teensy should pop up, select it
  5. Add new light from the left bottom corner "+"
  6. Change the Settings according to how you are configuring your system. I choose to give every LED line a universe so all of them could have the start channel 1 and the channel count is basically how many bytes do you have for every line (360 in my case; 120LEDs in a Line X 3 colors"RGB" =360). For every line there was a different output. So the out line is in an ascending order (From 0 to X). The out channel adds up to how many bytes you have in a channel + all the other bytes you defined. They all add up so that ArtNet can assign those bytes to the the right LED. If you are using an extra DMX usb controller make sure to not forget the channels it would be using. Try assigning it to a different universe than the ones used.
  7. Go to Bulb sign, create a new fixture by clicking on the figure under DMX+ and rename it
  8. Go to edit and write the amount of LED that should be assigned for this channel and the color order (RGB OR GRB etc)
  9. Save the fixture settings and assign it to a light from the menu on the left
  10. Add all the LEDs that your gonna be using. Make sure that you are changing the universes accordingly
  11. Group all the fixture
  12. Resize them and fix them to how you are gonna position them in real life
  13. PLAY WITH THE SOFTWARE

The software is so much fun and versatile play with the sound input add videos etc. Here comes your creative part ;)

Step 13: Assemble Everything and Run Your First Test!

After Playing with MadMapper for a while, its time to take the LED fixtures and the Controller and the laptop with MadMapper and do a test run in the venue. I didn't have enough time unfortunately to take Many photos for this Last bit since we were running late on the schedule.

I started by laying down the LED Fixtures on the floor as In the sketch connected them with 1m CAT6 cable between zig zag fixtures and a 5m CAT6 Cable between the two side fixtures. The side fixtures took there signal from the mircrocontroller through a 15m CAT6 cable connected Directly to the OctoWS2811 adapter and the zig zag as well. The power cables were connected as well to the power supply and to the fixtures through the XT60 connectors. It doesn't matter which side your supplying the power for your fixture with (left or right) the electricity will flow through the LED strip as long as its shorter than 2.5m. Connect your power supply first then the micro usb cable from the Teensy to your laptop and open Madmapper. Test the lights and map them accordingly. Once everything is working, mount the Fixtures to the celling and the power supply as in the sketch. run all the cables above the lighting fixtures to avoid hanging cables and wavy hands from dancers touching them.

Your DONE! Congratulations! now setup some ques and you'll be ready to throw a party with the new lighting system!

Step 14: Palestine Underground Music Scene

This Lighting system was Made for the UNION 2020 New Years party. Union is a collective body that brings together the efforts of artists building the electronic music scene in Palestine. Creating a solid base and a thriving network for creative minds taking part in building the Palestinian electronic music scene. Pushing towards bigger events, international collaborations from around the globe and creating yearly music festivals in Palestine.

Since couple of years, the underground music scene in Palestine has been growing exponentially, however, finding a venue was always a big deal. Cause there were simply none. Parties were always small and used to be made in Houses or Hotels. You see why that doesn't make sense, it ain't no Techno party in a 5 stars Hotel with people wearing all black going to a techno party and others in suits going to a meeting.
So two years ago we decided that a real venue is needed with the proper sound system, lighting system and audience. I used some of my basic knowledge of Arduino and electronics that I got throughout the years from a summer camp I was tutoring at and from the University to build the lighting system. At the time I was still in my first semester of my electrical engineering bachelor in Berlin, some Professors were kind enough to help me when I needed. After weeks of designing, researching prototyping and programming, I made a basic lighting system using 10m of the famous WS2812b addressable LEDs and an Arduino mega. I programmed the Arduino with a "Dumb" Loop that just keeps on looping without syncing to the music or the BPM. It didn't even have brightness or color control, there was only one button to change the effect. and this was version 2.0 of the lighting system.

The Please note that Iam still an electrical engineering student so any wrong information or missing information might be there by mistake. Please let me know if you see any of that, or simply have a question, improvement, wanna share your design or criticize anything. This Instructables will be listed under the Make it Glow Contest.


Watch this Documentary from boiler room or this set from SAMA' to know more about the thriving techno scene in Palestine.

Make it Glow Contest

Participated in the
Make it Glow Contest