Skip to content

Control solenoid motors using USB Midi notes. Based on Raspberry Pi Pico and MOSFETS.

License

Notifications You must be signed in to change notification settings

madskjeldgaard/midi2solenoid-pico

Repository files navigation

PlatformIO CI

MIDI 2 solenoid controller

midi2solenoid in action

This firmware will turn a Raspberry Pi Pico with 4 solenoids connected via pwm into a USB midi to solenoid motor controller boards.

It maps midi notes to one of the 4 solenoids. Note on turns it on, note off turns it off.

These midi notes are 60-63.

It also features a small auto sleep function which will turn off the solenoids if left idle, just as a safety measure.

Hardware

In the circuit pictured above, this is how each channel is laid out. One of these channel maps the pwm output of the pico to a solenoid using a MOSFET. It is quite reliable. It can supposedly be even better if you add a logic gate driver but I am not sure how to do it, so please open up an issue or PR if you know how to improve on it. Here is what each of those channels look like in a schematic:

Solenoid channel

Dependencies

You need to have platformio installed to make use of this.

Install it on MacOS by running homebrew:

brew install platformio

Compiling and uploading

To compile and upload your sketch, simply run the following command:

pio run -t upload

About

Control solenoid motors using USB Midi notes. Based on Raspberry Pi Pico and MOSFETS.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages