Photo interrupter heat up and burns

Hello I’m using the Photo Interrupter - GP1A57HRJ00F that I soldered to SparkFun Photo Interrupter Breakout Board - GP1A57HRJ00F.

When I connect the PWR, GND and SIG to my ESP-WROVER-KIT it heats up, one of the sensor even burned as I saw smoke coming out of it…

I connected :

  • PWR to the 5V pin of the board

  • GND to the GND pin of the board and

  • SIG to GPIO34 which is supposed to be an input.

I tried to verify if there was a short somewhere but I couldn’t find none. I tried with another sensor and it was the same happening. Is it possible the pin draws too much current from the SIG pin of the breakout board?

Here is the code:

int photoelectricPin = 34;  // LED connected to digital pin 13
int val = 0;      // variable to store the read value

void setup() {
  Serial.begin(115200);
  pinMode(photoelectricPin, INPUT);  // sets the digital pin 13 as output
}

void loop() {
  val = digitalRead(photoelectricPin);   // read the input pin
  printf("%i",val);
  printf("\n\r");
  delay(500);
}

Is the current-limiting resistor in place? https://www.sparkfun.com/products/9322 recommends 220 or 330 ohm

Otherwise, take a photo of your board/wiring and share it here

Can you supply a photo of the top and bottom of the pcb? Which side of the part is getting hot? (2 or 3 pin side)

Here are pictures I took yesterday of the PCB, I don’t have access to it right now but it was the 3 pins side. And yes I did populate the resistor I put a 220 Ohm one:

You put the photo interrupter on the bottom of the board rather than the top. That’s what is causing your troubles. The other parts can go on either side but the photo interrupter has to go on top.

Indeed, see the photo on the product page https://www.sparkfun.com/products/9322

Capture.PNG

Oh my, you’re right!

Thanks I wouldn’t have noticed.