Arrati, thanks for the idea, but I'll need an electrical solution rather than mechanical in this application.

Anand, any chance you could post an example circuit?