Did he know? No. Did he suspect they’d been swapped? Absolutely. Peter is Yondu’s son, might not be biological but he was raised by him. Yondu would swap the orbs so he’d suspect Peter would too. Michael Rooker, Yondu’s actor, sums this up in an interview himself as well.
I have to ask, because the sequel is coming and we know next to nothing about it. But the movie ends with Yondu… I mean he will be back, and Kraglin will be back, and the Ravagers. But the movie ends with him being made a fool of, to a certain extent.
Rooker: No, not really. Not at all. I think what it is, as the relationship between Yondu and Peter Quill, Star-Lord, has been, even at the very end, strengthened, because, in my opinion, Yondu expected Star-Lord to mess with him again on this.
Come on. Would he have really opened it if he really thought it was a bomb or some sort of crazy weapon?
I read it that way in the theater! I’m relieved that you agree that it was almost a proud smile…
Rooker: It was an absolutely proud smile. I was thrilled that he tried to do it to me, he tried to screw me over yet another time. No way. Of course. Yondu is very proud that his surrogate son has once again shown his true colors. My thought when I opened the orb and I see Peter’s trinket, I see it as, “That’s my boy. He’s done it to me again and I expected it.” I was somewhat taken back that he did it, you know?
ScreenRant, Michael Rooker Talks Yondu's Role In 'Guardians Of The Galaxy 2'