A dipodal sensor detects Al 3 + in HEPES buffered THF/H 2 O (7:3, v/v) through excited state proton transfer, representing a quenching at 355 nm and enhancement at 480 nm. The resulting aluminium complex ( 1.Al 3 + ) displays a highly selective response to perchlorate anion over other anions through the emergence of a new band at 428 nm. The chemical inputs of Al 3 + and ClO 4 − satisfies the conditions of AND molecular logic gates and in a sequential manner generates an output which mimics the functions of a security keypad lock. A dipodal sensor detects Al 3 + in through excited state proton transfer. The resulting aluminium complex (1.Al 3 + ) displays a highly selective response to perchlorate anion. The chemical inputs of Al 3 + and ClO 4 − satisfies the conditions of AND molecular logic gates and mimics the functions of a security keypad lock. ► Selective detection of Al 3 + through excited state proton transfer mechanism operated in a dipodal organic chemosensor. ► The resulting aluminum complex with this sensor displays a highly selective response to ClO 4 − anion over other anions through the emergence of a new band. ► The chemical in-puts of Al 3 + and ClO 4 − satisfy the conditions of AND molecular logic gate and in a sequential manner generates an out-put which mimics the functions of a security keypad lock.