Laser Scanning Display Project - Electronics Forums

Author Topic: Laser Scanning Display Project  (Read 30896 times)

ElectroNick

  • The forum moderator
  • Administrator
  • Full Member
  • *****
  • Posts: 154
  • Karma: +3/-0
  • The soldering iron is ON!
    • View Profile
    • Electronics Blog
Re: Laser Scanning Display Project
« Reply #15 on: April 25, 2013, 12:25:10 PM »
So far I have received the 0.25° holder from Shapeways but decided to hold off mounting mirrors on it until I can see at least some kind of meaningful output from the old 1° one. I am still struggling with the timing of the flashes. Even though I am able to see some very dim individual pixels, which at first sounded promising, I am not yet able to assemble them in the required shape of a symbol. I am actually suspecting slowness of the laser diode driver and at the moment looking for a faster driver or a faster way to energize a laser diode, anyhow - I might even go for energizing it as an LED just to see if the slowness of the driver is at fault.

So, here are my challenges so far, nothing new and exciting to report yet, will keep you posted once I have a break through.

Cheers!

Electronics Forums

Re: Laser Scanning Display Project
« Reply #15 on: April 25, 2013, 12:25:10 PM »

Georg

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +0/-0
  • I have a soldering iron and I'm not afraid to use it!
    • View Profile
Re: Laser Scanning Display Project
« Reply #16 on: May 04, 2013, 01:28:39 PM »
the HDD is turning! Incredible  :)
Now I try to find out how fast it turns.
I measured the TACH-Output. As you can see I got every 2ms a slope. What speed does that mean??
Can I use the TACH-signal to synchronize the laser?
The poti (potpin) changes only the form of the signal, but not the speed. Is that what you wanted?
I will organize now the mirrors. Do you have news with the mirrors?
(PS: I thought I have ordered the parts... but I missed a cross on the order, so nothing happened.. so now I am back again!)

ElectroNick

  • The forum moderator
  • Administrator
  • Full Member
  • *****
  • Posts: 154
  • Karma: +3/-0
  • The soldering iron is ON!
    • View Profile
    • Electronics Blog
Re: Laser Scanning Display Project
« Reply #17 on: May 04, 2013, 07:04:33 PM »
the HDD is turning! Incredible  :)
Now I try to find out how fast it turns.
I measured the TACH-Output. As you can see I got every 2ms a slope. What speed does that mean??
Can I use the TACH-signal to synchronize the laser?

Coming back from a couple of days of travel, so I will have to be brief with the answers.

I think the HDD has 36 electrical "steps" per revolution, so with 2ms tach period we're getting 72ms complete 360° rotation which makes for 60,000/72 = 833.33 RPM rotational speed.

BUT

I don't know the exact number of electrical winding commutation steps per revolution in the HDD motor - I've yet to open one up and count the windings cogs and the rotor's magnetic poles. So, there 's a chance that it has less steps per revolution and then RPM will be higher. In other words, that oscilloscope trace tells you the electrical speed which, depending on the actual design of the motor can translate into several possible actual mechanical RPMs

And that's where counting RPMs using a photointerruptor slot is better: it tells you absolute speed, regardless of the number of winding cogs and poles. It also tells you position - something that TACH signal cannot provide. So, the TACH output is an additional convenience in cases we are only interested in RPMs and know exact details of the BLDC motor design. But since we also need position and we don't know exactly what's inside of that motor, we're better off using a photointerrupter instead.

I will organize now the mirrors. Do you have news with the mirrors?
I've not yet tried the new mirror holder. But, just to reiterate, if you are ordering, be sure to get 0.25° one because the 1° one is simply incorrect. I will delete it from Shapeways when I have a moment.

Cheers!

Georg

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +0/-0
  • I have a soldering iron and I'm not afraid to use it!
    • View Profile
Re: Laser Scanning Display Project
« Reply #18 on: May 06, 2013, 10:27:26 AM »
I have now the photointerruptor in use. wow!
Look at the first copy of the osci. Red is the signal of the photointerruptor (and trigger)  - in yellow are the signals of the laseronPin. The yellow signals consists of changing sequences of the single signals...But why are the yellow bars not inside the time period of one rotation (the red marks)? This would be needed as signals for each mirror..

I made the motor slower by using the tone function:
pwm=40;
tone(pwmPin,pwm);

