Thank you for your guidance. i don't have BC548 transistor instead of that, i have used BC547 transistor. it is working for a while. i mean, i can able to give 12v to encoder, but after few trails, i am getting the same output. i think the transistor is wasted.... please give ur value suggestion