Photodiode with TTL output

Thread Starter

simonkaps

Joined Mar 17, 2021
5
Hello,

I am hoping that someone will be able to direct me towards the appropriate piece of hardware to purchase.

I am a cognitive neuroscientist, hoping to stimulate a specific area of the brain using Transcranial Magnetic Stimulation. The onset of stimulation needs to be precise (~100ms) and paired with a visual stimulus. We've decided to present a small stimulus on the bottom corner of our computer screen, one to be recognized by a photodiode, and this photodiode needs to send a TTL (something like a Schmitt trigger) to our DAQ box (specifically a Micro1401 from CED).

Trained in cognitive science, I am hesitant to make a purchase as I worry that I will buy a photodiode that does not suit my needs. I am hopeful that someone will be able to point me in the right direction.

Regards,
Simon Kaplan
 

Thread Starter

simonkaps

Joined Mar 17, 2021
5
Of note, I assume I will also need some sort of BNC cable converter - as this is the trigger input on the 1401 DAQ box. I am not sure what this would look like exactly.

Thanks,
Simon
 

Yaakov

Joined Jan 27, 2019
3,520
Hello,

I am hoping that someone will be able to direct me towards the appropriate piece of hardware to purchase.

I am a cognitive neuroscientist, hoping to stimulate a specific area of the brain using Transcranial Magnetic Stimulation. The onset of stimulation needs to be precise (~100ms) and paired with a visual stimulus. We've decided to present a small stimulus on the bottom corner of our computer screen, one to be recognized by a photodiode, and this photodiode needs to send a TTL (something like a Schmitt trigger) to our DAQ box (specifically a Micro1401 from CED).

Trained in cognitive science, I am hesitant to make a purchase as I worry that I will buy a photodiode that does not suit my needs. I am hopeful that someone will be able to point me in the right direction.

