There's been much discussion of circuitry to drive LEDs on this group.
Most has revolved around inexpensive but inelegant methods. The
elegant method is to use a controlled current source for each LED to
drive it at it's rated current.
The design methodology you describe is valid but with a few caveats.
First, remember that an LED is a diode and will only pass current in
one direction normally. I must assume that the AC adapter you refer to
is actually providing a nominal 9VDC, not 9VAC since your 270 Ohm
resistor value is a correct design value for 9VDC but not for 9VAC.
Second, given your supply voltage (9VDC) it makes sense to string two
LEDs in series and use a 90 Ohm resistor. You don't have enough
voltage for three but it's more efficient to drop voltage in another
LED making light you want rather than heat you don't in a resistor.
For example, in your original design you had a 270 Ohm resistor with a
5.4 Volt drop wasting 0.108 Watt versus my design where a 90 Ohm
resistor drops 1.8 Volts and only wastes 0.036 Watt (1/3 as much
driving 2 LEDs for a total savings of 0.18 Watt for every 2 LEDs). For
comparison, each of your LEDs is dissipating 0.072 Watts.
So, the optimal design for your components is two LEDs in series with
a 90 Ohm 1/8 or 1/4 Watt resistor. You may multiply this series in
parallel across your 9 Volt source up to 15 times before exceeding
your 300 milliAmp limit. That's 30 LEDs.
End of part 1. I'll continue next post.
Since the voltage of your source, the effective resistance of your
LEDs and the value of your resistors may vary from nominal values, you
need to build the circuit on a breadboard to experimentally determine
the best resistor value to drive your circuit at 20 milliAmps for each
leg. Additionally, as you add more circuit legs in parallel, the
loading on the power supply will decrease it's output making it
necessary to adjust the resistor value downward after you've built the
complete circuit.
If you intend to build it, here are the steps:
1 - Breadboard the complete circuit with 100 Ohm resistors on the
circuit legs.
2 - Substitute a variable resistance (250-500 Ohm potentiometer) on
one of the legs for the resistor making sure that it's value is set at
100 Ohms or more when you power the circuit.
3 - Place an Amp meter in series with the adjustable leg.
4 - Apply your 9 Volt DC source voltage to the circuit.
5 - Adjust the potentiometer value until the meter reads 20 milliAmps.
6 - Remove power from the circuit.
7 - Measure the value of the adjusted potentiometer with an Ohm meter.
8 - Remove and replace the potentiometer with a resistance value as
close to but no less than the value measured from the potentiometer as
possible.
9 - Repeat steps 2 through 9 for each leg of the circuit.
10 - After verifying operation with final components and making sure
that total circuit current doesn't exceed the load limit of the supply
(less than 300 mA),
build the components onto perf board or prototype board or etch a
board for it.
Before you go to the expense and difficulty of building such a
circuit, I recommend that you do some more research into your lighting
requirements. White LEDs don't provide significant amounts of
ultraviolet light which your algae may need for growth. There are
ultraviolet LED's available but I have no experience with them.
If I were in your position, I would be checking with people
experienced in micro reef culture to find out what solutions have been
used previously and what light spectra and intensity are needed. I
would also look to commercial sources of that light before endeavoring
to build my own. Often, a hobbyist discovers late that the cost of
components purchased at retail prices and the potential for failure
that are inherent to experimentation can cause the costs of the
experimental approach to exceed the cost of a commercial alternative
and often without producing the intended result.