Velocity and PWM

Hi there,

I would like to be able to manipulate PWM with the velocity controller (alternatively using a CC-controller).
Is this an easy customization on the device/arduino code? I want to use a combo of dc-motors, leds and solenoids.

Thank you.

The latest Automat firmware emits a single pulse and allows you to control the pulse width via velocity control. I also have modified my own Automat firmware to emit shorter repeating pulses and control that pulse width via velocity. I will share that version of firmware if you are interested.


Hey! Thanks - yes, I’m very interested in that!

Hey @smeidell & @lefty sorry for a delay with answering.
I just getting back on track after my visit at :wink: Besides that i am working on a couple nice hardware extensions for the toolkit. I would love to work on software capabilities in a joined effort if possible / interesting for you.

@lefty I had a quite long discussion regarding versioning the firmware last week. I don’t know if you have seen that i put the version you once made here:
But this is still a somewhat hidden release, as i was not sure how to handle different versions in the future.

I think best case all important features are always embedded in the latest version / release. And configurable through some interface / API - this could be MIDI CC or Sysex.
User facing there could be a JUCE App, MAX App or a WebMIDI Interface if suitable and needed beyond MIDI as configuration interface.

Regarding features i have a specification document with some Links to other projects and examples. But did not find the time and person to work on this yet.

Next to the forum there is a dadamachines slack channel - where i am gathering people who want to be involved in the development of dadamachines as a label for open source music hardware. And i am opening a workshop / lab for this idea in Berlin next week.
As well i should finish my work on the first draft of the Label “Manifesto”.

… Talk soon! J

1 Like

The version at github is not the one @lefty is talking about, I guess? Testing it now, and it only sends out a single pulse.

@smeidell The version you want is the one at the link provided :

However, it doesn’t start off with true PWM by default. That version of firmware allows you to choose between 4 different velocity schemes. You can either set it into the true PWM mode by sending in a program change to patch 3 or you can change line 39 of the .ino file to

int velocity_program = 2;

1 Like

Tried sending prog.change 0 - 3, and 2 and 3 seems to be operating identically
0 and 1 have a noticeble different effect on velocity
2 and 3 is only always on or always off (0 being off and 1 - 127 being on)

Since I’m a newbie, I unfortunately don’t know how to change the ino file and then make it into a uf2 file…

@smeidell I wrote a bit about how to install the software package for the automat here:
Not sure if this is enough to make it work for you.
You don’t need to make a UF2 file. You can just directly upload code from the Arduino IDE to the automat.

Do you see the Midi LED flash when you change the program?

Program 0 should have the same velocity behavior as the previous firmware. One pulse with the width varied by the velocity.

Program 1 is similar to Program 0, except that I flipped the response curve to have a more natural feel with my set of solenoids.

Program 2 will use repeating (very) short pulses during the first second of holding a key down to get different impact velocities on the solenoid. So velocity 127 = hard and velocity 50 = soft. Unlike programs 0 and 1, it will not release the solenoid until it gets a key up event.

Program 3 is like the initial version of the firmware where there is no velocity sensitivity.

If you send a note event with low velocity and hold down the key, do you see the expected behavior?

Thank you for taking the time, @lefty, I did a more thorough check, and do get the expected behavior.

What I’m looking for is a way to control DC-motors in a similar way – but in my case I want that first second you are referring to, lasting the duration of the note. Maybe unusable for solenoids :smiley: That way I can control the speed of the DC-motors with a midi controller (in my case an Octatrack). Is this something I can easily incorporate in the code myself?


Hi @smeidell Do you want the pwm to continue while the note is being held down? As you’ve guessed that does not work well with solenoids, but I can easily create a new mode (assigned to a different patch) that continues with the PWM while the note is held down. Do you have any documentation on the motor you are using as to what the minimum PWM duty cycle is?

Hi @lefty! No, I don’t have specs on PWM, I’m trying out different motors – both 24V, but one is 3000RPM and one is 22000 RPM. But I think I could adjust the PWM min/max values in the code when testing with if I locate it. It would be fantastic to have a new mode for DC motor control!

Hi @smeidell. I added a mode for continuous PWM that should be good for DC motor control. You access it on patch 5. The pulse width is controlled by velocity but I use a 0.5 ms periodic waveform. It should be merged to the main branch soon.

1 Like