Hello, carefully reading the microprocessor ATMEGA328PB documentation and application notes, i discovered that Microchip (now owner of ATMEL) removed the full swing oscillator inside the chip.
The old ATMEGA328P-AU is no longer produced even if, at the present time, is possibile to buy chips from distributors. When the available remaining parts around the world will be solded out, all new products will be ATMEGA328PB that is in full production.
With this version it is necessary to use and external active smd 16 Mhz oscillator, so i suggest you to adjust the board in Ver 4 to accomodate an external oscillator.
To fix my boards i bought a new batch of ATMEGA328P-AU and i am waiting for them to arrive.
Meanwhile i ported the code in Atmel Studio 7 and recompiled the code for using the internal 8 Mhz oscillator.
the new code run and the 1khz, 2 Khz and 3 Khz beeps are corrects but when starting the motor it does not run correctly, may be because the 8 Mhz internal clock is not so accurate for the acquisition position routine.
I didn't spend to much time on it since i am waiting for the correct processors, however it will be nice to work on a version that can run with the 8 Mhz internal oscillator.