I'm trying to implement the spirometer as described in AN4325 for the research purposes and having some issues calculating the proper size values for the mouthpiece to apply the correct pressure. Could you please share some details on mouthpice size described in the application note.
You don't have to calculate the proper size of the mouthpiece. You start with any mouthpiece, hence you know its area (A) and with the pressure sensor you know the differential pressure between A1 and A2. Now, by using the equations shown in page 5 you can calculate the flow rate (Q).
As described in the document, page 6. The application was fine trimmed using a blowing machine.