joystick smoking!

I found a misc joystick pot today. It was marked with 20k and nothing else. no real information on it.

I hooked it up with:

5v to one side
analog input connected to middle
neg to other side

(only hooked up one axis of the joystick for test)

after a moment or so it started smoking.

i'm new to hardware hacking - i assume i was passing too much power to it? while connected it did give out values though they were a bit low (never hitting 1024 with analogread() as a normal pot would).

should i put some resistors inline?

other advice?

should it have worked and is just a bad joystick?

all advice appreciated.

I = V / R
where I is current, V is voltage, and R is resistance.
basically, the lower resistance you have, or the higher voltage, the more current will flow through a circuit. it sounds like what happened was the potentiometer was low resistance, and shorting it out through the 5 volt line caused too much current to flow, heating it up, and destroying it. i'd advise using a cheapo multimeter to check the resistance if you want to use an unknown pot. if its too low a value, i guess you could wire in a 1k resistor on the positive and ground line to the pot, the same value on each leg. it might hamper your precision in the readings though.

My guess on what happened is that you mistook the wiper for one of the supply voltages. Therefore when you were at one end you were in effect shorting it out or having very little resistance in the way of the two power rails.