A piggy bank is usually a container with a slot in the top. I'm guessing that you want some way to determine the value os a coin being pushed into a coin slot. I think the cheap toys use a spring-loaded arm that turns a pot and the peak value of the pot is a rough measure of coin diameter.