Control when current can flow

I'm with mike. ... and I also don't know what that transistor is doing in your diagram. Is that something you bought or something you are building?