Consider this scenario:
I am a student. I ask my professor about possible research grants. He suggests applying for a research grant with 3D printing. He helps me brainstorm and incubate in idea.
I start doing research, get a proof-of-concept, submit the proposal. While waiting for the decision, he suggests I present at my university's research conference.
I register for the conference, include my professor as the advisor and give the presentation.
Get a good amount of my research done. My proposal was rejected unfortunately. I still did a tremendous amount of work, so I am going to write up a formal paper on my findings.
So the question: Is it appropriate to include my university as my affiliation in the paper? This is my first research paper, so I don't quite know the best practices on this. I should credit my professor. He really helped me to shape my idea and gave me a lot of advice. However, he did not have a formal role in the research.
I did do my work in the school's hardware lab. My professor did help me a lot in giving me advice. However, the tools, materials and 3D printer were all mine and it was all done on my own time.
So I'm writing this paper up, and wondering whether I should include my title using something like the following template:
3D Printing Stuff Title
Advisor: Hubert Farnsworth
Department of Quantum Neutrino Fields