Laser diode problem

Hello everyone,
I have a circuit (as shows in the picture) where the base transistor (PN2222a) leg is plugged into the pin 9 of the Arduino. When I power everything up and send the signal from the Arduino to the transistor base leg the laser diode doesn't light up. In addition, the Arduino is powered through a cable that is plugged into the computer and I am using a LED rocker switch if that helps.

Thanks guys.

There are so many things wrong with that schematic.

I figured there might be. :confused: Do you have an idea why the laser doesn't light up though?

The capacitor that you have shown between the switch and 100Ω resistor will only allow a short pulse of current to flow through the laser diode.

You haven't told us what value it is. Why did you include it?

You aught to have a resistor between the Arduino output and the base of the transistor, to limit the base current of the transistor.

Zbyszek:
I figured there might be. :confused: Do you have an idea why the laser doesn't light up though?

Because the circuit is complete nonsense. :astonished:

It is recommended you either learn how to draw circuits (the symbol with the arrows is meaningless), or show us a perfectly focused picture (preferably as a link in the text, not an attachment) which unambiguously shows what you have assembled.

JohnLincoln:
The capacitor that you have shown between the switch and 100Ω resistor will only allow a short pulse of current to flow through the laser diode.

You haven't told us what value it is. Why did you include it?

You aught to have a resistor between the Arduino output and the base of the transistor, to limit the base current of the transistor.

It is a 5V laser diode and the power the battery is 9V wouldn't that fry my diode if I didn't include the resistor?

I included the capacitor to prevent spikes from damaging the laser diode. It is 220uF.

how does not having the resistor between the base and the arduino affect the whole circuit?

Paul__B:
Because the circuit is complete nonsense. :astonished:

It is recommended you either learn how to draw circuits (the symbol with the arrows is meaningless), or show us a perfectly focused picture (preferably as a link in the text, not an attachment) which unambiguously shows what you have assembled.

Laser diode symbol - https://www.google.co.uk/search?q=laser+diode+symbol&biw=1366&bih=667&tbm=isch&imgil=CTkEjdaiRLOepM%253A%253BX_U2_LmafCmtuM%253Bhttp%25253A%25252F%25252Flaserpointerforums.com%25252Ff44%25252Fsymbol-laser-diode-64064.html&source=iu&pf=m&fir=CTkEjdaiRLOepM%253A%252CX_U2_LmafCmtuM%252C_&usg=__jL8tWe_Oeehbd5mOSRpwGfjqTqE%3D&ved=0CCwQyjdqFQoTCILIweH5y8cCFYxwGgodpJQOOw&ei=OmvgVYLDKozhaaSputgD#imgrc=CTkEjdaiRLOepM%3A&usg=__jL8tWe_Oeehbd5mOSRpwGfjqTqE%3D

LDR - https://www.google.co.uk/search?q=laser+diode+symbol&biw=1366&bih=667&tbm=isch&imgil=CTkEjdaiRLOepM%253A%253BX_U2_LmafCmtuM%253Bhttp%25253A%25252F%25252Flaserpointerforums.com%25252Ff44%25252Fsymbol-laser-diode-64064.html&source=iu&pf=m&fir=CTkEjdaiRLOepM%253A%252CX_U2_LmafCmtuM%252C_&usg=__jL8tWe_Oeehbd5mOSRpwGfjqTqE%3D&ved=0CCwQyjdqFQoTCILIweH5y8cCFYxwGgodpJQOOw&ei=OmvgVYLDKozhaaSputgD#tbm=isch&q=ldr+symbol&imgrc=OKEvLvQLh4hlDM%3A

Capacitor - https://www.google.co.uk/search?q=laser+diode+symbol&biw=1366&bih=667&tbm=isch&imgil=CTkEjdaiRLOepM%253A%253BX_U2_LmafCmtuM%253Bhttp%25253A%25252F%25252Flaserpointerforums.com%25252Ff44%25252Fsymbol-laser-diode-64064.html&source=iu&pf=m&fir=CTkEjdaiRLOepM%253A%252CX_U2_LmafCmtuM%252C_&usg=__jL8tWe_Oeehbd5mOSRpwGfjqTqE%3D&ved=0CCwQyjdqFQoTCILIweH5y8cCFYxwGgodpJQOOw&ei=OmvgVYLDKozhaaSputgD#tbm=isch&q=capacitor+symbol&imgrc=yk2n94A2VJa4GM%3A

Resistor - https://www.google.co.uk/search?q=laser+diode+symbol&biw=1366&bih=667&tbm=isch&imgil=CTkEjdaiRLOepM%253A%253BX_U2_LmafCmtuM%253Bhttp%25253A%25252F%25252Flaserpointerforums.com%25252Ff44%25252Fsymbol-laser-diode-64064.html&source=iu&pf=m&fir=CTkEjdaiRLOepM%253A%252CX_U2_LmafCmtuM%252C_&usg=__jL8tWe_Oeehbd5mOSRpwGfjqTqE%3D&ved=0CCwQyjdqFQoTCILIweH5y8cCFYxwGgodpJQOOw&ei=OmvgVYLDKozhaaSputgD#tbm=isch&q=resistor+symbol&imgrc=GUjnZtawCzkipM%3A

Transistor - laser diode symbol - Google Search

