How to build your own USB-MIDI to DMX interface

  Рет қаралды 8,535

Bass Jansson

Bass Jansson

Жыл бұрын

Repository: github.com/bassjansson/midi2dmx
NOTE: Small mistake in the schematic, flipped A & B around, check the repo for the correct one!
Press 'show more' for full project description which is down here.
Wish to support my channel? You can buy me a coffee at:
ko-fi.com/bassjansson
www.buymeacoffee.com/bassjansson
/ bassjansson
Thank you for your support! :)
MIDI2DMX (USB-MIDI to DMX-out)
A tutorial for building a tiny but powerful MIDI device which acts just like any modern synthesizer or MIDI controller, but it doesn't make any sounds, it sends the MIDI messages as DMX values to your DMX lights system instead!
Now you will not need these big and expensive DMX modules anymore and you'll never have to leave your DAW again to some other app to program your light show! Sync your beats with your lights and create a lightshow simply using MIDI notes and MIDI control changes. Need more control? Update the firmware with your custom code or create an Ableton Max for Live patch to get even more out of it! And when you add the MIDI DIN5 input plug to your device, you can even use your synthesizer or MIDI controller to directly control your lights without using a computer, how awesome!
What hardware do I need?
- An ATmega32U4 microcontroller, for example:
- Arduino Leonardo (docs.arduino.cc/hardware/leon...)
- Arduino Micro (store.arduino.cc/products/ard...)
- Arduino Pro Micro (www.sparkfun.com/products/12640)
- Adafruit ItsyBitsy (www.adafruit.com/product/3677)
- DFRobot Beetle (www.dfrobot.com/product-1075....)
- A MAX485 module
- An XLR-female connector/panelmount or a short XLR cable to cut in half
- A Micro-USB cable
- Some (jumper) cables
NOTE: Other Arduino microcontrollers are not tested. You will NEED a microcontroller which has native-USB support, just like the 32U4, otherwise the USB-MIDI won't work. There are workarounds e.g. for the Arduino Uno, but I won't get into detail on that here.
What software do I need?
- Arduino IDE (www.arduino.cc/en/software)
- Arduino MIDI Library (github.com/FortySevenEffects/...)
- Arduino MIDIUSB Library (github.com/arduino-libraries/...)
- Arduino USB-MIDI Library (github.com/lathoub/Arduino-US...)
- Arduino DmxSimple Library (github.com/PaulStoffregen/Dmx...)
How to upload the code?
Use the Arduino IDE and select Arduino Leonardo as the board, doesn't matter which 32U4 board you have from the list of boards above.
You're welcome!
Bass Jansson, Technology for the Arts

