Powering 65 leds with pwm

I want to power 65 leds in a 5x13 array which would need 18V and 260mA. I want to be able to controll it's brightness with a pwm pin. I wil use an external power source but don't know how to wire it up to do what I want.

You just need an ordinary npn transistor such as bc337.

+18V --> led array --> series resistors --> npn collector.

npn emitter --> ground

Arduino pwm pin --> base resistor --> npn base

Can you give a link to the spec of your leds, including forward voltage & max current?

the leds are 3.3v 20mA

so the wiring should be something like this

Ok, 5 leds in series will be 16V and the transistor will drop, let's say, 0.5V. So the voltage across the series resistors will be 1.5V. 20mA current flowing. So what value and how many will you use?

For the base resistor, the total collector current will be 280mA. If we assume a gain of 50, we will need a base current of 5.6mA. Make it 10mA to make sure the transistor is saturated. What value of base resistor do you think?

The resistors I think i'll use will be 82 ohm resistors and for the base resistor im not sure.