My team is currently using the BOSCH APC-2 winch motor and we’ve wired it to the robot like so:
RoboRIO Analog #1 -> Red wire -> (33 + 33 + 33 + 33 +33 +33) OHM Resistor -> Motor Pin #2
RoboRIO Analog #1 -> White wire -> Motor Pin #2
RoboRIO Analog #1 -> Black wire - > Motor Pin #4
As seen [here](RoboRIO Analog #1 -> Red wire -> (33 + 33 + 33 + 33 +33 +33) OHM Resistor -> Motor Pin #2).
My question is how to manipulate the motor from the program. I’m able to see the voltage of the winch and set average bits and oversample bits, but they aren’t affecting the speed of the motor. Sometimes when it runs when the robot turns on, but sometimes it doesn’t.
A realization has come to me: should the winch motor (instead of going directly to the PDP) go to a motor controller like usual but keep the analog input? If so, what function does the analog input serve then?
Link was broken but it sounds like your talking about the 6004 RA3 194-06 in the KOP.
As GeeTwo said you must hook up to a motor controller. Pins 2 and 4 are only to read a pulse for each time the armature rotates. That will give you the option for some feedback in your program when to stop the motor…let’s say you want to rotate 45 degrees and stop. It has no affect on controlling the motor at all.
Hooking up the motor to a Spark controller worked perfectly-thanks! And yes, @kprzewodek, that is the right motor and it is legal. Although I have it working perfectly fine (binded its speed to a controller), I’m confused as to what function the analog input serves.
I’m not familiar with this motor, but I’m confused as to how you would use something with a hall effect sensor on an analog input. My guess (and it is only that) is that the sensor is wired directly to these output leads. A hall effect sensor is generally a digital (i.e. off /on) signal.
I would have connected these leads to a digital I/O port and would have started out using an Encoder object on it to see how that worked.
It is a square wave and would appear digital. The key is that the signal varies between ~4.5V and ~3.5V which isn’t the right threshold to be read on the DIO. There is currently some discussion about adding a schmitt trigger to further condition to get the right threshold. Maybe there’s a better way.