Using a single-chip microcomputer to control a high-power DC motor (200W), controlling the steering relay is acceptable, but it is difficult to control the speed. The motor supplies you with 12~24V, which means that the current is about 10A, and the original can not carry the original. How to control this kind of high-power DC motor? What information is worth learning from? (For low-power DC motors, it can be controlled by a triode bridge circuit or directly with a microcontroller PWM wave.)
Strictly speaking, relays are not used to control steering but are used to control commutation. For DC motors, the dc motor can be driven directly by turning on the commutation signal (from Hall sensor or mechanical commutator) to control the direction of the stator current through the relay. The speed of the DC motor is simply related to the strength of the load and stator excitation current—in other words, it is only related to the load you added and the DC voltage/current provided to the motor. Under certain load conditions, the higher the DC voltage/current, the faster the rotation speed. So when using the one-chip computer to control the rotational speed of the direct current motor, the key point is to collect the rotational speed signal of the electrical machinery, input the one-chip computer, then control the magnitude of the direct-current voltage by the one-chip computer. The means of controlling the DC voltage by the single-chip microcomputer can realize the control of the output DC voltage by means of a DC-DC converter, that is, adjusting the duty cycle (PWM) of the power electronic device. To put it another way, the voltage of 12~24V, the current of 10A is not too large for power electronic devices.