A closed loop control system automatically ensures that an output of a device is constant. The system can receive an input to set a fixed value for a variable (e.g., a current, a heart rate, a tissue perfusion, an ion level, etc.), and this variable can be delivered to a feedback component. The system can also include the device to deliver the variable to a load. The feedback component can be coupled to the delivery device to sample the output of the delivery device at different times. Based on the sampling, the feedback component can vary a property of the delivery device related to the delivery of the variable to the load to ensure that the variable remains constant at the fixed value. In some instances, the system can be implemented as a stimulator that delivers the constant current of a current source and has a low output impedance of a voltage source.