G2 Drivers with Raspberry Pi

Since Raspberry PI has PWM support is it possible to use a G2 High Power driver directly with the Pi, or is it necessary to use a Simple Motor Controller instead?


There is some variation to the number of PWM channels different Raspberry Pi models support, but each G2 High Power Motor Driver only requires one PWM signal and they work with 3.3V logic, so you should be able to independently control as many of the drivers as your Raspberry Pi has PWM channels. If you need independent control of more motors, our Simple Motor Controllers can work with the Raspberry Pi via the TTL serial pins on the GPIO header or over USB.

You can read more about using the PWM outputs on a Raspberry Pi to drive motors and find some sample code for a motor driver board with a similar control scheme on the product page for our Pololu Dual MC33926 Motor Driver for Raspberry Pi (be sure to look on the “Resources” tab of the page for additional information including some sample code for the Raspberry Pi).


Thanks for the info.

I bought two G2 18v17 drivers and they are working great with the pi. What do you recommend for using the analog current sense output with the RPI which only has digital inputs? Is there a step response board I can use, or is an ADC my only option.

Much appreciated!

We do not have any current sensors that return a digital output, so you would need some kind of ADC, though we do not carry any and do not have any specific recommendations for choosing one. Another option might be to use a small microcontroller board like our A-Star Micro to read the values using its analog pins and return the values to the Raspberry Pi over a serial or I2C interface.