Author Topic: Arduino laser controller  (Read 17670 times)

0 Members and 2 Guests are viewing this topic.

Offline BlinkenLights

  • he's just this guy, ya know?
  • Administrator
  • Hero Member
  • *****
  • Posts: 730
  • Milliwatts: 4
  • Gender: Male
  • 'The Messenger' by Will Cascio
    • View Profile
Arduino laser controller
« on: January 20, 2020, 03:36:12 pm »

DISCLAIMER: This is not for controlling the laser modulation or galvos!


I have written a little piece of code for an Arduino designed to read the current state of the SHUTTER and INTERLOCK.


The code does the following.


IF the SHUTTER signal is OPEN (+5v) AND the INTERLOCK is a COMPLETE CIRCUIT, only then will a relay close providing power to the laser(s). (after a 5 second delay)


If at any point either of these states changes (shutter closes or interlock is broken) the relay immediately opens (its default un-powered state) and the lasers power is interrupted.


If laser power is interrupted there is a 5 second delay before you can turn the power back and the interlock and shutter have to be in the proper states else you cant turn it back on.


The current state of the laser power is printed to serial if you want to monitor the state.




For safety the GALVO power should not be interrupted


The Arduino pins are as follows


ShutterSignal = The signal coming from the ILDA shutter signal. +5v = Shutter OPEN (this is an input pin for reading the shutter voltage)
ShutterPin = Pin used to control the relay state (Output pin for sending signal to the relay)
InterlockOut = set to +v5 to send a constant signal over the interlock loop (+5v output pin)
InterlockIn = Reads the signal from the interlock loop sent from the InterlockOut pin(input pin)




The interlockIn pin has a 10k resistor to ground so that if the circuit is broken there is no voltage float to worry about.


Please feel free to ask any question you may have or suggest any additions to the system.


 I am thinking about adding a few temperature sensors that would shut down the ENTIRE system on overheat of a component and wait until it was below a certain threshold before allowing the system to start back up.


Code can be found here
https://github.com/adiastra/Laser-Projector-Controller/blob/master/laser_control.ino




NOTE: This sketch assumes that the the relay required a LOW signal to turn on. This can be edited in the #define section

Offline BlinkenLights

  • he's just this guy, ya know?
  • Administrator
  • Hero Member
  • *****
  • Posts: 730
  • Milliwatts: 4
  • Gender: Male
  • 'The Messenger' by Will Cascio
    • View Profile
Re: Arduino laser controller
« Reply #1 on: January 24, 2020, 01:39:25 pm »
Version 2.0 is out and is a complete re-write

https://github.com/adiastra/Laser-Projector-Controller


This version is even more reliable..

Next steps will be using bit/byte level reads and writes to enhance speed.

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.7 © 2008-2024, SimplePortal