Tell when you feel it's the right time. if you feel it's right now, and your OH agrees, then do it now. if you want to wait for the scan to make sure everything's okay, then do that. If then you don't feel ready, wait some more. There's really no rule.
FOr our first pregnancy we told family at 8 weeks and Facebook at 9 weeks, which was before the scan.
With this pregnancy we told family at 4 weeks and Facebook at 5 weeks, before any appointments or anything.