Disclosure of Invention
In order to solve the above-mentioned technical problem, an aspect of the present invention provides an automatic aperture driving circuit, including:
the front-end processor is used for analyzing the brightness of the current image and judging whether the brightness of the current image meets a set value or not;
the first digital-to-analog conversion module is used for receiving a first digital code from the front-end processor and generating a first analog voltage, and when the difference between the current image brightness and the set value is larger, the first digital code generated by the front-end processor is smaller, and the value of the first analog voltage is smaller;
the non-inverting input end of the first comparison module receives the first analog voltage output by the first digital-to-analog conversion module, the inverting input end of the first comparison module receives a reference voltage value, wherein the value of the first analog voltage is larger than or equal to the value of the reference voltage, the first comparison module compares the first analog voltage with the reference voltage value, if the value of the first analog voltage is larger than the reference voltage, the first comparison module outputs the first analog voltage to an automatic aperture interface pin damping positive so as to adjust the damping coil to control the damping, and therefore the aperture change speed is controlled, and if the value of the first analog voltage is equal to the reference voltage, the first comparison module outputs 0;
A second digital-to-analog conversion module that receives a second digital code from the front-end processor and generates a second analog voltage, wherein the larger the second digital code generated by the front-end processor is when the current image brightness is lower than the set value, the higher the value of the second analog voltage is, and the smaller the second digital code generated by the front-end processor is when the current brightness is higher than the set value;
the positive phase input end of the second comparison module receives the second analog voltage output by the second digital-to-analog conversion module, the negative phase input end of the second comparison module receives feedback voltage which is output from the output end of the second comparison module, is positive to the automatic aperture interface pin drive and is negatively fed back through the automatic aperture interface pin drive, the second comparison module compares the second analog voltage with the feedback voltage, when the second analog voltage is larger than the feedback voltage, the driving coil is adjusted to enable the aperture to be enlarged, when the second analog voltage is smaller than the feedback voltage, the driving coil is adjusted to enable the aperture to be smaller, and when the second analog voltage is equal to the feedback voltage, the aperture is stable.
Further, the reference voltage is defined as an analog voltage value output by the first digital-to-analog conversion module when the first digital code written into the first digital-to-analog conversion module is 0.
Further, the first digital code and the second digital code generated by the front-end processor are transmitted to the first digital-to-analog conversion module and the second digital-to-analog conversion module by IIC buses, respectively.
Further, the first digital-to-analog conversion module comprises a first digital-to-analog converter, the first digital-to-analog converter comprises an interface matched with an IIC bus, wherein the interface matched with the IIC bus is used for transmitting the first digital code to the first digital-to-analog conversion module;
the second digital-to-analog conversion module comprises a second digital-to-analog converter which comprises an interface matched with the IIC bus, wherein the interface matched with the IIC bus is used for transmitting the second digital code to the second digital-to-analog conversion module.
Further, the first digital-to-analog converter is a digital-to-analog converter of an 8-bit IIC interface, and/or the second digital-to-analog converter is a digital-to-analog converter of an 8-bit IIC interface.
Further, the IIC bus is an n-bit IIC bus, where n is 8, 10, 12 or 16, the first digital-to-analog conversion module and the second digital-to-analog conversion module are configured through the IIC bus, and the first digital code and the second digital code are 0 to 2 n -1, the value of the first analog voltage and the value of the second analog voltage output by the first digital to analog conversion module respectively varying from the reference voltage to a supply voltage, wherein the supply voltage refers to the supply voltage applied by the supply power to the first digital to analog conversion module and/or to the second digital to analog conversion module.
Further, the digital-to-analog conversion circuit further comprises a first filtering module, wherein the first filtering module is used for filtering the first analog voltage generated by the first digital-to-analog conversion module, and the filtered first analog voltage is input to the non-inverting input end of the first comparison module.
Further, the first filter module comprises a first capacitor and a first resistor, one end of the first resistor is electrically connected to the output end of the first digital-to-analog conversion module, the other end of the first resistor is grounded, the anode of the first capacitor is electrically connected to the non-inverting input end of the first comparison module, and the cathode of the first capacitor is grounded.
Further, the first pin of the first digital-to-analog converter is grounded, and the IIC address is 0 multiplied by 0C;
the second pin of the first digital-to-analog converter is a serial clock input end and is used for receiving a serial clock signal transmitted by an IIC bus;
a third pin of the first digital-to-analog converter is a data input end and is used for receiving the first digital code transmitted by the IIC bus;
the fourth pin of the first digital-to-analog converter is electrically connected to a first power supply;
a fifth pin of the first digital-to-analog converter is grounded;
the sixth pin of the first digital-to-analog converter is an analog voltage output end and is used for outputting the first analog voltage.
Further, the filter further comprises a second capacitor, wherein the second capacitor is used for decoupling and filtering the first power supply, the anode of the second capacitor is electrically connected to the first power supply, and the cathode of the second capacitor is grounded.
Further, the digital-to-analog conversion circuit further comprises a second filtering module, wherein the second filtering module is used for filtering the second analog voltage generated by the second digital-to-analog conversion module, and the filtered second analog voltage is input to the non-inverting input end of the second comparison module.
Further, the second filtering module comprises a third capacitor and a second resistor, one end of the second resistor is electrically connected to the output end of the second digital-to-analog conversion module, the other end of the second resistor is grounded, the anode of the third capacitor is electrically connected to the non-inverting input end of the second comparison module, and the cathode of the third capacitor is grounded.
Further, the first pin of the second digital-to-analog converter is connected to a second power supply source through a third resistor, the IIC address of the second power supply source is 0×0F, and the third resistor is used for limiting the current flowing into the first pin of the second digital-to-analog converter by the second power supply source;
the second pin of the second digital-to-analog converter is a serial clock input end and is used for receiving a serial clock signal transmitted by the IIC bus;
a third pin of the second digital-to-analog converter is a data input end and is used for receiving the second digital code transmitted by the IIC bus;
a fourth pin of the second digital-to-analog converter is electrically connected to the second power supply;
a fifth pin of the second digital-to-analog converter is grounded;
and a sixth pin of the second digital-to-analog converter is an analog voltage output end and is used for outputting the second analog voltage.
Further, the filter further comprises a fourth capacitor, wherein the fourth capacitor is used for decoupling and filtering the second power supply, the anode of the fourth capacitor is electrically connected to the second power supply, and the cathode of the fourth capacitor is grounded.
Further, the voltage dividing circuit is further provided with a voltage dividing point which is the reference voltage, wherein the voltage dividing circuit comprises a fourth resistor and a fifth resistor which are connected in series between a third power supply and ground, and the voltage dividing point is positioned between the fourth resistor and the fifth resistor and is electrically connected to an inverting input end of the first comparison module.
Further, the lens driving device further comprises a sixth resistor, wherein one end of the sixth resistor is electrically connected to the driving negative of the automatic aperture interface pin, and the other end of the sixth resistor is grounded and is used as a release path of driving coil current of the lens.
Further, the automatic aperture interface pin damping device further comprises a seventh resistor, wherein the seventh resistor is electrically connected between the first comparison module and the automatic aperture interface pin damping pin and is used for limiting the output current of the first comparison module.
Further, the automatic aperture interface pin is damped to negative ground.
Further, the first comparison module includes a first comparator and the second comparison module includes a second comparator.
In another aspect, the present invention provides an electronic device including the aforementioned automatic aperture driving circuit.
The automatic aperture driving circuit controls the lens to adjust the damping coil by using the first analog voltage signal generated by the first digital-to-analog conversion module so as to change the damping, thereby controlling the aperture change speed, and controls the aperture opening by using the second analog voltage signal generated by the second digital-to-analog conversion module to adjust the driving coil, so that the automatic aperture driving circuit can accurately control the aperture opening and the aperture rotation speed, and can realize good adjusting effect even when the ambient light changes severely.
The electronic device of the invention has the advantages because of comprising the automatic aperture driving circuit.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a more thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the invention may be practiced without one or more of these details. In other instances, well-known features have not been described in detail in order to avoid obscuring the invention.
It should be understood that the present invention may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. As used herein, the term "and/or" includes any and all combinations of the associated listed items.
In order that the invention may be fully understood, a detailed description will be provided below in order to illustrate the technical aspects of the invention. Preferred embodiments of the present invention are described in detail below, however, the present invention may have other embodiments in addition to these detailed descriptions.
In order to solve the foregoing technical problem, the present invention provides an automatic aperture driving circuit, comprising:
the front-end processor is used for analyzing the brightness of the current image and judging whether the brightness of the current image meets a set value or not;
the first digital-to-analog conversion module is used for receiving a first digital code from the front-end processor and generating a first analog voltage, and when the difference between the current image brightness and the set value is larger, the first digital code generated by the front-end processor is smaller, and the value of the first analog voltage is smaller;
the non-inverting input end of the first comparison module receives the first analog voltage output by the first digital-to-analog conversion module, the inverting input end of the first comparison module receives a reference voltage value, wherein the value of the first analog voltage is larger than or equal to the value of the reference voltage, the first comparison module compares the first analog voltage with the reference voltage value, if the value of the first analog voltage is larger than the reference voltage, the first comparison module outputs the first analog voltage to an automatic aperture interface pin damping positive so as to adjust the damping coil to control the damping, and therefore the aperture change speed is controlled, and if the value of the first analog voltage is equal to the reference voltage, the first comparison module outputs 0;
A second digital-to-analog conversion module that receives a second digital code from the front-end processor and generates a second analog voltage, wherein the larger the second digital code generated by the front-end processor is when the current image brightness is lower than the set value, the higher the value of the second analog voltage is, and the smaller the second digital code generated by the front-end processor is when the current brightness is higher than the set value;
the positive phase input end of the second comparison module receives the second analog voltage output by the second digital-to-analog conversion module, the negative phase input end of the second comparison module receives feedback voltage which is output from the output end of the second comparison module, is positive to the automatic aperture interface pin drive and is negatively fed back through the automatic aperture interface pin drive, the second comparison module compares the second analog voltage with the feedback voltage, when the second analog voltage is larger than the feedback voltage, the driving coil is adjusted to enable the aperture to be enlarged, when the second analog voltage is smaller than the feedback voltage, the driving coil is adjusted to enable the aperture to be smaller, and when the second analog voltage is equal to the feedback voltage, the aperture is stable.
The automatic aperture driving circuit controls the lens to adjust the damping coil by using the first analog voltage signal generated by the first digital-to-analog conversion module so as to change the damping, thereby controlling the aperture change speed, and controls the aperture opening by using the second analog voltage signal generated by the second digital-to-analog conversion module to adjust the driving coil, so that the automatic aperture driving circuit can accurately control the aperture opening and the aperture rotation speed, and can realize good adjusting effect even when the ambient light changes severely.
The automatic aperture driving circuit of the present invention will be described in detail with reference to fig. 1 to 3, wherein fig. 1 shows a topology of an automatic aperture system in an embodiment of the present invention; FIG. 2 illustrates an automatic aperture interface pin definition diagram in an embodiment of the invention; fig. 3 shows an automatic aperture driving circuit diagram in an embodiment of the invention.
Specifically, as shown in fig. 1, the automatic aperture driving circuit includes a front-end processor for analyzing the current image brightness and judging whether the current image brightness satisfies a set value.
The set value means that the brightness of the image meets the expected value of the user, and the set value can be reasonably set according to different requirements of different users on the expected value of the brightness of the image.
For example, the current image brightness information may be collected by a device including, for example, an image sensor, and transmitted to the front-end processor for analysis of the current image brightness and determination of whether the current image brightness meets a set value.
Further, the front-end processor may convert the current image brightness information to a digital code, for example, by a brightness encoder integrated in the front-end processor.
Illustratively, as shown in fig. 2, the auto-iris interface pin includes: driving positive (driving+), driving negative (driving-), damping positive (damping+) and damping negative (damping-) interface pins.
Illustratively, as shown in fig. 1, the automatic aperture of the present invention comprises a drive loop and a damping loop, the drive loop is connected to the automatic aperture interface pin drive positive, a signal is transmitted through the drive positive drive coil, the drive coil rotates to control the aperture to open or close, and the current is fed back to the drive loop from the drive positive through the drive coil to the drive negative; the damping loop is connected to the damping positive of the automatic aperture interface pin, signals are transmitted through the damping positive damping coil, the damping coil rotates to control the damping to be increased or decreased, current flows from the damping positive to the damping negative through the damping coil, and the damping negative is grounded to GND.
In one example, the automatic aperture driving circuit of the present invention further includes a first digital-to-analog conversion module that receives a first digital code from the front-end processor and generates a first analog voltage, the smaller the first digital code generated by the front-end processor, the smaller the value of the first analog voltage when the difference between the current image brightness and the set value is larger.
Further, the non-inverting input end of the first comparison module receives the first analog voltage output by the first digital-to-analog conversion module, the inverting input end of the first comparison module receives a reference voltage value, wherein the value of the first analog voltage is larger than or equal to the value of the reference voltage, the first comparison module compares the first analog voltage with the reference voltage value, if the value of the first analog voltage is larger than the reference voltage, the first comparison module outputs the first analog voltage to an automatic aperture interface pin damping positive so as to adjust the damping coil to control the damping, thereby controlling the aperture change speed, and if the value of the first analog voltage is equal to the reference voltage, the first comparison module outputs 0.
The voltage output by the first comparison module is 0V when the difference between the first analog voltage and the reference voltage value is zero, no current is input to an automatic aperture interface pin damping positive, no current flows in a lens, at the moment, the damping is minimum, and the aperture change speed is maximum.
Specifically, the first digital code generated by the front-end processor according to the current image brightness is transmitted to the first digital-to-analog conversion module by an integrated circuit bus (inter-Integrated Circuit, abbreviated as IIC bus), and other connection manners capable of transmitting the first digital code to the first digital-to-analog conversion module can be used as well known by those skilled in the art.
The IIC bus is illustratively an n-bit IIC bus, wherein n is 8, 10, 12 or 16, the first digital code is 0 to 2 if the first digital-to-analog conversion module is configured via the IIC bus n -1, the value of the first analog voltage output by the first digital to analog conversion module corresponding to the change from the reference voltage to a supply voltage, wherein the supply voltage refers to the supply voltage applied by the supply power source into the first digital to analog conversion module. For example, if the IIC bus is an 8-bit IIC bus, the first digital-to-analog conversion module is configured by the 8-bit IIC bus, and the first digital code is 0 to 2 8 -a natural number between 1, the value of the first analog voltage output by said first digital-to-analog conversion module varying accordingly from said reference voltage to the supply voltage, the larger the value of the first digital code, the larger the value of the first analog voltage output.
The reference voltage is defined as an analog voltage value output by the first digital-to-analog conversion module when the first digital code written into the first digital-to-analog conversion module is 0. For example, when the first digital code written into the first digital-to-analog conversion module is 0, the output analog voltage value is 2.7V, and the reference voltage is 2.7V.
The power supply voltage refers to a power supply voltage applied to the first digital-to-analog conversion module by a power supply, and the power supply voltage value can be determined according to a voltage actually required to be applied, for example, the power supply provides a power supply voltage of 5V.
In one example, the first number is encoded as 0 to 2 8 -1, the value of the output first analog voltage varies between 2.7V and 5V.
Wherein, writing 0 to 2 into the first digital-to-analog conversion module n -1, each corresponding to a value generating a first analog voltage, the larger the input value, the higher the analog voltage.
The first digital-to-analog conversion module includes a first digital-to-analog converter U1, and the digital-to-analog converter may be replaced by other functional modules such as an integrated circuit capable of implementing digital-to-analog conversion.
Illustratively, the first digital-to-analog converter U1 may be any type or model of digital-to-analog converter, and is not specifically limited herein.
Further, in order to implement the connection between the IIC bus and the first digital-to-analog converter, the first digital-to-analog converter includes an interface matched with the IIC bus, for example, when the IIC bus is an 8-bit IIC bus, the first digital-to-analog converter may be a digital-to-analog converter of an 8-bit IIC interface, where the interface matched with the IIC bus is used to transmit the first digital code to the first digital-to-analog conversion module.
In one example, as shown in fig. 3, the first digital-to-analog converter U1 includes the following six pins, wherein the first pin 1 of the first digital-to-analog converter U1 is grounded, and the IIC address is 0×0c; the second pin 2 of the first digital-to-analog converter U1 is a serial clock input end and is used for receiving a serial clock signal transmitted by the IIC bus; the third pin 3 of the first digital-to-analog converter U1 is a data input terminal for receiving the first digital code transmitted by the IIC bus; the fourth pin 4 of the first digital-to-analog converter U1 is electrically connected to a first power supply; the fifth pin 5 of the first digital-to-analog converter U1 is grounded; the sixth pin 6 of the first digital-to-analog converter U1 is an analog voltage output end, and is configured to output the first analog voltage.
In one example, as shown in fig. 3, the automatic aperture driving circuit of the present invention further includes a second capacitor C2 for decoupling and filtering the first power supply, where an anode of the second capacitor is electrically connected to the first power supply, and a cathode of the second capacitor is grounded.
Optionally, the range of the voltage provided by the first power supply may be reasonably selected according to the requirement of the actual circuit, where in this embodiment, the power supply voltage provided by the first power supply is 5V.
The first comparing module includes a first comparator U3A, which may be any type or kind of comparator known to those skilled in the art, and may also be implemented by a circuit capable of implementing the same voltage comparing function as the comparator.
Illustratively, as shown in fig. 3, the sixth pin 6 of the first digital-to-analog converter U1 is electrically connected to the non-inverting input terminal of the first comparator U3A to transmit the first analog voltage output from the first digital-to-analog converter U1 to the first comparator U3A.
In one example, the automatic aperture driving circuit of the present invention further includes a first filtering module, where the first filtering module is configured to filter the first analog voltage generated by the first digital-to-analog conversion module, and the filtered first analog voltage is input to a non-inverting input terminal of the first comparing module.
The first filtering module may be implemented by a filtering circuit capable of implementing a filtering function, for example, as shown in fig. 3, where one end of the first resistor R1 is electrically connected to an output end of the first digital-to-analog conversion module, for example, to an output end of the first digital-to-analog converter U1, the other end of the first resistor R1 is grounded, an anode of the first capacitor C1 is electrically connected to a non-inverting input end of the first comparing module, for example, to a non-inverting input end of the first comparator U3A, a cathode of the first capacitor C1 is grounded, and a filtering circuit formed by the first capacitor C1 and the first resistor R1 is used for filtering the first analog voltage.
In one example, as shown in fig. 3, the automatic aperture driving circuit of the present invention further includes a voltage dividing circuit for generating the reference voltage, and a voltage of a voltage dividing point of the voltage dividing circuit is the reference voltage, wherein the voltage dividing circuit includes a fourth resistor R4 and a fifth resistor R5 connected in series between a third power supply and a ground GND, wherein the voltage dividing point is located between the fourth resistor R4 and the fifth resistor R5, and the voltage dividing point is electrically connected to an inverting input terminal of the first comparison module, for example, to an inverting input terminal of the first comparator U3A.
The fourth resistor R4 and the fifth resistor R5 divide the power supply voltage provided by the third power supply, for example, the value of the power supply voltage provided by the third power supply is 5V, then the fourth resistor R4 and the fifth resistor R5 divide 5V, and the voltage from the dividing point is 2.7V as the value of the reference voltage, so that the resistance values of the fourth resistor and the fifth resistor can be reasonably set according to the required value of the reference voltage.
In one example, the automatic aperture driving circuit of the present invention further includes a seventh resistor R7, where the seventh resistor R7 is electrically connected between the first comparing module and the automatic aperture interface pin damping positive (damping+), and is used to limit the current of the output of the first comparing module, so as to prevent the excessive current from burning the lens coil. For example, one end of the seventh resistor R7 is electrically connected to the output terminal of the first comparator U3A, and the other end is electrically connected to the automatic aperture interface pin damping positive (damping+).
Further, the damping negative (damping-) ground of the automatic aperture interface pin is used as a release path of the current of the lens damping coil to form a damping loop.
In one example, the first comparing module includes a first comparator U3A, and the first comparator U3A is further electrically connected between the power supply and the ground, so that the first comparator can work normally, alternatively, the power supply voltage provided by the power supply may be 5V.
The circuit loop comprising the first digital-to-analog conversion module, the first comparison module and the like is used as a damping loop to realize the adjustment of the damping size.
When the digital camera is used, the front-end processor firstly analyzes the current image brightness and judges whether the current image brightness meets a set value, when the difference between the current image brightness and the set value is larger, the first digital code generated by the front-end processor is smaller, the value of the first analog voltage is smaller, the difference between the reference voltage and the first analog voltage is smaller, the damping is smaller, the aperture change speed is faster, when the difference between the first analog voltage and the reference voltage is zero, the first comparison module outputs 0V voltage, no current flows in a lens, the damping is minimum, the aperture rotation speed is fastest, otherwise, when the difference between the current image brightness and the set value is smaller, the first digital code generated by the front-end processor is larger, the value of the first analog voltage is larger, the difference between the reference voltage and the first analog voltage is larger, the damping is larger, and the aperture change speed is slower.
In a specific embodiment, 0-2 are written to the first digital-to-analog converter U1 8 Different values between-1, different first analog voltages are generated, the larger the input value, the higher the first analog voltage. When writing 0, the output voltage is 2.7V, and the writing is 2 8 -1, generating a voltage of 5V, which can be approximated at the moment when the current image brightness reaches the set value, or at the maximum value of the inherent damping in the device. The first analog voltage is compared with the reference voltage of 2.7V by the first comparator U3A, and the larger the difference value is, the larger the damping is, and the aperture change speed is reduced. When 0 is written, 2.7V voltage is produced, the first comparator U3A outputs 0V, no current flows through the lens, the damping is minimum, and the aperture change speed is maximum.
Further, the automatic aperture driving circuit of the present invention further comprises a second digital-to-analog conversion module and a second comparison module, wherein the second digital-to-analog conversion module receives a second digital code from the front-end processor and generates a second analog voltage, wherein the larger the second digital code generated by the front-end processor is when the current image brightness is lower than the set value, the higher the value of the second analog voltage is, and the smaller the second digital code generated by the front-end processor is when the current image brightness is higher than the set value is.
The positive phase input end of the second comparison module receives a second analog voltage output by the second digital-to-analog conversion module, the negative phase input end of the second comparison module receives a feedback voltage which is output from the output end of the second comparison module to the positive side of the automatic aperture interface pin drive and is negatively fed back through the automatic aperture interface pin drive, the second comparison module compares the second analog voltage with the feedback voltage so that an aperture driving circuit controls the aperture opening size according to a comparison result of the second comparison module, when the second analog voltage is larger than the feedback voltage, a driving coil is adjusted to enable the aperture to be enlarged, when the second analog voltage is smaller than the feedback voltage, the driving coil is adjusted to enable the aperture to be reduced, and when the second analog voltage is equal to the feedback voltage, the aperture is stabilized.
When the second analog voltage is equal to the feedback voltage, no current flows in a driving coil for controlling the aperture to be opened or closed, and the aperture is stable.
Specifically, the second digital code generated by the front-end processor according to the current image brightness is transmitted to the second digital-to-analog conversion module by an integrated circuit bus (inter-Integrated Circuit, abbreviated as IIC bus), and other connection manners capable of transmitting the second digital code to the second digital-to-analog conversion module can be used as well known to those skilled in the art.
The IIC bus is illustratively an n-bit IIC bus, wherein n is 8, 10, 12 or 16, the second digital-to-analog conversion module is configured via the IIC bus, and the second digital code is 0 to 2 n -1, the value of the second analog voltage output by the second digital-to-analog conversion module corresponding to the change from the reference voltage to a supply voltage, wherein the supply voltage refers to the supply voltage applied by the supply power source into the second digital-to-analog conversion module. For example, if the IIC bus is an 8-bit IIC bus, the second digital-to-analog conversion module is configured by the 8-bit IIC bus, and the second digital code is 0 to 2 8 -a natural number between 1, the value of the second analog voltage output by the second digital-to-analog conversion module varying accordingly from the reference voltage to the supply voltage, the larger the value of the second digital code, the larger the value of the second analog voltage output.
Wherein the reference voltage is defined as an analog voltage value output by the second digital-to-analog conversion module when the second digital code written into the second digital-to-analog conversion module is 0. For example, when the second digital code written into the second digital-to-analog conversion module is 0, the output analog voltage value is 2.7V, and the reference voltage is 2.7V.
The power supply voltage refers to a power supply voltage applied to the second digital-to-analog conversion module by a power supply, and the power supply voltage value can be determined according to a voltage actually required to be applied, for example, the power supply provides a power supply voltage of 5V.
In one example, the second digital code is 0 to 2 8 -any natural number between 1, the value of the output second analog voltage varies between 2.7V and 5V.
Wherein, writing 0 to 2 into the second digital-to-analog conversion module n -1, each corresponding to a value generating a second analog voltage, the larger the input value, the higher the analog voltage.
The second digital-to-analog conversion module includes a second digital-to-analog converter U2, and other functional modules such as an integrated circuit capable of implementing digital-to-analog conversion may be used instead of the digital-to-analog converter.
The second digital-to-analog converter U2 may be any type or model of digital-to-analog converter, for example, and is not specifically limited herein.
Further, in order to realize the connection between the IIC bus and the second digital-to-analog converter, the second digital-to-analog converter includes an interface matched with the IIC bus, for example, when the IIC bus is an 8-bit IIC bus, the second digital-to-analog converter may be a digital-to-analog converter of an 8-bit IIC interface, where the interface matched with the IIC bus is used to transmit the second digital code to the second digital-to-analog conversion module.
Further, the first pin 1 of the second digital-to-analog converter U2 is connected to a second power supply through a third resistor R3, the IIC address of which is 0×0f, and the third resistor R3 is used for limiting the current flowing into the first pin 1 of the second digital-to-analog converter U2 from the second power supply; the second pin 2 of the second digital-to-analog converter U2 is a serial clock input end and is used for receiving a serial clock signal transmitted by the IIC bus; the third pin 3 of the second digital-to-analog converter U2 is a data input terminal for receiving the second digital code transmitted by the IIC bus; the fourth pin 4 of the second digital-to-analog converter U2 is electrically connected to the second power supply; a fifth pin 5 of the second digital-to-analog converter U2 is grounded; the sixth pin 6 of the second digital-to-analog converter U2 is an analog voltage output end, and is configured to output the second analog voltage.
In one example, the automatic aperture driving circuit of the present invention further includes a fourth capacitor C4 for decoupling filtering the second power supply, an anode of the fourth capacitor C4 is electrically connected to the second power supply, and a cathode of the fourth capacitor C4 is grounded.
Optionally, the range of the voltage provided by the second power supply may be reasonably selected according to the requirement of the actual circuit, where in this embodiment, the power supply voltage provided by the second power supply is 5V.
The second comparing module includes a second comparator U3B, which may be any type or kind of comparator known to those skilled in the art, and may also be implemented by a circuit capable of implementing the same voltage comparing function as the comparator.
Illustratively, as shown in fig. 3, the sixth pin 6 of the second digital-to-analog converter U2 is electrically connected to the non-inverting input of the second comparator U3B to transmit the second analog voltage output from the second digital-to-analog converter U2 to the second comparator U3B.
Illustratively, as shown in fig. 3, the output of the second comparator U3B is electrically connected to the automatic aperture interface pin drive positive, such that the current output from the second comparator U3B flows through the drive positive to the drive coil for controlling the opening or closing of the aperture.
Further, as shown in fig. 3, the automatic aperture interface pin drive is negatively connected to the negative phase input end of the second comparator, so as to input the feedback voltage, which is output from the output end of the second comparator U3B to the automatic aperture interface pin drive, is positively fed back through the driving aperture and is negatively fed back through the automatic aperture interface pin drive, to the negative phase input end of the second comparator U3B.
Further, as shown in fig. 3, the automatic aperture driving circuit of the present invention further includes a sixth resistor R6, where one end of the sixth resistor R6 is electrically connected to the driving negative pin of the automatic aperture interface, and the other end is grounded, and is used as a release path of the driving coil current of the lens.
In one example, the automatic aperture driving circuit of the present invention further includes a second filtering module, where the second filtering module is configured to filter the second analog voltage generated by the second digital-to-analog conversion module, and the filtered second analog voltage is input to a non-inverting input terminal of the second comparing module.
The second filtering module may be implemented by a filtering circuit capable of implementing a filtering function, for example, as shown in fig. 3, where one end of the second resistor R2 is electrically connected to an output end of the second digital-to-analog conversion module, for example, to an output end of the second digital-to-analog converter U2, another end of the second resistor R2 is grounded, an anode of the third capacitor C3 is electrically connected to a non-inverting input end of the second comparison module, for example, to a non-inverting input end of the second comparator U3B, a cathode of the third capacitor C3 is grounded,
In one example, the second comparing module includes a second comparator U3B, where the second comparator U3B is further electrically connected between the power supply and the ground, so that the second comparator U3B can work normally, and alternatively, the power supply voltage provided by the power supply may be 5V.
The circuit loop comprising the second digital-to-analog conversion module, the second comparison module and the like is used as a driving loop to realize the adjustment of the opening size of the aperture, and the aperture is totally closed to be totally opened and divided into 2 by controlling the second digital-to-analog conversion module 8 (or other suitable 2) n ) The step size and the writing of different values can accurately control the opening size of the aperture.
When the digital image processing device is used, the front-end processor firstly analyzes the brightness of the current image and judges whether the brightness of the current image meets a set value, when the brightness of the current image is lower than the set value, the second digital code generated by the front-end processor is larger (namely, the second digital code generated by the front-end processor is larger than the second digital code generated by the front-end processor when the brightness of the current image meets the set value), and the value of the second analog voltage is higher, when the brightness of the current image is higher than the set value, the second digital code generated by the front-end processor is smaller (namely, the second digital code generated by the front-end processor is smaller than the second digital code generated by the front-end processor when the brightness of the current image meets the set value).
The positive phase input end of the second comparison module receives a second analog voltage output by the second digital-to-analog conversion module, the negative phase input end of the second comparison module receives a feedback voltage which is output from the output end of the second comparison module, is positive to the automatic aperture interface pin drive and is negatively fed back through the automatic aperture interface pin drive, the difference between the second analog voltage and the feedback voltage is compared, the aperture opening is larger, the light inlet amount is increased, after the aperture reaches a preset size, the second analog voltage is consistent with the feedback voltage, no current flows in a coil for controlling the aperture to be opened or closed, and the aperture is stable. On the contrary, when the current brightness is higher than the set value, the second digital code generated by the front-end processor is smaller, the value of the second analog voltage output by the second digital-to-analog conversion module is lower, the aperture opening is smaller, the light incoming quantity is reduced, when the second analog voltage is higher than the feedback voltage, the driving coil is adjusted to enable the aperture to be larger, when the second analog voltage is lower than the feedback voltage, the driving coil is adjusted to enable the aperture to be smaller, when the second analog voltage and the feedback voltage are equal, no current flows in the coil for controlling the aperture to be opened or closed, and the aperture is stable.
Illustratively, 0-2 are written to the second digital-to-analog converter U2 8 -different values between-1, generating different second analog voltages, the larger the input value the higher the second analog voltage; when writing 0, the second analog voltage is outputted as 2.7V, and 2 is written 8 -1, generating a second analog voltage of 5V. Second analog voltage and channelThe feedback voltage fed back by the second comparator U3B is compared, the larger the difference value is, the larger the aperture is opened, and the light inlet amount is increased. When a voltage value is generated, a current is generated by the coil in the lens to drive the aperture to change, after the aperture reaches a preset size, the fed back voltage is equal to the second analog voltage output by the second digital-to-analog converter U2, no current flows in the coil, and the aperture is stable. By controlling the second analog voltage U2, the aperture is fully closed to fully open and divided into 2 8 The step size and the writing of different values can accurately control the opening size of the aperture.
The explanation and explanation of the key parts of the automatic aperture driving circuit of the present invention are completed, and the complete driving circuit may also include other components and circuit parts, which are not described in detail herein.
In summary, the automatic aperture driving circuit of the present invention uses the first analog voltage signal generated by the first digital-to-analog conversion module to control the lens to adjust the damping coil, so as to change the damping, thereby controlling the aperture changing speed, and uses the second analog voltage signal generated by the second digital-to-analog conversion module to adjust the driving coil to control the aperture opening, so that the automatic aperture driving circuit of the present invention can precisely control the aperture opening and the aperture rotating speed, and can achieve a good adjusting effect even when the ambient light changes sharply.
Implement two
The invention also provides an electronic device comprising the automatic aperture driving circuit in the embodiment.
The electronic device of the embodiment may be any electronic product or apparatus such as a mobile phone, a tablet computer, a notebook computer, a netbook, a game console, a television, a VCD, a DVD, a navigator, a digital photo frame, a camera, a video camera, a recording pen, MP3, MP4, PSP, and the like, and may also be any intermediate product including a circuit. The electronic device provided by the embodiment of the invention has better performance due to the use of the circuit.
In one example, the electronic device in this embodiment is a camera, where the camera includes the automatic aperture driving circuit in embodiment one, and the automatic aperture driving circuit includes:
the front-end processor is used for analyzing the brightness of the current image and judging whether the brightness of the current image meets a set value or not;
the first digital-to-analog conversion module is used for receiving a first digital code from the front-end processor and generating a first analog voltage, and when the difference between the current image brightness and the set value is larger, the first digital code generated by the front-end processor is smaller, and the value of the first analog voltage is smaller;
The non-inverting input end of the first comparison module receives the first analog voltage output by the first digital-to-analog conversion module, the inverting input end of the first comparison module receives a reference voltage value, wherein the value of the first analog voltage is larger than or equal to the value of the reference voltage, the first comparison module compares the first analog voltage with the reference voltage value, if the value of the first analog voltage is larger than the reference voltage, the first comparison module outputs the first analog voltage to an automatic aperture interface pin damping positive so as to adjust the damping coil to control the damping, and therefore the aperture change speed is controlled, and if the value of the first analog voltage is equal to the reference voltage, the first comparison module outputs 0;
a second digital-to-analog conversion module that receives a second digital code from the front-end processor and generates a second analog voltage, wherein the larger the second digital code generated by the front-end processor is when the current image brightness is lower than the set value, the higher the value of the second analog voltage is, and the smaller the second digital code generated by the front-end processor is when the current brightness is higher than the set value;
The positive phase input end of the second comparison module receives the second analog voltage output by the second digital-to-analog conversion module, the negative phase input end of the second comparison module receives feedback voltage which is output from the output end of the second comparison module, is positive to the automatic aperture interface pin drive and is negatively fed back through the automatic aperture interface pin drive, the second comparison module compares the second analog voltage with the feedback voltage, when the second analog voltage is larger than the feedback voltage, the driving coil is adjusted to enable the aperture to be enlarged, when the second analog voltage is smaller than the feedback voltage, the driving coil is adjusted to enable the aperture to be smaller, and when the second analog voltage is equal to the feedback voltage, the aperture is stable.
Since the electronic device of the present invention includes the aforementioned automatic aperture driving circuit, the automatic aperture driving circuit has advantages as well as the electronic device.
The present invention has been illustrated by the above-described embodiments, but it should be understood that the above-described embodiments are for purposes of illustration and description only and are not intended to limit the invention to the embodiments described. It will also be appreciated by persons skilled in the art that the present invention is not limited to the embodiments described above, and that many variations and modifications are possible in light of the teachings of the invention, which variations and modifications fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.