Congratulations! After all that waiting and trying I am sure you are very excited. As for when to tell, If it were me, I would wait until 2nd tri unless you need to explain an expanding waistline or morning sickness. When we were expecting #2, we told our eldest (3 at the time) pretty early on and it was very difficult when at 14 weeks we lost the baby. She had a tough time understanding and it was especially hard on me since she wanted to talk about "the baby that died" CONSTANTLY. In fact, six years and two more kids later it still comes up pretty regularly. When we were expecting again a few months later, we waited until we hit 15 or 16 weeks to be on the safe side. We also used the t-shirt to tell family.
As for preparing your daughter, the big sister class is great. Our daughter really got a lot out of it. Also, we were very careful to never blame any of the negative side effects of pregnancy on the pregnancy. I never said mama can't pick you up because of the baby, it was because my back hurt. Or I was too tired to play just now because I went to bed too late (also helps enforce bedtime!) Anything that she or we couldn't do never was because of something to do with the baby or my pregnancy. I think it helped eliminate the possibility of starting resentment early. We carried that through even after baby was born. "because of the baby" was never a reason for why she couldn't do or have something she wanted. Even if it really was.
While we were waiting for the baby to be born, our daughter had special fun jobs to help prepare. We brought out the infant toys and she got to wipe each one down with a soapy cloth. She also arranged the toys and books on baby's shelves. When we found out we were having another girl, our eldest got busy folding her old baby outfits and really, truly loved the idea that her little sister would sleep in the same crib, wear some of the same clothes and play with the same toys that she had. We also made her feel like she had picked out the bedding and nursery decor as well as the name. Then just before the due date I took her shopping to pick out a special new toy that she would give her sister at the hospital. It was a stuffed Snoopy that our now five year old still sleeps with. New baby also gave big sister a present at the hospital which our eldest just loved!
After the baby came home from a somewhat extended hospital stay, big sister again had special jobs. She would greet all visitors at the door, show them where to wash hands and then she would inspect their hands (it was very cute). She was also in charge of giving the visitors any new and interesting updates about the baby. I really wish I had written these down. Baby's progress from a 4 year old's perspective was very interesting. Big sister also chose the toys that Baby would play with (from a pre-screened selection of course) and chose each day's first outfit. We never had her help with the basic care as we wanted this to be a fun experience and to not make having a baby sister feel like work.
A great tip I got for toy safety when there are babies and older kids sharing space really helped as well. I have all our toys in clear Sterilte bins of varying sizes organized on a shelving system (Besta from Ikea). On each bin I taped a photo wrapped in clear contact paper of the toys that belong in that bin. This really makes it easier for big kids to clean up and keep track of their toys. Then, when the baby was born, I added a picture of the baby's face to all the bins that contained toys that, while maybe not baby toys, were safe to be out when baby was in the room. My daughter loved this system and she was very good about only taking out toys from baby approved bins when her sister was also in the playroom. The toys are easy to see and find too. And, when the baby was napping, it was a special time for our daughter to take out those Polly Pockets and Legos and all the other things that weren't okay for the baby to be around. We still use this system and it works great for playgroup where ages range 0-10.
We also kept a daily basket of toys, books and healthy snacks that our eldest could access when I was nursing her sister. Many of the things were special things that were only available at feeding times. This way our daughter didn't resent Mama's unavailability and try to get attention through misbehaving. Instead she saw it has an opportunity for a snack or fun toy.
You have so many great things to look forward to. I really loved watching that sibling relationship develop. While there is certainly plenty of rivalry, there are also a lot of truly heartwarming moments. Best wishes!