Talon PWM Questions (Independent Project)

Hello. My friends and I are working on a robot (separate from our schools competition), and are currently working on ordering and deciding on parts. We have a query about the Talon Speed Controller’s compatibility with a 3rd party micro-controller (Not cRIO or Sidecar). To save our wallets, we were wondering if the Raspberry Pi could control the Talon. The Raspberry pi does have PWM compatible I/O pins, but our question is: Could the Talon be controlled by the Raspberry Pi? Thank you for reading.

As far as I know, yes. In theory, anything that can produce a PWM signal can command a Talon. A quick look at the user guide says the Talon requires a signal of 1-2 ms with a neutral point of 1.5 ms as a default, but you can calibrate it to your different needs [strike](I could not find anything about how often the pulse must be sent)[/strike]. In summary, if you have a controller that can produce a reliable signal, you should be fine.

Edit: I just found that the Talon expects the signal to be 333 Hz.

The 333Hz is an upper limit, not the “expected” frequency.

Remember, this is pulse width modulation, not duty cycle modulation.

Thank you for the correction.

Generally speaking, the period of the PWM frame is 20 ms but that can and does vary depending on the specific device.

I’m working on a spinoff project from 1540, and we’ve been using a BeagleBone Black to great success. The only catch is that the BBB outputs 3.3 volts when the Talon wants 5, so you just have to run the signals through a cheap little level shifter to make it work. Not horribly hard, but I’ve been realizing just how easy FIRST makes it for Control Systems folks on FRC robots. They’re really just ‘plug ‘n’ go’ compared to just about everything else out there. (mini-rant over)

Thank you for all the replies, they have been helpful. We do realize that the first robotics kits make things much easier, but we have a tight budget and are saving money this way. Thank you again.

The Cheap and Dirty control system from AndyMark is a great alternative if all you need is a PWM signal

If the Talon is like the Vic and Jag, it doesn’t “want” volts. It “wants” milliamps (to turn on the opto-coupler LED).

It takes only single-digit milliamps or so to fully drive a Victor and I suspect the same is true for Talon.

What’s important is the output impedance of your 3.3 volt source.

With the series resistor in the circuit, the voltage is important. Whatever current the opto-isolator is designed to receive with a 5v control signal, it’ll only get about half of that with a 3.3v signal.

*Some data and calculations to support my previous post:

For the Jag, the schematic is available. The turn-on threshold is 1.6ma max. The silicon drop across the LED is approx 1.2V at 3ma. There’s a 150 ohm series resistor. So to push 3ma thru the Jag’s input would require 1.2+0.003*150=1.65 volts at the input.

For the Vic, I have some test data.

So if the 3.3 volt source is low impedance, it will most likely work just fine.

So a 5 volt signal will yield about 25 milliamps. That’s nearly a factor of sixteen greater than is required (and a lot higher than I expected*). A 3.3 volt signal gives 14 milliamps, indeed approximately half of the “nominal” 5v value. But half of a 16-fold input is still an 8-fold input, which will definitely work.

With the low 150-ohm series resistor, even a 1.5 volt input ought to be able to turn on the opto-isolator.

  • The circuitry I’m used to has 1.2k series resistors on optocouplers, giving about a 2x “safety factor” for turnon current with a 5v control signal, and limiting the current to ten milliamps in case of accidental application of automobile battery voltage. 3.3 volts isn’t quite enough to be certain of having it work in that case.

Your Raspberry Pi will happily produce duty cycle modulation (sometimes mis-named PWM). I bet it can also produce pulse width modulation, but you need to take care to produce the right signal.

For a talon, deliver a 1.5 mSec pulse every 20 mSec (or so) and you’ll be in “neutral”. Change the pulse to 1.0 mSec and it’s full ‘reverse’, and 2.0 mSec and it’s full ‘forward’. (Of course, pulse times in-between produce speeds in-between).

Note that the talon can deal with slight inaccuracies in the rate of pulses (the 20 mSec), and often responds well to pulses shorter or longer than ‘full speed’.

Let us know how it turns out!

“Slight inaccuracies” is an understatement. The rate of pulses for the Talon can be as fast as 3ms. I don’t know for sure what the upper length of the period is, but I’d guess 50ms or more.

Within a wide range, the rate of pulses (the reciprocal of the period) doesn’t matter to the Talon (or the Vic or the Jag), since they are decoding the length of the pulse, not the % duty cycle.

Don’t use the rasperry pi for what you are trying to do. The raspberry pi has very limited number of PWM pins. I would suggest getting a Arduino Uno ($35.00) or a Beagleboard Black($45)
YOu get alot of bang with a Beagleboard black. The raspberry pi you only get 1 pwm pin. The beagleboard black has 8 pwm ports and 65 GPIO pins. Also the beagboard black is more powerful then the raspberry pi.

The Arduino Uno (which is the one I have) is ($35). Though it is not very powerful (16 mhz clock) with 2kbs of RAM. It operates at 5 volts I just use a 9 volt batter unless UI have a motor shield connected then I have 8 AA batterys. Anyways Arduino is a very customizable platform and there are man versions of it. At of the Raspberry Pi and Beagleboard black the Arduino is probably the best for reading sensor data it is alot easier. Also you can get wifi/ethernet shields to connect your robot to a network and be able to tweet things or control the arduino from anywhere in the world with a internet connect (though this is advanced stuff). The best part about the Arduini is that you can build your own or you buy one at Radioshack or on the internet. Also the community for Arduino is absolutely HUGE. Also I think Andymark has a specialaly made Arduino to replace the CRIO so you can connect it to the rest of the FRC control system. Yes I am biased to the the arduino. I absolutely love the Arduino. Plus it is made in Italy instead of China though not America but still better then being made in China (just my opinion)

Buy a Arduino. Though I dont know what you r project is so I can’t help you as much.

When we do separate projects (or multiple simultaneous prototypes) we use VEX micro-controllers. They output PWM straight to a Talon/Victor/Jag. We even ran a kitbot off of a VEX controller instead of a cRIO, although the radio version (we have radio and wifi versions) had trouble because its antenna was very close to the electromagnetically noisy CIM motors. We moved the antenna as far as we could from the motors and it worked swimmingly