I know this is old thread but thought I'd chime in. I don't see any way to use NPN with a comparator. From what I've read (including the site where you got that last circuit) you have to use a PNP. Don't know why so many people get this wrong but to trip a transistor/relay from a comparator LM339 you use PNP. From an op-amp, you can use NPN since op-amp let's current flow forward, it "sources" vs. "sinking".