I'm using a Luxdrive 3021 Buckpuck (datasheet here) I'll be dimming this with PWM generated from a Picaxe.

I'll be connecting the Picaxe and buckpuck in the same way as shown in fig14 of the datasheet:

This will be first time I've 'dabbled' with transistors so I'm really just seeking help to make sure I've calculated the values for both resistors correctly - the diagram above list 5K but that's a 'non standard' value and quite expensive when I searched on Farnell!

My workings out are as follows:

The datasheet for the buckpuck tells me that the impedance of the Control pin is 1K, so the voltage from the Ref pin is 5V which makes the current 5mA

I'll also be using a 2N4403 transistor as listed in the above diagram - As I don't know any better!!

According the the 2N4403 datasheet the hfe could be somewhere between 60 and 100 So I've taken the lowest figure....

Using the calculations on http://www.rason.org/Projects/transwit/transwit.htm

R1 = Supply Voltage / ( Maximum Current Required / Minimum HFE * 1.3 )

so:

5/(.005/60*1.3) = 46,153 - 46.4KR being the nearest value I can see.

R2= 10*R1 so that gives me a 464KR value

But if I use the calculations here my calculations are somewhat different!!

Here, R1 = (Vc *hfe ) / ( 5 * Ic )

so, ( 5*60 ) / ( 5*0.005) = 12KR

But the site doesn't mention any value for R2

This is why I'm confused!!

Which of these calculations are correct or am I barking up the wrong tree?

Also while I'm here, the frequency I'll use for PWM will be approx 4Khz ( with a duty cycle of between 40-100% ) - so I'll be under the maximum frequency for the buckpuck. If I'm reading the transistor's datasheet correctly am I right in saying that I'm well within it's capability?

Many thanks