affiliation if I change departments within university I am wondering what affiliation to put down on a paper that has been accepted (now going through the proofs). 

I worked in one department (a centre, or institute, within my university) while I was conducting the research. I am now in another department (not a centre/institute, but a different department), within the same university. 

Does it make sense to put both both affiliations, even though they are both linked to the same university? In my mind it makes sense to acknowledge both labs (the one where I did the research and the one where I did the writing), but then again it doesn't make sense to acknowledge the same university twice. 

Does anyone have experience with this sort of situation, whether from the author or from the editor perspective? Is there a generally accepted solution?
Of course it’s also possible to have


  Zero the Hero, Department of Nothing and Institute of Heroes, Gong University


or else you can have your “old” address on the byline with a footnote to your new address:


  Zero the Hero*, Department of Nothing, Gong University


(* now at Institute of Heroes, Gong University )

The latter (and variations on this) is the model used for sabbaticals or for people who have moved since the work was completed: the researcher will acknowledge the host institution but will have a footnote to the current or the permanent address.