LaserBoy

Hardware => Other Hardware => Topic started by: dtewksbury on November 21, 2009, 02:55:30 am

Title: Analog laser shunt modulation
Post by: dtewksbury on November 21, 2009, 02:55:30 am
Hi everyone. I have been busy buying red and violet lasers off eBay. As a consequence, I have found that the LM317 laser supplies are fine for driving the lasers, but when it comes to blanking and ramps they are of course useless.

So, I am designing an analog shunt modulator for these supplies that has a fast response. I have simulated the circuit and it seems to have a delay of about 1 microsecond, and it is very linear with an expected input of 0-5 V (of course). You can adjust the maximum power and blanking points. The circuit is very simple and I will post it if anyone is interested (once I have determined that it doesn't destroy the laser diodes).

Anyway, I have tested it's blanking with my laser driver software and it is awesome (as far as blanking response anyway), I have attached an image of Quisp being scanned with a 650nm 200mW diode I bought from eBay.

I have to apologize about the laser spill, I had to focus the laser on the wall and that made the spot a little too large for the scanner mirrors, I will have to do something about the optics with these cheap lasers to get the spot smaller on the mirrors (maybe a beam expander will work), and this is with a glass collimating lens.

I will post some images with gradients as well when I get a chance.

So here it is, a $49 300mW laser diode (running at 200mW, measured with a coherent power meter). Plus about $10 worth of parts for the modulator.
Title: Re: Analog laser shunt modulation
Post by: Fanny Pack on November 21, 2009, 05:29:07 am
Good work.  I used to use Norm's driver and it is a shunt type.  It worked fine but was a bit bulky and needed a big heatsink since the driver was always allowing max current to flow.  I ended up going with the tiny die4drive units and just being careful not to touch my diode cases while they were in use. 
Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 21, 2009, 06:23:13 am
I have never heard of the Die4Drive units, but they look good. I am also curious about the ZVS unit that is mentioned on the site. I have smoked quite a few FETs while trying to build ZVS power supplies. Its all a learning process.
Title: Re: Analog laser shunt modulation
Post by: drlava on November 21, 2009, 11:41:32 am
Here is a high speed shunt driver schematic I posted back in 2008:
http://www.photonlexicon.com/forums/showthread.php?t=5428

Since that time, I've found the FlexMod more flexible, precise, and easier to use.
Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 21, 2009, 06:20:54 pm
I didn't realize there were so many available. I did try to search for them before I decided to design one, but that's what seems to happen a lot. Anyway it is very simple and only uses two transistors, it is very linear as well, with a fast response time.

I am not sure about this linear thing though, the very low intensity end I think would benefit from a non linear response when you get down to near the laser threshold, then a sharp cutt off for blanking, I find it too 'steppy' at the lower end, even though the response is linear.

I have attached an image of the circuit so far.
Title: Re: Analog laser shunt modulation
Post by: James on November 21, 2009, 09:44:25 pm
Once again, I'd say I am not an expert, but I have heard from others that it's not a good idea to completely drop all current flow through the laser diode for blanking. The idea is to turn it down so low that you can't really see it. I believe if you do it that way, the diode responds to coming on faster and it lasts longer.

Have you ever heard of the lasorb?

James.  :)
Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 21, 2009, 10:04:29 pm
I have heard of lasorb, it was demonstrated to me at ILDA this year.

I am not turning the laser off, there is a pot to set the Blank level (idle current). You can't shunt the diode too low otherwise the capacitor on the output will see a large dv/dt and that will significantly slow the responce. The way this circuit works is to simply steer the current from the laser to the shunt, so the capacitor should only see a very slight voltage change.

I have added a makeshift aperture in the laser path to mask the mirrors better, I have attached some more images, much better now without the spill from the mirror edges.

Notice how the Ramp image shows quite a sudden drop off when it gets near black (near the threshold level of the laser), this is where I would like to add some non linearity in. I have decreased the color depth to 5 bits so you can see the stepping.

The images below don't do any justice to how these laser images actually look, I thing that 650nm does not do well through the lens of my camera.
BTW I am using a Canon 40D with a 17-85 zoom lens, admittedly, this is not the best lens, but it works quit well at 532nm.
Title: Re: Analog laser shunt modulation
Post by: James on November 21, 2009, 10:19:08 pm
Check out the gears in LaserBoy.

Open LaserBoy and select the three gears, frames 1, 2, & 3 with the space bar. You'll see that each frame is selected when the background behind the yellow frame stat 2D frame (index) changes to dark red.

