# Current Input

![](/files/-LChAY-FkCxeNH6moJlI)

This is the most complex input circuit on the eChook, but once broken down it is still fairly simple. The main component above is an operational amplifier (op-amp). More information on op-amps can be found [here](http://www.electronics-tutorials.ws/opamp/opamp_1.html) or through Google.

The op-amp above is configured to be a differential amplifier; the output is the voltage difference between the two inputs, multiplied by a gain.

The gain is set by the feedback resistors (R22 and R23) and the input resistors (R20 and R21). In this circuit, both feedback resistors are equal and both input resistors are equal, so the gain can be calculated as below, where V2 and V3 are the voltages on connector pins 2 and 3 in the schematic.

$$
V\_{out} = (R\_{22}/R\_{20})\*(V\_3 - V\_2)
$$

More information on solving differential amplifiers can be found [here](http://masteringelectronicsdesign.com/solving-the-differential-amplifier-part-1/).

At the current sensor's maximum calibrated current (50A), the difference between the reference and sense outputs is about 2.5V. The gain doubles this to the maximum voltage readable by the Arduino, giving higher sensitivity to the current readings.

## Filter

The current signal is very noisy, primarily because small current spikes are created each time the motor brushes make a new connection with the coils. R24 and C5 create an RC low-pass filter with a 3Hz cutoff frequency to remove these high-frequency spikes and smooth the signal.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.echook.uk/circuit-schematics/current-input.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
