Schau dir mal den LM3914 an, der macht genau das was du willst.