Yes, ATM can detect fake money and they can also track it back to you. It is against the law to deposit fake money and there are chances you will be charged with passing counterfeit bills.