I've been using a 600ohm to 10k resistor in series with the photointerrupter and I keep frying it from overcurrent.
when it gets fried the output rises to 8v from 5v source.
from the datasheet of similar devices like the gp1s39 it seems they output 7-4ma,
so the arduino seems to be drawing too much current at 20m-40ma iirc.
is there an optoisolator that input switches at 2v, 4ma? to protect the photointerrupter or should I use a jfet to handle the increased current.
I need the extra current to drive a 20k each leg voltage divider to increase voltage swing to act as a switch on the i/o pins.
I'd like 0.5 volts of swing, without the divider I get 0.1v.
I tried a pc817 optoisolator but that wouldn't switch at all as the interrupter only outputs 2.5v, and needs a lot of current.
I'd prefer to use an optoisolator so that I could use pullups on the i/o pins to increase stability, and I find them easier to use, as I had to keep changing the resistor types as the photointerrupter slowly burned out..
The photointerrupter is a dual type and one of the issues I ran into was both i/o lines interacting through the voltage divider to ground. they would work fine separately, just not together.
I don't expect anyone to do the project for me but i'd appreciate an example circuit or suitable part.
when it gets fried the output rises to 8v from 5v source.
from the datasheet of similar devices like the gp1s39 it seems they output 7-4ma,
so the arduino seems to be drawing too much current at 20m-40ma iirc.
is there an optoisolator that input switches at 2v, 4ma? to protect the photointerrupter or should I use a jfet to handle the increased current.
I need the extra current to drive a 20k each leg voltage divider to increase voltage swing to act as a switch on the i/o pins.
I'd like 0.5 volts of swing, without the divider I get 0.1v.
I tried a pc817 optoisolator but that wouldn't switch at all as the interrupter only outputs 2.5v, and needs a lot of current.
I'd prefer to use an optoisolator so that I could use pullups on the i/o pins to increase stability, and I find them easier to use, as I had to keep changing the resistor types as the photointerrupter slowly burned out..
The photointerrupter is a dual type and one of the issues I ran into was both i/o lines interacting through the voltage divider to ground. they would work fine separately, just not together.
I don't expect anyone to do the project for me but i'd appreciate an example circuit or suitable part.