Introduction: Duxman Lights

About: Although this is clear, I will explain it. It's me, professional programmer, computer engineer, curious and geek in general. I like to disassemble pots to understand their operation, so as imaginary I have a h…

The main objective of this project is to give a show of light and sound.
You can synchronize the song you want with the lights, for example your Christmas or hallowen decoration or any party. In this case I give you the example of my terrace with Christmas decoration, with LED strips of various colors and the wire.

Now i put some links with examples, sorry no sound but you can belive me Villancicos rock are playing

This is an example 1

This is an example 2

Step 1: Tools and Materials

For this instructable you need some material (sorry for this but this part i need to write in my language, Spanish)

  1. Welder

  2. Tin

  3. An undetermined amount of 4 and 2 wire cable (depends on the distance you want to cover), I have used 15 meters

  4. Recommended welding loupe

  5. Recommended wire stripper or electrician scissors

  6. recommended crimper

  7. and of course strips of LEDs or ELWire

  8. If you use ELWire you will need one or more investors

  9. Of course a 12V power supply

I can not tell you exactly all the LEDs and theWire that I used and where I bought it, but there are many Chinese stores like (A _ _ Expre_ _) you already know where all this material is more or less affordable.

To give you an idea of what I have used:

  • 15 meters of one color LED (Red, Green, Blue) 5 meters each
  • 15 meter RGB led
  • 25 meters of wire led wire of adas (I do not know why in the Chinese pages they call it that way)
  • 100 meters of ELWIRE of different colors (This was a download with defective colors I do not know where I bought them, I think it was through a page of sales (bargains)
  • 3 inverters from El wire
  • 1 power supply of 12 V (use the one that came with my 3d printer) but in Amazon you have several, if you can not ,use an ATX power supply, you only need a little bit of skill
  • 15 Transistors Tip 120
  • 15 Connection Clems
  • Of course a raspberry Pi 3 B +

Step 2: Welding the Material and Join All the Material

I do not think it's necessary to explain how to solder an LED strip or ElWire, because it probably opens many more well-explained instructions than how to do it.
So, I'll just leave a picture so you can see what I've done

I would just like to say that I use watertight connectors for all connections, better safe than sorry.

A few steps later I leave the diagrams of the plate in case you want to use them

Step 3: Use My Designed Hardware, V1

This is my first board version

We can control three Zones or a RGB led strip

You only need three transsistor tip120 a conexion pins and connection terminals

Step 4: Use My Designed Hardware, V2

This is my second board version

We can control 15 Zones You only need 15 transsistor tip120 a conexion pins

Step 5: Prepare Your Raspberry

I will not comment much on this step since there are already many instructions on this and I'm sure someone will explain them better than me.

You just have to install the latest version that you have raspbiam in your raspberry.

You need to install some packages

Python requirements

install the following packages

python -m pipinstall numpy

python -m pipinstall pyaudio

python -m pipinstall pydub

Raspberry stuff

Probably you need this other packages

sudo apt-get install git

sudo apt-get install python-dev

sudo apt-get install pyton-rpi.gpio

Step 6: Get the Version

In the following link you can see my code, I assume that you will not like it, so do not cut yourself, you can improve it.

Anyway if you have any comments and / or suggestions do not hesitate to contact me.

The very first version

git clone

git checkout Version-0.01

Initial release version, play Wav files, Only digital output allowed

The Second Version

git clone
git checkout Version-0.02

It allows the reproduction of wav and mp3 (these will become wav in the first reproduction)
Separate scripts are created to allow the execution of music and sequences

The web configuration is adapted

Improves playback and synchronization

Now lighting zones are defined instead of individual pins, each zone allows several pins.

The development version

git clone

I improve de code

I am constantly improving the code and giving new features, but it may not be stable.
You know what you do

Step 7: Configure All Together

Duxman Luces

More info y blog

Install download the repository

install the following packages

python -m pipinstall numpy

python -m pipinstall pyaudio

python -m pipinstall pydub

For use with MP3 file you need ffmepg instaled in your system make sure you have ffmpeg and ffprobe in your path of execution


Modify the following files in config directory or use the webserver included in the app by default in port 8000

You only neeed to navigate to http://:8000 and start to fun :)


It is the general configuration of the program This file contains

"GeneralPins" : General configured pines ( not in use) "MusicPath" : Music directory "FfmpegPath" : ffmpeg path , only for windows, "WebServerPort" : web server port


It is the time config of the program This file contains

"StartTime" : Start Time, "EndTime" : End Time "State" : Not in use "WaitTime" : Wait Time between executions


In this file we configure the music file or the sequence string

This file contains

"ProgramName" : Program name "ProgramType" : Indicate if the program use music o programed sequeneces SEQ -> Execute Secuence MUSIC -> execute with music file "ProgramInterval" : Wait time between executions "Sequences" : Array of Zones to activate

"MusicFiles" : Arrray of songs wav or mp3 files The mp3 files will beed converted to wav the first time we play then. Zones.json

In this file we configure the predefines zones with the pins used in every zone

This file contains

"ZoneType" : It is GPIO or MCP (if we use MCP we need to configure I2CConfig.json file) "Zones" : Array of Zones [ ZoneId : it is the weight or the order of the zone ZoneName : Name of the zone ZonePins : Comma separated string with the used pins in this zone ZoneType : Indicate if the zone light alone or in spectrum mode. It is usefull to highlight especific zones ] I2CConfig.json

In this file we configure the I2CDevices I use MCP23016 port expander

This file contains

"Devices" : Array of devices [ BasePin : Initial pin number for this I2C Device, in this way with MCP it is the first digital pin in this MCP I2CAddress : Address of the MCP device ]

Step 8: Execute the Programs

For use the main program execute

this command

sudo python luces/

For test a Song execute this command

sudo python luces/ -i example : sudo python luces/ -i ./music/sample.wav

For test a Sequence execute this command

sudo python luces/ -i example : sudo python luces/ -i 1,3,1,4,2,1,5,2,3,4,5

Convert mp3 to wav

sudo python luces/util/ -i -p example : sudo python luces/ -i sample.mp3 -p ../music

you'll get ../music/sample.mp3.wav

Step 9: Final Results

This is the final result.

I can not hear the music, snifffff, but I'm not telling myself. Put on rock carols with great artists like (MotoHead, Queen, Bruce Sprint, Ramones, Twisted Sister, and more) But you can create light in the rhythm of the music.

First Time Author

Participated in the
First Time Author