Best way to Connect Phototransistor using 1 pin to propeller
Igor_Rast
Posts: 357
Hi there .
I was wondering ,
whats the best way to connect (schematic) the phototransistor to the propeller , and be able to get the difference in lights on or lights off in a room ,
so i wanna be able to detect if its dark in the room , or if there are any lights on , (on/off)
and only 1 pin available , maybe some other parts ( transistor , opamp ) included but 1 pin cause the other pins are ocupied
been reading some , but cant realy get a usefull schematic that the prop can read .
hope to get some help here
any advice ?
I was wondering ,
whats the best way to connect (schematic) the phototransistor to the propeller , and be able to get the difference in lights on or lights off in a room ,
so i wanna be able to detect if its dark in the room , or if there are any lights on , (on/off)
and only 1 pin available , maybe some other parts ( transistor , opamp ) included but 1 pin cause the other pins are ocupied
been reading some , but cant realy get a usefull schematic that the prop can read .
hope to get some help here
any advice ?
Comments
im gonna take a look
does a long wire say 3-5 meter have a bad working on the thing making it respond bad ?
The phototransistor ,a resistor maybe also a variable resistor (fine tunning), a transistor that wil be used as a switch . And some ic to use as buffer for the logic 1 or 0. (Some ic = opamp /inverter orso).
Found some schematics but can't get a good working example .
A schematic tha sends back a good result independed of what wire lengt is used is what the goal is
Hope I can get some useful schematics
Almost any comparator or op amp would do what you want, but we need to know what part you are using to provide a circuit.
did write the wrong name before , have changed it now
thanks
anyway
the variable resistor sould be on the sensor side , and not on the propside., so ill have to do something else with it ,
but it a good start so thanks for the schematic.
The higher current or brighter LEDs work best but they all do this.
Duane J
It depends on the room, and other light sources.
Simple black-out on/off can use almost any sensor with a high value load resistor.
Where it gets tricky, is if other light sources (like windows) can illuminate the room, and the type of .light bulb.
This can give highly variable light levels, and you need to sense the 'lights on or lights off " with other light.
So a simple Digital threshold design, may not be up to practical use.
CFL/LED lamps may allow you to use a mains-frequency filter, to better decide on internal/external light.
( There is some light modulation even on incandescent bulbs, so that may be enough )
For wide dynamic range, devices like this Light to Frequency Converter are great
https://www.sparkfun.com/products/9768
'No need to point to Sparkfun. Parallax carries these, too (in two different sensitivity ranges):
-Phil