| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
AN3248 bảng dữ liệu(PDF) 14 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3248 bảng dữ liệu(HTML) 14 Page - STMicroelectronics |
|
14 / 17 page ![]() Brightness control using a light dependent resistor (LDR) AN3248 14/17 Doc ID 17758 Rev 3 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 12 shows how to connect an LDR resistor to an STM32L1 device. COMP2 non-inverting input can be connected to an LDR resistor through a voltage divider (VIN). The threshold can be set externally to PB3 or set internally to VREFINT, 3/4 VREFINT, 1/2 VREFINT, or 1/4 VREFINT. The COMP2 output (CMP2OUT) can be internally connected to EXTI line 22 which, when configured to detect both rising and falling edges on CMP2OUT, can be used as an interrupt source to switch to/from Low power mode. Figure 12. Connecting an LDR resistor to an STM32L1 device 1. PB4 or PB5 can be used as COMP2 non-inverting input. Thus, VIN can be connected to PB4 or PB5. 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. VDD COMP2 Resistor (R) VIN Other possibilities V REFINT PB3 ¾ V REFINT ½ V REFINT ¼ V REFINT PB4/PB5 (1) + - EXTI line 22 ai18728 CMP2OUT Light dependent resistor (LDR) STM32L1 device V IN LDR LDR R + () ---------------------------- V DD × = |
|
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất All Rights Reserved©Alldatasheet.com |
| 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 |