How do automatic flushers work?

Most airports, movie theaters, malls and restaurants now have toilets that automatically flush when you walk away. Not everyone likes this technology, but they are everywhere. This video shows you the basic parts involved:

You need:

1)A sensor (usually infrared) to detect when the person walks away

2)A button to flush manually

3)A battery to operate an electric motor and the sensor

4)An electric motor to operate the valve that flushes the toilet

5)A simple controller that sends power to the motor

When the controller gets a signal from the button or the infrared sensor, it activates the motor.