Please explain :Piezoelectric effect
Basically, in some crystals such as quartz, when you compress the crystal, you are slightly changing the orientation of the atoms making it up. In a normal crystal with polar bonds, the positive and negative poles exist but overall the crystal is neutral. However, if you compress it, the atoms move in such a way that more positive charges accumulate on one end of the crystal and negative ones on the other side. This creates polarity at two ends of the crystals. Now these poles will result in current flow if connected to a wire. In this way, pressure on a crystal generates electricity and this is referred to as piezoelectric effect.