Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

G2 18v25 dc motor

Is it possible to receive serial data from the controller while sending in an analog value for desired motor speed?

Maybe more of a feature request… what would it take to expand the rc airplane pwm input to except a wider range of pwm inputs to control motor speed and direction? Ie… 78hz and 5 to 95% duty cycle with 50% ± 3% for a neutral…

Thanks Ryan

Hello, Ryan.

Please note that we carry 2 products that have “G2 18v25” in the name. These are the High-Power Simple Motor Controller G2 18v25 and the G2 High-Power Motor Driver 18v25. In this case, since you mention serial signals, it sounds like you are referring to the Simple Motor Controller version (SMC G2).

You can use the SMC G2’s serial interface to read the voltage on the analog input pin; however, I am not sure how that relates to the 78Hz duty-cycle based PWM signal you described, since that is not an analog signal. The SMC G2 does not support that kind of PWM signal as an input.

The previously mentioned G2 High-Power Motor Driver 18v25 does accept this kind of signal as an input, but in sign-magnitude mode it also needs a digital DIR signal. You could remove the need for a digital direction signal by using it in locked-antiphase mode, but 78Hz is a really low frequency for that kind of control. Typically, locked-antiphase control requires a high frequency PWM signal since it is essentially switching the direction of the motor constantly at that frequency. Also, please note that the G2 High-Power Motor Driver 18v25 is not as configurable as the SMC G2 and does not have many of the higher-level features like USB, acceleration limiting, input mapping, and much more.

Brandon

I must have the SMC G2 then. My project is doing a returnless fuel pump system. I currently have it working but I add another micro controller to read the duty cycle of the 78hz pulse train coming from my aftermarket EFI ecu then drive a DAC output to the G2 analog input. The ecu has a pid controller to close the loop around fuel pressure by changing the desired speed of the pump.

If the G2 could read the duty cycle of an incoming pulse and correlate that to motor speed would save me the add on board.

This is my first video driving a low pass circuit to the analog input but it was slow and not very linear.

If your pulse widths are from 5% to 95% duty cycle, then they are well outside of the standard RC servo pulse width range, so the SMC G2 will not be able to read that as a valid signal. If using something like the G2 High-Power Motor Driver 18v25 I mentioned in my previous post would not work for your application, using a separate microcontroller is probably the next option I would have suggested. You might consider something like our A-Star 32U4 Micro or one of our A-Star 328PB Micros if you are looking for a compact microcontroller board that would take up very little space.

By the way, please note that we do not recommend our products for applications where failure could result in injury or significant property damage.

Brandon