PWM Generator

I’m putting together a little motor controller station for prototyping. Essentially a battery, Talon, and a PWM generator from Amazon. If I’m good I’ll get a fuse in it too.

The PWM generator simply takes an input of frequency and duty cycle and PWM signal comes out. I look at the Talon manual and it says “The PWM signal used to control the Talon SRX must be between 1-2ms in duration with a center (neutral) pulse of 1.5ms and a period between 2.9-100ms.” I don’t understand this Talon requirement of the PWM signal. Can someone translate this for me?

The Talons (and most PWM capable motor controllers) pretty much expect RC style servo signals. Unlike pure PWM (where the duty cycle matters, i.e. ON vs OFF time), a RC signal is only defined by the pulse width. The wikipedia article on this is pretty useful: https://en.wikipedia.org/wiki/Servo_control

You could have a 20ms period (ON + OFF), but only the time where the signal is ON matters. So, if your pulse is 1.5ms wide, that will stop the motor controller, with the extreme ends (1.0ms/2.0ms) being full forward/reverse

Relevant quote from the wiki page:

Most RC receivers send pulses to the RC servo at some constant frame rate, changing only the high time. However, it is possible to command an RC servo to move over its entire range with a function generator set to a constant 10% duty cycle by changing only the frequency (frame rate)

OK, thanks now that makes some sense.

This is an example using arduino uno R3 and example servo code, the arduino has attached a MultiFunction Shield with male pins for servo usage (vcc, gnd, signal).

We attached the female connector from victor SPX and the necessary things to power it.

MFS has a direct input from precision potentiometer, so you just need to adjust it to get PWM signal.
Full forward, stop at the center and full backward.
https://www.chiefdelphi.com/uploads/default/original/3X/5/3/5304c1f65b2b07f0968a66ca8fdbb82c278c1c25.mp4

Our team made one of these in the offseason and it’s been fantastic for us. @NYtoWI @scubadiv3r Tagged those who were involved in making it.

Edit: we used Sparks and not talons since we had them laying around and no longer use then on any of our competition bots.

Yeah as long as your motor controller takes PWM it doesn’t super matter which you use.

We made a little box containing a voltage regulator, an Arduino Nano, and a couple potentiometers. Basically how it works is the voltage regulator just converts 12V to 5V, super cheap on Amazon. This powers an Arduino Nano, which is translating the position of the potentiometer into a PWM value that we then just hook to our motor controller. We use those potentiometers for easy speed and direction control.

You can also use a servo signal generator to do this, we wanted to control 3 motor controllers individually on our tester so that’s the reason for the Arduino.

Honestly when we made ours I didn’t worry about the frequency, I just had to figure out the range of Arduino values that translated to our forward and backwards ranges. Not the most refined method, but fairly straightforward.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.