Electronic Components Datasheet Search
  English  ▼

X  

AN4112 Datasheet(PDF) 14 Page - STMicroelectronics

Part # AN4112
Description  Using STM32F05xx analog comparators in application cases
PDF  17 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN4112 Datasheet(HTML) 14 Page - STMicroelectronics

Back Button AN4112 Datasheet HTML 9Page - STMicroelectronics AN4112 Datasheet HTML 10Page - STMicroelectronics AN4112 Datasheet HTML 11Page - STMicroelectronics AN4112 Datasheet HTML 12Page - STMicroelectronics AN4112 Datasheet HTML 13Page - STMicroelectronics AN4112 Datasheet HTML 14Page - STMicroelectronics AN4112 Datasheet HTML 15Page - STMicroelectronics AN4112 Datasheet HTML 16Page - STMicroelectronics AN4112 Datasheet HTML 17Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 14 / 17 page
background image
Brightness control using a light dependent resistor (LDR)
AN4112
14/17
Doc ID 023195 Rev 1
6
Brightness control using a light dependent resistor
(LDR)
In some battery operated applications, the microcontroller needs to be powered if the
environment is lit; otherwise, it must be kept powered off. For such applications, a light
dependent resistor (LDR), whose resistance depends on light intensity, is useful to control
the microcontroller state. Using an LDR sensor, the microcontroller can switch to/from low
power mode depending on the voltage provided by the LDR resistor. Figure 11 shows how
to connect an LDR resistor to an STM32F05xx device. The COMP2 non-inverting input can
be connected to an LDR resistor through a voltage divider (VIN). The threshold can be set
externally to the PA2 or PA5 pin or set internally to VREFINT, 3/4 VREFINT, 1/2 VREFINT, or 1/4
VREFINT. The COMP2 output (COMP2OUT) can be internally connected to EXTI line 22
which, when configured to detect both rising and falling edges on COMP2OUT, can be used
as an interrupt source to switch to/from low power mode.
Figure 11.
Connecting an LDR resistor to an STM32F05xx device
1.
PA3 or PA1 can be used as COMP2 non-inverting input. Thus, VIN can be connected to PA3 or PA1.
The voltage VIN can be computed using Equation 5.
Equation 5
As the LDR resistance decreases with increasing light intensity, the voltage VIN decreases
as more light shines on the LDR.
MS30286V1
VREFINT
¼VREFINT
½VREFINT
¾VREFINT
Other possibilities
PA2/PA5
PA3/PA1
(1)
COMP2
+
-
EXTI line 22
COMP2OUT
Light
dependent
resistor
(LDR)
VDD
Resistor (R)
VIN
STM32F05xx
V
IN
LDR
LDR
R
+
()
----------------------------
V
DD
×
=



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com