If anyone has done this I would like to know what sort of laser works?
It would be nice if a visible light laser would work so that you could see what you are pointing it at. I am thinking of a system with several detectors and only one will respond if the laser is pointed at it.
When the code is broadcast with an IR Led it is detectable all over the place and would trigger several devices at the same time. With a directional (laser) beam the user wouldn't need to remember what code applied to what device.
Red laser diodes typically have a wavelength of around 635nm or 650nm. Figure 10 on the TSOP4838 datasheet indicates that the detector is not sensitive at this frequency. So you will have to use an infrared laser. Look for one with a wavelength between 900 and 1025nm. You could maybe get away with 850nm (which will cost less), but the sensitivity of the detector is lower by a factor of 10 at this wavelength.
@dc42 I infer from your reply that any laser with the correct wavelength should work.
Is there any risk of the laser being too intense and damaging the device?
I wonder is there anything like the TSOP that responds to red light?
If I need an infrared laser to trigger the TSOP I will need a second visible light laser for aiming purposes. Which makes the project a lot less attractive.
@Grumpy_Mike, thanks, I have no intention of buying a powerful laser. Even the low power ones scare me.
I suspected that a visible light TSOP was unlikely. I only discovered the device recently and they are so simple and effective (and cheap) there is no way I would try to build one from discrete parts.
Unfortunately, the TSOP4838 datasheet shows that 650nm is well outside its sensitive range. I found a couple of 905nm laser diodes on the Farnell site which should work with that sensor, but they are much more expensive than 650nm laser diodes.
The CHEAP green (~535nm) LASER pointers, found on eBay and other places, are DPSS (Diode Pumped Solid State). That is a Direct Diode LASER (laser diode), in the I.R. range (~1060nm) pumping a 'frequency doubbler' crystal to produce Green beam at a lower optical power than the I.R. LD. Some of these modules post a power output of <5mW and use up to a 1W I.R. LASER. Also, most of the cheap ones (from China) do NOT have I.R. filtered output and will exhibit fairly high optical power output in the I.R. range.
A 808nm 1W LASER Diode can be picked up via eBay at a very low price.
TSOP4838 will pickup and respond to 808nm. An umcollimated 1W 808nm at one meter will not damage the TSOP. At less distance you MAY see heating, but no appreciable increase in signal discrimination.
Good luck and PLAY SAFE. I.R. can bite ya without you knowing it, until the damage is done.
Robin2:
there is no way I would try to build one from discrete parts.
It's not rocket science, or should I say quantum mechanics. The block diagram of what is inside the chip is in the data sheet and attached for your convenience. You will see that all it is is an amplifier, band pass filter and demodulator. A couple of op amps should do it.
On the other hand how about a visible detector that simply drives an IR LED pointing into the TSOP chip, a bit like a home made opto isolator / frequency shifting repeater. Bind it in tape to stop stray light, a sort of down converter.
Thanks, @Grumpy_Mike, I do appreciate your input. The main reason I'm not going to try discrete parts is because I'm not sufficiently interested to spend all that time when the TSOP only costs about 60p. The other reason is that I barely have space for the TSOP chip and discrete parts would be much larger.
@123Splat, I don't see myself getting involved with dodgy 1W lasers.
I might consider whether I could add an LDR to my project that would detect a regular laser pointer as a second channel of communication to the TSOP. My concern is that an unmodulated laser might trigger the wrong device if the user happened to illuminate it by accident while trying to aim at the desired vehicle. It might be possible to eliminate most of that by requiring the beam to illuminate the LDR for a finite time before the Attiny does anything.
In truth I am losing interest in laser - if there had been a simple solution I might have tried it.
@dc42 - I've been thinking of something along those lines - perhaps mounting the IR led at the back of a tube to constrain its visibility.
I think it would be necessary for the beam to be narrow enough to distinguish between TSOP detectors that are 3cm apart, or definitely 5cm. The problem is that model railway vehicles could be anywhere relative to each other and the system would be useless unless it was rare for the wrong uncoupler to be triggered.
The range would probably be under 3 metres, maybe 4 metres for those with funds for large layouts.
With a non-directional coded IR transmission I don't think range would be a problem because you could have several IR leds at convenient overhead locations.
...R
By the way I just noticed your Hofstadter's law. That's exactly why I won't be making a detector from discrete components.
Robin2:
With a non-directional coded IR transmission I don't think range would be a problem because you could have several IR leds at convenient overhead locations.
The problem with a coded solution is that you either use a PC screen from which the user selects the vehicle to uncouple (which is how I plan to use it) or the user must remember which code relates to which vehicle so s/he can key it into some handheld controller (for those strange people who don't want to use PCs).
If there was a simple way to use a laser pointer the non-pc person could select the vehicle to uncouple just by pointing at it and without needing to know any codes.
The ones I bought are probably the same thing, the important thing is that they were 5v. My ebay history shows that the ones I used are 650nm and 5mW just like these. Now as far as using the sensor, the laser has to hit the sensor directly for it to work. Which is great if you want your hits to be very precise, but that could also be frustrating. I've tried using a table tennis ball to transfer the laser pulses to the sensor to widen the sensor area. the laser will light up the ball, but the sensor doesn't read it. It may be positioning of the Tsop in the ball or it may need some sort of amplifier, I'm not sure. I'm sure this being a cheap laser means it falls outside that 650nm and that's probably why it works with the TSOP.
dc42:
Red laser diodes typically have a wavelength of around 635nm or 650nm. Figure 10 on the TSOP4838 datasheet indicates that the detector is not sensitive at this frequency.
I won't argue with what the datasheet says but I tested a TSSP4038 with a red laser (from a ~$2 laser pointer) and it worked fine at about 15m distance.
Some IR detectors have a small bubble shape at the detector on the chip. This may be a plastic IR filter to help filter out visible light. Carefully removing the filter bubble with fine sand paper or similar might make the detector more sensitive to visible light.
It was a TSSP4038 which is a receiver built by the same manufacturer but it has different rules on the modulation encoding -- it doesn't require any pauses in the signal making setting up a continuous 38KHz stream a lot simpler.
To modulate the laser I created a 555 board and used a transistor to drive it. Nothing fancy, but even a couple years ago AVR parts were a lot more expensive and I was building 10 of them. I tested a red laser, white led, red led, and IR led; all worked fine but the red and white LEDs didn't give much more than a couple meters distance though.