UNO + unstable PWM + Linear Led Drive

This is my first attempt to build something (almost) on my own and I'm utterly stuck:

I am trying to control several LED strips via a 0-10V signal to a Linear Drive [1] with a UNO (which only gives me 0-5v, so I cranked up the intensity on the driver, but it is not really making it better), but I am not entirely convinced I have the most efficient set up:
When on the lower ranges the flickering is actually really distracting, so I was looking into MOSFETS (bought an assortment of what I could find) but I am starting to think that NPN-type transistor TIP120 and the others that I bought are too high capacity for what I am aiming to do, as when connected it just gives me full power regardless of the PWM.

I have no background in electronics, so I might have a whole or two on my set up; I have been making guestimates on resistor sizes, asking a lot of questions and reading forums; but some of the posts[2] that relate are too technical for my understanding. I would really appreciate if I can get some pointers on a way to amplify the PWM to 0-10 for the layman.

Thanx in advance,

[2] Arduino Forum

but I am starting to think that NPN-type transistor TIP120 and the others that I bought are too high capacity for what I am aiming to do, as when connected it just gives me full power regardless of the PWM.

No such thing as too high capacity.

The problem is that you do not say how you are trying to wire this thing up. To get help you need to post a schematic showing how you have wired it.
The link to the controller is a bit puzzling, this is a DMX driven device, you are not trying to put PWM to power this are you?


Ok, wrong term, the capacitance in the transistor is working against me?

I am using the UNO (pin3 using analogWrite) connected to the 0-10V External Control Device on the Driver. I first looked into using DMX but it is way out of my league.

So getting rid of mosfets and the like, I have:

pin3 to
GND to

I'm at work, but will do a hand sketch and post it during lunch.

Disclaimer: That is a 10k resistor. The LED driver is not shown.

Very strange diagram, these are hard to follow so you should post a schematic.
Why do you have reed switch in the ground?
If the external input is 0 - 10V you are only feeding it with a 10V PWM signal at best, not an analogue voltage. What is the FET part number!

You need an RC filter to make the PWM into a smooth DC signal.

the capacitance in the transistor is working against me?

Again meaningless I am afraid.

I'm really starting to dislike Fritzing. It is NOT the common language used by Electronics Hobbyists, Technicians and Engineers.

Analog.write() is a horrible trick played on the unsuspecting newcomer by the original developers. Analog.write() is supposed to be the inverse of and sadly it is very different. It should actually be called PWM.write(), but I guess that would be forcing the user of the command to question... what is PWM... and then we have a sticky problem... since what PWM (pulse width modulation) is, is not obvious.

PWM is technically a PULSED output at a high repetition rate. (High enough that your EYE won't really notice) The width between pulses becomes the "implied" effect voltage since, with an LED for example, if an lamp stays OFF more than it is ON, it is perceived to be DIM.

PWM does not create a VOLTAGE, per se, but it can simulate a voltage using an R/C Filter.

If you want ON/OFF and PWM control using an FET and Higher Supply voltage, this circuit should get you started.

Note: This circuit was designed for a high current LED (up to 500ma) using non-logic level mosfet. R3 will need tweaking to your design. Though to me, it could be done with just BJT's of the right value... The drawing was created to help someone else with a specific problem.

The point about that last circuit is that Q2 can't be turned off unless the PWM signal is a 15V signal. You need another transistor like Q1 to boost the PWM signal to 15V before Q2 can be turned on and off by the PWM signal.

Yeah... It was handy and I never liked it.

Here is what I think fritzing thing wants to show...


Sorry. Those diagrams are easier for me to understand, i still struggle a bit with the schematics.
The reed switch is following an arrangement I found earlier and that part is working.
Basically i am aiming to build the 3rd diagram here: but really does not work with the LED driver... looking into RC filter now.
Thank you.


Indeed. That is it.
Thank you.

Those diagrams are easier for me to understand,

That is as maybe, but it dosn't change the fact that they mean very little to anyone else.

I don't understand what the reed switch is supposed to be doing. Normally it will just be a short circuit and it will open when you bring a magnet close to it.

If you are trying to replace your LED driver with that light bulb then no I would not expect it to work. The ext - needs to be at ground, the ext+ needs to be on the collector of the transistor, then you need to replace the bulb with a resistor, say 10K.
Then you should try putting a capacitor from ground to the collector to smooth the signal. I don't know what value you will need but I would start with 10uF and go bigger if it flickers.


I'm using the reed switch as a sort of speedometer (but that is the part that actually is working).

Ok, will give it a go now, thanx.

I'm using the reed switch as a sort of speedometer

Dose it have to be on th RX pin. This will stop you being able to upload code and will also prevent you getting any debug serial output.

i guess it can be moved to any analog input pin, i just didn't change it as it was working, but noted, will reassign it.

My aim with all of this is to get the LED (via the drivers) to fade as per the bike speed.

So this has been a 2 piece problem:

  1. reed switch + magnets on wheel for speed (solved)
  2. use speed value to control LED brightness (working on it)

We understand you are new. So here is some help.

You said FET, so I drew one and the circuit does make some sense.


The TIP120 part is most definitely not an FET.

The TIP120 is an NPN Epitaxial Darlington Transistor and therefore needs (not optional) at least a 1000 ohm transistor between the PWM pin and the BASE pin.

In other words, this is what you need.

Thank you!

also bought:

Because i thought it would make sense to try other stuff since shops were going to be closed today.
Will move to that right now and post as soon as i get a result.
Thanx again.

bit flickery still
moving on to RC filter tomorrow

IMG_4058.MOV (3 MB)

Experimenting is good.

is fun...but still not working properly... for some reason I still cannot figure out, when I follow the last schematic don't get a result. Tying to figure out why.

But what result do you get? Can’t help if you don’t say what is happening.

On a white only LED thru the circuit, any input from the Arduino causes a flicker: with no input shines at 60%, any input (even what would be a 255) dims it, flickers and when the signal is gone, it goes back to a steady glow. And even better, when I use colour LEDs, the colour changes on top of the flicker.