// (c) Michael Schoeffler 2014, http://www.mschoeffler.de
const int pinLaser = 2; // output signal pin of laser module/laser pointer
const int pinReceiver = 3; // input signal pin of receiver/detector (the used module does only return a digital state)
void setup() {
pinMode(pinLaser, OUTPUT); // set the laser pin to output mode
pinMode(pinReceiver, INPUT); // set the laser pin to output mode
digitalWrite(pinLaser, HIGH); // emit red laser
Serial.begin(9600); // Setup serial connection for print out to console
}
void loop() {
int value = digitalRead(pinReceiver); // receiver/detector send either LOW or HIGH (no analog values!)
Serial.println(value); // send value to console
delay(1000); // wait for 1000ms
for some reason, the receiver always gets burned ( the first one we saw it smoking, the second one I disconnected immediately but it was almost to late... )
the receiver is getting 4.8 volt, is also mounted as it has to,
please can somebody help us, my kid wants to replace his broken synthetiser ( keyboard ) by a bunch of lazer rays...
If the receiver is heating like that when correctly connected to the supply its faulty/broken, or more likely the pcb labelling is in error so you've connected the supply backwards in good faith.
Can you post a picture of your project, in particular the receiver?
Is the receiver getting hot when the laser is not shining on it?
Can you post a link to spec/data of the receiver please?
The hypothesis of Post #5, that the phototransistor is socketed incorrectly, seems the most likely explaination.
It would be helpful to see a photo of the bottom of the receiver board showing the printed circuit board traces.
If you have an Ohm meter with a diode (or low resistance) setting, measure resistance between all pin combinations of the phototransistor. You should find that one pin (base) conducts to two other pins (emitter & collector). The only way this thing smokes is if power and ground are connected through that path.
It's troubling that the board is marked for a D18S20 temperature sensor which typically has connections to all three pins (power, ground, data with pullup resistor to power) and is being used with a phototransistor which, if the base pin is brought out, should be a no connection.
Suffice to say that if something is burning, then something is connected wrongly. No other option.
We need a link to the Aliexpress page for the "sensor" so we can see the view of the PCB pattern. I think the OP should provide this rather than expecting me to search for it.
Paul__B:
Suffice to say that if something is burning, then something is connected wrongly. No other option.
We need a link to the Aliexpress page for the "sensor" so we can see the view of the PCB pattern. I think the OP should provide this rather than expecting me to search for it.
thank yo Paul__B for your request, here's the link in aliexpress,
The sensor which plugs into the sensor card has a tiny dot on one side and is sort of opaque on the other side. The small dot which can be felt and seen under good lighting is the sensor. Facing the sensor left to right it is GND - OUT - VCC. There isn't much to them and yes, the only way to smoke one is likely placing the actual sensor in wrong.
The 5.0 mW transmitter should draw about 25 mA max current. Using these in the past while they claim 3.2 to 5.0 volts I have found using them at 5.0 volts they have a short life expectancy. I have had good results just putting a 39 Ohm resistor in series with them.
Ron_Blain:
Facing the sensor left to right it is GND - OUT - VCC.
So note here that the socket next to the "DS" marking is VCC and that next to "20" is ground.
As you will see from the video, the sensor mounts so that the projecting lens faces toward the middle of the PCB, not outward. If you insert it the other way, facing outward, you must expect burning,
It's troubling that the board is marked for a D18S20 temperature sensor which typically has connections to all three pins (power, ground, data with pullup resistor to power) and is being used with a phototransistor which, if the base pin is brought out, should be a no connection.