Regards,
Simon Kaplan
This super cheap module ( https://www.electrodragon.com/product/photoresistor-light-sensitive-module/ ) has a digital output based on s set threshold. Attaching the sensor directly to the screen would probably work for you. It will need a power source, and the BNC cable you mentioned but both of those are trivial. If I understand you correctly, you intend to create a signal that the stimulus has been presented by lighting up a specific portion in the corner of the screen. This is intended to trigger the TMS through the DAC and your program. If that’s correct, I think you can make this work and at the price you can buy several to experiment with.

My only question is latency, but the 100ms seems pretty liberal.
 

Yaakov

Joined Jan 27, 2019
3,520
I should add that the module looks like it uses an LDR so it might be slow. You might be able to find a similar module that uses a photodiode which could be faster.

On the other hand, you might also consider using some other interface from the computer to trigger.
 

Tim-MK

Joined Oct 29, 2019
5
photodiode, and this photodiode needs to send a TTL (something like a Schmitt trigger) to our DAQ box (specifically a Micro1401 from CED).
Simon, question I have is what is this “stimulus” that will illuminate your photodiode? And how will any ambient light source not also trigger it? Viewing angle also.....
 

Phil-S

Joined Dec 4, 2015
222
You could try one of the photodiode/op amp packages like the TSL/AMS chips.
Search TSL250 (now obsolete), to give you an idea of the item.
I use quite a lot of them in either visible or infrared.
They are light to voltage converters so you can use them in the analogue mode or with a simple CMOS logic chip (74HC14 Schmitt) for digital.
I use the output from the TSL to monitor an electricity meter Watt-hr LED with no logic chip, straight into an MCU.
On a quick look, Reneas do similar.
The advantage is that the hard work of matching an op amp to photodiode is done for you, the rest is straightforward.
Ambient light is kept out by taping over with aluminium duct tape.
 

Thread Starter

simonkaps

Joined Mar 17, 2021
5
I should add that the module looks like it uses an LDR so it might be slow. You might be able to find a similar module that uses a photodiode which could be faster.

On the other hand, you might also consider using some other interface from the computer to trigger.
Yaakov,

Thank you for the response. This seems like it would work, however, I am certainly unfamiliar with the process of adjusting a potentiometer re: sensitivity. How does it differ from a photodiode? I am also unsure as to how I would connect a power source, let alone a BNC - are these separate purchases?

You are correct in your later response, that we would simply tape the photodiode to the corner of the screen, and it would just need to register a change from black to white. We could surround the photodiode with tape or some other contraption to prevent ambient light. Latency is not an issue of concern at this stage.

Thank you,
Simon
 

Thread Starter

simonkaps

Joined Mar 17, 2021
5
You could try one of the photodiode/op amp packages like the TSL/AMS chips.
Search TSL250 (now obsolete), to give you an idea of the item.
I use quite a lot of them in either visible or infrared.
They are light to voltage converters so you can use them in the analogue mode or with a simple CMOS logic chip (74HC14 Schmitt) for digital.
I use the output from the TSL to monitor an electricity meter Watt-hr LED with no logic chip, straight into an MCU.
On a quick look, Reneas do similar.
The advantage is that the hard work of matching an op amp to photodiode is done for you, the rest is straightforward.
Ambient light is kept out by taping over with aluminium duct tape.
Thank you for the information. We plan to do something similar to keep out ambient light.

I would very much like to avoid having to match an amp to photodiode, (or anything to anything else, for that matter) as it is likely that I would do so incorrectly.

If you could provide me with a link, that would be incredibly helpful. I am, as you mentioned, looking for something that will convert to a digital output.
 

Thread Starter

simonkaps

Joined Mar 17, 2021
5
Simon, question I have is what is this “stimulus” that will illuminate your photodiode? And how will any ambient light source not also trigger it? Viewing angle also.....
Thanks for your reply. The "stimulus" in question will simply be an illumination of the corner of the screen. For most of the experiment, it will remain completely dark (black) - but we can make it bright (white) easily, as needed to trigger, down the line, our TMS machine. I imagine that a contraption of aluminum foil and tape will shelter this photodiode from ambient light, perhaps at least enough to allow this functionality.
 

Yaakov

Joined Jan 27, 2019
3,520
Yaakov,

Thank you for the response. This seems like it would work, however, I am certainly unfamiliar with the process of adjusting a potentiometer re: sensitivity. How does it differ from a photodiode? I am also unsure as to how I would connect a power source, let alone a BNC - are these separate purchases?

You are correct in your later response, that we would simply tape the photodiode to the corner of the screen, and it would just need to register a change from black to white. We could surround the photodiode with tape or some other contraption to prevent ambient light. Latency is not an issue of concern at this stage.

Thank you,
Simon
Yes, you would need to find a simple BNC terminate cable (should be easy) and supply the module with 3.3 to 5V. A USB power supply would be OK, but use a good one because cheap ones can be referenced to the mains which is... bad. You can take a somewhat beefy USB cable and cut of the micro end. If you strip it back, you will find four wires. The red (+) and black (-) will give you 5V to power the board.

There are only three pins to be connected: VCC, GND, and D0

1616177022023.png

The red wire from the USB supply goes to VCC, the black wire and the wire connected to the outer shell of the BNC go to GND, and the wire to the pin in the BNC go to DO

The trimmer marked R3 is the sensitivity adjustment, and you will need to experiment with that. There is an LED marked SIG which should let you know when it "sees" something. That might help.

This should work but you'll have to try it to know. If you want, you can desolder the CDS cell (marked SEN) and extend it on a wire for convenience. It has no polarity to be worried about, just don't short it.

I'd get at least 3 of these to account for failures, errors, and sanity checks.
 

w8mif

Joined Jan 25, 2018
1
Hello,

I am hoping that someone will be able to direct me towards the appropriate piece of hardware to purchase.

I am a cognitive neuroscientist, hoping to stimulate a specific area of the brain using Transcranial Magnetic Stimulation. The onset of stimulation needs to be precise (~100ms) and paired with a visual stimulus. We've decided to present a small stimulus on the bottom corner of our computer screen, one to be recognized by a photodiode, and this photodiode needs to send a TTL (something like a Schmitt trigger) to our DAQ box (specifically a Micro1401 from CED).

Trained in cognitive science, I am hesitant to make a purchase as I worry that I will buy a photodiode that does not suit my needs. I am hopeful that someone will be able to point me in the right direction.

Regards,
Simon Kaplan
where are you located? If at a University, check with your local EE department - this would be a trivial assignment for a student! If not, check with your nearest University.

Conversely, as noted by somebody, whatever "signal" you send to the monitor could also trigger whatever response system you have, to let you know a stimulus has been presented.
 

Tim-MK

Joined Oct 29, 2019
5
Thanks for your reply. The "stimulus" in question will simply be an illumination of the corner of the screen. For most of the experiment, it will remain completely dark (black) - but we can make it bright (white) easily, as needed to trigger, down the line, our TMS machine. I imagine that a contraption of aluminum foil and tape will shelter this photodiode from ambient light, perhaps at least enough to allow this functionality.
OK Simon, so the photodiode is attached to/facing the TFT screen and could be near dark as possible and then illuminated for a trigger, here is a suggestion attached that I have just run through a circuit simulator:
Just two components plus 5V power, which I happen to have in my drawer, an OPT101 and 555 IC configured as a window comparator, which drives the BNC 50ohm cable directly (or can it drive the digital I/O on the back of your Micro1401). The potentiometer allow for a window adjustment of the light/dark setting of the TFT display.
 

Attachments

Tim-MK

Joined Oct 29, 2019
5
OK Simon, so the photodiode is attached to/facing the TFT screen and could be near dark as possible and then illuminated for a trigger, here is a suggestion attached that I have just run through a circuit simulator:
Just two components plus 5V power, which I happen to have in my drawer, an OPT101 and 555 IC configured as a window comparator, which drives the BNC 50ohm cable directly (or can it drive the digital I/O on the back of your Micro1401). The potentiometer allows for a window adjustment of the light/dark setting of the TFT display.
It could look like this:
- note: the OPTO detector is on the bottom, facing your screen, USB powered.
(Unzip OPTO_Module for a .obj file)
 

Attachments

Tim-MK

Joined Oct 29, 2019
5
Simon, some other points top be aware of are:
1. Pixel response time (from dark to bright) could be 30-40ms
2. Horizontal flyback time can add noise to the signal.
3. Backlight dimming control can also add variations in light intensity.
My tests show 325Hz 1v peak noise (with 5V full scale) on the monitor of my PC and the OPT101, but the window comparator and suitable feedback can remove this. t i m @ s e k e l . c o . u k for more info.
 
Top