Did I fry my pins?

diagram-20240430
I used this setup with a HW-493, and and external 5V power supply. The ground was connected, on my UNO R3.
Running a slight variation on Blink.ino :

int laser = 2;

void setup() {
  // initialize digital pin laser as an output.
  pinMode(laser, OUTPUT);
}

void loop() {
  digitalWrite(laser, HIGH);  // turn the laser on (HIGH is the voltage level)
  delay(1000);                      // wait for a second
  digitalWrite(laser, LOW);   // turn the laser off by making the voltage LOW
  delay(1000);                      // wait for a second
}

I think I fried pin 2 (and 3, which I also tried it on), but I'm asking here to

  1. be certain
  2. get some advice on how to avoid this

Unlikely if there was a 22k resistor between the base of the transistor and your output pin, and all GNDs were indeed connected.

If the 'Laser' is a bare laser diode, it is likely you fried that. And/or the transistor.

Can you tell us a little more about what the 'Laser' is and which transistor you used, and show a picture of the circuit as built? Preferably also a schematic of the entire system, not just the few components around the 'Laser'.


This is the entire circuit pretty much.
" The device includes a built-in 91 ohm current limiting resistor and draws about 30mA. ", some specs I found for this diode.

Is the LASER constantly on and you can't turn it off?
What is the part number of the transistor?

Yes, BC547

If you disconnect the violet colored wire from the Arduino and connect it to ground, does it go off?

UPDATE: It seems they are not fried. I was not running the code I thought I was, but the project I was working on. There, pin 2 & 3 were assigned to servos, which caused the problem

That 22kΩ resistor is going to limit the base current to about 200µA (0.2mA).

You could reduce the value of that resistor to say 1kΩ to give you more base current, to ensure that the transistor is fully conducting.

So everything OK?

Yes, and it works now. Thanks for the assistance!

I suggest you reduce the resistor to 1K, it will work bettor.

Handy hint,
If you add the following to setup( ), then it will print out on the serial monitor the name of the file that you are using, and the date and time it was compiled:

Serial.begin(9600);  
Serial.println( F(__FILE__) );  
Serial.println( F(__DATE__) );  
Serial.println( F(__TIME__) );

That way , you can tell whether you are using the right code.

1 Like

Thanks! I'll use this in the future

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.