An electrochemical (EC) system, designed and incorporated into a scanning tunneling microscope (STM), is described. It has potentiostatidgalvanostatic capabilities for the sample and potentiostatic capabilities for the STM tip. The system permits imaging under potentiostatic (or galvanostatic) control. The STM-EC center has been utilized to deposit metal films (Cu, Cd) on carbon substrates such as highly oriented pyrolytic graphite (HOPG) and glassy carbon (GC), and then was used for in situ imaging under potentiostatic control. Tip-induced electroplating on HOPG and its correlation to the bare graphite surface properties are also explored. Experimental considerations for in situ imaging under potentiostatic control are discussed.