Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

LPF Donation via Stripe | LPF Donation - Other Methods

Links below open in new window

ArcticMyst Security by Avery

Driver with PWM input

Zeebit

0
Joined
Aug 27, 2012
Messages
1,110
Points
0
Hi everyone! Its good to be back. I'm sure I missed a lot of stuff while I was away due to various reasons. One of which was because the hobby is a bit expensive. I hope I could get back on track.


With that out of the way, I'd like to ask help from the community.


I'm building a strobe light using some high-power LEDs (10W probably) I will be using an Arduino to generate a very low frequency PWM signal somewhere in the 5-30Hz range. My initial plan is to feed the PWM signal into a logic level MOSFET that will act as a switch for the LEDs and a series resistor to limit the current.

That could work but I'm looking for something a little more fancier than that. I'm looking for a driver IC that accepts the mentioned PWM signal. An external pass transistor is most likely going to be used as the LEDs require large amounts of current.

Thanks everyone! :yh:
 
Last edited:





Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
This should be no problem at all. I have previously designed a driver for laser diodes that accepts both analog and tll input, and will have no problem with PWM either:

Merghart.com - TTL/Analog controlled opamp based current source

A very slow pwm signal like 30 Hz will be processed as such, so it will result in notable flicker. You could even this out using a resistor-capactitor network if you want, though i'd just speed up the pwm. The standard PWM outputs on an arduino operate at 500 to 900 Hz, which is fine.

On the circuit you can replace the BD139 transistor with an n-type mosfet of your choice. If you want to drive a string of leds that's also fine, but keep in mind that the opamp has a max voltage rating of just over 30, so you may need a separate supply for a long (over about 10 white led) string.
 
Joined
Jun 22, 2011
Messages
2,431
Points
83
This should be no problem at all. I have previously designed a driver for laser diodes that accepts both analog and tll input, and will have no problem with PWM either:

Merghart.com - TTL/Analog controlled opamp based current source

A very slow pwm signal like 30 Hz will be processed as such, so it will result in notable flicker. You could even this out using a resistor-capactitor network if you want, though i'd just speed up the pwm. The standard PWM outputs on an arduino operate at 500 to 900 Hz, which is fine.

On the circuit you can replace the BD139 transistor with an n-type mosfet of your choice. If you want to drive a string of leds that's also fine, but keep in mind that the opamp has a max voltage rating of just over 30, so you may need a separate supply for a long (over about 10 white led) string.

That's a very cool schematic, I've been looking for something like that for a long time to make an Arduino controlled driver.

If I replace the BD139 with a IRFP250N can I use it to drive a laser diode to 3A max (or do you suggest another easy-to-find transistor)? Do I need to replace anything other than the sense resistor? Sorry for the dumb question, I know a bit of digital electronics but next to nothing of analog stuff.
 
Last edited:

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
The sense resistor needs to be adjusted to the range you need indeed, you may be looking at something in the order of 0.4 ohm to push 3 amps.

The IRFP250N can work, but it does require a pretty high gate-source voltage to drive currents of several amps. The circuit will happiliy provide that voltage, as long as the supply voltage is sufficient to make it possible.

So this will not work when running off 5 volts, but when running for 2 lithium cells at 7.4 volts there should be no problem. If you run it in a non-battery operated system i'd recommend powering the driver from something like a 12 or 15 volt bus. The power source for the laser/led/etc driven can be different, as long as it shares the ground connection.
 
Joined
Jun 22, 2011
Messages
2,431
Points
83
I'm planning on using two 1ohm 2W plus a 5.1ohm 1/2W in parallel to get about 2.6-2.7A to overdrive an NDB7675.

Power will be 2x18350 (IMR) if I can get away with that. If not I'll use 2x18650.

Do you think that'd work?

Edit: do I need to change the MOSFET base resistor as well?
 
Last edited:

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
As far as the circuit is this should work. I'm not totally sure if the 18350 cells can deliver that current at proper voltage, but i reckon they might if proper IMR ones.

