vk2fro
0
- Joined
- Nov 30, 2009
- Messages
- 1,304
- Points
- 63
This is just a place holder at the moment. I am organising with Daguin to buy a JDSU ion laser (of the type with the 25 pin remote control). Once I have the laser and have written the code and created the circuit, I'll post the rest up here on how to build a fancy pants controller for your JDSU ion. You must be willing to run your laser at full power for a short period of time to assist in calibrating the controller, however this only needs to be done once - values are stored for this information in the controllers memory. Likewise the laser must be run at idle to configure the low end of the scale.
This project will give you the ability to have push button control of the laser and monitor its statistics as you go. Press buttons are provided for up and down (in light and current mode), and mode selection. A key switch enables emission. There will also be a start/stop button to turn on/off the laser. The display will have a bar graph for immediate recognition of how much current is going through your tube, as well as the mw out. At the same time these values are also displayed in text. You will have close to 100 steps of resolution to control the laser (digipot limitation), and 1024 steps of accuracy on the text readouts. The bargraph will be 100 step resolution (limitation of a 20x4 LCD).
You will need these parts:
An arduino
A 4 x 20 LCD (serial/3 wire is preferred - We're going overkill on IO pins!). 1 IO Line + 5V and ground - very easy to drive. We'll have the arduino talk to it from pin 2.
2 x Digipots (this controls the Light and Current modes of the gas laser. 1K should be fine. We talk to them over 2 io lines (a communications protocol). Pins 12+13 are our control pins, and we use pin 10+11 to enable/lock the digipots. We control which pot we are controlling (light or current) in software. To increase resistance, we pull pin 13 high, to decrease, we pull it low. We pulse pin 12 to step the pots wiper one increment at a time until we reach our target.
http://www.digikey.com/product-detail/en/CAT5113LI-01-G/CAT5113LI-01-G-ND/1755332
Each digital pot is non-volatile; however for saftey reasons the arduino will reset them each boot to the idle current/lowest mw settings during initialization. I have once again chosen a different digipot, as we want a dip packacge - the previous was an SOIC, and a bit more difficult to solder. The dip package we can also use with an IC socket. They are 8 pin devices.
A Primer on digital pots. (I still cannot decide which design of digipot to go for - the easiest to solder are the hardest to control, and vice versa!)
Just like their analog cousins, digital pots are a variable resistor, but with one huge difference - they're a damn IC! As well as being an IC, they can be controlled by our arduino! So we get digital control of our laser power supply!
2 5k multiturn trim pots. We'll limit the max current to 10.5A with these. these will be used to form hard stops so we cannot over drive our tube. Before fitting, wind these to maximum resistance. We will also use one to calibrate the 0-8v light feedback loop, so it is within the 0-5v range of the arduino.
7 more resistors - we will need these to form voltage dividers so we can read out the values from the remote port on the laser. These fixed resistors will be determined as I go along. A few more of these will also be used to make voltage dividers again to run the pushbutton matrix, so it only chews up one IO pin. The switch matrix uses 22K, 56K, 98K and 150K resistors. This provides a great variation between each button so the controller makes no mistake that of which button was pressed... "NO DAMN IT - SHUT OFF THE BEAM, NOT GO TO FULL POWER". You understand what I mean
Some press buttons. (takes 1 IO lines) : Mode, Inc, Dec, Run/Idle - Pin 8
A Mushroom switch (E-Stop). DO NOT SKIP THIS. This switch breaks the interlock chain and shuts down the laser - should the arduino lock up you have a means to stop emission with this. This is not wired to the arduino at all. Its our hardware E-Stop and sits between the 25DB connector either across the interlock pins, or in series with the interlock relay contacts, both it and those contacts must be closed to satisfy the interlock chain.
4 small signal relays and one Mains rated relay if you want fan control. The signal relays are for "Light/Current mode, Emission control, Idle/Run, Interlock" - we'll stick two of these on pins 7 (Light/Current toggle) and 6 (emission enable), and the other two on pins 5 (Idle/run), and 9 (interlock). If you want to control the fan and laser PSU remotely, the last relay (15A contacts, mains rated) will be wired to pin 4.
A key switch (it takes an IO Line) hereby labelled "Emission enable" (pin 3). It controls the emission enable relay
A DB25 socket and DB25 male to female cable (to interface the laser to the controller)
A 6pin DIN socket and plug (a breakout to calibrate the controller, and remote control of the cooling fan/laser PSU).
A nice cabinet to put the project in.
A smaller cabinet (to house the relay to control the cooling fan, and mains to the laser power box. We want to shut off the mains remotely so the lasers cathode is not left heating by mistake).
Some strip board - the circuit for the power controls is very VERY simple - its mainly wiring. I may choose to make a PCB; However, if I choose not to it should be an easy circuit to build - a bit of stripboard is all you need to hold the digipots, the voltage dividers and the trim resistors.
A JDS Uniphase argon ion gas laser with a 25pin remote port (duh!).
(you can use a different laser but you'll need to modify the interface and voltage divider resistors yourself).
Hook up wire, both signal size and mains rated. At least enough signal length wire to run the length of your laser umbilical and then some; up to the fan connector.
Heat shrink tubing
Tools needed:
Soldering Iron *Electronics type, like we all have from building pointers
Wire nippers
Heat gun (or a ciggy lighter - to shrink heatshrink tubing)
Screw Drivers
Something to program your arduino with if it doesnt have a usb port
A Dremel (to cut out holes in the cabinet for the DB25 and the LCD)
A Drill
A Digital Multimeter
A PC/Mac computer (to burn the code into the arduino with)
The arduino IDE.
Optionally, an LPM
Functions include:
Maintenance mode - This will run your laser for 110 minutes starting at idle for 10 minutes, ramping up to 7-8 amps, and run your laser for its monthly maintenance burn. At 100 minutes it'll throttle the laser back to idle for 10 minutes then completely shut it down automatically. You can jump out of this mode at any time and go back to normal mode.
Normal mode - this is the mode you'll spend most of your time in - its the mode you use when you're "playing" with your laser. Once the controller powers up in this mode it'll automatically set the power control to "idle" and await your order to enable emission. In this mode, the unit ignores the light/current switch for the first minute, and only allows the laser to run at up to half power in current mode, to allow the laser psu to settle and avoid plasma oscillations. Once this timer has expired (warming up disappears from the screen) you'll be free to do whatever you like with the laser.
Each of the above two modes is entered with a toggle switch on the controller
Calibration:
To calibrate the controller in current mode first load the main routine into the arduino. We're going to set the laser to a maximum current of 10.5 amps (lower if your more cautious - I plan to set mine at 9.5). Once the code is loaded, and the arduino is running (it'll do a short intro of what it is, and then beep twice, with "interlock open" on the display), turn it off, check to ensure you wound the current adjust trimpot to maximum resistance, and connect the db 25 cable to the laser and the controller you've just made. Start the arduino again, and select Normal mode. Turn on your laser if it does not automatically do so, select a power level of 50%, and turn the key. After the preheat delay expires, the laser will start at 50% power approximatly in current mode. Adjust the 5k trimpot to see exactly 5 amps of tube current. Next increase the power to 100% while watching the current meter closely or as sam would say "like a hawk" - this will take you to 10.5A. If you want to lower the limit, choose a different value for one the following line near the top of the program - INT FULL if limiting with the uC, or INT OFFSETFULL if limiting by increasing the resistance of the current set trim pot:
INT FULL=100 ##<--- change this guy if you want to limit the max tube I to a lower than 10.5A value in software
INT OFFSETFULL=0 <-- take 10.5 and subtract your preferred hard full power current limit from this, and enter the result here. This offset ensure current readings are correct if you are enforcing a hard limit with the pot rather than the arduino
and re-burn the main code into the arduino
We're safe to run in current mode, but will not yet get proper milliwatt readings as we still havent calibrated light mode yet!! To calibrate light mode, set the laser power to idle using our controller, and measure the output on the lasers PSU. Doing the math or using your LPM, see if the mw's out matches whats on the screen. If not, adjust the "Light" feedback trimpot until it matches. Now, increase the power to full one last time, and read the value on the screen. It should be VERY close, if not equal to doing the math on the multimeter or whats on your LPM; and what your laser is rated at. Now you have calibrated light mode, and can effectivly read out the laser output power as well as tube current at the same time!
You can change the following settings in the code.
INT MAXI=10.5 <-- maximum laser tube current.
INT MINI=4.2 <-- minimum laser tube (idle) current.
INT FIDLE=0 <-- change this to 1 to force an idle power condition on each laser start
INT PREHEAT=60 <-- Set this to how long your laser takes to fire from a cold start, in seconds. This way you get a nice progress bar as the laser warms up.
INT MAINT=90 <-- Change this value to reflect how long you'd like a maintenance mode burn to run (in minutes)
INT MAINTB=10 <-- Change this to reflect how long the laser runs at idle during a maintenance burn start and finish (in minutes)
INT LOCK=1 <-- change this to 0 to bypass the need to wire the interlock. If this is set to 1, pin 9 of the arduino controls the interlock of the laser. Otherwise you are only relying on your mushroom switch.
INT FAN=1 <-- Change this to 0 if you don't want to control the fan with a remote relay.
INT HARDPOT=1 <---- change this to 0 to indicate you'd rather not use a hardware pot in addition to the digipots to control current - this is not advised as it'll take away the full range of 256 steps to control your laser. You'll need to set INT FULL to a lower than 256 value
I have NOT elimenated the need for a battery in the controller, however we all should have 18650 batts, and I have located an inexpensive resolution to the power problem. You'll stick two cells into the solution and that will run the laser controller for quite a while. Simply charge the controller every second weekend, or when the low battery light comes on. For even longer runtimes between charges, you can add up to 4 18650 batteries.
To be continued, once I get the laser.
This project will give you the ability to have push button control of the laser and monitor its statistics as you go. Press buttons are provided for up and down (in light and current mode), and mode selection. A key switch enables emission. There will also be a start/stop button to turn on/off the laser. The display will have a bar graph for immediate recognition of how much current is going through your tube, as well as the mw out. At the same time these values are also displayed in text. You will have close to 100 steps of resolution to control the laser (digipot limitation), and 1024 steps of accuracy on the text readouts. The bargraph will be 100 step resolution (limitation of a 20x4 LCD).
You will need these parts:
An arduino
A 4 x 20 LCD (serial/3 wire is preferred - We're going overkill on IO pins!). 1 IO Line + 5V and ground - very easy to drive. We'll have the arduino talk to it from pin 2.
2 x Digipots (this controls the Light and Current modes of the gas laser. 1K should be fine. We talk to them over 2 io lines (a communications protocol). Pins 12+13 are our control pins, and we use pin 10+11 to enable/lock the digipots. We control which pot we are controlling (light or current) in software. To increase resistance, we pull pin 13 high, to decrease, we pull it low. We pulse pin 12 to step the pots wiper one increment at a time until we reach our target.
http://www.digikey.com/product-detail/en/CAT5113LI-01-G/CAT5113LI-01-G-ND/1755332
Each digital pot is non-volatile; however for saftey reasons the arduino will reset them each boot to the idle current/lowest mw settings during initialization. I have once again chosen a different digipot, as we want a dip packacge - the previous was an SOIC, and a bit more difficult to solder. The dip package we can also use with an IC socket. They are 8 pin devices.
A Primer on digital pots. (I still cannot decide which design of digipot to go for - the easiest to solder are the hardest to control, and vice versa!)
Just like their analog cousins, digital pots are a variable resistor, but with one huge difference - they're a damn IC! As well as being an IC, they can be controlled by our arduino! So we get digital control of our laser power supply!
2 5k multiturn trim pots. We'll limit the max current to 10.5A with these. these will be used to form hard stops so we cannot over drive our tube. Before fitting, wind these to maximum resistance. We will also use one to calibrate the 0-8v light feedback loop, so it is within the 0-5v range of the arduino.
7 more resistors - we will need these to form voltage dividers so we can read out the values from the remote port on the laser. These fixed resistors will be determined as I go along. A few more of these will also be used to make voltage dividers again to run the pushbutton matrix, so it only chews up one IO pin. The switch matrix uses 22K, 56K, 98K and 150K resistors. This provides a great variation between each button so the controller makes no mistake that of which button was pressed... "NO DAMN IT - SHUT OFF THE BEAM, NOT GO TO FULL POWER". You understand what I mean
Some press buttons. (takes 1 IO lines) : Mode, Inc, Dec, Run/Idle - Pin 8
A Mushroom switch (E-Stop). DO NOT SKIP THIS. This switch breaks the interlock chain and shuts down the laser - should the arduino lock up you have a means to stop emission with this. This is not wired to the arduino at all. Its our hardware E-Stop and sits between the 25DB connector either across the interlock pins, or in series with the interlock relay contacts, both it and those contacts must be closed to satisfy the interlock chain.
4 small signal relays and one Mains rated relay if you want fan control. The signal relays are for "Light/Current mode, Emission control, Idle/Run, Interlock" - we'll stick two of these on pins 7 (Light/Current toggle) and 6 (emission enable), and the other two on pins 5 (Idle/run), and 9 (interlock). If you want to control the fan and laser PSU remotely, the last relay (15A contacts, mains rated) will be wired to pin 4.
A key switch (it takes an IO Line) hereby labelled "Emission enable" (pin 3). It controls the emission enable relay
A DB25 socket and DB25 male to female cable (to interface the laser to the controller)
A 6pin DIN socket and plug (a breakout to calibrate the controller, and remote control of the cooling fan/laser PSU).
A nice cabinet to put the project in.
A smaller cabinet (to house the relay to control the cooling fan, and mains to the laser power box. We want to shut off the mains remotely so the lasers cathode is not left heating by mistake).
Some strip board - the circuit for the power controls is very VERY simple - its mainly wiring. I may choose to make a PCB; However, if I choose not to it should be an easy circuit to build - a bit of stripboard is all you need to hold the digipots, the voltage dividers and the trim resistors.
A JDS Uniphase argon ion gas laser with a 25pin remote port (duh!).
(you can use a different laser but you'll need to modify the interface and voltage divider resistors yourself).
Hook up wire, both signal size and mains rated. At least enough signal length wire to run the length of your laser umbilical and then some; up to the fan connector.
Heat shrink tubing
Tools needed:
Soldering Iron *Electronics type, like we all have from building pointers
Wire nippers
Heat gun (or a ciggy lighter - to shrink heatshrink tubing)
Screw Drivers
Something to program your arduino with if it doesnt have a usb port
A Dremel (to cut out holes in the cabinet for the DB25 and the LCD)
A Drill
A Digital Multimeter
A PC/Mac computer (to burn the code into the arduino with)
The arduino IDE.
Optionally, an LPM
Functions include:
Maintenance mode - This will run your laser for 110 minutes starting at idle for 10 minutes, ramping up to 7-8 amps, and run your laser for its monthly maintenance burn. At 100 minutes it'll throttle the laser back to idle for 10 minutes then completely shut it down automatically. You can jump out of this mode at any time and go back to normal mode.
Normal mode - this is the mode you'll spend most of your time in - its the mode you use when you're "playing" with your laser. Once the controller powers up in this mode it'll automatically set the power control to "idle" and await your order to enable emission. In this mode, the unit ignores the light/current switch for the first minute, and only allows the laser to run at up to half power in current mode, to allow the laser psu to settle and avoid plasma oscillations. Once this timer has expired (warming up disappears from the screen) you'll be free to do whatever you like with the laser.
Each of the above two modes is entered with a toggle switch on the controller
Calibration:
To calibrate the controller in current mode first load the main routine into the arduino. We're going to set the laser to a maximum current of 10.5 amps (lower if your more cautious - I plan to set mine at 9.5). Once the code is loaded, and the arduino is running (it'll do a short intro of what it is, and then beep twice, with "interlock open" on the display), turn it off, check to ensure you wound the current adjust trimpot to maximum resistance, and connect the db 25 cable to the laser and the controller you've just made. Start the arduino again, and select Normal mode. Turn on your laser if it does not automatically do so, select a power level of 50%, and turn the key. After the preheat delay expires, the laser will start at 50% power approximatly in current mode. Adjust the 5k trimpot to see exactly 5 amps of tube current. Next increase the power to 100% while watching the current meter closely or as sam would say "like a hawk" - this will take you to 10.5A. If you want to lower the limit, choose a different value for one the following line near the top of the program - INT FULL if limiting with the uC, or INT OFFSETFULL if limiting by increasing the resistance of the current set trim pot:
INT FULL=100 ##<--- change this guy if you want to limit the max tube I to a lower than 10.5A value in software
INT OFFSETFULL=0 <-- take 10.5 and subtract your preferred hard full power current limit from this, and enter the result here. This offset ensure current readings are correct if you are enforcing a hard limit with the pot rather than the arduino
and re-burn the main code into the arduino
We're safe to run in current mode, but will not yet get proper milliwatt readings as we still havent calibrated light mode yet!! To calibrate light mode, set the laser power to idle using our controller, and measure the output on the lasers PSU. Doing the math or using your LPM, see if the mw's out matches whats on the screen. If not, adjust the "Light" feedback trimpot until it matches. Now, increase the power to full one last time, and read the value on the screen. It should be VERY close, if not equal to doing the math on the multimeter or whats on your LPM; and what your laser is rated at. Now you have calibrated light mode, and can effectivly read out the laser output power as well as tube current at the same time!
You can change the following settings in the code.
INT MAXI=10.5 <-- maximum laser tube current.
INT MINI=4.2 <-- minimum laser tube (idle) current.
INT FIDLE=0 <-- change this to 1 to force an idle power condition on each laser start
INT PREHEAT=60 <-- Set this to how long your laser takes to fire from a cold start, in seconds. This way you get a nice progress bar as the laser warms up.
INT MAINT=90 <-- Change this value to reflect how long you'd like a maintenance mode burn to run (in minutes)
INT MAINTB=10 <-- Change this to reflect how long the laser runs at idle during a maintenance burn start and finish (in minutes)
INT LOCK=1 <-- change this to 0 to bypass the need to wire the interlock. If this is set to 1, pin 9 of the arduino controls the interlock of the laser. Otherwise you are only relying on your mushroom switch.
INT FAN=1 <-- Change this to 0 if you don't want to control the fan with a remote relay.
INT HARDPOT=1 <---- change this to 0 to indicate you'd rather not use a hardware pot in addition to the digipots to control current - this is not advised as it'll take away the full range of 256 steps to control your laser. You'll need to set INT FULL to a lower than 256 value
I have NOT elimenated the need for a battery in the controller, however we all should have 18650 batts, and I have located an inexpensive resolution to the power problem. You'll stick two cells into the solution and that will run the laser controller for quite a while. Simply charge the controller every second weekend, or when the low battery light comes on. For even longer runtimes between charges, you can add up to 4 18650 batteries.
To be continued, once I get the laser.
Last edited: