How to build your own USB-MIDI to DMX interface

Поділитися
Вставка
  • Опубліковано 30 лип 2022
  • 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! :) ua-cam.com/video/rJIh-3a-4dY/v-deo.html

  • @JonValtandtheEvilRobots
    @JonValtandtheEvilRobots 9 місяців тому +1

    YESSSS DUDE this is EXACTLY what I was searching for!!!

  • @australai
    @australai Рік тому

    Nice work!

  • @marco.scaligeri
    @marco.scaligeri 11 місяців тому +1

    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 місяців тому +1

      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

  • @keepitdialed
    @keepitdialed Рік тому +1

    Well done! Subscribed!

  • @ManfredGerhard
    @ManfredGerhard Рік тому +1

    That’s super! It saves a lot of money. I’m building it :)

    • @bassjansson
      @bassjansson  Рік тому +1

      Great! Let me know how it goes. I added two tests to the repo for some easier debugging!

    • @ManfredGerhard
      @ManfredGerhard Рік тому +2

      @@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  Рік тому +1

      @@ManfredGerhard Wow great, that's super amazing! Glad to hear :)

  • @keytun69
    @keytun69 10 місяців тому +1

    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!

  • @kidamazed
    @kidamazed 3 місяці тому +1

    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 місяці тому +2

      @@Blackain66 I actually bought it and it serves me well. It pretty much does what I want.

  • @SteveLongo
    @SteveLongo Рік тому +1

    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!

  • @wojtekdeutschmann7251
    @wojtekdeutschmann7251 Рік тому +1

    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  Рік тому +1

      Hello, no, once you have everything up and running, no upload necessary anymore! Cheers

  • @josemanuelgonzalez6968
    @josemanuelgonzalez6968 9 місяців тому +1

    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 місяців тому +1

      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 місяців тому +1

      @@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 місяців тому +1

      @@bassjansson Thank you so much again!!!

  • @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!

  • @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 Рік тому +1

      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?

  • @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

  • @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!

  • @slimxix
    @slimxix Рік тому

    you did a great job, but where do light address go?

    • @bassjansson
      @bassjansson  Рік тому +2

      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?

  • @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!

  • @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  Рік тому +1

      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  Рік тому +1

      @@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 Рік тому +1

      @@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!

  • @antonioferreyra7320
    @antonioferreyra7320 10 днів тому

    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

  • @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  Рік тому +1

      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  Рік тому +1

      @@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!

  • @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  2 місяці тому

      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!