We report a facile approach to prepare cellulose/TiO2/PANI composite nanofibers that involves P–N heterojunctions.
The response values and sensitivity of cellulose/TiO2/PANI were much higher than those of cellulose/PANI composite nanofibers.
Enhanced sensing was obtained due to the P–N heterojunctions whose depletion layer would be widened when the sensor was exposed to ammonia.