Inside the science lab, the visitor leaned forward, listening to teenagers describe their work - a biodiesel project, a windmill, distillation systems that may be used to purify water in Sierra Leone someday.
The world's most famous tech geek turned philanthropist had lots of questions for the kids at Science Leadership Academy - how long does that take to boil water? Why did you use this material? What's better about metal?
"It's great to see people doing hands-on science," said Bill Gates after the presentations were over. "Science is fun."
Gates is in town to receive an award tonight from the Franklin Institute for building Microsoft and for his philanthrophy. He stopped by SLA, the district high school magnet run in partnership with the science museum, to tour the lab, then answer student questions.
About 200 students squeezed into the school's common room to hear Gates. The other 300 watched in their classrooms, text messaging questions to friends in the room. The event was streamed live around the world via the school's website.
Principal Christopher Lehmann was over the moon.
"It's our quirky little school, and here's Bill Gates," Lehmann said.
Gates talked about teaching computer programming to his fellow students in high school and about being an overconfident math student at Harvard. He urged the SLA teens to learn as much as they could about science.
"Hopefully, many of you will go into these fields which are so cool, so interesting," Gates said.
Once the floor was open to questions, the students let loose.
Philanthropy was a popular theme.
"What should we do as students to change lives?" one boy asked.
Pick a cause and dedicate your time, money, or voice to it, Gates advised. At a young age, start with mentoring other kids, he said.
Gates seemed impressed by the students' passion for doing good.
As for his own path to becoming a philanthropist, Gates said, at first, "I was so maniacal about Microsoft being good that I really didn't do much," he said. "But it's much easier today to get involved than it's ever been."
They wanted to know what he read as a child - biographies and a lot of science fiction, he said. They wanted to know what's important to him as a father - teaching his children (14, 10 and 7) about the larger world, even the slums and orphanages, and spending lots of time with them, he answered.
Gates implored the students to take advantage of the wealth of knowledge available to them for free. For example, Gates wanted a refresher course on physics, so he followed an MIT course online available for anyone to take advantage at no cost.
When he was growing up, Gates said, he asked his father a number of questions the older man couldn't answer.
"I have a son who will ask me questions - 'Why don't you fall through the floor?' 'Why are some materials strong and others not strong?'" Gates said. When his son asks him something he doesn't know, the two go online and find out, said Gates.
One girl wanted to know where Gates stood on magnet schools: should they exist or are they inherently unfair to large high schools, she wanted to know.
Gates took a pass on that one.
"My interest is more in if my teacher wants to be better, how do they become better?" said Gates, whose foundation is pouring resources into the subject. "You have to have teachers who will experiment."
He said schools need to get better about spreading best practices, and also spoke out in favor of charter schools - when he gets discouraged about the state of American education, he visits a charter, he said.
"Education, we need to improve it a lot, and there just hasn't been enough invested in it," said Gates.
He urged the students to invest in themselves through education. Then, Gates said, "start to get this broad awareness so you will be equipped when you are successful to have that broad impact."
After Gates left, senior Alison Campbell was rapt.
"It was nice to know that someone that big was paying attention to what we're doing," said Campbell, 18, who's headed to study chemical engineering at the University of Colorado at Boulder.
Frederic Bertley, a Vice President at the Franklin Institute, was also thrilled.
The museum takes the partnership with SLA very seriously, Bertley said. Watching the students - who were not prepped for the session - engage in such high-level dialogue with Gates was a thrill for him.
"I couldn't have asked for a better litmus test for the project," said Bertley. "This is why we do what we do."