Can firearm propellant be ignited by piezoelectric crystals that are activated by the trigger? This is for use in a world 50 years into the future similar to Earth. The people there are gearing for war and want to mass produce firearms with as few moving parts as needed without compromising their effectiveness in combat. If you wish, you can even describe mechanisms needed to make these semi- or fully automatic. The mechanism can either be struck by a force or ignited in a similar fashion to a lighter.
The people there are gearing for war and want to mass produce firearms with as few moving parts as needed without compromising their effectiveness in combat.
If the goal is to produce weapons with as few moving parts as needed, piezoelectric ignition is a step backwards.
Electronic ignition has been done before, but specifically piezoelectric ignition implies striking a piezoelectric crystal with a hammer, producing electricity which sets off the round.
There's just one problem with using that electricity to set off modern, smokeless propellant. Firearm propellants are designed to be stable, which is an important part of making them combust at a controlled rate rather than detonating inside the gun, so they are difficult to ignite via electricity or shock by design. This is why primers exist; they produce a quick burst of heat sufficient to ignite the propellant.
So, even for a piezoelectric system, you're going to need a primer. And at that point, instead of designing a firearm to have a firing pin which strikes a piezoelectric crystal which triggers a primer which in turn ignites the propellant, why not simplify the design and omit the piezoelectric crystal entirely?
Note that in the real world, electronically-fired guns do not use piezoelectric systems. The most common form of electronically-fired ammo runs an electric current through a resistor taking the place of primer, and that resistor heating up supplies the thermal energy necessary to ignite the propellant. This requires a power source and onboard control circuitry, both of which dramatically increase the complexity and fragility of a weapon.
It has been done. This chain discusses some of the past experiments: https://www.ar15.com/forums/general/Piezoelectric_Firearms__Primers_/5-1653460/
RPG7 uses a peizo electric primer, and Remington had a peizo electric primed cartridge for its 700 series, but the ammunition was cost prohibitive. http://www.thetruthaboutguns.com/2013/12/chris-dumm/electric-cartridge-primers-gone-but-not-lamented/
Your firearm could use an actuator based on the inverse piezoelectric effect, where an applied voltage produces a displacement in a piezoelectric material. Some ink jet printers use this technology to expel drops of ink.
Displacements of a few mm are easily obtainable, with a tradeoff between displacement and impact force.
In this case, the piezoelectric material would move a firing pin which would impact the primer in a typical round of ammunition. The trigger could be replaced by a touch sensor (removing one moving part), and the associated circuitry could produce semi- or full-automatic fire.
The added electronics leave room for lots of interesting wrinkles, like fingerprint ID, double-tap for auto, booby traps in the event of enemy capture. Your list will undoubtedly be longer.
mass produce firearms with as few moving parts as needed without compromising their effectiveness in combat
If the goal is to minimize moving parts, what about railguns?
Railguns can fire ammunition that is otherwise inert without any moving parts. The loading mechanism should even be able to be replaced with a system similar to the firing mechanism itself at lower power.
However, the more advanced the machine, the less likely field repair becomes. Complexity also usually increases number of things that can fail. That being said, guns are only as reliable as they are due to generations of improvements. If your civilization developed along a different path, railguns may have become the default before traditional guns and a very stable configuration was found.