# US 2019/0170573 A1 · Measuring Process of the Average Frequency of an Alternating Signal, and Corresponding Electronic Circuit

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0170573 A1
- Document ID: US20190170573A1
- Status: Published application
- Kind: A1
- Application number: 16/110,779
- Filed: 2018-08-23
- Published: 2019-06-06
- Earliest claimed: 2017-12-04
- Assignees: STMicroelectronics (Grenoble 2) SAS
- Applicants: STMicroelectronics (Grenoble 2) SAS
- Inventors: Pascal Mellot
- Web page: https://patentgrep.com/patent/US20190170573A1

## CPC

- G01J 1/44: Electric circuits {(for command of an exposure part G03B7/02)}
- G01J 1/4204: {with determination of ambient light (solar light G01J2001/4266)}
- G01R 23/10: by converting frequency into a train of pulses, which are then counted {, i.e. converting the signal into a square wave}
- G01J: MEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY (light sources F21, H01J, H01K, H05B; investigating properties of materials by optical means G01N)
- G01R: MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES (indicating correct tuning of resonant circuits H03J3/12)

## Abstract

In an embodiment, a method for measuring an average frequency of an AC signal includes receiving the AC signal, triggering a first counter that is clocked at a first frequency, detecting each zero crossing of the AC signal in a predetermined crossing direction, recording a value of the first counter at each detected zero crossing, incrementing a second counter at each detected zero crossing, and calculating the average frequency of the AC signal based on the first frequency, a last recorded value of the first counter, and a last value of the second counter.

## Claims

### Claim 1

A method for measuring an average frequency of an AC signal, the method comprising:
receiving the AC signal during a measuring period that has a beginning and an end;
triggering a first counter that is clocked at a first frequency higher than a maximum frequency of the AC signal;
detecting each zero crossing of the AC signal in a predetermined crossing direction starting from the beginning of the measuring period;
recording a value of the first counter at each detected zero crossing;
triggering a second counter with an initial counter value at a first zero crossing of the AC signal in the predetermined crossing direction;
incrementing the second counter at each subsequent zero crossing of the AC signal in the predetermined crossing direction;
calculating a duration of a portion of the AC signal based on the first frequency and on a first and last recorded values of the first counter; and
calculating the average frequency of the AC signal based on the duration, the initial counter value and a last value of the second counter.

### Claim 2 (depends on 1)

The method of claim 1, wherein the first counter has a first maximum value and the second counter has a second maximum value, the method further comprising:
stop incrementing the second counter when the value of the first counter reaches the first maximum value; and
stop recording the value of the first counter when a value of the second counter reaches the second maximum value.

### Claim 3 (depends on 1)

The method of claim 1, wherein the predetermined crossing direction corresponds to a zero crossing of the AC signal from a positive value to a negative value.

### Claim 4 (depends on 1)

The method of claim 1, further comprising, during the measuring period:
successively measuring positive peak values of the AC signal;
successively measuring negative peak values of the AC signal;
successively comparing the measured positive peak values and absolute values of the measured negative peak values; and
generating an amplitude signal having an amplitude that corresponds to an average amplitude of the AC signal.

### Claim 5 (depends on 4)

The method of claim 4, wherein the amplitude of the amplitude signal corresponds to minimum values between the measured positive peak values and the absolute values of the measured negative peak values.

### Claim 6 (depends on 1)

The method of claim 1, wherein the measuring period is adjustable.

### Claim 7 (depends on 1)

The method of claim 1, wherein the AC signal is a digital AC signal representative of a level of ambient light radiation.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
clocking a third counter with a clock signal having a second frequency;
resetting and triggering the third counter each time at least one photodiode illuminated by the ambient light radiation reaches a discharge threshold;
delivering a third counter output signal;
generating an intermediate signal by clipping and inverting the third counter output signal;
undersampling the intermediate signal at a third frequency lower than the second frequency; and
bandpass-filtering the undersampled intermediate signal so as to generate the AC signal, wherein the bandpass-filtering comprises an upper cutoff frequency that determines the maximum frequency of the AC signal.

### Claim 9

An electronic circuit comprising:
a first counter configured to be clocked at a first frequency;
a second counter;
a first control circuit configured to receive, during a measuring period, an AC signal having a maximum frequency that is lower than the first frequency, wherein the first control circuit is configured to:
trigger the first counter,
detect, starting from a beginning of the measuring period, each zero crossing of the AC signal in a predetermined crossing direction,
record a current value of the first counter at each zero crossing of the AC signal in the predetermined crossing direction,
trigger, at a first zero crossing of the AC signal in the predetermined crossing direction, a second counter with an initial counter value, and
increment the second counter at each subsequent zero crossing of the AC signal in the predetermined crossing direction; and
a module configured to:
calculate, at an end of the measuring period, a duration of a portion of the AC signal based on the first frequency and of a first and a last recorded current values of the first counter, and
calculate an average frequency of the AC signal based on the duration, the initial counter value and a last value of the second counter.

