I'm designing a very simple circuit with a few leds, a transistor (2n2222a) as a switch, powered by a 12v 7 amp hour battery. When performing my calculations for resistor values should I use the battery's nominal voltage of 12v or it's actual voltage which when charged is probably around 13v?
Unless you use a regulator, say 5 or 9 Volts or constant current. The brightness will vary accordingly between the low and high voltage ranges.
Adam
Regulation would be ideal, but if you want to stick to the simple resistor route, it would be a good idea to do your calculations based on the higher voltage your circuit will see. I slapped together a cheap dome-light in a car and used 14.4 V in my calculation... it will die soon due to spikes in the electrical system, and it dims slightly when the engine is shut off and the battery droops back to 12V.
If you do your calculations on the lower voltage, you will be pushing your LED's harder than they are rated for until the battery voltage droops back down. This will greatly shorten the life of your LEDs.
Edit: Because your voltage will vary, it would be helpful to use maybe 1 or 2 less LEDs in series... This will cause the resistor to drop a larger voltage, but will result in the current through your LEDs changing much less than if it were only dropping 0.5 - 1V for example.