I made a small test-code (should generate 2 dots with the first mirror):
byte pwmPin = 9;
byte ledPin = 13;
byte laserOnPin = 8;
int pwm;
byte timePixel = 20;

void setup() {
  attachInterrupt(0, calcRPM, FALLING);
  pinMode(pwmPin, OUTPUT);
  pinMode(ledPin, OUTPUT);
  pinMode(laserOnPin, OUTPUT);
  pwm=40;
  tone(pwmPin,pwm);
}

void loop() {}

void calcRPM(){
    digitalWrite(laserOnPin, HIGH );
    delayMicroseconds(timePixel);
    digitalWrite(laserOnPin, LOW );
    delayMicroseconds(timePixel);
    digitalWrite(laserOnPin, HIGH );
    delayMicroseconds(timePixel);
    digitalWrite(laserOnPin, LOW);
}
You see the result in the second picture. There are now 4 signals - but only 2 are set. Is it a  Bounce effect?
(Eventually a photointerruptor for each mirror - and a second one for the position of the first mirror might be an easy way for the synchronisation)

What di you think?

ElectroNick

  • The forum moderator
  • Administrator
  • Full Member
  • *****
  • Posts: 154
  • Karma: +3/-0
  • The soldering iron is ON!
    • View Profile
    • Electronics Blog
Re: Laser Scanning Display Project
« Reply #19 on: May 06, 2013, 01:03:16 PM »
I have now the photointerruptor in use. wow!
Look at the first copy of the osci. Red is the signal of the photointerruptor (and trigger)  - in yellow are the signals of the laseronPin. The yellow signals consists of changing sequences of the single signals...But why are the yellow bars not inside the time period of one rotation (the red marks)? This would be needed as signals for each mirror..
I think the difference in periods between the TACH (or was it the photointerruptor output? they have VERY different timing!) and the  laserOnPin signal is probably because the laserOnPin has arbitrary timing set by byte timePixel = 20; . I'm actually quite surprised they are this close to each other. Perhaps 20mks makes the second laserOnPin signal come later than the program gets interrupted again, so the second one never actually happens? Also, I'm not sure what time scale was it on the osc. plot - could it be that all four are just squished together?

I made the motor slower by using the tone function:
pwm=40;
tone(pwmPin,pwm);
That's exactly the idea for RPM control, we just have to devise a good way to adjust the pwm value in a way that does not require too many calculations - there's no time we can spare for those because the interrupts are coming very very fast.


I made a small test-code (should generate 2 dots with the first mirror):
byte pwmPin = 9;
byte ledPin = 13;
byte laserOnPin = 8;
int pwm;
byte timePixel = 20;

void setup() {
  attachInterrupt(0, calcRPM, FALLING);
  pinMode(pwmPin, OUTPUT);
  pinMode(ledPin, OUTPUT);
  pinMode(laserOnPin, OUTPUT);
  pwm=40;
  tone(pwmPin,pwm);
}

void loop() {}

void calcRPM(){
    digitalWrite(laserOnPin, HIGH );
    delayMicroseconds(timePixel);
    digitalWrite(laserOnPin, LOW );
    delayMicroseconds(timePixel);
    digitalWrite(laserOnPin, HIGH );
    delayMicroseconds(timePixel);
    digitalWrite(laserOnPin, LOW);
}
You see the result in the second picture. There are now 4 signals - but only 2 are set. Is it a  Bounce effect?
(Eventually a photointerruptor for each mirror - and a second one for the position of the first mirror might be an easy way for the synchronisation)

What di you think?
We definitely only need 1 photointerruptor and should be fine with just one slot. Perhaps it might be easier to have 8 slots at the beginning of each mirror's sector but we should also be able to just divide the time of one rotation by 8 and thus know where each of 8 mirrors is.

Photointerruptors don't have bouncing (up and down) although they do need time to react (less than 1 microsecond, I believe)

I had very little time to work on the project lately but should be able to get back on track during this week. I'll keep you posted.

Georg

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +0/-0
  • I have a soldering iron and I'm not afraid to use it!
    • View Profile
