Is there a way to test the CIM without roboRIO? I was thinking about using a separate PWM controller, it would use the motor without programming and specific FRC motor controllers, just mechanical adjustments.
yeah, this is just to create a new mode to test, I’m not gonna use this in an official competition.
We have a switch with battery in and anderson out leads that turns a CIM on without any control other than on and off. But a PWM tester will probably work better with the controller hooked to a battery and then PWM out.
The best way long term is to disassemble an old 12 volt drill, remove the motor, and then put connectors on the output. Then you can use it to supply variable speeds. You can find more info by searching here.
We use a PWM signal generator
You connect it to the PWM signal inputs on a motor controller and it allows fine control of a motor without code. This one has two PWM outputs so you can control two motor controllers with one input (they will be the same output, so if you want two different speeds, you will need to get two of these).
We built a box that has a battery a couple of motor controllers and PWM generators with Anderson connections for the motors. You can get a PWM generators from RC hobby stores or Google.
as far as I can remember, my first year dealing with the current version Spark Max you can actually connect them to the CIM motor and connect the spark max to a computer or laptop for testing
this should help SPARK MAX Operating Modes - REV ION Brushless
Cool!
But to control a motor, I will need to connect Spark Max directly to the battery with the USB Cable, right? Because USB isn’t 12v and I don’t know if it works.
We were using the below generators with victor sp’s and were running into issues. It appeared we could configure the frequency and the duty cycle on the unit. After connecting it to a PDP it would only spin the motor very slowly from duty cycle values 0-5%. From 5-100% it would not power the motor. Any idea why this could be? I lnked the units we used below
DROK Frequency Generator, DC 3.3V-30V 5-30mA 1Hz-150kHz Adjustable Output PWM Pulse Duty Cycle Square Wave Function Signal Generator Module https://a.co/d/dGD7JkY
We have had success driving TalonSRX, VictorSPX and SparkMax all from Arduino Mega and Arduino Uno. Ground comes from the Arduino and the Signal is any of the PWM indicated pins. The 5V is unUsed as there are only two wires used in PWM mode (on TalonSRX and VictorSPX you use the CAN wires as PWM). The Motor Controllers provide their own 5V.
If you use Servo and Write microseconds rather than the usual way of analog Write you can control them. Per the TalonSRX manual.
After a PWM connector is installed, the Talon SRX will readily interface with the NI roboRIO and many other microcontrollers. 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.
If OP wants to see how cheap they can go, we bought these 3 for $8.99 and they work great with our old Talon. Each one has 3 channels and took our PWM cables. PWM generator
PWM is used in two in two contexts that lead to a little confusion.
PMW used for the output of the motor controllers which changes the duty cycle of output to mimic a voltage controller.
So you adjust the duty cycle to get the desired
A PMW control signal has its roots in hobby RC servo controllers. The radio control were transited by analog transmitters and multiple PWM signals were multiplexed on one analog channel. A little too much detail. Anyway. The individual PWM signal has a variable on width that defines the command (in FRC terms 1MS=-1,(-100%), 1.5MS=0 (0%) and 2MS=1(100%). For the controller to stay enabled the signal has to be transmitted within a certain time period, not at a particular frequency.
So with a square wave generator you will have to adjust the Frequency and duty cycle to get the desired on time for the desired command. Better to get a PMW generator specifically for control. Sometimes called servo testers
We used to use a cheap blue PWM controller from Amazon, but the output was sensitive to noise and would cause the Spark Max to jitter. Not recommended.
I recently found a much better off-the-shelf PWM device from goBILDA called the Servo Commander.
Then you are done!
Completely off the shelf too, and nice smooth performance.
Remember, set the knob in the middle (for OFF = no rotation) when turning the power on.
Can you share with me the setup you’re using in order to connect the speed controller to the battery, please? What is the fuse plugged to and what is the fuse current value?