Cognitive radio (CR) has been identified as an enabling technology toward meeting the high spectrum utilization efficiency demand in future internet-of-things (IoT) systems. Development of new spectrum sensing schemes better suited to CR-based IoT networks, which are typically heterogeneous with perfect network-wide synchronization difficult to achieve, is thus rather crucial. Motivated by the low-complexity feature of the energy detector (ED), this paper proposes a normalized weighted ED to cope with random arrival of the primary user (PU) signal due to imperfect transmission coordination. The proposed approach first multiplies each received sample by a weighting factor, and then normalizes the total weighted energy with respect to the raw signal energy: this is better able to discern the presence of the PU, particularly when the PU arrives very late in the sensing period. The weighting sequence is designed by minimizing the detection probability subject to a tolerable false-alarm probability constraint. In our design, the Gaussian approximation technique is used to derive an approximate formula of the detection probability, and the steepest descent algorithm is used to find a solution. Computer simulations are conducted to validate our analysis, and confirm the performance advantage of the proposed scheme.