License

CC-BY-SA 3.0

Recommend Projects

autolight-board

1 month ago 134
  • Description
  • Documents
  • BOM
  • Attachments
  • Members
  • Comments

Description

Auto light

Attiny10 & APDS-9930 based automatic light/switch

https://github.com/N-Storm/autolight

https://easyeda.com/NStorm/autolight-board

This project utilizes small ATtiny10 mcu to work with APDS-9930 ambient light (AL) and proximity I2C sensor. This is used for automatic "smart" light in a drawer. Once the drawer are open the APDS-9930 will notice proximity change and trigger a preset interrupt and MCU will come from sleep to check if AL level are below set (i.e. it's dark around). If the set condition for AL level will be met, it will enable HIGH level on PB3 pin. Which is connected to a MOSFET or any other switch to enable LED light.

Reset shares same PB3 pin so it must be disabled via fuses. You will have to apply +12V to PB3/RESET pin to reprogram attiny10 after flashing RSTDISBL fuse.

The PB2 port are used as INT0 for sensor interrupts to wake MCU from sleep on proximity change event.

Building

Fetch the latest trunk:

git clone https://github.com/N-Storm/autolight && cd autolight

Then tweak some settings in autolight.h if required. They are commented. After that do a:

make && make flash && make fuse.

After you do a make fuse step, you won’t be able to program MCU again without applying +12V to RESET pin (make sure it’s not connected to your programmer hardware

Alternatively you can use pre-built binaries with the default settings from releases section.

Connecting

PB0 ↔ SCL

PB1 ↔ SDA

PB2 ↔ INT

PB3 are the module digital output, with logic LOW when light should be turned off and HIGH when it should be on. Suited for connecting to an N-channel FET driving the LED light.

Please be aware that the APDS-9930 module requires 2.5 – 3.6 V for it’s operation on Vdd+Vbatt (IR LED power). I recommend to use a 3.3V LDO for powering both MCU & APDS-9930.

Schematics & board are available on EasyEDA: https://easyeda.com/NStorm/autolight-board

This board has two places for LDOs - U3 & U4. Solder only one of them! They replace each other. The board are made so they could replace each other. Alternatively edit board/schematics to replace them with your favorite LDO.

This project utilizes software I2C library by eXtreme Electronics, India. www.eXtremeElectronics.co.in

Documents

autolight-board

autolight-board

BOM

ID Name Designator Footprint Quantity Manufacturer Part Manufacturer Supplier Supplier Part Price LCSC Assembly Mounted BOM_Supplier BOM_Manufacturer BOM_Manufacturer Part BOM_Supplier Part
1 ATTINY10-TSHR U1 SOT-23-6 1 LCSC MICROCHIP ATTINY10-TSHR C128438
2 MCP1810T U4 8-VDFN EXPOSED PAD 1 Digi-Key MCP1810T-33I/J8ACT-ND
3 1u C1,C2 0805 2
4 XC6206P302MR U3 SEEED-SOT-23 1 XC6206P302MR
5 IRLML2502TRPBF Q1 SEEED-SOT-23 1
6 OUT CN2 JST-PH-2-THM 1
7 Header-Male-2.54_1x6 P1 HDR-6X1/2.54 1 LCSC BOOMELE Header-Male-2.54_1x6 C37208
8 BAT_IN CN1 JST-PH-2-THM 1
9 10K R1 0603-RES 1

Attachments

None

Members

Success
The owner does not allow comments in this project now

Comments (0)

goToTop
你现在访问的是EasyEDA海外版,使用建立访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow
We use cookies to offer you a better experience. Detailed information on the use of cookies on this website is provided in our Privacy Policy. By using this site, you consent to the use of our cookies.