Please familiarise yourself with the forum rules & guidelines

iFreilicht

About

Username
iFreilicht
Location
Germany
Joined
Visits
6
Last Active
Roles
No Roles
Points
7
Location
Germany
Posts
37
2
Badges
  • Deluge MIDI Host Mod Buildlog

    Current status

    Perspective view of USB ports
    Stuff plugged into Deluge
    Everything mounted inside Deluge

    Issues to fix

    • Doesn't boot when powered by USB, only when powered by batteries
    • RK 005 doesn't connect to hub, only power available

    Original post

    Mockup of USB ports on rear panel

    Hi everyone! Bought my deluge a week ago, huge fan, such a powerful and fun device. It's replacing the OP-Z for me, which was much more portable and great fun as well, but ultimately not the right fit for a bunch of reasons.

    While the Deluge is more powerful than the OP-Z in a lot of ways, one feature I'm missing quite a bit is the ability to act as a MIDI host. Mind you, it was terribly buggy on the OP-Z (like a lot of things right now), but it was very convenient to just connect a Keystep with just one cable and be ready to go.

    So, that's what I will mod into the Deluge. Specifically:

    Important Features

    • MIDI Host with 4 USB ports - Enable the Deluge to act as a host to MIDI devices
    • Provide Power to MIDI devices - All connected USB MIDI devices will be provided with power from the internal battery/power bus
    • MIDI thru between USB and DIN - Deluge can already do that (which is awesome, btw), but I need to keep that feature alive

    Potential additional Features

    • One more CV/Gate/Clock output - Can't have enough of those, can you?
    • Battery level indicator - Self explanatory
    • MIDI Status LED - Blinks on signal receive
    • USB C input jack - I charge most of my stuff with USB C, so that would be a nice modernisation
    • Increase battery life by up to 400% - Not sure on the exact number yet, will need to be tested.

    How I'm going to achieve that?

    Short Story

    Put an RK 005, a USB Hub and a Powerbank into the Deluge, cut a few holes and solder it together right.

    Long Story

    Space

    Here you can see what the Deluge looks like with the bottom panel removed. Lots of free space, about 21mm deep.

    Inside of the Deluge

    Into this free space I want to fit an RK 005, a USB Hub, and a Powerbank. All of those things will be held in place by 3D-printed mounts that will in turn be mounted to the deluge using Female-Female M2 Standoffs in place of some of the nuts you can see in the picture.

    And here we have the rear connector area, as shown in the banner above. The 4 USB ports will be sitting underneath the CV/Gate outputs.

    Mockup of USB ports on rear panel

    Components/Mods

    Retrokits RK 005 is a Standalone USB MIDI Host and MIDI Interface. Any message it receives on an IN port will be echoed to all OUT ports, and if it's connected to a PC or other MIDI Host, will also be visible to that device. The cool thing, like a PC, it has full support for USB Hubs, so you can (in theory) connect up to 127 USB MIDI devices to it.
    It also has a configurable TRS jack that can be configured to Gate, Clock or CV output and any combination of two of those, which I could put next to the USB ports.
    And it has a status LED, which could be a useful thing to make visible as well.
    To fit into the chassis of the Deluge, I will have to desolder the TRS jack and the DIN MIDI connectors. Luckily, as the Deluge has MIDI through between USB and DIN, I won't be needing those anyway.

    Retrokits RK 005

    A 7-port USB 2.0 Hub. The flat form factor is important, as is the number of ports. Four of them will face outside, one of the ones facing inward will be connected to the deluges USB port. Then I still got two left for further mods. I'm thinking a Raspberry Pi Zero to interface with Bluetooth MIDI gear, for example.
    The case of this will be removed, of course.

    Belkin 7-port USB 2.0 Hub

    A 5x18650 powerbank kit (similar to what's shown in the picture). The case I don't care about, I only need the circuit. This will be connected to five 18650 batteries, the single one in the Deluge right now will be removed.
    I'll probably solder the USB connections, plugging in cables in there feels to error-prone and unreliable.
    If I want to make the battery indicator visisble, I'll have to desolder it as well.

    Sidenote: I will not re-use the 18650 cell of the deluge. I'm getting five new ones from the same batch that will be matched by their inner resistance. This is important for the parallel charging and discharging to work properly.

    A Powerbank kit for 5 18650 cells

    The Deluge itself will also have to be modified. First of, the battery goes out. The battery holder and capacitor will be left in place unless I run out of space. The 9V input will be desoldered, as well as the USB B connector. In the place of the latter, I'll solder a cable connected to the hub, as shown below. If I'm lucky I can just re-use the USB connector by turning it upside down, that would be pretty smooth. The SW3 header (the one the power switch connects to) will be bridged so the Deluge turns on or off as the powerbank provides power or not. The power switch itself I'm not sure about. Whether I can reuse this depends on how the powerbank behaves exactly. And, of course, I will have to cut holes into the rear/bottom plate to expose the USB connectors.
    For some additional indicators, like the MIDI and Battery LEDs, I could use the speaker grill. If I do that, I'll have to reseat the speaker and work out how to redirect the sound towards the grill again.

    System Design

    Here's the plan I threw together in paint.net (for the pedantic: Arrow direction represents logical USB downstream direction)

    System design plan for the mod

    Really quite simple. The Powerbank has to be bypassed as powerbanks normally don't forward incoming data; instead, they connect the pins using a combination of resistors to communicate to the device being charged how much current it can pull.
    And the RK 005 is bypassed for power to give more headroom for connected devices

    The Beginning

    Thanks for reading, hope you'll follow me on this journey. Maybe you have some ideas/tips as well? Feel free to share any thoughts!

  • Deluge MIDI Host Mod Buildlog

    @darenager said:
    Some serious hacking there! Probably not much use to you now but these little midi USB hosts are pretty good http://www.hobbytronics.co.uk/usb-host-mini

    Ah, I thought they could be great for transitioning to a RasPi-based host, but they only support one device, no hubs.

    @punchedout said:
    Thank you for attempting this and documenting it. Really enjoying the build process.

    Thanks so much!

    Boom, update!

    Print went well, not much to report here. The first layer wasn't great, so some of the screw holes came out weirdly, but that's alright. I did a test print to see if I could print the "floating" section the hub mounts to with bridging (an experimental feature in cura), but it sagged too much. So in the end, I went for regular supports.

    Mount on 3D printer

    Fitting went OK. It seems I was sloppy when measuring the position of the MIDI ports, so I had to file off quite a bit off the left side of the hub section. I also cut off the rear support for the USB hub, as it prevented me from fitting cables there. You can see the infill pattern, which looks rather funky. Once that was done, the part fit into the deluge perfectly.

    Mount inside Deluge

    Now for test fitting all the parts. I really messed up the RK 005 mount, the screw holes don't go all the way through and are shifted up by 1-2mm. Luckily, the cutouts for the midi ports are also too close together, so it just clamps to the part without any screws. Apart from that, everything fit quite nicely.

    Components test fitted on mount inside Deluge

    And now the biggest jump; everything mounted and soldered together. I forgot to take many pictures along the way, but I'll walk through some of the challenges afterwards.

    Everything mounted and soldered together

    This took a hell of a long time. Mounting the battery holders was quite hard. I had to cut and file them a few times and some still had to be pressed in with the soldering iron so the plastic would melt and let them slid into place. Then I didn't leave a lot of room for soldering them together, so I had to hold the cable with pliers while soldering and feeding solder into the joint.

    The power cabling was also quite a task. From the USB port, one cable goes to the powerbank, carrying only power, and one goes to the RK 005, carrying only data. The connector was not designed for having cables soldered to it directly, so after finally managing to get them on and making sure there were no shorts, I used hot snot to secure and isolate the leads.

    Hot glue on USB B connector

    However, the cable to the RK 005 also has to be connected to power coming from the powerbank, which needs to be switched together with power going to the USB hub. So, I soldered a female pin header to the 5V out of the powerbank on one lead and the Power in of the hub and 5V in of the RK 005 on the other lead, and soldered the GND of the RK 005 onto the GND going from powerbank to hub. Again stabilised with hotglue, and made to look nicer with heatshrink and tape. This was probably the hardest bit of soldering I've done in this mod.

    When doing this, I also made sure to not build any ground loops. Ground now has the same path as power input, and only fans out like a tree to all the components.

    2-pin connector for power switch

    Output soldering on the RK005 went smoothly, but desoldering was quite hard again. Not sure what it is with this board. You can also see the misaligned screw holes in this picture.

    RK 005 mounted

    Little detail on the speaker: A reflex port. I didn't have space for a proper channel, unfortunately, but it was a fun feature to model

    Speaker mounted, reflex port below

    Another piece of the puzzle: The power switch bypass on the deluge.

    And then, the final link in the chain; the spot where the deluge USB up is soldered to the hubs USB down port.

    Deluge USB cable soldered to hub

    Now everything's connected properly and should work, right?

    Damn right it does

    Deluge working again with all the stuff mounted inside

    The only difference you can tell right now is the battery indicator in the speaker grill.

    Battery indicator through speaker grill

    Now, there are a few peculiarities that this mod brought with it. The smallest problem is that the USB LED now flashes between green and yellow, probably because there's no battery installed in the Deluges own battery holder.

    But the bigger problem is that it doesn't work when plugged into USB power. With phone chargers, it seems to boot but none of the buttons work (and the led is red sometimes), and on PCs it refuses to boot altogether.

    I suspect the powerbank doesn't like charging and putting out power at the same time. I'll have to investigate this.

    Next steps

    For once, I have to investigate the power issues mentioned above. Potentially, bypassing the powerbank with a diode could already solve this problem.

    Another problem is that I already broke off the USB port after plugging in the cable for the 10th time or so, so I need to find a way to mount it more securely than just surface soldering it to the PCB.

    Then cut holes into the rear panel to expose the USB ports, and we're done.

    Thanks for reading!

  • Arpeggiator additions

    Yes please, triplets arp sync is direly needed. Maybe (to not make options impossible to wade through), one could use the <> knob to set the "n-ness" of the arp pattern? So you'd select 4/3/5/7/dotted/whatever with <>, and 4bar/2bar/1bar/2nd/4th/8th/16th/32nd/64th with the select knob as is already done.

    Could be spelled n(.)-div, like 3-16, 5-4, 4.-32 on the display. This could also be used for LFOs.

    Pattern editing would be nice as well, but that seems like a much more sophisticated change. This would require a special Arp View.

    Arp View Concept

    Arp View is opened automatically when selecting ARP->MODE.

    You can then flick through the patterns, which are displayed in a non-scale grid, and edit them as well. Every row of the grid represents one pressed key. So the bottom row is the lowest key, the one above the next key and so on.

    Arp patterns could look like this:

    UP

    DOWN

    BOTH

    Something custom

    One problem is how to allow for up-and-down movements. I solved this by having two separate sections for that. If the arp reaches the rightmost note but there are still higher ones held down, it will start from the left again with the next note being the new "lowest". Once it reached the highest note, it will jump to the section on the right.

    Maybe a setting BOUNCE would be enough, though.

    With this one could also make triplets sync happen by using triplets mode while editing the pattern, though that would be cumbersome.

  • USB power (5v) vs DC power (9v-12v) performance differences?

    There's certainly no mention of any performance differences in the manual. The CPU for sure won't overclock and suddenly allow you to play more voices, that's not a thing.

    What I can imagine is the battery charging faster when on 9V and using a stronger adapter (like 1A or more), but I have not tested that and a 1A USB adaptor may shorten charging time just as well. Overall I feel there's no use in getting a 9V supply. Any phone charger does the job properly.

  • Deluge MIDI Host Mod Buildlog

    I've recently bought a Deluge, and I'm fascinated with your mod!
    Will be following your progress to see if I'd be able to do similar to mine.

    Would be really cool if I can get it to a stage where all the 3D-Files, schematics and so on are available so anyone can replicate it.

    I got a update from Retrokits, btw: They say that this is a very common issue, but nothing they can fix.

    We alter the startup timing of the 005 almost on every firmware because one person says device A does not boot, another one has problems with device B to X.

    They also recommended I try a downgrade to older versions, but that didn't change anything. So I'll go with my safer approach.

    Little update

    I actually finished a prototype for this, and it works pretty well. You can see that I had to use 5 of the available 6 pins on the ATTiny, so there's no way of reprogramming it while it's inside the Deluge. Not to worry, though.

    Schematic

    Quick walkthrough:

    So here's a short rundown of what happens:

    If there's no power, nothing is running (of course).

    Once USB power is connected, the CHARGE MOSFET turns on. This is just done with a pull-up resistor, the digispark isn't even powered yet.

    If the power switch is flipped (simulated by this jumper wire), the digispark is powered by the battery. And immediately turns charging off. This is important, otherwise the powerbank would shut down as it does not support charging and discharging at the same time.

    It also turns power to the RK-005 (simulated by the green LED) on, either using the USB_MAIN or BAT_MAIN MOSFET, depending on whether USB is connected or not.

    And after a delay of a few seconds, the INT_5V MOSFET is turned on as well, providing power to the USB Hub and thus the Deluge and all connected devices (simulated by the yellow LED).

    Slight caveat

    This doesn't actually work with real components. The problem is that I didn't really know how MOSFETS work, so I just bought N-channel ones because they are more common.

    HOWEVER, as I now learned, N-channel MOSFETs can only switch loads properly at the ground side! For turning the high side on and off, you have to use P-channel MOSFETs. Now it would potentially be possible to redesign the circuit to only switch on the low side. However, I don't feel comfortable doing this. I'm not an electrical engineer, but from what I know this would be incredibly unsafe in this case, as it would mean isolating the different grounds of the different devices from one another, which could lead to all sort of weird issues with charge building up on the different grounds. I could see ESD problems arising or even weird current spikes when plugging the whole thing into a USB port, resulting in damage to the hardware or whatever it's being plugged into.

    So, I gotta make a trip soon and get my hands on some P-channel MOSFETS. Also get thicker wires for the power distribution. Surely there's not gonna be a single problem after that ;)