What are diodes and which purpose do they serve in electrical design?

Diodes are a common component used in power electronics.

In modern electrical design, diodes are used especially for circuit protection to promote the flow of current in only one direction.

More formally defined, diodes are a semiconductor device that act as a one-way switch for current.

It allows current to flow easily in one direction, but severely restricts current from flowing in the opposite direction.

Thinking of their use in common power electronics, if you were to open up an electric skateboard, electric scooter, or devices that use a battery or motor, there’s a high chance you’ll find diodes used in hardware. Diodes would be critical in the sense that you don’t want an over-current condition on your battery (i.e. regenerative power going back to battery when braking) or inducing an over-voltage/current condition on any of the power supplies that are used in the device (almost all power electronics are rated for a set current/voltage range).