Can the XRP motor drivers control a 5v solenoid?

BRomagosa recently described a solenoid driven drum machine using 5v solenoids to ‘strike’ various percussion instruments.

Can the motor drivers of the XRP be used to control a 5v solenoid like these?

1 Like

Hi there!

FYI your Discord link doesn’t work for others (or maybe just me?), I’m guessing because you have to be in that server to view it. A screenshot or something would be great!

Yes, I believe the XRP Control Board could be used to drive solenoids, as long as you’re careful about it:

  • You’ll need to do some custom wiring to connect the solenoid to the 6-pin connector on the control board.
  • Be mindful of the voltage limit of the solenoid. With 4xAA batteries installed, the motors (or solenoid in your case) will be driven with 6V, whereas that solenoid is only specified for 5V. Truthfully, 6V would probably be fine on that solenoid, but just be aware that it could cause damage in the short or long term.
  • Be mindful of the current limit of the motor driver. The XRP Control Board uses the DRV8835, which is rated for 1.5A per output. That solenoid’s datasheet specifies a current consumption of 1.1A at 5V, so running it at 6V will increase the current consumption. The DRV8835 does have overcurrent protection, so it should safely shut down if its limits are exceeded.
  • It might be worth adding a flyback diode to be extra safe. The DRV8835 should tolerate some amount of Back-EMF, but I’m not certain how much will come from that solenoid.
  • Use 100% duty cycle (effort if you’re using the MicroPython library) on the motor driver. Lower duty cycles are used to make brushed motor spin more slowly, but solenoids are really only intended to be binary on or off.

Hope this helps!

1 Like

Thank you for feedback on Discourse and the detailed answer to my question!

1 Like