With only those three frames selected, choose 'o' for output, '1' for ILDA, and '5' for frame set effect.

Then type gears and hit enter. It is the name of the gears frame set effect and a new file will be created called gears.ild.

Open that file into LaserBoy and just for fun, type 'o' for output, '1' for ILDA, '5' for frame set effect and move_t2b for the frame set effect. You don't have to select any frames. This effect uses the whole set.

It looks better of you go into menu 'h' and hit 'n' to add distance span before you call the move_t2b effect.

James.  :)
Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 21, 2009, 10:50:08 pm
OK I will see if I can figure it out. I have to be honest with you and say that I haven't really used LaserBoy yet. It's mainly because I have no hardware to view it's output.

Or does it just output to ILDA for playback in other software/hardware?

I will make the effort, and have a look, I feel guilty now.........
Title: Re: Analog laser shunt modulation
Post by: James on November 21, 2009, 11:04:52 pm
Yes.

It saves all flavours of ILDA including what I call !3.

It also saves as wave, DXF (directory) and plain ASCII text tables (all lossless vector art formats).

Plus bitmap raster iamges.

James.  :)

Quote
I feel guilty now.........

Good! That's what I was going for...  ;) ;D
Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 21, 2009, 11:11:12 pm
It said move_t2b is not a registered LaserBoy frame set effect?
Title: Re: Analog laser shunt modulation
Post by: James on November 21, 2009, 11:13:07 pm
This list of registered effects should appear on the right side where the palettes usually are.

Effects are "registered" as an array of text strings for lookup and pointers-to-functions for the calls.

What version do you have?

The current is:

http://akrobiz.com/laserboy/code/LaserBoy_2009_11_13.zip

That is a fairly recent effect.

As a matter of fact, move_l2r and move_t2b should be both frame and frame set effects.

Looks like I still need to work on it a bit. It blacks out some lines before it should.

James.  :)

PS. Did you see this (ild file) animation?

http://www.akrobiz.com/laserboy/free_art/countdown.zip

I did this with the new angle_wipe frame set effect.
Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 21, 2009, 11:19:49 pm
2009_10_20, I will download the latest now.
Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 21, 2009, 11:20:26 pm
Ah it looks like you have used small square grab boxes like I do for each vertex in my editor.
Title: Re: Analog laser shunt modulation
Post by: James on November 21, 2009, 11:21:57 pm
If you look at menus 'k' and 'l' you will see I also have a unique system for selecting a consecutive series of vertices; between the egg and the spider.

The [{ ]} keys move them independantly and the 'u' 'i' 'o' keys move them through the lit segments.

Sorry about stealing your thread dude!  :P

James.  :)
Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 21, 2009, 11:25:28 pm
Thats very good, I just did what you said above, and that looks cool. The image of the gears I did above also has animation. I will have to get my video camera out and post some animations that I have done as well.
Title: Re: Analog laser shunt modulation
Post by: James on November 21, 2009, 11:28:16 pm
Take a look at the file LaserBoy_frame_set_effects.cpp and the function gears to see how it works.

James.  :)
Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 22, 2009, 04:46:04 am
OK I will do that.

Man it is hot here today, in your terms 105.8 degrees f. 41 deg C, welcome to Sydney, Australia.

I have uploaded a video to youtube showing some of my animations. Plus near the end you can see some live hand drawn stuff that I add animation to afterwards, this was created from scratch while recording the video, hence my bad mouse writing. Apart from me cutting a little out to try to reduce the video size a bit, it is all done in real time, this will give you an idea of how quick it is to do animations.

Enjoy....  http://www.youtube.com/watch?v=jXRLetDm0SM (http://www.youtube.com/watch?v=jXRLetDm0SM)
Title: Re: Analog laser shunt modulation
Post by: James on November 22, 2009, 02:21:12 pm
WOW.

I really like the beam effect with the short lines.

And the floating stick man is a trip!

Can you say Wankle Rotary Engine?  ;D

James.  :)
Title: Re: Analog laser shunt modulation
Post by: drlava on November 22, 2009, 02:55:14 pm
Nice live animation, exploding segments of the drawn text. 
Title: Re: Analog laser shunt modulation
Post by: James on November 22, 2009, 03:45:01 pm
It's a beautiful, sunny 60°F here in Akron, Ohio!  ;D

James.  :)
Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 22, 2009, 03:59:21 pm
Actually, I love rotary engines, good on mazda for keeping them alive.

