Looking at GTG737's implementation of an adaptive mixer -- and GatsbyDSP's comment
that it would run away with itself -- gave me the idea to build an integrator, something that
several folks have asked for. This one is complete with Run/Stop and Reset control inputs:
With a DC source at the input as shown, it generates a ramp as expected:
An integrator has infinite gain at DC -- its output constantly grows. If your input
contains DC, you'll need to stop it before it overflows the DSP. You can replace the manual
switches shown with logic to perform this or other functions.
You can set a nonzero initial condition with a DC source.. If you also feed the integrator's output
around with an inversion, you solve the differential equation dy/dt = -y. The resulting curve
is characteristic of a RC circuit discharging, or your coffee getting cold with time.
Yep, you can build an analog computer with integrators like this, and rediscover how
The circuit simplifies greatly if you don't need the controls. The core function is
incredibly simple -- an adder that feeds back to itself. This makes a perfect integrator,
unlike a low-pass filter which has a finite DC gain. Uses fewer instructions, too.