When can the heartbeat be detected?

Had a missed miscarriage in April I am now pregnancy again 5 weeks and will be booking in for an early scan does anyone know how many weeks would be best to book the scan in for?