0
\$\begingroup\$

I have this current sensor, it has a measuring range of 0-20A and outputs 0-1V.

I need to create a circuit that uses this current sensor, and trimming a current threshold (using a trimmer) the circuit will generate a pulse on output that will be used in order to detect if the load was switched on from my MCU (ATMEGA328P)

How i can do that?

What i've done so far?:

Actually i'm using this CT in this configuration and i detect when the load is switched on by sampling the analog values and determining the on/off with a software based threshold, but my intent is to keep this logic out of my software and get a pulse to my ATMEGA328P when the load is switched on/off.

circ

\$\endgroup\$
4
  • \$\begingroup\$ Just add an analog comparator ... with a digital output. NB : there is a comparator in the MCU. \$\endgroup\$
    – Antonio51
    Jan 14 at 16:33
  • 1
    \$\begingroup\$ arduino.stackexchange.com/questions/23551/… \$\endgroup\$
    – Antonio51
    Jan 14 at 16:41
  • \$\begingroup\$ Thanks, but what is the threshold of the internal comparator? Also, the values that are coming out from the CT are floating +/- 1V...how the internal comparator will work? \$\endgroup\$
    – VirtApp
    Jan 14 at 21:54
  • \$\begingroup\$ The values coming out of the CT are centered on 2.5V, so no worries. If I remember well, the two inputs of the comparator are "accessibles", so one can wire the output of the CT on one input, and a chosen value (by a pot) on the other. See section 22 of the datasheet. <<<Overview ... The analog comparator compares the input values on the positive pin AIN0 and negative pin AIN1>>> \$\endgroup\$
    – Antonio51
    Jan 14 at 22:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.