AC line detector using transistor