Re: Laser Scanning Display Project
« Reply #20 on: May 06, 2013, 04:43:30 PM »
Quote
the TACH (or was it the photointerruptor output?
- on the first picture the red signal is the photointerruptor.
The problem with the timing is that each mirror should start at exact rotationtime/8. but in one slot we have different sequences and number of signals. So probably we need 2 timers: one for timepixel and the otherone for the start for each mirror.
You can see the time scale in the middle of the screen (M:20ms for pic1 and M:100us for pic2).

Quote
could it be that all four are just squished together?
yes - attached you see the picture from your code (scale m:200us) the length of the sequence is aprx. 900us. The length of one rotation is about 125ms. you can see the sequence here -

In pic2 of last reply it is strange that the 2 signals in the code generate 4 signals! Sometimes just 2 signals come up, but most of the time 4 signals appear. I changed already timePixel value, the timegap between signal 2 and 3 seemed to be always the same..
« Last Edit: May 06, 2013, 04:48:45 PM by Georg »

Georg

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +0/-0
  • I have a soldering iron and I'm not afraid to use it!
    • View Profile
Re: Laser Scanning Display Project
« Reply #21 on: May 08, 2013, 06:03:34 AM »
I have another issue. I changed the bareboard. Now it does not work anymore?! You can hear the noise of the motor, it turns a while but becomes slower and slower until the motor stops...

I made the circuit 3 times again (without looking at the last circuit and using new parts) - but always the same effect! the osci shows no sinus line for the motor (so it can not work!) - only a line with peaks when the enable signal comes. I also measured the motor - between L1,L2,L3 3.5 Ohm and all to base and 2.3Ohm to base - so ok.
Do I use the right parts?
2n3906 -> 2N2907
2n3904 -> 2N2219
LM741 -> LT1006
IRF654B -> TIP 120
Do you see a wrong part?
Quite strange, because it did already work!!

ElectroNick

  • The forum moderator
  • Administrator
  • Full Member
  • *****
  • Posts: 154
  • Karma: +3/-0
  • The soldering iron is ON!
    • View Profile
    • Electronics Blog
Re: Laser Scanning Display Project
« Reply #22 on: May 08, 2013, 12:20:04 PM »
I have another issue. I changed the bareboard. Now it does not work anymore?!
...
IRF654B -> TIP 120
Do you see a wrong part?
Quite strange, because it did already work!!
TIP120 is a different type of a transistor. It's a Darlington whereas the IRF needed for the circuit is a MOSFET (N-channel MOSFET). It can still work but will run much hotter and perhaps will need a heatsink for long operation. Voltage drop across MOSFET is less and so less energy is wasted to heat by the transistor itself. If you don't have power MOSFETs, I would definitely advise getting yourself some. They are not very expensive (less than $1 on eBay from China that is) and they are very often used in various high power circuits because they are able to commutate insane amount of current. The one I'm using is rated for 50V and 110A(!)

I worked on the project some more last night. Nothing good to report yet. I've tried different approaches to the timing of the laser flashes and I think I've exhausted software options by now. Have to take a hard look at the laser driver. It just does not seem to come up to full power in the 10-20µs that we have for individual flashes representing one pixel. So, the end result is that I can see some output and it does look like the pixels are in order but they are not in the order I wanted them to be. The picture that it projects appears somewhat stable but it looks nothing like the word "TEST" that I've programmed. I can only see anything if I shut all the lights and the picture is very faint, very hard to make sense of it. So, I need to make sure the brightness is much higher before I can successfully troubleshoot the problems with the pixel ordering.

By the way, I think I never fully outlined the specs I'm going for:
I'm trying for 1 line, 24 symbols, 8x8 matrix for each symbol. So, this display should eventually become something like a 192x8 matrix.
I'm making my calculations based on 1,200RPM - 50ms per rotation.
That leaves us with 50ms/8 = 6250µs per one mirror. That is the full time if the mirror is scanning its full 360°/8 = 45°. However, that's a very wide scan. I think all we have is about 10° max. Otherwise the characters will be way too wide to be recognizable.
So, we now have 6250µs/4.5 = 1388.9µs to illuminate one mirror
Since each mirror represents one line, each pixel then is 1389µs/192 = 7.23µs

7.23µs is way too fast for several reasons. For one, the laser has to be insanely bright for the eye to register such short burst of light. My only hope is that when the picture is more of less static, several of these 7.23µs flashes will overlap to create a longer lasting impression in the eye, long enough to actually see it. Anyway, since my test word is only 4 characters, not 24, I have 6 times more time for the pixels but at ~40µs they are still very very faint. Perhaps 24 characters is way more ambitious than the physics/biology would allow.

Another important reason 7.23µs is too fast is that Arduino itself is just not that fast. I believe microsecond functions  (delayMicroseconds, micros) are only accurate to 4µs and we need to do way more than a couple operations between individual flashes.

So, there's quite a bit of work left yet. I'll keep you posted!

Georg

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +0/-0
  • I have a soldering iron and I'm not afraid to use it!
    • View Profile
Re: Laser Scanning Display Project
« Reply #23 on: May 09, 2013, 06:15:48 AM »
thanks for the info about the TIP120 - I will order some N-channel MOSFET.

a remark to your calculation: if the projectionwall is 2m from the laser, then 2m*2*3.14/360°= 34.9mm/1° - that means at 10° we have 349mm text length for 192 dots. So the distance between the dots 1.8mm.
Compared to distance between the lines 0.25° mirror angle =>0.25°*2m*2*3.14/360°=8.5mm !!
That does not fit! If we go in between and say the distance between the dots horizontal and vertical is 5mm:
-> angle between the mirrors: 5mm/34.9mm=0.143° for the mirrors
-> and text length = 192dots*5mm=960mm -> 960mm/34.9mm=27.5°

Based on that we have 6250us/mirror for 45° we can go for 27.5° = 27.5/45*6250us=3819us -> 3819/192=19.8us
(that it would mean 2 dots after the other gives in reality a line ... not 2 dots, otherwise the signal for the laser must be less than 19.8us)

BTW I played around (at that time when the HDD-motor was working) with a laser from a laserpointer and one mirror on the HDD motor. I do not know the rpm - estimation is 600rpm with my test-code (4 signals each 20us long with 20us pause). The dots of the laser were separately visible on the wall. but the dots were flickering.

That is a little bit better - but not changing the game!!!
Can we go for less than 1200rpm?
How do the other guys solve it with the arduino??
« Last Edit: May 09, 2013, 06:17:25 AM by Georg »

ElectroNick

  • The forum moderator
  • Administrator
  • Full Member
  • *****
  • Posts: 154
  • Karma: +3/-0
  • The soldering iron is ON!
    • View Profile
    • Electronics Blog
Re: Laser Scanning Display Project
« Reply #24 on: May 10, 2013, 12:39:58 AM »
OK, I worked on the project some more and have some good and some bad news. The good is that 0.25° angular difference between the mirrors seems to work well. I have the wall at about 2.5m (~8') and the laser beam spreads out just enough to make the dots on the wall almost touch each other but still look like distinctive dots - I could almost see the picture except of course I realized I have it upside down and some mirrors have not glued well.

The sensitivity of the mirrors to the thickness of the glue and other factors is rather alarming. I had to re-mount 2 of the 8 mirrors because before the epoxy cured, they moved slightly. The movement is very small and is absolutely imperceptible by a naked eye but leads to the dot lines overlapping or even in wrong order.  I think that this project could really use some adjustable mirror holder - even though I broke the two bad mirrors off and used laser to guide them when putting back, I am still not sure how it will come out because they can move under their own (tiny) weight while epoxy is not very hard.

So, the end result of today's work is that 0.25° seems a good difference between mirrors but the bad news is that 0.25° difference is so small that it's very hard to get uniformly (or even properly) distributed lines. 

Perhaps the problem with mirrors was because of the epoxy I used. It is very strong and does not warp, so the mirrors are perfectly flat when it cures. But it goes on thick and therefore gives the mirrors (I used pieces of split DVD again) some room to move while is' not fully set. When I used liquid super glue (cyanoacrylate), it goes on in a thin layer but it must be dissolving the polycarbonate plastic of the disk because the mirrors warp.  We need some kind of a glue that holds well, goes on very thin and does not dissolve the plastic or deforms it. Can you think of any glue like that?

I've tried it at 1200RPM today and the dots on the wall were pretty clearly defined. The picture itself was wrong, like I said, but the individual dots were fine, and I think we can stick with 1200RPM as the desired rotation speed. The flash time was at about 10µs - it's very fast but I could just about make out something with the lights on. To be able to actually read something with the laser flashing at 10µs, the lights in the room would have to be off. So, the slower it turns, the longer we can make the flash, the brighter the picture will be. But at the same time the slower it turns the more it flickers. So, again, 1200RPM looks like a good balance of brightness/flickering.

Georg

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +0/-0
  • I have a soldering iron and I'm not afraid to use it!
    • View Profile
Re: Laser Scanning Display Project
« Reply #25 on: May 10, 2013, 02:14:01 AM »
Is my calculation wrong? the distance from line to line should be 0.25°/360°*2500mm*2*3.14=10.9mm (0.42 inch)? Was that the distance for the lines? Or is my calculation wrong?
Glue for the mirrors. good question, I also would use epoxy. The other guys seem to use hot glue. But it is not clear for me, how they position the mirrors.  I still follow the idea to make a ring out of Aluminium and polish the mirror areas. I think that weight will be no problem. I will order the ring, as soon as my HDD-motor does work!!

ElectroNick

  • The forum moderator
  • Administrator
  • Full Member
  • *****
  • Posts: 154
  • Karma: +3/-0
  • The soldering iron is ON!
    • View Profile
    • Electronics Blog
Re: Laser Scanning Display Project
« Reply #26 on: May 10, 2013, 10:22:20 AM »
Is my calculation wrong? the distance from line to line should be 0.25°/360°*2500mm*2*3.14=10.9mm (0.42 inch)? Was that the distance for the lines? Or is my calculation wrong?
Your calculations look fine to me, and the (ideal) distance is probably just about 10mm. I have a laser diode housing with focusable lens, so I can adjust the focus in such a way that I can make the laser dot smaller of larger so it sort of covers the distance between the lines and make the dots appear to be closer to each other.

However, the problem is: the 0.25° difference is so darn small that I am having serious issues with the mirrors. I checked the mirrors this morning, when epoxy settled, and whatever I did last night did not fix the positioning errors. I now have 8 mirrors that only project 5 lines because three of them overlap others. It is a huge setback for me because it will take me 3 more weeks to get another holder made and sent from Shapeways.  And I'm not even sure I'll be able to mount mirrors perfectly next time either.

I can still work on better RPM control and timing but it will be a while until I can see a usable output.

Georg

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +0/-0
  • I have a soldering iron and I'm not afraid to use it!
    • View Profile
Re: Laser Scanning Display Project
« Reply #27 on: May 10, 2013, 03:32:49 PM »
I will make a ring for the HDD-motor with polished mirror areas from Aluminium. The ring can be fixed with the screws from the HD.  I can make 2 parts and send you one. Are you interested?
« Last Edit: May 10, 2013, 03:53:10 PM by Georg »

ElectroNick

  • The forum moderator
  • Administrator
  • Full Member
  • *****
  • Posts: 154
  • Karma: +3/-0
  • The soldering iron is ON!
    • View Profile
    • Electronics Blog
Re: Laser Scanning Display Project
« Reply #28 on: May 10, 2013, 04:07:45 PM »
I will make a ring for the HDD-motor with polished mirror areas from Aluminium. The ring can be fixed with the screws from the HD.  I can make 2 parts and send you one. Are you interested?
Hi Georg, thank you for the offer! Sure, I am interested in a metal holder! My initial thinking was that a lighter plastic one will make disbalance less of the issue but I underestimated the issue of accuracy of plastic shapes. In this project we're talking about such tight tolerances that the plastic parts and the plastic mirrors seem a bit too unpredictable.

The photointerruptor needs a slot or a hole for the light to pass through and trip it once per every revolution. Can you make the ring to sit above the motor spindle so a simple plastic disk with the slot can be mounted underneath the mirror ring?

Thanks!

Georg

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +0/-0
  • I have a soldering iron and I'm not afraid to use it!
    • View Profile
Re: Laser Scanning Display Project
« Reply #29 on: May 10, 2013, 06:12:06 PM »
we can use the section with diameter 40 to adapt a pastic disk for the photointerruptor. Is that ok?
Fit the diameter 32 hole for your spindle?
I want to mount the ring directly on the spindle (you can see the spindle in the picture).
Maybe the CNY70 Vishay is a simple sensor for the rotation. We have only to mark a black line on the disk and the CNY70 will see it (it is not tested, but my expectation!).

 

Related Topics

  Subject / Started by Replies Last post
5 Replies
11663 Views
Last post December 08, 2012, 02:05:19 PM
by smeezekitty
0 Replies
8193 Views
Last post November 02, 2011, 11:49:06 PM
by ElectroNick
0 Replies
11662 Views
Last post May 19, 2012, 09:04:54 PM
by ElectroNick
2 Replies
11614 Views
Last post December 14, 2012, 04:14:52 PM
by ElectroNick
14 Replies
13758 Views
Last post February 25, 2013, 12:24:16 PM
by ElectroNick