"Have to" think of it as more of a responsibility or duty. "You have to go home now"(Meaning the sensible thing is to go home) "You have to wake up by 7 to prepare for school" ( In order not to be late for school, the responsibility you have is to wake up by 7).
"Must do" think of it as an "order" or an "obligation" giving by a superior body. "You must do your home work"(If you don't, you are probably going to fail the course), "You must take your medication" (If you want to be alive/healthy, the obligation you have is to take your medication ).
I hope this helps!