What resistor should I use?

Hi there,

This is my case:

I have an Arduino Nano v3.0, TIP120 transistor and a 60W 12V transformer. Now I would like to PWM a 12V 6.5W LED spotlight from 0 to 12V. The most circuits I have seen are using 175, 1K or 2K2 resistors. I have tried them all, but when I PWM PIN 11 with the value 1 it's output is already around 6V. The output of PWM 255 is 11.34V, so that's fine.

Does anybody know if it's possible to switch a TIP120 from 0 - 12V with PWM? If so, what resistor should I use?

Thank you in advance!

Gtz Henk

Does anybody know if it's possible to switch a TIP120 from 0 - 12V with PWM?

Yes it is perfectly possible.

If so, what resistor should I use?

The TIP120 has such a high gain it doesn't matter much, 1K will do.

I have tried them all, but when I PWM PIN 11 with the value 1 it's output is already around 6V.

How are you measuring it. You can't use a meter to measure PWM you need a scope.

http://www.thebox.myzen.co.uk/Tutorial/PWM.html

What is the load that you have in the TIP120? What is the circuit that you have?

Show us yer bits!

Give us a diagram of your proposed circuit.

Thanks for the replies.

Here is the diagram of my proposed circuit.

circuit.jpg

If your diagram is right you have a darlington , high gain... 1k would be fine.

L1 is an inductor label - label an LED "LED1" perhaps :slight_smile:

MarkT:
L1 is an inductor label - label an LED "LED1" perhaps :slight_smile:

Hehe indeed...

I will use a 1K resistor and measure the output with a scope.

Thanks

Another question. Where you are measuring the voltage?

luisilva:
Another question. Where you are measuring the voltage?

I disconnect the LED spot and I measure the voltage there.

Why you disconnect it?

Leave it connected and measure the voltage. (Between the 2 connections of the LED, or, if you want, between +12V and the collector of the TIP120 - WITH ALL CONNECTED).

I just want to make sure I understand something - your LEDs are rated to run directly from 12V without an external current limit?

With PWM, you are not varying the -voltage-, you are varying the -dutycycle-. IE, the percentage of time the LEDs are turned on.

luisilva:
Why you disconnect it?

Leave it connected and measure the voltage. (Between the 2 connections of the LED, or, if you want, between +12V and the collector of the TIP120 - WITH ALL CONNECTED).

I disconnected it during the measurement, so I was sure that the LED spot was not consuming power

polymorph:
I just want to make sure I understand something - your LEDs are rated to run directly from 12V without an external current limit?

It's a LED spot (GU 5.3 socket), so it is rated to run 12V.

polymorph:
With PWM, you are not varying the -voltage-, you are varying the -dutycycle-. IE, the percentage of time the LEDs are turned on.

I do know PWM is varying the duty cycle in stead of the voltage. But shouldn't my meter give the approximately average of the duty cycle then?

re: LED rating - good.

If you have an analog meter, it may give you a pretty good approximation, but -only- if you have the LED in circuit. The meter movement itself acts to average out the PWM pulses. Without the LED in circuit, it depends on a number of factors, but it may not give you a meaningful reading. Keep in mind the TIP120 as a darlington pair drops out about 1.4V.

With a digital multimeter, all you are likely to get is nonsense readings.

Henk1987:

luisilva:
Why you disconnect it?

Leave it connected and measure the voltage. (Between the 2 connections of the LED, or, if you want, between +12V and the collector of the TIP120 - WITH ALL CONNECTED).

I disconnected it during the measurement, so I was sure that the LED spot was not consuming power

OK. Maybe you know what you are doing. (or maybe not)

Henk1987:

polymorph:
I just want to make sure I understand something - your LEDs are rated to run directly from 12V without an external current limit?

It's a LED spot (GU 5.3 socket), so it is rated to run 12V.

polymorph:
With PWM, you are not varying the -voltage-, you are varying the -dutycycle-. IE, the percentage of time the LEDs are turned on.

I do know PWM is varying the duty cycle in stead of the voltage. But shouldn't my meter give the approximately average of the duty cycle then?

A low pass filter should give a nice average.

There must be a load connected, or you will get a nonsensical reading from the collector of the TIP120. Otherwise, it pulls low, then it is open, then it pulls low, then it is open. Through a lowpass filter, that gives you... zero.

Even with the LED, a lowpass filter may not give you an accurate reading, because of the voltage threshold of the LEDs.

Henk1987:

polymorph:
I just want to make sure I understand something - your LEDs are rated to run directly from 12V without an external current limit?

It's a LED spot (GU 5.3 socket), so it is rated to run 12V.

polymorph:
With PWM, you are not varying the -voltage-, you are varying the -dutycycle-. IE, the percentage of time the LEDs are turned on.

I do know PWM is varying the duty cycle in stead of the voltage. But shouldn't my meter give the approximately average of the duty cycle then?

So placing a capacitor between ground and the gate/base pin would not work?