First of all, an electric motor is an electrical to mechanical or electro-mechanical energy convertor. It converts electrical energy to mechanical movement (rotational or translational). They were first invented by William Sturgeon in 1832, 44 years before Nikolas August Otto created the first practical petrol engine. Our society went the petrol direction because of the wide availability and the greater energy density of fossil fuels as described in our previous article.
Today, there exists multiple types of electric motors: brushed, brushless, uncommutated, permanent magnet stators and wound stators. Most of these exploit the forces created by magnetic fields and possess some kind of internal mechanism.
Let’s look into the simplest DC motor possible as shown in the picture above. It is made of a stator and a rotor. The stator does not move and is equipped with magnets. The rotor is a coil or armature placed within the stator through which a current passes. This current generates an electromagnetic field aligned with the center of the coil. The direction and intensity (or magnitude) of this current determines the direction and intensity of the magnetic field produced by the coil. The following picture represents this phenomenon, with I the current. This is also called an electromagnet as it creates a magnetic field when electricity passes through it.
The magnetic field created in the rotor attracts and repels the magnets placed in the stator (positive pole attracts negative pole and negative pole attracts positive pole). If everything is kept equal the rotor will consequently turn a maximum of 180 degrees before stopping. To keep this rotational motion the poles of the electromagnet that is the rotor have to be switched, guess how? … By switching the direction of the current passing through it as shown in the following animation:
The question is, how do you switch the current’s direction when your battery is always connected in the same way? Well, in brushed motors, actual conducting brushes make contact with the rotor as it spins and sequentially reverse the current going through it, in turn switching its polarity. However, the obvious problems with using brushing contacts to switch the current are that the whole thing heats up faster and therefore needs a bigger cooling system, it creates sparks, it wears out and consequently limits the speed of the motor.
This is where modern computers and electronics come in. They allowed us to get rid of those brushes to create Brushless DC (BLDC) Motors, the wonderful components that make your favorite electric bicycles possible! Essentially, a BLDC motor is a brushed DC motor turned inside out. The rotor is made with permanent magnets placed in the center of the motor while electromagnets are placed around it in the stator. A computer, using powerful transistors, then switches the polarity of these electromagnets which leads the rotor to turn. This enhances how well the energy stored in your battery is converted to movement, reduces the need for maintenance and removes the cap on speed as the only limit is now the power available in your system and the speed at which your computer can switch the electromagnets.
More specifically, the computer in your ebike is called a controller and extracts current from your battery in order to switch the electromagnets in the stator of your motor.
Hopefully, this is all kind of clear, if you have any questions, do not hesitate to ask in the comments!