Author Topic: How to controll a laser pointer from a microcontroller  (Read 2151 times)

0 Members and 1 Guest are viewing this topic.

Offline ConscriptedTopic starter

  • Robot Overlord
  • ****
  • Posts: 291
  • Helpful? 10
How to controll a laser pointer from a microcontroller
« on: March 29, 2010, 02:46:39 PM »
Good afternoon all,

I'm in the design phase of a new project. I need to connect a laser to a microcontroller and I'm not sure what the best approach is. I intend to use a cheap off the shelf laser. I suspect that the laser may draw to much power to be powered by the microcontroller itself. Anyone have any experience with this?

Thanks
Conscripted

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: How to controll a laser pointer from a microcontroller
« Reply #1 on: March 29, 2010, 02:57:44 PM »
If you use a cheap laser could you not just use the battery that came with it and put a transistor where the switch normally is? Yes, a laser would draw to much current :)
Howdy

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: How to controll a laser pointer from a microcontroller
« Reply #2 on: March 29, 2010, 06:44:17 PM »
Hi,

I need to connect a laser to a microcontroller and I'm not sure what the best approach is. I intend to use a cheap off the shelf laser. I suspect that the laser may draw to much power to be powered by the microcontroller itself. Anyone have any experience with this?
A simple NPN transistor and two resistors will do, if the LASER can live off the same voltage as the controller. If it's a standard 3-cell pointer, a diode like 1N400x inline will drop a 5V line to around 4.35V, which should be just right for a 3-cell.

Do you need a schematic for this?
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline nottoooily

  • Full Member
  • ***
  • Posts: 91
  • Helpful? 3
Re: How to controll a laser pointer from a microcontroller
« Reply #3 on: March 30, 2010, 02:28:49 AM »
Be careful with the super-cheap laser pointers. I've found that the laser itself has about the same operating life as the batteries. Maybe I just got a bad batch, but it could be endemic!

Offline ConscriptedTopic starter

  • Robot Overlord
  • ****
  • Posts: 291
  • Helpful? 10
Re: How to controll a laser pointer from a microcontroller
« Reply #4 on: March 30, 2010, 05:55:30 AM »

Do you need a schematic for this?


A schematic would be great thanks

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: How to controll a laser pointer from a microcontroller
« Reply #5 on: March 30, 2010, 08:46:07 AM »
Replace LED and resistor with laser:

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: How to controll a laser pointer from a microcontroller
« Reply #6 on: March 30, 2010, 06:09:57 PM »
Hi,

Replace LED and R1 with LASER and diode, in case of a 5V supply.
Make R2 somewhere around 3k3 to 4k7.

Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Hawaii00000

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 347
  • Helpful? 2
Re: How to controll a laser pointer from a microcontroller
« Reply #7 on: March 30, 2010, 08:16:19 PM »
I just thought I'd tag this on while we're talking about it. I tried this one with a spare transitor and a cheap laser, but I didn't work completely. It was on constantly (even when it wasn't supposed to be) but it got brighter when power was applied to the transisor. Suggestions?
"God chose to make the world according to very beautiful mathematics."
-Paul Dirac
**************************************************************
Its Hawaii Five-O. Get it?

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: How to controll a laser pointer from a microcontroller
« Reply #8 on: March 30, 2010, 11:05:13 PM »
Hi,

It was on constantly (even when it wasn't supposed to be) but it got brighter when power was applied to the transisor. Suggestions?
You clearly didn't drive the transistor from a CMOS output, so it didn't shut off the transistor fully.
If you just used a switch, a push button or a functional equivalent which didn't drive the base low, put a resistor (say 10k) from the base to the emitter/ground.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline amando96

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 1
Re: How to controll a laser pointer from a microcontroller
« Reply #9 on: April 03, 2010, 11:03:00 AM »
I like using these bad boys:
http://www.datasheetcatalog.org/datasheet/fairchild/4N35.pdf

they are easy to use, and a laser malfunction won't damage your micro!
It's also a good idea to use these with serial port/USB diy projects, your ports will be safe from little errors that could damage them...

Rorcle, 60% complete
AATV, 5% complete

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: How to controll a laser pointer from a microcontroller
« Reply #10 on: April 03, 2010, 11:33:21 AM »
Hi,

they are easy to use, and a laser malfunction won't damage your micro!
It's also a good idea to use these with serial port/USB diy projects, your ports will be safe from little errors that could damage them...
A transistor (in OC configuration) won't backflow a malfunction either. It's a waste of money using opto-couplers here.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: How to controll a laser pointer from a microcontroller
« Reply #11 on: April 06, 2010, 10:26:34 PM »
Not what you wanted to know, but still fun to watch :P

http://www.societyofrobots.com/robotforum/index.php?topic=4887.0

Robotic Cat Toy



 


Get Your Ad Here