For the mosfet the base (gate) resistor does not really matter. You can just leave it as is. Mosfets are voltage driven devices versus transistors that are current driven and require a base drive current to operate. Once the gate is charged to the proper voltage on a mosfet no further current needs to flow. The resistor would limit the speed at which the mosfet could compensate for a load or input change, but in this application it would be negible unless you want to drive it beyond 100 kHz or so.

At such speeds the opamp itself becomes a limiting factor (limited gain/bandwidth product), but the circuit was intended for tens of kHz or so as you encounter in typical laser shows, not as an RF driver ;)
 
Joined
Jun 22, 2011
Messages
2,431
Points
83
Bought the parts today. Had to go with the IRFP260N (was thinking of the 250 because the store used to have 'em, but they didn't) - I don't think that'll make any difference.

Couldn't find the 1.25V zener and they sold me two diodes marked 1N60 as if they were 1N4148. Only managed to read the tiny markings when I got home :/

Anyways I'll see if I can get it to work with a big LED this weekend.

Do you know of an "easy" way to use an Arduino to drive it in analog mode? By easy I mean something without DAC chips or inductors.
 

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
Two diodes in series to produce the 1.25 reference are fine - i usually just use 2 1n4148 diodes in series as the reference unless i need the precision of a proper reference for some reason. The 1n60 is a germanium diode however, and will have a lower forward voltage at low current. I'm not sure why they would recommend this - even using general purpose rectifier diodes like 1n400x would have been a better substitute. Also the 1n4148 diode is probably the most common small signal diode on the market, so i wonder why they do not stock those but do have the the far more rare 1n60.

You can still use the 1n60 diodes however, just measure the voltage across the pair and calculate the sense resistor accordingly. If you don't compensate you will get lower output current, but still regulated so it's nothing dangerous.

As far as an arduino providing an analog output voltage: it doesn't. Some of the digital outputs can do PWM. The driver is fine in accepting this PWM signal, but your leds will also pulse at the same speed the arduino PWM output is driven. For a stationairy led light this is not visible, but in a flashlight you would see distinct flashing as you move it around.

If you wanted smooth, continous output, you could fairly easily achieve that. If you connect a 1k resistor from the pwm output pin to a 100 uF capacitor to ground, the voltage over that capacitor will be the average with a small amount of ripple. You could then control the driver circuit from this smoothed out voltage and be fine.

Downside is that the RC time of this network is slow enough to stop you from flashing the lights really quickly. This would be of concern when trying to do things like stroboscope effects, but not a problem if you just want to have a 'dimmable lamp' for general use.
 
Joined
Jun 22, 2011
Messages
2,431
Points
83
Managed to buy some 1N4148 diodes and prototyped the driver today on a breadboard.

The good news is that it works and the capacitor with PWM input seems to do the trick :)

But I ran into a few issues:
-The total voltage drop of the two 1N4148 diodes varies with input voltage (mine stay between 1.14 and 1.2V). I'm afraid that'll force me not to overdrive the laser too much to account for the "worse case" input voltage. I can't find those 1.25V zeners anywhere :/

-The IRFP260N drops a lot of voltage. At least 2.5V on my tests. Not sure how it'll act with higher current, though.

-I scoped it (using a 1ohm resistor in series with an LED) and it's being very noisy (seems like random noise, Vpk-pk is similar to whatever current I set it to). I tested with low current (up to 100mA) on a breadboard using thin wires and no soldering. Not sure if that might be causing it to act up. I did a very quick test at 1A but that was only a few seconds due to lack of heatsinking and crappy wiring.
 

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
The 1.25 reference should not be that hard to find. Note that it's often described as a voltage reference rather than a zener diode. It works in exactly the same way a a reverse-biased zener diode, though it may not act as a normal diode when forward biased (which can never happen in this application). Think units like these 5X TI LM385B 1 2 Micropower Voltage Reference IC 1 2V 385B12 LM385 1 2 | eBay are just zeners though.

For the voltage drop across the FET gate: this will need to be slightly higher for higher currents, but usually not much. If the ouput of the opamp is near supply voltage this would be indication that it is out of regulation. This will only result in too low output current - not what you want, but not dangerous. You need to increase the opamp supply voltage if this happens.

