Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Arduino laser controller

  1. #11
    Join Date
    Jul 2008
    Location
    Maryland
    Posts
    1,691

    Default

    Adam,

    Check out the code now.
    https://github.com/adiastra/Laser-Pr...er_control.ino

    I completely reworked it for version 2.0 with comments to explain each section. Let me know if you have questions.

    Now that I have the logic squared away, version 3.0 will be a rework using low level bit banging instead of digitalWrite and digitalRead because its faster. But for now this is better than what was available to the hobbyist.
    Quis custodiet ipsos custodies?
    Solid State Builders Group

  2. #12
    Join Date
    Jul 2008
    Location
    Maryland
    Posts
    1,691

    Default

    Quote Originally Posted by buffo View Post

    I do want to say that I still don't see the purpose of applying the delay once the shutter has been closed though, particularly if this is a user-adjustable parameter. It would seem that if the user wanted a delay it would be on start-up or resumption of output.
    Look at ot this way, IF you are switching DC power and the laser is on, when you turn it off you need a pause else you would be able to click the shutter button quickly causing damage to the laser module driver(s)
    There is still the possibility of turning it ON and back OFF quickly but can only happen once every SHUTTER_DELAY .I would rather have the option of always being able to turn it off no mater what.

    Perhaps apply the delay upon successful completion of the interlock loop instead? That would prevent it from delaying the re-opening of the shutter during a show while still providing a start-up delay. Just a thought.
    There is a delay anytime the interlock is broken (or remains broken). Even once the interlock is fixed, the delay remains for 10 seconds (user configurable)
    once the Interlock is not longer broken, and the delay has passed, the shutter can be activated again.


    You're absolutely correct about some laser drivers producing unpredictable output with the modulation inputs left floating; that's why I suggested crowbaring them to ground.
    I am not going to ever be crowd-scanning so something like PASS is overkill. grounding the modulation signal will bring the lasers down to their lowest level. Killing DC power is obviously going to work as well. none of this really matters as what I am providing here is a method of control, how you use that control is your business.


    The new version (2.0 and higher) is totally different but the logic is the same. There is no delay in enabling the shutterPin once the delay has been met. The delay is for protecting the hardware, not the crowd. Its easy to disable if desired.
    Last edited by keeperx; 01-25-2020 at 06:55.
    Quis custodiet ipsos custodies?
    Solid State Builders Group

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

    Default

    Quote Originally Posted by keeperx View Post
    Look at it this way, IF you are switching DC power and the laser is on, when you turn it off you need a pause else you would be able to click the shutter button quickly causing damage to the laser module driver(s)
    I disagree that this is a necessary feature to protect the laser. On a loss of DC power the driver shuts down and there's no current to the diode. When the DC power comes back, if there already happens to be a modulation signal applied to the driver it will start sending current to the diode again, but only up to the maximum current setting on the diode (assuming the modulation input is at the max of +5 V.) In the absence of a modulation signal the driver powers up and sits there waiting for an input. None of this is harmful to the diode or the driver.

    Consider this: If the laser could ever be damaged by a "down and up" power cycle on the DC input, then it would also be damaged every time you turned the projector on with the DAC already sending a signal to the projector.

    If someone is using a home-made driver that can't handle a down-and-up power cycle without spiking the current to the diode, then they really ought to consider using a better driver. None of the drivers I've ever used (BBE, Flexmod, Flexdrive, etc) are prone to the issue you're describing.

    There is still the possibility of turning it ON and back OFF quickly but can only happen once every SHUTTER_DELAY .I would rather have the option of always being able to turn it off no mater what.
    If you want to offer the user the flexibility to do this, of course that's fine. I just don't see it as a hardware safety concern for the diode or the driver.

    There is a delay anytime the interlock is broken (or remains broken). Even once the interlock is fixed, the delay remains for 10 seconds (user configurable)
    This makes perfect sense from a safety standpoint (basically it's a power-on delay). Ideally if the interlock is broken everything stops, and only once the interlock has been re-closed (fixed) would the 10 second countdown timer start running. So even if you broke the loop and immediately re-closed it, once the closed interlock loop was detected you'd still have the 10 second delay before the shutter could be opened.

    I am not going to ever be crowd-scanning so something like PASS is overkill
    Completely agree. PASS is very involved, both to integrate and to calibrate. But yeah, there's a big difference between building a certified eye-safe audience-scanning projector and just adding a reliable e-stop and startup delay to a hobbyist projector.

    what I am providing here is a method of control, how you use that control is your business.
    I would add the caveat that if you suggest methods of control to the user(s), you want to be sure you cover as many of the edge cases as possible so you don't inadvertently suggest something that will either 1) cause the projector to behave unpredictably (as in the case where the controller closes and re-opens the shutter in the middle of a show and this triggers a start-up delay), or 2) create the perception of safety when not all conditions are actually "safe" (as in the case where the modulation inputs are left floating, which can produce output from some drivers). Either result reduces the safety of the projector.

    Don't get me wrong: you've covered a lot of ground already (and you already called out the floating modulation input example above). I do think this would be a welcomed addition to a hobbyist's projector. But the more you do to help users make the right choices, the safer things will be for everyone. (Even if at the end of the day it's still the end-user's ultimate responsibility to ensure safety.)

    Adam

  4. #14
    Join Date
    Jul 2008
    Location
    Maryland
    Posts
    1,691

    Default

    Quote Originally Posted by buffo View Post
    I disagree that this is a necessary feature to protect the laser. On a loss of DC power the driver shuts down and there's no current to the diode. When the DC power comes back, if there already happens to be a modulation signal applied to the driver it will start sending current to the diode again, but only up to the maximum current setting on the diode (assuming the modulation input is at the max of +5 V.) In the absence of a modulation signal the driver powers up and sits there waiting for an input. None of this is harmful to the diode or the driver.
    Its to protect the actual driver not the laser itself. Manufacturers instructions for multiple RGB modules (like the one I have) specifically say not to switch power to the driver on and off quickly as it could damage the unit (not the lasers).



    This makes perfect sense from a safety standpoint (basically it's a power-on delay). Ideally if the interlock is broken everything stops, and only once the interlock has been re-closed (fixed) would the 10 second countdown timer start running. So even if you broke the loop and immediately re-closed it, once the closed interlock loop was detected you'd still have the 10 second delay before the shutter could be opened.
    that's exactly what happens, ANY fault causes a 10 second delay. it checks for a fault thousands of times a second, so if the fault is not fixed the 10 second delay is reset. If the fault is fixed, you still have to satisfy the 10 second delay that was triggered a millisecond ago.

    I would add the caveat that if you suggest methods of control to the user(s), you want to be sure you cover as many of the edge cases as possible so you don't inadvertently suggest something that will either 1) cause the projector to behave unpredictably (as in the case where the controller closes and re-opens the shutter in the middle of a show and this triggers a start-up delay), or 2) create the perception of safety when not all conditions are actually "safe" (as in the case where the modulation inputs are left floating, which can produce output from some drivers). Either result reduces the safety of the projector.
    I agree and think I have been clear that the method of "shutter" is up to the user. its open source code and totally easy to configure so anyone who is bright enough to flash it to the arduino, has to be able to edit it (you have to open it in the editor to flash it)

    Don't get me wrong: you've covered a lot of ground already (and you already called out the floating modulation input example above). I do think this would be a welcomed addition to a hobbyist's projector. But the more you do to help users make the right choices, the safer things will be for everyone. (Even if at the end of the day it's still the end-user's ultimate responsibility to ensure safety.)

    Thats a good point and I have added a safety disclaimer to the top of the readme.
    https://github.com/adiastra/Laser-Projector-Controller
    Quis custodiet ipsos custodies?
    Solid State Builders Group

  5. #15
    Join Date
    Jul 2008
    Location
    Maryland
    Posts
    1,691

    Default

    Ok so I am thinking about changing up the logic here a bit.

    I think I will use 2 pins to control 2 different protection mechanisms.

    For shutter I will ground or crowbar the modulation signal (need to verify that this will actually work with lasers that are default on)
    and for interlock I will disconnect DC power to the lasers.

    This will provide a shutter that can blink without causing damage to the lasers while still protecting the DC Power side of the driver (with a delay) from damage.


    Now I just need to figure exactly how i want to build the crowbar/ground circuit.
    Last edited by keeperx; 02-02-2020 at 10:18.
    Quis custodiet ipsos custodies?
    Solid State Builders Group

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

    Thumbs up

    Quote Originally Posted by keeperx View Post
    I just need to figure exactly how i want to build the crowbar/ground circuit.
    Here's a suggestion based on the interlock I used to use before switching to the Stanwax boards. Admittedly though the 5-pole double-throw relay is expensive and hard to source. However, it can be broken down into a 2 pole double-throw for the primary latch and DC laser supply circuits with the DC laser supply feeding a *separate* 3 pole double-throw for the modulation signals.

    Interlock Schematic.bmp

    Relays are easy to work with, but they take up a lot of space and they're clunky. They also don't respond as fast as solid-state devices. Were I to re-design this today, I'd use either multiple SSRs with very low on-resistance, or else some sort of programmable input/output or analog multiplexer chip (TMUX1247 or similar).

    Adam

  7. #17
    Join Date
    Jul 2008
    Location
    Maryland
    Posts
    1,691

    Default

    I have a friend who deals with this type of stuff. He works mostly with industrial climate control for labs and the such but is a wiz at circuit design. We will be getting together this weekend to do some testing and discuss. Ill let you know what w come up with.
    Quis custodiet ipsos custodies?
    Solid State Builders Group

Posting Permissions

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