### Claim 10 (depends on 9)

The electronic circuit of claim 9, wherein:
the first counter has a first maximum value;
the second counter has a second maximum value; and
the first control circuit is configured to stop incrementing the second counter when the current value of the first counter reaches the first maximum value, and stop recording the current value of the first counter when the value of the second counter reaches the second maximum value.

### Claim 11 (depends on 9)

The electronic circuit of claim 9, wherein the predetermined crossing direction corresponds to a zero crossing of the AC signal from a positive value to a negative value.

### Claim 12 (depends on 9)

The electronic circuit of claim 9, further comprising:
a first measuring circuit configured to successively measure positive peak values of the AC signal;
a second measuring circuit configured to successively measure negative peak values of the AC signal; and
a comparison circuit configured to successively compare the measured positive peak values with absolute values of the measured negative peak values, and deliver an amplitude signal having an amplitude that corresponds to an average amplitude of the AC signal.

### Claim 13 (depends on 12)

The electronic circuit of claim 12, wherein the amplitude of the amplitude signal corresponds to minimum values between the measured positive peak values and the absolute values of the measured negative peak values.

### Claim 14 (depends on 9)

The electronic circuit of claim 9, wherein the measuring period is adjustable.

### Claim 15 (depends on 9)

The electronic circuit of claim 9, wherein the AC signal is a digital AC signal representative of a level of ambient light radiation.

### Claim 16 (depends on 15)

The electronic circuit of claim 15, further comprising:
a photodiode;
a third counter configured to be clocked by a clock signal having a second frequency so as to deliver a third counter output signal;
a control module configured to reset and trigger the third counter when the photodiode illuminated by ambient light radiation reaches a discharge threshold; and
a second control circuit comprising:
a processing module configured to generate an intermediate signal through clipping and inversion of an output signal of the third counter,
a sampling module configured to undersample the intermediate signal at a second frequency lower than the first frequency, and
a filtering module configured to perform bandpass filtering of the undersampled intermediate signal so as to generate the AC signal, the bandpass filtering having an upper cutoff frequency that determines the maximum frequency of the AC signal.

### Claim 17 (depends on 15)

The electronic circuit of claim 15, further comprising an ambient light sensor configured to generate the AC signal based on the level of ambient light radiation.

### Claim 18

A system comprising:
a photodiode coupled between a first supply terminal and a first node;
a first switch coupled between the first node and a second supply terminal;
a control module comprising a first comparator having an input coupled to the first node; and
a second circuit comprising a preliminary counter having an input coupled to an output of the first comparator, and a measuring module having an input coupled to an output of the preliminary counter, the measuring module configured to generated an average frequency signal based on the output of the preliminary counter.

### Claim 19 (depends on 18)

The system of claim 18, wherein the control module further comprises a control stage configured to generate a value representative of an intensity of light based on an output of the first comparator.

### Claim 20 (depends on 18)

The system of claim 18, wherein the second circuit further comprises:
a processing module coupled between the preliminary counter and the measuring module, the processing module configured to generate an intermediate signal;
a sampling module configured to undersample the intermediate signal and generate an undersampled intermediate signal; and
a filtering module configured to filter the undersampled intermediate signal and generate a digital AC signal, wherein the average frequency signal is an average frequency of the digital AC signal.

### Claim 21 (depends on 20)

The system of claim 20, wherein the measuring module comprises:
a first counter configured to be clocked at a first frequency;
a second counter;
a control circuit configured to:
receive the digital AC signal,
record a value of the first counter at each zero crossing of the digital AC signal during a measuring period, and
increment a second counter at each zero crossing of the digital AC signal during the measuring period; and
a controller configured to calculate the average frequency of the digital AC signal based on the first frequency, a last recorded value of the first counter, and a last value of the second counter.

### Claim 22 (depends on 20)

The system of claim 20, wherein the system is a cellular mobile telephone, tablet, laptop computer, or a motor vehicle.

### Claim 23 (depends on 20)

The system of claim 20, wherein each zero crossing of the digital AC signal comprises each time the digital AC signal transitions from a value higher than a predetermined threshold to a value lower than the predetermined threshold.
