Combining steering and throttle input to control two motors

drod

100 µW
Joined
Mar 26, 2024
Messages
9
Location
York
Hi, I have 2 (rear) motors with 1 controller each. The controllers each take a throttle input and are currently using a common feed from the throttle with both motors spinning ok at the same speed. I'm looking to add a steering input to control the motor speed in a turn and trying to work out how I can combine the steering and throttle outputs to drive the wheels at the correct speed.

I've searched for an answer but not sure exactly what I'm looking for. My questions are:
What type of circuit would I need to combine the outputs?
Is there any mechanical calculations (wheel size, speed etc) to calculate, or is it typically a proportional split between the outputs?

Thanks
 
Any math required depends on the circuit you choose to use and whether you want something other than a direclty proportional ratio.

The simplest way to implement a steering-controlled left-right throttle ratio is a simple potentiometer driven by your steering (for instance, a gear on the stem or steerer driving a gear on a pot that is mounted on the headtube). The throttle signal goes to the pot's center pin, and each outer pin goes to one of the controllers. The pin that gets more throttle signal when you turn left goes to the rightside controller, and vice-versa.


Unless the controllers have resistances in them on the throttle lines, you don't have to do anything to modify the input throttle voltage to compensate. If they do, then you will be creating a kind of resistive voltage divider and the throttle voltage will be distributed differently than desired, and may require adjusting the input throttle voltage upward before reaching the pot to compensate.


Or use a stereo pot, so that there are two separate ones on the same shaft. The center pins still get the same throttle input, but you use the leftside output of one to feed one controller, and the rightside output of the other to feed the other controller.


You can instead use the pot to control the gain on two separate op-amp circuilts, that normally would be 1:1 when the pot is centered, but turns up the gain on one and the other down as you steer. The stereo pot may be required to do this, as you probalby have to use independent resistors in each circuit. The pot would probably not be wired to the throttle input signal in this case, just wired to change the resistance on each op-amp so one goes down while the other goes up, and the throttle signal would feed the op-amp itself. I don't have a circuit diagram for you, but you can go to places like http://allaboutcircuits.com and the op-amp sections, and learn how to make such a variable-gain circuit for one side, then just duplicate it for the other side.


There are other ways to do it, too, like using a pair of analog hall sensors (throttle types) mounted to the headtube, and magnets on the steerer or stem, and have the outputs of these sensors control the gain of the op-amps, or be read by an MCU and control which side gets more throttle, etc. But this may require a custom magnet to provide the right output range for the amount of steering rotation your vehicle has availalble, since the sensors will respond to a certain amount of magnetism at a certain distance with a certain output, and outside of that range won't respond at all, leaving the output at the default (usually 1/2 VCC).


However, unless you have a specific problem with the motors forcing the turn to be less tight than you want it, it's not generally necessary to do any of this. I had planned to do it on the SB Cruiser, but it has proven to be unnecessary.
 
I had planned to do it on the SB Cruiser, but it has proven to be unnecessary.
I've seen this talked about before and the conclusion was that, since the two motors/wheels are not linked, it's totally unnecessary to do anything like the above. You don't get the "wheel is too fast/slow" effect of a linked set of wheels because each motor will interdependently adjust on their own specific curve.

I do know there is a "Traction control" option in VESC controllers when you have two wheels its supposed to reduce power to the wheel that starts spinning faster, but I've never had a setup like this to test it with.
 
Thanks for the responses. I did wonder if I was trying to introduce more complexity than was required by including a steering sensor. I'll go ahead and try it without for now and see what the outcome is.
 
When the sun gear and the carrier run in opposite directions, you can get the combined output through the ring gear, or vice versa. For example, when the carrier and the ring gear run in opposite directions, the sun gear experiences a complex speed variation due to the interaction of the inputs. Technically, you can not get output by providing single rotational input. Because, if you cancel one of the inputs, the other rotational input will be wasted. But it can be solved by avoiding reverse rotations with ratchets.
 
When I have considered doing torque steering with a wheel pair, I figured I'd use a throttle on each side and handle it manually. I haven't had an occasion to try it, though.
 
Back
Top