The working principle of electric motors and generators involves the basic principles of electromagnetism, that is, changing magnetic fields can produce currents, and currents can produce magnetic fields.
How an electric motor works:
An electric motor is a device that converts electrical energy into mechanical energy. Its operating principle is based on Faraday's law of electromagnetic induction and Ampere's law of force. When electric current flows through a wire, a magnetic field is created. In an electric motor, this magnetic field is created by windings, and when an electric current passes through these windings, it creates a magnetic field there. When this magnetic field interacts with the magnetic field produced by permanent magnets or another set of currents, torque is produced, causing the motor to rotate. The amplitude of the torquee depends on the amplitude of the current, the intensity of the magnetic field and the angle between the current and the magnetic field.
How a generator works:
A generator is a device that converts mechanical energy into electrical energy. Its operating principle is based on Faraday's law of electromagnetic induction. When a rotor (usually a coil winding) rotates in a magnetic field, the electrons in the rotor are subjected to the Lorentz force, producing an electric current. This current creates its own magnetic field, which interacts with the original magnetic field to create torque. This torque turns the generator, producing electricity. The output voltage and current of a generator depend on the speed of its rotor and the strength of its magnetic field.