Laser pointer discussion. Read/write reviews of laser pointers and laser pointer companies. Learn about all types of laser pointers and lasers

 Welcome to Laser Pointer Forums! If you are looking for a laser pointer or want to compare different laser pointer companies, you may want to check out the LPF Laser Pointer Company Database. The link will open in a new window for your convenience.

One laser store meets all your needs

 Laser Pointer Forums - Discuss Laser Pointers Converting XY points to DAC values

LPF List of Laser Pointer Companies (link opens new window)

06-17-2013, 05:28 AM #1
 Junior Member Join Date: Mar 2013 Posts: 6 Rep Power: 0
laserlightguy
Junior Member

Join Date: Mar 2013
Posts: 6
Rep Power: 0
Converting XY points to DAC values

I have an XY galvo and want to make a control card.

If I have values (0,0) (0,10) (10,10), (0,0) eg a square, how do I convert these XY values to voltages?

My understanding is that the angle the mirror rotate is supposed to be linear between -5v and +5v eg if I get it 0 volts then the mirror should rotate to 0 degrees, if I give it +5v it should go to say +20degrees so +2.5v=10degrees.

Playing with my galvo I see if I adjust the X galvo from -5v to +5v it will scan a straight line but if I scan the Y galvo the line is not vertical if the X galvo is not at 0v.

Anyone have the equations for the function (volts_A,volts_B)=function(x,y) ?

LPF List of Laser Pointer Companies (link opens new window)

06-17-2013, 07:14 PM #2
 Class 1M Laser Join Date: Sep 2011 Location: Holland, Rotterdam Posts: 102 Rep Power: 14
camvo
Class 1M Laser

Join Date: Sep 2011
Location: Holland, Rotterdam
Posts: 102
Rep Power: 14
Re: Converting XY points to DAC values

It depends on what kind of DAC you are using.

I find that the Arduino DUE board is most easy one.

Code:
analogWrite(DAC1, valx );
analogWrite(DAC0, valy);
That's it!
And its biggest advantage is that both DACs are updated at the same time.

Or with MCP4725:

Code:
Wire.beginTransmission(DACX);
Wire.send(64);                // cmd to update the DAC
Wire.send(valx >> 4);         // the 8 most significant bits...
Wire.send((valx & 15) << 4);  // the 4 least significant bits...
Wire.endTransmission();

Wire.beginTransmission(DACY);
Wire.send(64);                // cmd to update the DAC
Wire.send(valy >> 4);         // the 8 most significant bits...
Wire.send((valy & 15) << 4);  // the 4 least significant bits...
Wire.endTransmission();
You need 2 separate DACs. You can not update them at the same time.
So no diagonally lines, only stair cases.

MCP4922 which is a dual DAC has latching capability but is is way to slow.

Have a look at this thread at LPF
__________________
50mW 532nm (ripped from a cheap stage projector)
500mW 532nm (in the laser harp)

1W RGB (500mW-660nm, 200mW-532nm, 500mW-450nm) Touch the white beam and it is: "AUCH!!"

The white laser burned the paint off from the door!
I am thinking of starting a "door-etching-business"

Last edited by camvo; 06-17-2013 at 07:17 PM.

06-17-2013, 07:20 PM #3
 Member Join Date: May 2013 Location: Sweden Posts: 43 Rep Power: 0
Sultanen
Member

Join Date: May 2013
Location: Sweden
Posts: 43
Rep Power: 0
Re: Converting XY points to DAC values

Im working with an SPI DAC, its ALOT faster than I2C once like MCP4725. Its easy to interface it if your reading the datasheet =)

06-17-2013, 08:59 PM #4
 Class 2 Laser Join Date: Feb 2012 Location: UK Posts: 330 Rep Power: 80
Multimode
Class 2 Laser

Join Date: Feb 2012
Location: UK
Posts: 330
Rep Power: 80
Re: Converting XY points to DAC values

Quote:
 Originally Posted by Sultanen Im working with an SPI DAC, its ALOT faster than I2C once like MCP4725. Its easy to interface it if your reading the datasheet =)
I set up a SPI DAC running at 8mhz clock and it tops out at about 700 points.
Any more points and the graphics starts to flicker.

The DAC / processor Camvo is using loads the DAC by writing to the DAC registers directly, so only takes a few clock cycles, therfore the limiting factor is the scanners not the SPI bandwidth.

ATB
MM

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

All times are GMT. The time now is 05:30 PM.

 -- DarkShadows V5 -- Responsive LPF -2562016 -- Default Style Contact Us - Laser Pointer Forums - Archive - Top