Battery - https://www.google.co.uk/search?q=laser+diode+symbol&biw=1366&bih=667&tbm=isch&imgil=CTkEjdaiRLOepM%253A%253BX_U2_LmafCmtuM%253Bhttp%25253A%25252F%25252Flaserpointerforums.com%25252Ff44%25252Fsymbol-laser-diode-64064.html&source=iu&pf=m&fir=CTkEjdaiRLOepM%253A%252CX_U2_LmafCmtuM%252C_&usg=__jL8tWe_Oeehbd5mOSRpwGfjqTqE%3D&ved=0CCwQyjdqFQoTCILIweH5y8cCFYxwGgodpJQOOw&ei=OmvgVYLDKozhaaSputgD#tbm=isch&q=Battery+symbol&imgrc=V4LQVSy1ibwj3M%3A

now tell me which part you don't understand.

Zbyszek:
It is a 5V laser diode and the power the battery is 9V wouldn't that fry my diode if I didn't include the resistor?

I included the capacitor to prevent spikes from damaging the laser diode. It is 220uF.

how does not having the resistor between the base and the Arduino affect the whole circuit?

The circuit - as you have drawn it - is complete nonsense.

It might be of interest to show us a photo (in adequate lighting) to let us see how closely your actual circuit resembles it.

Other than that, you need to cite (with a Web link) the actual laser that you are using, and what you want to do with it, and we can direct you as to how to connect it.

Oh my! You have replied! :astonished: I will have to see if I can make sense of your links. (However, my comments stand meanwhile!)

OK, you have randomly assembled symbols from Google searches, but it does not represent a circuit. :grinning:

Show us the photo. (See who else contributes - I'm off to bed!)

Paul__B:
The circuit - as you have drawn it - is complete nonsense.

It might be of interest to show us a photo (in adequate lighting) to let us see how closely your actual circuit resembles it.

Other than that, you need to cite (with a Web link) the actual laser that you are using, and what you want to do with it, and we can direct you as to how to connect it.

Oh my! You have replied! :astonished: I will have to see if I can make sense of your links. (However, my comments stand meanwhile!)

The soldering is messy. You don't want to see a photo :smiley:

there you go: http://www.ebay.co.uk/itm/181806759158

Why so surprised? xD

Zbyszek:
The soldering is messy. You don't want to see a photo :smiley:

there you go: http://www.ebay.co.uk/itm/181806759158

Well, as I said, the photo would be the only way to know what you actually did, because your "circuit" sure doesn't!

OK, that laser diode has a resistor on the back labelled "910". That being the case (you can check), while some might dispute this, in practice it may be powered directly by an Arduino pin and will draw about 20 mA. You can even use PWM!

You pay a lot for getting it quickly by mail locally. Exactly the same part is about 15 cents in quantity from China.

Seriously, it's ridiculously late and I am off to bed. :grinning:

As Paul__B said, the circuit is complete nonsense. However, some interpretation is possible.

  1. Battery is connected the wrong way around.
  2. No ground connection to the Arduino, so the transistor won't turn on.
  3. The capacitor is used incorrectly.
  4. It is completely unclear what the connection to A0 is supposed to mean or accomplish. LDRs have two connections, not three.

jremington:
As Paul__B said, the circuit is complete nonsense. However, some interpretation is possible.

Sheer optimism.

Sheer optimism.

"Hope springs ever eternal in the human breast."

Oh. I thought it was the silicone! :grinning:

Hi Zbyszek,

As Paul and others have been saying, your schematic shows a hodge-podge of components hooked together in a nonsensical way. Rather than diagnose what your circuit does (or doesn't do) why not try a simpler approach. Build the basic "blink" example, program your Arduino for that example. Then substitute your laser diode for the LED (be sure to put it in the right way (the darker lead, or the one attached to the outside of the case should go to ground.)

NOTE: your diode looks similar to this one. The spec on the diode says it draws "less than 40ma". An arduino pin can supply 40ma, so an Arduino pin can run the laser just like a very-bright-and-directional LED.

Now run the blink sketch. Your laser should blink on and off. Modify the sketch from there to get it to do what you want. Schematic problem solved.

ChrisTenone:
Then substitute your laser diode for the LED (be sure to put it in the right way (the darker lead, or the one attached to the outside of the case should go to ground.)

You need to sit and think a while. Do you know anything about laser diodes?

ChrisTenone:
NOTE: your diode looks similar to this one. The spec on the diode says it draws "less than 40ma". An Arduino pin can supply 40ma, so an Arduino pin can run the laser just like a very-bright-and-directional LED.

Guess that is what I explained in reply #10. :grinning:

ChrisTenone:
The spec on the diode says it draws "less than 40ma". An arduino pin can supply 40ma, so an Arduino pin can run the laser just like a very-bright-and-directional LED.

Not quite. 40mA is the absolute maximum, but reliable operation is not guaranteed at that level. 20mA is acceptable, but there is also another maximum for the total current carried by multiple pins.

Paul__B:
... Do you know anything about laser diodes? ...

A little, but I've never seen this particular component, with the red and blue wires. I was guessing the red wire coming out of the middle of the device would be the anode. If that's wrong, just swap the wires, right?

And you did imply that earlier, but I said it directly, thus giving the OP a schematic and wiring diagram from the tutorial to follow.

aarg:
Not quite. 40mA is the absolute maximum, but reliable operation is not guaranteed at that level. 20mA is acceptable, but there is also another maximum for the total current carried by multiple pins.

The idea here was to make the device work, not build a robust circuit.

The Arduino should have two sets of connections, one set to the transistor, involving two wires.

And one to the light sensor (again two wires).

Every circuit needs at least two wires. Its a circuit - charge goes round a circuit, its always a
loop. The only exception is an antenna or a connection to earth.

So clearly each of your connections is missing a return wire (usually ground). The power
source would normally be relative to ground too.