If the ATM would not accept your cash then the bill might not be in good enough condition. Also, make sure to enter cash flat and not folded. A good rule of thumb is simply to use bills that a vending machine would accept. Bills that are overly crumpled or torn will be rejected by the ATM.