The ideal location for piezoelectric patches on a cantilever beam to capture electrical energy from vibration is presented in this research. Harnessing vibrations for energy generation through piezoelectric patches on cantilever beams holds great promise for powering small devices. A piezoelectric patch on a cantilever beam with a tip mass is typically used in energy harvesting devices. The majority of these gadgets employ a rectangular piezoelectric patch that covers the entire beam or just a portion of it. The position on the cantilever beam determines the voltage produced by the piezoelectric patches. The output voltage was determined experimentally in this work using a prototype harvester developed in accordance with the previously specified structure. The resultant ac output voltage was measured after the piezoelectric patches were positioned at various points along the rectangular cantilever beam. Additionally, we investigate the appearance of various solutions by varying the tip mass. Finding the best location for the energy harvester's patches and tip mass on the vibrating structure is crucial since different solutions may provide varying amounts of ac output voltage. Once this optimal position is identified, it provides a clear path to enhance the energy harvesting system's performance.