|
||||
How the steering and brake controllers and actuators are connected This note covers how the steering and brake servomotors are wired and controlled. Brake controller and actuatorThe Polaris Ranger has hydraulic disc brakes on four of its six wheels.These are driven by a pedal and a dual master cylinder, so that there are two brake hydraulic systems, front and back. We've added actuators and sensors to that system. The actuator is a screw drive device driven by a brush-type servomotor. Sensors are two limit switches on the actuator, and a pressure switch and pressure sensor on the front hydraulic system. All these devices are connected to a Galil DMC-1416 mounted under the hood. The brake controller is called "gcbrake", and has the "gcbrake" IP address burned into its non-volatile memory. The actuator, encoder, and limit switches are all wired so that applying the brake is the "forward" direction. The pressure sensor is a SenZors PT1H pressure sensor, which requires a 12VDC input, and outputs an analog signal in the 0..5V range. This is connected to analog input 1 of "gcbrake". 5V = 2000PSI. The limit switches are tied to the forward and reverse limit switch inputs of "gcbrake". Reverse limit is full brake release. Forward limit is never reached in operation. If forward limit is ever reached, the brake linkage or hydraulics have broken. There are three connections between braking and the E-stop box.
All this wiring is documented in the "interbox connections" spreadsheet in the CVS server. The encoder is plugged into the 15-pin encoder connector of "gcbrake", using differential inputs. The other signals go in through the 37-pin "general I/O" connector of "gcbrake" This leads to a somewhat ugly connector, with several cables going into it. Noise control and grounding"gcbrake" is powering the encoder and the pressure sensor from its own built-in 5V regulator. This can be a problem, because noise from the motor can get into the +5 supply of the Galil controller and crash it. Initially, that happened. Now, there is a capacitor across the brake motor and an ferrite toroid around its power leads, which seems to solve the problem. The brake actuator itself was supported in such a way that it wasn't grounded, so there's now a grounding lead tying it to the vehicle frame. Braking controlAt reverse limit, the brakes are totally released, and there's some slack in the mechanical linkage, which is a cable. As the actuator is moved forward, the measured pressure will not change until the slack is taken up, after which it should increase linearly with position. The "reverse limit" switch is set at a good "pedal released" position. At some point forward of that, pressure starts to climb. We don't want to hold the actuator at the zero-pressure point; the master cylinder won't refill from the reservoir if we do that. Startup needs to be cautious, because we're likely to get control from the brakes-locked state. Homing would release the brakes. We might be on a hill. So we have to defer homing until we get a signal to go to zero brake pressure. The controller program ("gcbrake.txt") handles all these problems. Remotely setting "GOAL" in the controller program will set the pressure to the desired value. The unit of measure is volts, with 5V=2000 PSI. Setting GOAL to 0.0 will release the brakes completely. The first time the brakes are released completely, the release will be slow, because the controller has to find the reverse limit switch position cautiously. After the first brake release, further releases will be fast. The brakes can always be applied, even during brake release, by setting a larger value into GOAL. Firmware settingsCurrently, the brake controller has two non-default values set in its non-volatile memory - its IP address, and an initial state of "motor off". The program "gcbrake.txt" is loaded in its non-volatile memory. That program auto-starts on controller reset or power-up. At start, it will attempt to set the brake pressure to the maximum allowed value, locking the brakes. Steering controller and actuatorThe Polaris Ranger has manual steering through a steering box on the front axle with an upward-pointing lower steering shaft with a universal joint at each end. The steering wheel is attached to the upper end of this shaft. We've replaced the lower steering shaft with a shorter shaft, which connects to a large Faulhaber servomotor through a shock coupling. Below the shock coupling is a BEI rotation sensor. The actuator is a planetary gearhead driven by a brush-type servomotor. There is an encoder on the end of the motor. The BEI rotation sensor is a multiturn pot/encoder combination. But the pot only provides useful values for the "centermost" turn of its rotation, and thus it's only useful as a home position sensor. We are not using the encoder in the BEI sensor. The BEI sensor is powered with +5 from the Galil controller (RED), tied to the Galil controller's ground (BLACK), and analog input 1 of "gcsteer" (GREEN). There are no steering limit switches. These devices are connected to a Galil DMC-1416 and Galil DMC-1460 interface box with optoisolation, mounted under the hood. The Galil DMC-1460 is also used to operate solid-state relays for the ignition, starter, and 6WD unit. [NOT YET DONE]. The 6-pin resistor pack in the DMC-1460 has been reversed [NOT YET DONE], which causes the digital outputs from the DMC-1460 optoisolators to have the same polarity as the unisolated digital outputs, and to come up as OFF. (For some reason, the default is that the DMC-1460 inverts the digital outputs.) In addition, another encoder on the steering wheel is connected to the auxiliary encoder input of "gcsteer", for manual steering. The motor and encoder are wired so that "right" is the forward direction. Most of this wiring is documented in the "interbox connections" spreadsheet in the CVS server. Manual steering modeThere are two manual steering modes. The lowest level uses a rocker pot on the dashboard. Turning the steering switch to "battery" connects the rocker pot and an analog servoamplifier to the motor, allowing very limited manual steering. No computers or digital controllers are involved. A more usable mode uses the steering wheel, an encoder, and the "gcsteer" controller. The sensor on the steering wheel (a commercial steering sensor, identical to the one on the steering shaft) combines a 1 degree encoder and a 4-turn potentiometer. The potentiometer only produces useful values for one of its four turns. The steering wheel has mechanical limit stops to prevent it from turning more than one turn. So the potentiometer value is valid. However, the potentiometer value is used only to obtain an initial steering wheel position. After that, the encoder is used. The steering wheel is easy to turn; too easy. You can easily spin the wheel faster than the steering drive can go. This doesn't hurt anything, but the lag in the steering system is noticeable. For manual steering using the steering wheel, the 24VDC supplies must be powered on at the power box. 12VDC and 120VAC power can be off. For emergency manual driving, a good setup is 24VDC on, 12VDC off, 120VAC off. This prevents the computers from talking to the controllers. Firmware settingsCurrently, the steering controller has two non-default values set in its non-volatile memory - its IP address, and an initial state of "motor off". The program "gcsteer.txt" is loaded in its non-volatile memory. That program auto-starts on controller reset or power-up. At start, it first homes the steering system to straight ahead. Homing is based on the potentiometer on the steering shaft. It then looks at the remotely settable variable AUTO. If AUTO is zero, the vehicle is in manual steering mode, and the steering wheel on the vehicle controls the steering. If AUTO is set to nonzero, steering position is remotely controlled via the GOAL variable. AUTO can be turned on and off as desired.
to be added:
|