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.








Green Laser Pointers by Category Blue Laser Pointers by Category Red Laser Pointers by Category
Yellow Laser Pointers by Category Violet Laser Pointers by Category Orange Laser Pointers by Category
Top Laser Pointers by Power - 1 Watt+ Top Laser Pointers by Power - 500mW+ Top Laser Pointers by Power - 250mW+
Laser Pointer Database High Power Laser Pointers Laser Pointer Diodes
Laser Technology Laser Pointer Parts Lasers by Wavelength
Top 10 Laser Pointer Companies Laser Pointer Company Database Visible Beam Laser Pointers


One laser store meets all your needs

























Go Back   Laser Pointer Forums - Discuss Laser Pointers > Lasers > Laser Shows



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



Reply
 
LinkBack Thread Tools Display Modes
Old 05-18-2013, 11:45 PM #17
Junior Member
 
Join Date: Apr 2013
Location: South Midlands, UK
Posts: 15
Rep Power: 0
Fraggle is on a distinguished road
Fraggle Fraggle is offline
Junior Member
 
Join Date: Apr 2013
Location: South Midlands, UK
Posts: 15
Rep Power: 0
Fraggle is on a distinguished road
Default Re: ARDUINO & DAC for XY projector

After reading a bit, the Arduino Wire library is fixed at 100kHz, which is approx 10,000bps which is slow, and why the circle is steppy.

Have a read here
Faster I2C - Arduino Forum
which explains how to increase that four fold to 400kHz.

That'll give you four times the speed which will make it quite a bit better.

Another thing you may be able to do is to just use a resolution of 256 x 256 rather than 4k by 4k.

That would allow you to send one byte to each DAC rather than two, thereby doubling the speed.

