Design of a statically balanced mechanism using magnets and springs