The noise is abnormal thouh, i never had that problem, but it could be due to your setup in the breadboard combined with the mosfet output. Did you put in any decoupling capacitors? I've drawn in only a 10 uF one in the schematic, but it could help to put a 100 nF multilayer right on the opamp (i usually solder these to the bottom of the pcb).

If your power line is clean, please provide some more info on the noise (frequency, consistency, amplitude, preferably scope screenshots and photos of your breadboard setup) so i can have a good look at whats going on. I have all the stuff to build this with a mosfet (sure to have some buz11 around) on a breadboard here, so i could attempt to replicate the issue.
 
Joined
Jun 22, 2011
Messages
2,431
Points
83
Ah, OK, I was searching under the wrong keyword. I'll see if I can buy one locally this week.

Didn't occur to me to measure the output of the opamp. Will do that next time.

Power was far cleaner than the output. I used a bench PSU, it's not completely clean but not that bad either.

Unfortunately by the time I posted this I had already disassembled it. I didn't include any extra decoupling caps either. Anyways the whole thing was such a rat's nest that it's a miracle it worked at all!

The noise looked totally random to me. I'm still learning how to use the scope but it didn't manage to catch a specific frequency. Peak to peak voltage was very close to the current it was set, but it seemed to be "jumping" between 0 and slightly above the set current in a completely random manner.

Next time I'll solder it up and use proper thick/short wires. I'll be sure to take screenshots if it keeps acting up.

I'll probably only be able to do it next weekend. Any suggestions are welcome, including replacing the MOSFET with a BJT of your choice (as long as it's easy to find locally).

BTW I appreciate you going out of your way to help me with this!
 

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
It's a chance to learn for me too :)

I know this circuit generally does work with mosfets, but you could always opt for a darlington transistor (BD677/679/681/683 or similar universal would be fine and these can sink 4 amps with a heatsink).

If all is wired up correctly it definitely should not be doing anything random. If you can set this up again and reproduce the problem i'm sure a solution can be found. It might be decoupling, but also the opamp having a hard time driving the mosfet that's bascially an open circuit (pulldown resistor may help with that).

Btw, just to be sure: you are using the CA3140 or another opamp that has common mode range right down to ground, right? If you drop somethig generic like a TL081 in this circuit, it will not work.

I actually tested and developed this circuit on breadboards, so that in itself should not be a limiting factor. I do usually just jam some decoupling onto the breadboard power rails to avoid any problems there, which could perhaps make a difference.


I suggest component values based on price and availability as far as i am aware about. The components i suggest are things you could order from futurlec or a similar electronics outlet, as well as from most local electronics stores. Often there are more modern parts available that perform better, but since they can be hard to obtain in single units i try to avoid them.
 
Last edited:
Joined
Jun 22, 2011
Messages
2,431
Points
83
I'll see if I can find one of those locally. Else I'll try again with the MOSFET and take some screenshots of the noise.

I used a CA3140E, but the chip seems slightly "beaten up". Unfortunately most components bought locally look that way, like they have been in the shelf for years.

Thing is I don't live in the US and we have very few stores that sell that kind of stuff. We don't have good online stores either. Ebay is an option, but packages from abroad take months to arrive :/
 
Last edited:
Joined
Aug 7, 2015
Messages
10
Points
0
Hi everyone,

First post here,
I'm searching around this forum for an answer to my question and can't find it here... or on the web.
I figured I would post in this thread instead of starting a new one.

I am trying to set a pwm modulator on the laser driver I just bought from dtr (hey if you're reading ;) ). He suggested me a frequency a 100hz but I can't really find one card that fits exactly.
Can I use a bigger frequency like 26kHz or it might shorten my diode and driver life?

like this one:
http://www.amazon.ca/Unique-Goods-C...3-fkmr2&keywords=motor+speed+controller+100hz

I bought an 1.7W 445nm Copper Module W/Super X-Drive!

Thank you! :)
 
Joined
Oct 26, 2007
Messages
5,438
Points
83
The higher PWM frequencies would actually be desirable to reduce flicker, especially as 100hz is pretty slow. I think the laser would probably handle it too, and most of the components in the drivers would be fine, or at worst just not be able to respond fast enough. Anyone else have any insight?
 




Top