I need to pop out a needle like object(toothpick,matchstick,etc) from a hole in a surface and push it back in automatically.I need to make a array of such needles in which each needle's position can be controlled individually.The objects aren't supposed to be oscillated continuously, instead they are to be locked in one of the two positions-either above the surface or inside it. I am trying to search a mechanism to achieve this.This can be easily done with a simple DC servo motor, but the problem is I have to do this in very limited space-about 6 such objects in base area of 3 cm x 3 cm.Moreover the power source would be DC +5 V
So far I have thought of creating small electromagnets with springs,but still not sure about it.Any inputs will be appreciated.