(the DACs may refuse to work this way thought, I don't know. They might insist on both bytes being sent rather than assuming the missing byte consists of zeros which is what you want)

If you can do both of those things, (and they both work) that would give you an 8 times increase in the speed of writing the data to the DACs, and you can then decrease the 10 degree step down to 8, 5, 4, 3, etc until it looks good. (and doesn't flicker)


Fraggle is offline   Reply With Quote







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







Old 05-19-2013, 12:15 AM #18
Bionic-Badger's Avatar
Class 4 Laser
 
Join Date: Oct 2007
Location: Oregon, USA
Posts: 5,476
Rep Power: 1469
Bionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond repute
Bionic-Badger Bionic-Badger is offline
Class 4 Laser
Bionic-Badger's Avatar
 
Join Date: Oct 2007
Location: Oregon, USA
Posts: 5,476
Rep Power: 1469
Bionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond reputeBionic-Badger has a reputation beyond repute
Default Re: ARDUINO & DAC for XY projector

Remember to wrap your code in the [code] tags.

That Arduino-specific code I posted was just written up from memory. I'm not sure what byte order the DAC expects for I2C. The I2C stuff I've dealt with just used 8-bit data, so I didn't need to shift anything.

Though I haven't checked what the input format of the DAC is, your circle in the original code is probably steppy in the original because you were only shifting by 4-bits, not the full 8-bits. So you were truncating off some of the lower bits. You probably have enough points to represent the circle (or else it would just look rough, not steppy). The integer representing your X and Y value looks like this:

Code:
             MSB         LSB
int x = [15, ..., 8 ] [7, ... 0]
        `-------- bits --------'
Shifting moves the bits to the right or left. Sending out the MSB and LSB requires:

Code:
char MSB = 0xFF & (x >> 8); // Take top 8-bits and move them into the lower 8-bit positions
char LSB = 0xFF & x; // Simply mask away the higher-order bits.
The masking might be unnecessary, but it's good for completeness, and necessary if the type is an int.

In the error that the variable "c" wasn't working, I think that might be because it needs to be an int type, not char. I actually rarely use those bit-structs, but I thought given the 12-bit-per-axis resolution of your DAC that you could fit all the point and color data into a single 32-bit structure. With more RAM it won't matter.

The buffer code helps give you consistent frame-rates because the calculations are pre-stored. If you're doing stuff like floating-point calculations per point it'll slow up the per-point graphics. However, I think the main problem with your code was that the bit shifting was incorrect (hence the steppy appearance), and therefore while you had enough points to draw a circle, it had to spend about 2x the number of points drawing the jagged edges. Use the full 8-bits of shifting and you should be able to reduce the number of points as well as remove the jagged appearance.

Finally, remember that you can do fast bit-wise integer multiplications by using right and left shifting. Especially for division this is very fast and reduces a lot of calculations if you can use it. Beware that this shouldn't be used on the floating point calcs. Ex:

Code:
int x = 170;

int x1 = x >> 1; // Right-shift is division by 2^n --> 170/2
int x2 = x >> 2; // Right-shift is division by 2^n --> 170/4
int x3 = x << 1; // Left-shift is multiplication by 2^n --> 170 * 2
Those optimizations above help a lot with slow MCUs like the ATmega. It's still good even on faster processors if you can use them.
__________________
You must spread some Reputation around before giving it to <person> again.
Bionic-Badger is offline   Reply With Quote
Old 05-19-2013, 09:06 AM #19
Class 2 Laser
 
Join Date: Feb 2012
Location: UK
Posts: 330
Rep Power: 80
Multimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond repute
Multimode Multimode is offline
Class 2 Laser
 
Join Date: Feb 2012
Location: UK
Posts: 330
Rep Power: 80
Multimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond repute
Default Re: ARDUINO & DAC for XY projector

Quote:
Originally Posted by Fraggle View Post
After reading a bit, the Arduino Wire library is fixed at 100kHz, which is approx 10,000bps which is slow, and why the circle is steppy.

Have a read here
Faster I2C - Arduino Forum
which explains how to increase that four fold to 400kHz.
That'll give you four times the speed which will make it quite a bit better.
Another thing you may be able to do is to just use a resolution of 256 x 256 rather than 4k by 4k.
That would allow you to send one byte to each DAC rather than two, thereby doubling the speed.
If you can do both of those things, (and they both work) that would give you an 8 times increase in the speed of writing the data to the DACs, and you can then decrease the 10 degree step down to 8, 5, 4, 3, etc until it looks good. (and doesn't flicker)
I agree, the I2C bus is slow and the wire lib code to drive it even slower.
I still think the staircase effect is to do with the delay between sending out the X then the Y co-ordinate.
Speeding up the data transfer from 100khz to 400KHZ will help, but you'll still be lumbered with the wire.lib
Remember the galvo will responde in about a milisecond, so you must output the xy co-ord pair in a much shorter time than this to gat a straight line between the two.

It would be good to see you output 2 diaganol co-ordinates as mentioned before. There is no processor overhead in doing this, but will prove that the I2C interface / bit banged Wire lib is too slow for your application.

(It's not the speed / computing power of the ATMEGA either - I produced complex graphics and Logos with a 1 MHZ 6502 processor and G120D scanners about 20 years ago - this was using 8 bit DACs driven on a parallel bus).

Spark fun supply a nice 8 bit parallel DAC AD5330 and looking at the data sheet, there is a 10bit DAC AD5331 _ I bet you could desolder the 8 bit and hack on the 10 bit version for better resolution.
https://www.sparkfun.com/products/9719
These DACs will allow you to load the X and Y co-ords.... then using the LDAC pin, output the new xy pair exactly at the same time.
Cool project
ATB
MM

Last edited by Multimode; 05-19-2013 at 09:19 AM.
Multimode is offline   Reply With Quote
Old 05-19-2013, 10:53 AM #20
Junior Member
 
Join Date: Apr 2013
Location: South Midlands, UK
Posts: 15
Rep Power: 0
Fraggle is on a distinguished road
Fraggle Fraggle is offline
Junior Member
 
Join Date: Apr 2013
Location: South Midlands, UK
Posts: 15
Rep Power: 0
Fraggle is on a distinguished road
Default Re: ARDUINO & DAC for XY projector

I'm still a bit puzzled by the staircase effect.

The code is doing "SetX" and then "SetY" which are being sent to the DACs.

Even at 9600bps, assuming the complete I2C command is (say) 10 bytes (which actually makes my statement about doubling the speed sending one byte rather than two rubbish!), that will take ~10mS to send the command.

Unless the mirror units can respond far, far quicker than 10mS (I'm not familiar with them, how quick do they operate?), I would expect to see the X mirror start moving, and then the Y mirror start moving, so a very short horizontal straight line, then diagonal, then very short vertical straight line (as the Y mirror finishes it's move) for each step.

It would be better if a single I2C command with X AND Y coordinates in it (32 bits), with a little bit of decoding at the other end to split the 32 bits into the X and Y again before sending to the DACs, which would start to drive both X and Y mirrors at the same time.

Or buy an Arduion Due which has two DACs onboard so could drive the motors (via small drivers I think) directly.
Fraggle is offline   Reply With Quote
Old 05-19-2013, 10:55 AM #21
Class 4 Laser
 
Join Date: May 2007
Location: Queensland, AU
Posts: 7,549
Rep Power: 754
Things has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond repute
Things Things is offline
Class 4 Laser
 
Join Date: May 2007
Location: Queensland, AU
Posts: 7,549
Rep Power: 754
Things has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond repute
Default Re: ARDUINO & DAC for XY projector

What I'm getting at is the points are not actually in a circle, they're alternating in a staircase. To me that looks/sounds more like an issue in the maths/coding more than a speed issue. Even if the scanners are too slow, the dots should still actually be in a circle.
Things is offline   Reply With Quote
Old 05-19-2013, 10:57 AM #22
Junior Member
 
Join Date: Apr 2013
Location: South Midlands, UK
Posts: 15
Rep Power: 0
Fraggle is on a distinguished road
Fraggle Fraggle is offline
Junior Member
 
Join Date: Apr 2013
Location: South Midlands, UK
Posts: 15
Rep Power: 0
Fraggle is on a distinguished road
Default Re: ARDUINO & DAC for XY projector

I agree, unless the mirrors can move in a micro second, it shouldn't look like that!
Fraggle is offline   Reply With Quote
Old 05-19-2013, 11:30 AM #23
Class 2 Laser
 
Join Date: Feb 2012
Location: UK
Posts: 330
Rep Power: 80
Multimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond repute
Multimode Multimode is offline
Class 2 Laser
 
Join Date: Feb 2012
Location: UK
Posts: 330
Rep Power: 80
Multimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond repute
Default Re: ARDUINO & DAC for XY projector

Quote:
Originally Posted by Fraggle View Post
I'm still a bit puzzled by the staircase effect.

The code is doing "SetX" and then "SetY" which are being sent to the DACs.

Even at 9600bps, assuming the complete I2C command is (say) 10 bytes (which actually makes my statement about doubling the speed sending one byte rather than two rubbish!), that will take ~10mS to send the command.

Unless the mirror units can respond far, far quicker than 10mS (I'm not familiar with them, how quick do they operate?), I would expect to see the X mirror start moving, and then the Y mirror start moving, so a very short horizontal straight line, then diagonal, then very short vertical straight line (as the Y mirror finishes it's move) for each step.
.
Hi,

That's the problem,
The G120d scanners I used (20yrs ago!)had a step response of about 1ms ...I think these are the equivelent of the 50KPS sets now, so even the slower scan sets of 25kps will have a response time way shorter that 10ms.

I dont know enough about the modern scan sets / their capability, but I'd bet my mother in laws pants it is the delay between sending the X and then the Y co-ord thats the root problem.
ATB
MM


Edit - here is a previous thread regarding scan speed - I think it shows that the response time of even a basic set is much faster than 10ms
Question about Galvo Speed?

Post #6 shows the step time for the GS120 scanner - 5 degree step in 1.1ms !!!

Last edited by Multimode; 05-19-2013 at 11:51 AM.
Multimode is offline   Reply With Quote
Old 05-19-2013, 12:14 PM #24
Class 4 Laser
 
Join Date: May 2007
Location: Queensland, AU
Posts: 7,549
Rep Power: 754
Things has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond repute
Things Things is offline
Class 4 Laser
 
Join Date: May 2007
Location: Queensland, AU
Posts: 7,549
Rep Power: 754
Things has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond reputeThings has a reputation beyond repute
Default Re: ARDUINO & DAC for XY projector

Yea, you are correct there. You can see clearly the scanners stepping in the X direction, then moving up Y, stepping X etc.
Things is offline   Reply With Quote
Old 05-19-2013, 02:51 PM #25
camvo's Avatar
Class 1M Laser
 
Join Date: Sep 2011
Location: Holland, Rotterdam
Posts: 102
Rep Power: 14
camvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to behold
camvo camvo is offline
Class 1M Laser
camvo's Avatar
 
Join Date: Sep 2011
Location: Holland, Rotterdam
Posts: 102
Rep Power: 14
camvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to behold
Default Re: ARDUINO & DAC for XY projector

@ Fraggle,

I found that same article Faster I2C - Arduino Forum

That article tells to delete the files:
hardware/libraries/Wire/Wire.o
hardware/libraries/Wire/utility/twi.o

I could not find these files.
(I use the Arduino 023 version but checked the version 1 and these 2 files are also not there.)

Anyway, I tried it.

I modified it to:

Code:
#define TWI_FREQ 400000L
Restarted the IDE.

It made no difference.
__________________
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; 05-19-2013 at 03:01 PM.
camvo is offline   Reply With Quote
Old 05-19-2013, 03:35 PM #26
Class 2 Laser
 
Join Date: Feb 2012
Location: UK
Posts: 330
Rep Power: 80
Multimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond repute
Multimode Multimode is offline
Class 2 Laser
 
Join Date: Feb 2012
Location: UK
Posts: 330
Rep Power: 80
Multimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond repute
Default Re: ARDUINO & DAC for XY projector

Quote:
Originally Posted by camvo View Post
@ Fraggle,

I found that same article ........
It made no difference.

Increasing the clock rate from 100khz to 400khz will only speed up the data transfer.

The delay between sending the X co-ord and Y-co-ord is dependant on how quickly the Wire.lib executes

Even if you could increase the I2C serial clock rate to Ghz, the delay would still be the same as the wire.lib won't be runninng any faster


ATB
MM
Multimode is offline   Reply With Quote
Old 05-19-2013, 03:48 PM #27
camvo's Avatar
Class 1M Laser
 
Join Date: Sep 2011
Location: Holland, Rotterdam
Posts: 102
Rep Power: 14
camvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to behold
camvo camvo is offline
Class 1M Laser
camvo's Avatar
 
Join Date: Sep 2011
Location: Holland, Rotterdam
Posts: 102
Rep Power: 14
camvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to behold
Default Re: ARDUINO & DAC for XY projector

Bummer!!!
__________________
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"
camvo is offline   Reply With Quote
Old 05-19-2013, 04:30 PM #28
Class 2 Laser
 
Join Date: Feb 2012
Location: UK
Posts: 330
Rep Power: 80
Multimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond repute
Multimode Multimode is offline
Class 2 Laser
 
Join Date: Feb 2012
Location: UK
Posts: 330
Rep Power: 80
Multimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond reputeMultimode has a reputation beyond repute
Default Re: ARDUINO & DAC for XY projector

Hi Camvo,

It may be possible to manipulate the port dirctly (not using the Wire lib) or use the TWI hardware on the ATmega328- but that's way above my software capability.
I've had a google round to see if anyone else has done something similar needing a high speed I2C but can't find anything that would help.

All I can suggest is as before, use a parallel DAC, but I don't know how fast the digital write function operates? You may hit a similar problem

ATB
MM
Multimode is offline   Reply With Quote
Old 05-19-2013, 07:43 PM #29
camvo's Avatar
Class 1M Laser
 
Join Date: Sep 2011
Location: Holland, Rotterdam
Posts: 102
Rep Power: 14
camvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to behold
camvo camvo is offline
Class 1M Laser
camvo's Avatar
 
Join Date: Sep 2011
Location: Holland, Rotterdam
Posts: 102
Rep Power: 14
camvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to behold
Default Re: ARDUINO & DAC for XY projector

I have been reading the Arduino playground about the I2C bus.

And found this:

Quote:
The Wire library's I/O blocks. This means that when sending or receiving over the I2C bus, your application is prevented from running until the communication is complete.
In truth the operation of the TWI hardware in your processor is interrupt-driven, so your application should be free to run at full speed while the TWI communication takes place, but this capability is not utilized by the Wire library.
I think that the library was written for general purposes. So for sending and receiving data.
For this project, only data is sent. There is no feedback over the I2C bus from other items.

So I would think that if the receiving data part(s) in the library would be deleted, that certainly would speedup things.

How ever I am like you. Do not have the knowledge of howto.

Probably my thinking is too simple.....
__________________
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"
camvo is offline   Reply With Quote
Old 05-19-2013, 08:50 PM #30
camvo's Avatar
Class 1M Laser
 
Join Date: Sep 2011
Location: Holland, Rotterdam
Posts: 102
Rep Power: 14
camvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to behold
camvo camvo is offline
Class 1M Laser
camvo's Avatar
 
Join Date: Sep 2011
Location: Holland, Rotterdam
Posts: 102
Rep Power: 14
camvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to behold
Default Re: ARDUINO & DAC for XY projector

Would this work better?

It seems this is a continuos running writing to the I2C bus without waiting for the end of the communication.
__________________
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; 05-19-2013 at 08:51 PM.
camvo is offline   Reply With Quote
Old 05-19-2013, 10:29 PM #31
Member
 
Join Date: May 2013
Location: Sweden
Posts: 43
Rep Power: 0
Sultanen is on a distinguished road
Sultanen Sultanen is offline
Member
 
Join Date: May 2013
Location: Sweden
Posts: 43
Rep Power: 0
Sultanen is on a distinguished road
Default Re: ARDUINO & DAC for XY projector

It sounds like he is adressing a big problem with the Wire library that might solve your delays, i would love to see your result after this library is implemented!
Sultanen is offline   Reply With Quote
Old 05-20-2013, 11:16 AM #32
camvo's Avatar
Class 1M Laser
 
Join Date: Sep 2011
Location: Holland, Rotterdam
Posts: 102
Rep Power: 14
camvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to behold
camvo camvo is offline
Class 1M Laser
camvo's Avatar
 
Join Date: Sep 2011
Location: Holland, Rotterdam
Posts: 102
Rep Power: 14
camvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to beholdcamvo is a splendid one to behold
Default Re: ARDUINO & DAC for XY projector

If I only could figure out how to use the I2C.write command...

It mentions

I2c.write(address, registerAddress, *data, numberBytes)

I have no idea of how to translate this from my original code:

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();

or the code from Bionic-Badger:

Code:
  Wire.beginTransmission(DACX);
  Wire.send(0xFF & (coord->x >> 8));    // MSB
  Wire.send(0xFF & coord->x);           // LSB
  Wire.endTransmission();

I do not have experience.
__________________
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; 05-20-2013 at 11:46 AM.
camvo is offline   Reply With Quote
Reply

Tags
arduino, dac, lasershow





Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://laserpointerforums.com/f47/arduino-dac-xy-projector-82479.html
Posted By For Type Date
Volcan Veins This thread Refback 07-17-2016 08:34 PM
?ASTRAL PLANE? This thread Refback 05-01-2016 09:04 PM
???????? This thread Refback 04-27-2016 09:39 AM
myswap.sinaapp.com Site Overview This thread Refback 04-24-2016 07:36 AM
I want peace This thread Refback 04-20-2016 12:47 AM
:???*:???:?? This thread Refback 04-19-2016 12:44 PM
</title> <style>figure{margin:0}</style> <link rel="shortcut icon" href="http://31.media.tumblr.com/avatar_a882b8c904c1_128.png"> <link rel="alternate" type="application/rss+xml" href="http://sidlolly.tumblr.com/rss"> <link rel="shortcut icon" href=" This thread Refback 03-12-2016 07:21 PM
Untitled document This thread Refback 01-26-2016 09:03 PM
So let's start creepy games This thread Refback 01-05-2016 05:06 PM
Untitled document This thread Refback 11-07-2015 08:26 PM
myswap-(wd-galvo) This thread Refback 10-18-2015 12:46 AM
Ethical Consumption Under Late Capitalism This thread Refback 10-17-2015 06:07 AM
/diy/ - Do-It-Yourself Thread #612500 This thread Refback 05-24-2014 02:50 PM
LASERS | Pearltrees This thread Pingback 03-21-2014 03:15 AM
Scanning - Next Steps & Help (Page 1) ? Printer Control ? Pryntech This thread Refback 09-05-2013 09:45 PM










Loading








Green Laser Pointers by Category Blue Laser Pointers by Category Red Laser Pointers by Category
Yellow Laser Pointers by Category Violet Laser Pointers by Category Orange Laser Pointers by Category
Top Laser Pointers by Power - 1 Watt+ Top Laser Pointers by Power - 500mW+ Top Laser Pointers by Power - 250mW+
Laser Pointer Database High Power Laser Pointers Laser Pointer Diodes






Privacy Policy | Advertising Disclaimer | Terms of Use


 


All times are GMT. The time now is 06:38 AM.


Powered by: vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO
Privacy Policy | Advertising Disclaimer | Terms of Use
Copyright (C) 2017 Laser Pointer Forums, LLC