Laser Sensor not sending power on the switched leg when laser is hitting the diode

I recently bought a laser transmitter with a laser sensor module. When I wired everything to the arduino board the laser transmitter worked, but the laser sensor module was still registering no voltage by displaying a "0". I used a multimeter to check the voltage of from the positive side of the laser sensor to the out pin and there wasn't any voltage present. However when I physically (using a small flathead) connected the positive leg of the sensor to the switched leg of the sensor then the arduino IDE would register a 1 meaning 5 volts present. I assumed it was a bad sensor, but after trying 8 different ones and also trying multiple modules as well. I'm stumped

This is the code I'm using to program the arduino board:

const int laserSensorPin = 7;

void setup() {
Serial.begin(9600);
pinMode(laserSensorPin, INPUT);
}

void loop() {
int sensorValue = digitalRead(laserSensorPin);
Serial.print("Sensor Value: ");
Serial.println(sensorValue);

if (sensorValue == HIGH) { // Check for HIGH (active high)
Serial.println("Light Detected!");
} else {
Serial.println("No Light!");
}

delay(500);
}

This is the link to the laser transmitter and sensor module that I purchased:

Welcome to the best Arduino forum.

In order to help you, we need to understand your project.

So, post a project schematic.

Redo your topic by placing your code between the tags as recommended by the forum rules.

1 Like

Your code posted doesn't display that.

1 Like

I also didn't see any links to datasheets or any detailed connection information. That's a common problem with 3rd-party Amazon suppliers, eBay, AliExpress, etc. :frowning:

They do give a model number for the transmitter (but no manufacturer) so you can probably track-down the technical information for it.

Places like Adafruit, SparkFun, and DFRobot tend to provide lots of good documentation. (You'll probably have to pay more.) "Legitimate" distributors like DigiKey or Mouser always give you the manufacturer's model/part number and links to the datasheets but they mostly sell components, and not many board assemblies.

P.S.
There's a chance that it's wired and working correctly but picking-up too much light. Try putting it in the dark (in a box, or something) and maybe it will change from 0 to 1.

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