Am I obligated to tell work about my pregnancy?

I'm almost 18 weeks pregnant and I haven't told anyone at work yet including my boss. I want to wait til my next sonogram, around 19-20 weeks, to make sure the baby is okay before telling work I'm pregnant and need maternity leave. Is it weird to wait this long? Im very anxious about it.