Пікірлер: 57
@bassjansson
@bassjansson Жыл бұрын
Also check out my new video where I added a DIN5 MIDI input plug! :) kzfaq.info/get/bejne/qLB5m5BkxpOYlI0.html
@JonValtandtheEvilRobots
@JonValtandtheEvilRobots 9 ай бұрын
YESSSS DUDE this is EXACTLY what I was searching for!!!
@bassjansson
@bassjansson 9 ай бұрын
You're welcome! :D
@australai
@australai Жыл бұрын
Nice work!
@bassjansson
@bassjansson Жыл бұрын
Thanks!
@keepitdialed
@keepitdialed Жыл бұрын
Well done! Subscribed!
@bassjansson
@bassjansson Жыл бұрын
Awesome, thank you!
@marco.scaligeri
@marco.scaligeri 11 ай бұрын
that's amazing! thanks for making this video. could you please make a more detailed video how you put things together, wiring and hardware you are using?
@bassjansson
@bassjansson 11 ай бұрын
Hi Marco, you're welcome! Probably I won't make another video about this subject, but I can refer you to the second video I made or the GitHub link in the description which will have some more details. You can always message or email me if you have any questions! Hope this helps, Bass
@ManfredGerhard
@ManfredGerhard Жыл бұрын
That’s super! It saves a lot of money. I’m building it :)
@bassjansson
@bassjansson Жыл бұрын
Great! Let me know how it goes. I added two tests to the repo for some easier debugging!
@ManfredGerhard
@ManfredGerhard Жыл бұрын
@@bassjansson the program in the branch usbmidi to dmx works like a charm. I control the dmx lights using ableton and it’s midi effects in general the arpegiator. I use a max 4 life device to map cc values to potis of a xone k2. The shutters were controlled by the arpegiator and the different leds were controlled by the midi controller. It super fun to use it with DJ software like Traktor and sync everything up via ableton link. It’s a full sound to Lightshow for a few bucks 🫣😅
@bassjansson
@bassjansson Жыл бұрын
@@ManfredGerhard Wow great, that's super amazing! Glad to hear :)
@keytun69
@keytun69 10 ай бұрын
This is amazing! if you were to daisy chain multiple fixtures, could you individually send them different messages?
@bassjansson
@bassjansson 10 ай бұрын
Thanks! Yes you can, but you will need to update the code to match your lighting setup! This is done in the initDmxChannels() and updateDmxChannels() functions. Check these functions and the comments I put in there. If you have any more questions, you can send me an email. Hope this helps!
@josemanuelgonzalez6968
@josemanuelgonzalez6968 9 ай бұрын
Nice tutorial!!! Thanks for sharing. I guess that you need some decoder in between the arduino device and your RGB LED strips, right?
@bassjansson
@bassjansson 9 ай бұрын
Hi Jose, if you are building it like in my video, then yes, you will need a DMX to LED-strip decoder. But, if you are capable of some Arduino programming and hardware design, you can also use the MIDI library together with a LED-strip library like FastLED, hook up the LED-strip DIN and GND to the microcontroller and there you go, no DMX needed. Remember to use a proper power supply for the LED-strips though! Hope this helps :)
@leonarda1973
@leonarda1973 9 ай бұрын
@@bassjansson Thanks a lot for the quick answer!!! Which decoder would you recommend? I want to control 4 LED RGB bars I made myself.
@bassjansson
@bassjansson 9 ай бұрын
@@leonarda1973 I cannot recommend any, as I haven't used any of those yet. Although, a subscriber contacted me and was using a 24 channel decoder found on Amazon and that one worked completely fine for him!
@leonarda1973
@leonarda1973 9 ай бұрын
@@bassjansson Thank you so much again!!!
@wojtekdeutschmann7251
@wojtekdeutschmann7251 Жыл бұрын
Great Job, i already buy the boards. It is neccesery to upload the code every time when you connect this unit to pc or just first time?
@bassjansson
@bassjansson Жыл бұрын
Hello, no, once you have everything up and running, no upload necessary anymore! Cheers
@SteveLongo
@SteveLongo Жыл бұрын
My comment from last night disappeared but wanted to say thanks for the detailed video which has been helpful. Just checking to see if this DWEII 2PCS RS485 to TTL 5V Board RS-485 Module TTL to RS485 Module with MAX13487 Chip Compatible with Raspberry Pi Arduino will work? Since I'm using Roland Vdrums with Octopad Sp30 I could use the MIDI out from the pad to laptop interfaced with this? If so, I will start ordering parts! 😀
@bassjansson
@bassjansson Жыл бұрын
Hello! What I quickly read on the internet, the MAX485 chip should be interchangeable with the MAX13487 chip, you'll have to do some research on this or just try it. Only difference seems to be how the enable pin (EN) would work, so maybe some changes in the circuit and/or in the code are required. Hope this helps!
@kidamazed
@kidamazed 3 ай бұрын
Well, this is brilliant (you legend), but why can't I buy this somewhere? I want to run lights from logic: MIDI to DMX, without additional software, just a plain conversion. I've been thinking about: DOREMiDi MTD-1024, and it's close but not exactly what I'm looking for. If i try to mimic your solution (or do you sell it perhaps?) is it then isolated? My computer is expensive and I have heard about things going horribly wrong with cheaper solutions.
@Blackain66
@Blackain66 2 ай бұрын
why is the MTD-1024 not working for you? what are u missing there??
@kidamazed
@kidamazed 2 ай бұрын
@@Blackain66 I actually bought it and it serves me well. It pretty much does what I want.
@wojtekdeutschmann7251
@wojtekdeutschmann7251 10 ай бұрын
Hi, i already buind this intarface, i installed libraries, uploaded your Arduino Ide scrypt and interface look fine - light flashing and ableton live see Arduino Leonardo midi out. But unfortunetly my device (24chanell dmx512 decoder - was checked and work with build in program) dont get any dmx signal from live via usb-dmx interface. It is possible that something is wrong with interface? I use it on ableton live 8 on PC.
@bassjansson
@bassjansson 10 ай бұрын
Hello, have you tried my test scripts? Did you update the initDmxChannels() function to match the channels of your light? Have you soldered the A/B connections to the correct pins? Check my GitHub for the correct schematic. Did you use the direct or mapped version? Please try the direct one first, and make sure you modify it to match your light. You can send me an email if you'd like more help!
@TrinityCodex
@TrinityCodex Жыл бұрын
I've build the thing but for some reason the light flickers on and off constantly. Selecting other colors does work
@bassjansson
@bassjansson Жыл бұрын
Hi! That's unfortunate, what type of flickering is it? Could it be that you accidentally turned on a strobe function in initDmxChannels? You can send me a message on Instagram if you'd like, @bassjansson
@torbaymusic
@torbaymusic Жыл бұрын
Hi many thanks for the great vids. I am going to try building this unit. Can you tell me if your wiring diagram on GitHub is correct or do I need to change the pins over, I have the beetle board as you used. Many thanks
@bassjansson
@bassjansson Жыл бұрын
Hello, thanks, you're welcome! The schematic on GitHub is correct. Though, you will need to check the pin numbers in the arduino code so that they match up with the ones on your board.
@torbaymusic
@torbaymusic Жыл бұрын
@@bassjansson Hi. Just wired my board up and loaded code etc. Tried the DMX test file and it did not work, red light on fixture came on then switched off, no further colours. This was using the beetle board, also tried a leonardo board and the same happens. So I uploaded the same sketch to a uno board and the dmx test worked fine cycling through colours as in sketch. Have you any idea why the leonardo boards are not working. Many thanks
@bassjansson
@bassjansson Жыл бұрын
@@torbaymusic Assuming everything went well wiring the boards, I guess the problem exists within the Arduino IDE. Which Arduino IDE version are you using? Is it up to date? Is the DMX library up to date? Have you selected "Arduino Leonardo" from the boards menu before uploading the code? Cheers
@torbaymusic
@torbaymusic Жыл бұрын
Wiring ok and everything up to date. Just tried old IDE just the same. Test works on UNO but not Leonardo. Anyway looked through the test DMX Sketch and deleted this: #ifdef ENABLE_SERIAL_DEBUG // Initialize serial communication Serial.begin(115200); while (!Serial) // Wait for native USB delay(1); #endif Now test works on the Leonardo boards. I wonder if you have any thoughts on this as I am quite new to Arduino coding. Many Thanks
@bassjansson
@bassjansson Жыл бұрын
Hello, somehow I saw this reply only now. It could be that the while loop is hanging the Leonardo somehow. I don't know why exactly, because this doesn't happen with my boards. It's something specific to boards having native USB. But I am glad you found this issue! How did you progress in the meantime? Everything working okay now?
@slimxix
@slimxix Жыл бұрын
you did a great job, but where do light address go?
@bassjansson
@bassjansson Жыл бұрын
So, imagine you set your light address to 10 and the light uses for example 6 channels, than in that case the light will listen to DMX channels 10 to 16. Respectively, the midi notes or control changes the light will listen to will also be number 10 to 16. Does this help?
@antonioferreyra7320
@antonioferreyra7320 6 күн бұрын
Qué tal hermano, disculpa que te escriba en español, mi inglés es un poco malo. Podrías explicarme un poco lo de la resistencia número 7? Estoy teniendo problemas de intermitencia en mis luces y creo que se puede deber a eso. Saludos
@PO-mk6zp
@PO-mk6zp 8 ай бұрын
Hiii where can I find the exact code that you have used in this video ?
@bassjansson
@bassjansson 8 ай бұрын
Hi! I do not have a branch with the exact same code at the moment, but if you go to my GitHub repo which is in the video description, you can find midi2dmx-direct in the src folder, this is an updated version which works practically the same!
@jsonslim
@jsonslim Жыл бұрын
But maximal midi value is 127, and dmx512 is 255. How to deal with this? We can multiply midi value by 2 inside arduino, but it's a some sort of workaround
@bassjansson
@bassjansson Жыл бұрын
Hey Sergey, yes you are right, what I am doing now is multiply it by 2 in Arduino. For my purposes this works totally fine, only losing one bit of precision (7-bit vs 8-bit). But I guess that there will be lights around which need the 8-bit precision for some things such as settings. In that case it would maybe be an idea to use 2 midi control changes for just one DMX channel and then creating a Max patch in Ableton to take care of it properly. Using system exclusive midi messages could maybe be an even better solution.
@jsonslim
@jsonslim Жыл бұрын
@@bassjansson Thank you for the reply! I don't know anything about system excluseive messages, I will make a recearch then. Resently I bought a lightbar and tried to control it the same way - from ableton midi track. But I also want to make a MAX4Live device to transform midi to dmx and send it to the usb->DMX512 (basically USB->Serial adapter) inside the max device. And maybe SysEx will be the better alternative.
@bassjansson
@bassjansson Жыл бұрын
@@jsonslim Interesting! I did the latter first, which is funny. Created a Max4Live device to send serial messages to the microcontroller which converts it to DMX. But, somehow only baudrate 9600 worked on my Mac, not any faster. It did work okay, but using the microcontroller as a midi device felt very user friendly. Also that it's cross DAW compatible.
@jsonslim
@jsonslim Жыл бұрын
@@bassjansson agree about midi device :) it's not convenient to open COM port every time
@7heMech
@7heMech Жыл бұрын
Is it possible to convert a non-dmx machine to dmx?
@bassjansson
@bassjansson Жыл бұрын
Yes, the MAX485 module can also be used to create a 'slave' device to receive DMX signals. I used it now to create a 'master' device to send DMX signals. Hope this helps!
@neilpk01
@neilpk01 2 ай бұрын
Is it dangerous? Or is totally safe? Because i saw this things could be dangerous... I want to control four lights dmx. Please helpme bro. Greatings from colombia
@bassjansson
@bassjansson Ай бұрын
Hi Neil, it should all be fine as long as you solder everything correctly. Biggest problem might be a short, but even in that case the computer will warn you to immediately unplug the device as it will detect the short. Just test for any shorts using a multimeter before powering the device for the first time. From my knowledge, there'll only be a big risk of damaging your computer when using an external power supply with more power, but my device in the video just uses the power of the computer's own USB port. Hope this helps!
@glennmeader626
@glennmeader626 Жыл бұрын
Link to a source for the MAX485 module?
@bassjansson
@bassjansson Жыл бұрын
Hi Glenn, if you search for MAX485 on for example amazon.com you will find the exact same modules I am using, usually packed in 5 or more. I couldn't find an official link of the module, so that's why I left that one out. Hope this helps!
@JakeJoao
@JakeJoao Жыл бұрын
Great video! I've built this, but I am unable to get it to work with any of my lights. I noticed that there is a difference in the pin assignment between the video and the GitHub code. Which should I be using?
@bassjansson
@bassjansson Жыл бұрын
Hello! The pin assignment (schematic) on GitHub is the correct one, I misspoke myself in the video unfortunately (A/B swapped). If changing pins doesn't work, tryout my test programs which are also on GitHub, this will help track down the issue!
@JakeJoao
@JakeJoao Жыл бұрын
@@bassjansson so it's not pin 1 for transmit and 10 for enable? It seems like those are the correct pins on the board so I'm confused
@bassjansson
@bassjansson Жыл бұрын
@@JakeJoao Ah sorry, I thought you were talking about the A/B connections of the DMX, which I misspoke in the video. You are right. The newest code on GitHub uses other pins for TX and EN. Change the pin numbers in the code to the pin numbers you are using on the board. Also check if A/B are connected correctly to the DMX connector pins. Good luck!
Can the ARDUINO NANO handle 64 potentiometers?
26:55
Notes and Volts
Рет қаралды 14 М.
How to build your own MIDI to DMX interface (DIN5 to XLR)
12:51
Bass Jansson
Рет қаралды 1,8 М.
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 170 #shorts
00:27
Khó thế mà cũng làm được || How did the police do that? #shorts
01:00
Building and Testing a USB to DMX interface
21:47
Tech Tips, Fixes & More
Рет қаралды 1,9 М.
Controlling Lights With Ableton Live (MIDI to DMX - Enttec DMXIS)
19:59
Julian Gray Media
Рет қаралды 185 М.
How To Control DMX Lights From A Computer Using QLC+ and uDMX Adapters
25:51
The 6 Biggest Mistakes while Building MIDI CONTROLLERS
9:38
Nerd Musician
Рет қаралды 13 М.
This diy DMX Light Rig will Change Your Live Shows
12:51
Super Valid Designs
Рет қаралды 306 М.
Never Buy a Patch Cable Again
16:43
Vertex Effects
Рет қаралды 127 М.
DMX Control for Robot Animatronics?
13:50
James Bruton
Рет қаралды 63 М.
How to record Midi Tracks to control Dmx Lights
10:08
livetraker
Рет қаралды 9 М.
USB VS MIDI & How To Setup
16:33
Ike Beats
Рет қаралды 114 М.
Survival skills: A great idea with duct tape #survival #lifehacks #camping
0:27
iPhone 16 с инновационным аккумулятором
0:45
ÉЖИ АКСЁНОВ
Рет қаралды 6 МЛН
ToRung short film: 🙏give away free meals🤗
0:47
ToRung
Рет қаралды 4,4 МЛН
KINDNESS ALWAYS COME BACK
0:59
dednahype
Рет қаралды 107 МЛН
Эй Рамазан # DamirAgroDizel
0:17
DamirAgroDizel
Рет қаралды 2,1 МЛН