It took me a while to figure out why just a simple vertical sin move didn't allow the big end to stay lined up with the crank, after examining the motion properly I realized that I had to add some second harmonic in as well. That fixed it. The beauty is that all of the animations are added with a dynamically allocated doubly linked list, so it is easy to add and remove animations in a chain. This allows for really complex mechanical motion simulations with only 2 or 3 deep animations.

60 F, mmmmm 15 degrees, that's too cool man, although you have really cold places over there, I prefer the heat, although not quite to this extent.     
Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 22, 2009, 04:04:24 pm
Nice live animation, exploding segments of the drawn text. 

Thanks, sorry about my mouse writing skills. Maybe I should use a tablet.

I don't know if you noticed, but when I was drawing the text there was the occasional un-blanked segment appearing. I only just noticed that myself. That is because when a vertex is created it is not blanked by default, and I blank it afterward.

So what is happening is that the output thread grabs the vertex before I set the blank flag. I will try setting them blank before adding them to the display list, hopefully that will fix it.
Title: Re: Analog laser shunt modulation
Post by: James on November 22, 2009, 04:20:24 pm
When you say you have a doubly linked list of animations, do you mean vector filters? Are these things functions or what?

60°F in direct sunlight is OK by me! Especially in late November.  ;D

We live not too far south of Lake Erie, on the Top Half.  ;)

It does get cold here! -20°F once or twice a year is not too uncommon. 105°F is very rare, but it has happened.

I guess that's what 7° latitude will get you.

James.  :)

Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 22, 2009, 05:47:56 pm
Well, I will try to explain.

An image is a collection of vertices, a class I call PointList. This is a linked list that holds the vertices, has load and save functions etc. Every Vertex has a pointer to another class called LaserAnimationList, this can contain LaserAnimations. All these lists have been made thread safe, so Animations can be added, removed or modified from the AnimationList. When the display engine reads a vertex it calls that vertexes AnimationList and that list manipulates that vertext. This is done for the entire list of vertices.

So every vertex has it's own AnimationList, and each list can have as many animations as you like. Also each animation can be linked to trigger or be triggered by any other animation in any other animation list, that's how I did the camshafts pushing the valves down, the cam shaft had a rotation animation, and that animation triggered the valves move animation (which was made of a delay + move animation). It's a bit hard to explain, you have to see it.

I am not sure what you mean by vertex filters, but I guess so. Yes they are functions of course, but there are lots of pointers that need to be set.

When an image is saved, it's entire hierarchy of animations etc is saved as well. This means that the timeline editor works really well and makes it easy to just drop any of these cool animations in sequence on the timeline (you can have as many laser tracks as you want, plus audio, dmx, serial etc), and each laser track can be assigned to a different laser driver (these are network based).

The advantage of doing it this way is that you can open a show and just drag the start and end points of each animation, and it will run for that length of time because everything is calculated as it plays. It is surprising how little CPU is used. I love that PC's are so powerful these days. Gone is the 1MHz Z80 with 16K RAM.....

I am rambling now, I will go and eat a donut, that will calm me down.
Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 22, 2009, 05:58:27 pm
Apparently I am getting off topic now, that happens with me a lot I'm afraid.

I am still working on the laser blanking. It seems to be working fine (laser diode still alive). However I need to deal with the diodes threshold voltage variation with temperature, it's not an issue after running the system for 5 minutes or so, just when it starts and is cold the threshold voltage appears to be lower.

I need to read up more about quantum wells, I thought semiconductors have a lower junction voltage when hot, although FETs work the other way..... I must read read read.
Title: Re: Analog laser shunt modulation
Post by: James on November 22, 2009, 07:43:36 pm
Linked lists are pretty cool, but you know they have some drawbacks, like overall size of memory consumption and an indexing Big O of N.

Do you keep a list of discarded objects and reuse them to keep from spending too much time creating and destroying your heap?

James.  :)
Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 22, 2009, 08:11:57 pm
In some of my lists I do just flag entries as unused, and when it comes time to allocate a new one it gets re-used if available.

Yes it does use more memory, but in my case it's not that bad because I wrote the entire list handling library, so I have as little overhead as possible. Plus the list is traversable in both directions which is handy when doing things like calculating distance to previous vertex etc.

I have just recently (for this project) implemented the linked list as a templated class, so every list I make can now uses the same list base class (How cool is C++).

Query?
and an indexing Big O of N.
??? I don't know what this means?
Title: Re: Analog laser shunt modulation
Post by: James on November 22, 2009, 09:29:39 pm
Big O of N means that it takes N time to get to the Nth element in the list.

With an array, access to any index is Big O of 1. How much time does your code spend counting elements into the lists?

