![]() | ![]() | ![]() |
| | |||||||
| Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| I designed my light detector. It is an LDR and cap to a pin on a microcontroller. And a transistor to piezo to beep.. Thanks to Nigel's joystick tutorial. Problem, battery last 5 days (9volt transistor type). Any ideas on using the LDR, it drops to 1K when the light is at the level I want to detect. Can I use it and a resistor to an FET to power the microcontroller? Any other ideas. I bought some AVR tiny11 chipd that draw less power, but my programmer will not program them (for some reason), so look for other ideas. Thanks. | |
| |
| | (permalink) | |||
| Quote:
Second, by using 9V you're instantly wasting 4/9th of the power in the regulator, dropping it down to 5V. Use three AA batteries to power it!. Thirdly, (as I believe I mentioned previously?), don't take continuous readings, there's no need - put the PIC to sleep and have it wake up under control of the watchdog timer and run the test, then go back to sleep again. The WDT is rather limited, so it's usual to only test every so many WDT timeouts. Fourthly, run at a lower clock speed, power consumption is directly proportional to clock speed. Quote:
Quote:
Quick check in the datasheet, for a 16F628A typical running consumption at 4MHz is 668uA, at 32KHz only 38uA, and typical sleep current is only 0.2uA. | ||||
| |