Welcome to our forum.
The schematic is a bit small, so it's hard to recognize what the voltage at U2:A, pin2 or U2B, pin5 respectively is.
Your circuit is based on the right idea, but has some drawbacks if not outright faults:
- the collectors of Q1 and Q2 are not connected to the positive supply.
- the emitters of Q3 and Q4 are not connected to ground (or negative supply).
- assuming that the voltage at U2:A, pin2 (see above) is a reference or threshold, either U2:A or U2:B will output a high positive voltage. These amplifiers are not operated in a linear region, so their outputs are either a high positve voltage or a voltage near ground. How near to Vcc or GND depends on the specific type of amplifier. If you don't use rail-to-rail opamps, you'll see a few volts above GND or below Vcc.
- if you were thinking to create a variable speed control using this setup: it will not work for the following reasons:
1) the opamps are either high or low at the output, see above. No analog control voltage will develop.
2) even if you were to modify the opamp circuit such that it creates an output voltage proportional to the position of the potentiometer, you would almost instantly destroy the transistors. Why? Because if e.g. Q2 and Q4 are both conducting only a bit, a high short circuit current will flow from VCC through Q2 and Q4 to ground creating nothing but losses (heat) in the transistors. You don't operate an H-bridge in linear mode, you use e.g.
PWM to turn the transistors always completely on or off.
3) as it is connected, U2:A would turn on Q1 and Q2 simultaneously. This will pt both ends of the motor in connection with Vcc. The motor will not turn. LIkewise will U2:B turn on or off Q3 and Q4 simultaneously, connectig both ends of the motor to GND which will also not provide power to the motor.
No power, no torque.
An
H-bridge (i suppose that's what you meant to construct) works by turning on Q1 and Q4 while Q2 and Q3 are off and vice versa.
- the circuit lacks any regulation or feedback. A segway is not just controlled by powering the motors a bit more or less in either direction. A segway contains a controller (e.g.
PID type) that has the input from the driver (leaning forward and backward) as well from the vehicle (speed, tilt, ...) and uses the feedback algorithm to stabilize the vehicle. You may want to peruse
this article for more information.