Templates are really cool! I love the STL! I have done a few really complex projects that rely on a class or classes inherited from STL stuff. It is about as stripped down and smokin' fast as it gets. And it's all done before you even think about using it!

James.  :)
Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 23, 2009, 07:01:55 am
Counting elements into the lists doesn't really happen that often because most of the routines traverse the list sequentially, like the display section, and UI section. Rarely is a list searched for entries. So it is no slower than using an array. granted there isn't random access, but when would that be required?
Title: Re: Analog laser shunt modulation
Post by: James on November 23, 2009, 02:27:06 pm
That's a good point!

The next vertex you need to look at is usually either the one just before or just after the one you are looking at now.

Plus, inserting a new vertex between two that already exist is way faster with a list.

James.  :)
Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 23, 2009, 03:48:24 pm
Yes exactly, and the advantages outweigh the disadvantages. Plus the other cool thing is that I have a function that is called to get the next vertex, but that is called from a function that does all of the ballistic calculations (extra vertices between points etc), and that counts the PCM samples that are created to go to the DACs, and sends this value to the animator, but only at the frame boundaries. So this means that as the image is animating it is dynamically adding and removing extra vertices depending on the distance between the original vertices which changes during the animation. So the animation speeds are consistent, although the frame rate is constantly changing, but the images are consistently nice.

Daryl.
Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 23, 2009, 03:56:40 pm
Hey James, by the way I notice you are using SDL, I started using that a when I began writing graphics applications. I tried to use DirectX after that but found it too confusing. I now use OpenGL, it is simple to use and has similar performance. For any audio I use FMod, but I have designed all of the hardware for this project and don't use any windows drivers for any of it. In fact the only library I use is the OpenGL one. Everything else has been written by me.

So like your application, mine doesn't rely on any big bloated Microsoft libraries to be installed, I can just copy the executable and opengl dlls and it runs, no installation, very portable. All the networking sections I use Winsock and that's built into the OS, all my networking is UDP, I have written all of the libraries to handle dropped packet recovery etc, so it works well over a wireless connection as well.

Daryl.
Title: Re: Analog laser shunt modulation
Post by: drlava on November 23, 2009, 03:58:36 pm
yeah, I saw that blanking retrace pop up, but as you said it's an easy fix not worth mentioning.  I noticed the scan rate for the text changing as you scaled it, also.  Have you tried scanning with and without this feature?  The goal is to have the scaling not create changing artifacts as more points are added, in some cases scanning artifacts, if they exist, are more tolerable if the don't change as the frames are scaled and manipulated in 3D.

PCM samples, eh?  Are you using high end audio D/As for output? Leverage some good existing tech if you are!
Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 23, 2009, 04:11:22 pm
Hi drlava, yes I am using the 24 bit Alesis DACs (I have ADAT compatibility, with optical IO for our old stuff). I have found these DACs to be awesome. I use them for position and color. At the moment I have 6 channel color and two scanner sets out for each laser, but I am decreasing that to 4 channels of color and one scanner set per output. This is because we have a lot of mixed gas lasers that use PCAOMs, we are phasing these out and going OPSL, hence the hardware changes.

I have designed all of the analog section on the output which is all DC coupled of course.

As for your other question, it is easy to disable the auto point calculations, or change it on the fly, all of the settings for this can be adjusted/disabled on a per image basis, because some images need different processing. However I have found that if you do that the start and end points can get a bit ugly where there are large traversal distances, so I leave it on most of the time. It is only really an issue when trying to video it. It is made worse by the fact that the camera is interlaced, I will eventually get a HD camera with adjustable frame rate to get better captures.

Also it works well to give consistent brightness to images that come to the front and go to the back, or get large and small if you like.
Title: Re: Analog laser shunt modulation
Post by: James on November 26, 2009, 11:25:03 pm
Right now it's about 0°C in Akron, Ohio.

Or it that -0°C ? ???

James.   :)
Title: Re: Analog laser shunt modulation
Post by: dtewksbury on November 27, 2009, 12:26:44 am
Wow, it is 34 Deg C here at the moment, and it will be 40 tomorrow.
Title: Re: Analog laser shunt modulation
Post by: James on November 27, 2009, 01:01:10 am
There's an old saying around here.

If you don't like the weather in Ohio, just wait a few minutes.

I've seen it go from below freezing to 65°F in half a day.

James.  :)
Title: Re: Analog laser shunt modulation
Post by: BlinkenLights on November 27, 2009, 09:50:58 am
thats an old saying about Maryland too.. and since maryland is older i think you stole it from us.
SimplePortal 2.3.7 © 2008-2024, SimplePortal