I would suggest waiting until either:
- The second trimester (for the same reasons that people are generally advised not to spread news of a pregnancy too early)
- It's visually obvious that you are pregnant
The important part is that you need to give your manager and team enough notice that they can plan adequately for your being absent for at least 6 weeks.
If you have a physically taxing job, you should probably expect to be relieved of those duties before beginning maternity leave, and always be prepared to leave earlier than expected due to early labor or unexpected and unfortunate complications.
Be sure to offer to cross-train people for your tasks and complete documentation well in advance of your departure to cover the possibility of an early or extended leave.