NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Project Help and Ideas » LCD fades as LED is lit
August 04, 2011 by edb |
I am trying to 'fiddle' with the system now that I've completed the basic projects. I'm using the temperature sensor project and combining it with a simple LED flash when the temperature exceeds a set limit. The modifications to the temperature project program are included below. My question, why does the LCD dim (completely) when the LED is on? Can I not run both devices? Does the ADC take too much current to run these together? Capacitor not big enough? Is smoke eminent? The project notes seem to imply that this should work... Thanks for any insights! // pin definition DDRB |= (1<<PB5); int main() { // original code while(1) { //check temperature and average
|
---|---|
August 04, 2011 by Rick_S |
If you are not using a current limiting resistor on your LED, use one. For experimentation purpose, you probably don't need to drive the LED at full power and without a current limiting resistor, you are giving it everything the micro-controller is capable of. For my workbench setups, I typically will use a 1k resistor but anything from about 150 ohms up to that should work fine. This will prevent the LED from dropping the voltage so much. If you are using battery power for your kit, it may be time to upgrade to a wall wart power supply or change the battery. The more you use your kit the more you will find the benefit of an external power supply. If you are using the backlight for your LCD, you will either want to go with the external supply or disconnect it. Rick |
August 04, 2011 by bretm |
Make sure you use a current-limiting resistor for the LED (the NerdKits Guide skips that in places), and try a fresh battery. |
August 04, 2011 by Rick_S |
Ha Ha bretm, I was a bit too fast for you. |
August 04, 2011 by edb |
I tried a small resistor, but maybe the wrong type? I'll check into that. It's battery right now but I probably have a dozen wall warts to choose from... Thanks for the assist, as always! |
Please log in to post a reply.
Did you know that you can control multiple LEDs from one microcontroller output? Learn more...
|