Abstract: The present invention discloses an electronic security device for automated teller machines and a card reader driver including such device. This electronic device comprises an optoelectronic sensing barrier transversely aligned to the card-in/card-out passage, an electronic circuit which is connected to said sensing barrier, a comparator and timers. The device further includes one or more emergency or alarm signal outputs responsive to the insertion of foreign bodies which, when inserted in the passage, pass through the sensing barrier.