EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: shiftline on August 12, 2017, 10:29:10 pm

Title: Help converting 0-12v PWM to 0-5v ttl
Post by: shiftline on August 12, 2017, 10:29:10 pm
What is the best way to convert the 0-12v PWM fan signal to 0-5v TTL for the laser driver   Would a 5v regulator work or should I try a few resistors?


Sent from my iPhone using Tapatalk
Title: Re: Help converting 0-12v PWM to 0-5v ttl
Post by: Kjelt on August 12, 2017, 10:41:47 pm
What is the frequency? I would use two resistors followed by a fast active ttl gate or a schotkey diode with an active gate with 5V pull up resistor on the input such that the 0v of the 12V pwm will create a 0,3V (schotkey forward voltage drop) on the active gate while a 12V will do nothing and the gate gets 5V from the pull up resistor.
Google level shift  ;)
Title: Help converting 0-12v PWM to 0-5v ttl
Post by: shiftline on August 12, 2017, 10:52:35 pm
I'll look it up when I get home! Thanks :)


The 12v is the fan pwm controller from the 3d printer. The laser stats say 9khz for the frequency


Specification parameter:
Body size: long 50mm* wide 50mm* high 100mm
Output wavelength: 450nm
Output power: 2.5W
Modulation frequency: TTL can be modulated ,0v- off 5V open ,PWM frequency <9Khz
Working voltage: DC=12V
Working current: I<2A
Focal length: adjustable
Operating temperature: 15 degrees to 45 degrees C

It's "working" straight off the 12v signal but the laser won't 100% turn off which is leaving traces from movement
(https://uploads.tapatalk-cdn.com/20170812/80661f5dcdc0a3e10a9eae12b09d49a0.jpg)


Sent from my iPhone using Tapatalk



Title: Re: Help converting 0-12v PWM to 0-5v ttl
Post by: shiftline on August 13, 2017, 08:32:19 am
I ended up using a voltage regulator and 2 mosfets to get it going


Sent from my iPhone using Tapatalk
Title: Re: Help converting 0-12v PWM to 0-5v ttl
Post by: nxym on December 14, 2017, 12:21:31 am
      I have the same problem too .

      I must connect ttl to a 12v pmw fan output so my laser goes on and off. My Laser is 12v 5A 5W so it needs external power supply to feed current.
      I manage to control on/off with an arduino when sending 5v on the ttl input and their external power supply. Now i need to translate the 0v/12v of the fan to 0v/5v so i can use it on my 3d printer.


    Can you tell me how do you manage to convert the 12v signal?
Title: Re: Help converting 0-12v PWM to 0-5v ttl
Post by: danadak on December 14, 2017, 01:23:21 am
You could feed a 0 - 12V signal thru a series R straight into
a 5V CMOS input. This relies on internal protection diode
to clamp the swing <= Vdd + Vdiode (.7V). You limit the current
to datasheet spec for injection current of input to prevent latchup.

Or if PWM has an open drain/collector output just tie an R to
5V Vdd from open drain/collector output and tie junction at
output to 5V part input.

Or use a MOSFET, gate to 12V output, source to ground, drain
to R to 5V Vdd and drain to 5V input. If Bipolar add series R in
base to 12V output to limit base current.

All these techniques alter the duty cycle a bit, but depending on
application may not be of concern.



Regards, Dana.