Animating a spring

Hi all,
I wish to animate a spring, that is attached to a wheel. Now, I would know how to do an animation in a primary 3D app, but this one has to follow the movement of an input, so the wheel for example ascends and descends as someone presses the up and down arrow (was an example), and as I said, the spring attached to it stretches out or gets compressed.
I thought of just scaling with the pivot at the top but that causes significant volume loss.
Thanks in advance for the help.