Results 1 to 9 of 9

Thread: How to drive TTL RGB laser module??

  1. #1
    Join Date
    Nov 2019
    Posts
    26

    Default How to drive TTL RGB laser module??

    I'm betting this has been answered here somewhere but I can't find it for the life of me.

    I bought a couple of these RGB laser modules to try out. There is a 12V input and 3 TTL inputs for the 3 colors.

    Question is, what kind of signal is expected? I'm guessing PWM.

    If so, what frequency and duty cycle range?

    Is the TTL level 5V (most likely) or 12V?

    I'm an electrical engineer so all technical details welcome.

    Surely this info is online somewhere but the vendor doesn't have it (aliexpress special) and I'm coming up empty.

    Click image for larger version. 

Name:	laser.jpg 
Views:	3 
Size:	1.73 MB 
ID:	58785Click image for larger version. 

Name:	board.jpg 
Views:	2 
Size:	1.26 MB 
ID:	58786
    Last edited by nmaddix; 04-08-2022 at 00:52.

  2. #2
    Join Date
    Jan 2006
    Location
    Charleston, SC
    Posts
    2,147,489,446

    Default

    Quote Originally Posted by nmaddix View Post
    I bought a couple of these RGB laser modules to try out. There is a 12V input and 3 TTL inputs for the 3 colors.
    Question is, what kind of signal is expected? I'm guessing PWM.
    TTL modulation inputs are designed for simple on-off operation. 0 volts = off, +5 volts = on at 100% power. Do *not* exceed +5 volts on the modulation input.

    As a general rule, TTL modulation inputs are not designed to support any sort of pulse-width modulation. Not to say that you can't apply a PMW signal, but the laser may not behave as you expect. (Depending on the speed at which the driver responds to modulation input.)

    Some people have experimented with various duty cycles in an attempt to get "pseudo-analog modulation" from a TTL modulation driver. To calculate the duty cycle, they work backwards from the point speed of the scanners.

    If you assume 30Kpps, then each point lasts 33 microseconds. From there, you can sub-divide the time of each point into however many slices you need to get the brightness variability you want. You might start by using a base frequency of 1 MHz, which in theory would give you 33 possible intensity levels for each point.

    In practice, however, it's very likely that your driver will not respond linearly to a 1 Mhz PWM input. Most people are happy if they can get 8 to 10 discrete brightness levels via PWM, which in this case means your base frequency would be around 300 KHz. But again, these cheap modules are not specifically designed to support PWM, so your results may vary. (You may even find that different channels - red, green, blue - have different response speeds.)

    If you want good, linear control over the brightness of the laser, you need to purchase a driver that supports ANALOG modulation. The input signal limit is the same (0 volts = off, +5 volts = on at full brightness), but now as you reduce the modulation signal voltage from +5 volts, the output of the laser also dims in direct proportion. So +4 volts = 80%, +2.5 volts = 50%, and so on.

    There's only a small increase in cost to upgrade from a TTL modulation driver to an an analog modulation driver, so most people will opt for the analog modulation unless they fully intent to always operate the laser at 100% power. (A beam rail is an example where TTL modulation is fine.)

    Surely this info is online somewhere but the vendor doesn't have it (aliexpress special) and I'm coming up empty.
    Doubtful. In a perfect world, the driver would come with a datasheet that specified all sorts of parameters, including the response time to a signal on the modulation input. In practice, this sort of information is almost never available for these cheap modules from China. (Doubly so when buying from Aliexpress, but even the manufacturer often doesn't have this info.) There are some drivers that don't even conform to the minimum impedance spec of 10Kohms on the modulation input. This is typical at the low end of the market, so it's a case of "buyer beware".

    Adam

  3. #3
    Join Date
    Oct 2012
    Location
    Germany
    Posts
    1,478

    Default

    Quote Originally Posted by buffo View Post
    TTL modulation inputs are designed for simple on-off operation. 0 volts = off, +5 volts = on at 100% power. Do *not* exceed +5 volts on the modulation input.
    ... many chinese drivers "accept" +12V at the TTL-input ... some even +24V!

    And many too have "inverted" logic -- so "0V" (or not connected!) for "ON" with laser output ... and "+5V" (or +12V) for "OFF" !!

    Viktor
    Aufruf zum Projekt "Müll-freie Meere" - https://reprap.org/forum/list.php?426
    Call for the project "garbage-free seas" - https://reprap.org/forum/list.php?425

  4. #4
    Join Date
    Jan 2006
    Location
    Charleston, SC
    Posts
    2,147,489,446

    Default

    Quote Originally Posted by VDX View Post
    many chinese drivers "accept" +12V at the TTL-input ... some even +24V!
    The problem with drivers that "accept" more than +5 volts is that some of them will overdrive the diode if you exceed the 5 volt threshold. Better safe than sorry!

    And many too have "inverted" logic -- so "0V" (or not connected!) for "ON" with laser output ... and "+5V" (or +12V) for "OFF" !!
    I agree that this used to be a big problem (especially with early DPSS drivers), but I haven't seen it in years. Also, the picture he posted above looks very similar to drivers I've worked with recently, and they used the correct polarity.

    Adam

  5. #5
    Join Date
    Oct 2012
    Location
    Germany
    Posts
    1,478

    Default

    ... yes, I agree -- recent drivers seems to be more "common" in function ... but this is "chinese", so without further infos you have to await the "worst", as every now they will copy a different board with "non-common" behaviour

    Viktor
    Aufruf zum Projekt "Müll-freie Meere" - https://reprap.org/forum/list.php?426
    Call for the project "garbage-free seas" - https://reprap.org/forum/list.php?425

  6. #6
    Join Date
    Jan 2006
    Location
    Charleston, SC
    Posts
    2,147,489,446

    Default

    Quote Originally Posted by VDX View Post
    but this is "chinese", so without further infos you have to await the "worst", as every now they will copy a different board with "non-common" behaviour
    Ayup! True that...

    Adam

  7. #7
    Join Date
    Nov 2019
    Posts
    26

    Default

    Finally getting back to this after a big event... thanks for the details and thought behind all the responses.

    Mostly I was worried about overdriving them or something but in the end it seems straightforward so I tested things out.

    Added 12V power and the laser turns on. Seems like the TTL polarity might be inverted after all.

    But actually I couldn't get any of the lasers to turn off by applying 5V to the TTL inputs. All 3 were on at all times.

    What am I missing here?


    Quote Originally Posted by buffo View Post
    TTL modulation inputs are designed for simple on-off operation. 0 volts = off, +5 volts = on at 100% power. Do *not* exceed +5 volts on the modulation input.

    As a general rule, TTL modulation inputs are not designed to support any sort of pulse-width modulation. Not to say that you can't apply a PMW signal, but the laser may not behave as you expect. (Depending on the speed at which the driver responds to modulation input.)

    Some people have experimented with various duty cycles in an attempt to get "pseudo-analog modulation" from a TTL modulation driver. To calculate the duty cycle, they work backwards from the point speed of the scanners.

    If you assume 30Kpps, then each point lasts 33 microseconds. From there, you can sub-divide the time of each point into however many slices you need to get the brightness variability you want. You might start by using a base frequency of 1 MHz, which in theory would give you 33 possible intensity levels for each point.

    In practice, however, it's very likely that your driver will not respond linearly to a 1 Mhz PWM input. Most people are happy if they can get 8 to 10 discrete brightness levels via PWM, which in this case means your base frequency would be around 300 KHz. But again, these cheap modules are not specifically designed to support PWM, so your results may vary. (You may even find that different channels - red, green, blue - have different response speeds.)

    If you want good, linear control over the brightness of the laser, you need to purchase a driver that supports ANALOG modulation. The input signal limit is the same (0 volts = off, +5 volts = on at full brightness), but now as you reduce the modulation signal voltage from +5 volts, the output of the laser also dims in direct proportion. So +4 volts = 80%, +2.5 volts = 50%, and so on.

    There's only a small increase in cost to upgrade from a TTL modulation driver to an an analog modulation driver, so most people will opt for the analog modulation unless they fully intent to always operate the laser at 100% power. (A beam rail is an example where TTL modulation is fine.)



    Doubtful. In a perfect world, the driver would come with a datasheet that specified all sorts of parameters, including the response time to a signal on the modulation input. In practice, this sort of information is almost never available for these cheap modules from China. (Doubly so when buying from Aliexpress, but even the manufacturer often doesn't have this info.) There are some drivers that don't even conform to the minimum impedance spec of 10Kohms on the modulation input. This is typical at the low end of the market, so it's a case of "buyer beware".

    Adam

  8. #8
    Join Date
    Oct 2012
    Location
    Germany
    Posts
    1,478

    Default

    ... could be, the +5V on the "TTL"-inputs aren't enough, as the optocouplers are wired for +12V (as mentioned in my 1. post) ...

    Viktor
    Aufruf zum Projekt "Müll-freie Meere" - https://reprap.org/forum/list.php?426
    Call for the project "garbage-free seas" - https://reprap.org/forum/list.php?425

  9. #9
    Join Date
    Nov 2019
    Posts
    26

    Default

    Thanks for the reminder. That got me back to testing and it turns out the TTL inputs are floating (or internally pulled) high, and need to be shorted to ground to turn the laser off. This is literally the first thing I checked but apparently I wasn't getting the pins shorted when I did it the first time.

    So now the mystery is solved. Low = laser off, 5V levels work

    Now I have to experiment with PWM brightness modulation. I did need a science project...


    Quote Originally Posted by VDX View Post
    ... could be, the +5V on the "TTL"-inputs aren't enough, as the optocouplers are wired for +12V (as mentioned in my 1. post) ...

    Viktor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •