Voltage to fit Propeller I/Os
EMHmark7
Posts: 93
Hi,
I have a phototransistor in series with a variable 1M Ohm resistor at ground side, so I get the most voltage from the sensor at the point between them.
here are samples of voltages I can get, depending on the resistor:
Dark Switched On by a monitored led
034mV 180mV
045mV 260mV
055mV 160mV
070mV 214mV
016mV 300mV
036mV 700mV
400mV 1.5V
There are possible errors due to breadboard contacts, sensor positionning, the hytech device hiding the ambiant light (namely one dark sox).
Bottom of the line, I can get dark voltage from 034mV to 400mV and lit voltage from 160mV to 1.5V.
I have tried many technique I know (I do not know well electronics) in order to get 2 states that wil be recognized as a 0 and 1 by the Propeller.
I tried several things but without success. The chips I have are for 6V (a comparator with a reference voltage). (My sensor is powered by 3V). I have linked both GND.
I tried a solution found on this forum that uses 3 transistors, 2N3904, 2N3904 and 2N3906.
I tried to feed the base of a 2N2222 transistor. Does not work.
I even tried to put some pullup resistor. Most of the time, my results are about 3V and I cannot get the Low state. Anybody could suggest the most simple way to acheive it? Thanks.
I have a phototransistor in series with a variable 1M Ohm resistor at ground side, so I get the most voltage from the sensor at the point between them.
here are samples of voltages I can get, depending on the resistor:
Dark Switched On by a monitored led
034mV 180mV
045mV 260mV
055mV 160mV
070mV 214mV
016mV 300mV
036mV 700mV
400mV 1.5V
There are possible errors due to breadboard contacts, sensor positionning, the hytech device hiding the ambiant light (namely one dark sox).
Bottom of the line, I can get dark voltage from 034mV to 400mV and lit voltage from 160mV to 1.5V.
I have tried many technique I know (I do not know well electronics) in order to get 2 states that wil be recognized as a 0 and 1 by the Propeller.
I tried several things but without success. The chips I have are for 6V (a comparator with a reference voltage). (My sensor is powered by 3V). I have linked both GND.
I tried a solution found on this forum that uses 3 transistors, 2N3904, 2N3904 and 2N3906.
I tried to feed the base of a 2N2222 transistor. Does not work.
I even tried to put some pullup resistor. Most of the time, my results are about 3V and I cannot get the Low state. Anybody could suggest the most simple way to acheive it? Thanks.
Comments
Anyway, I will try your solution.
1) The first pullup resistor you are talking about is for where?
2) By the way, do you know if there is a 3.3V version of the old 555 chip (for those who do not know, 2 comparator at 1/3 and 2/3 of source plus a latch to make shure we saw any short pulse)?
Thanks for your assistance, your the one I was hoping to see. I need to make this machine work before I take my plane on december 24 because I need that machine in my trip! Time is running faster than me...
There's a CMOS version (LMC555) of the 555 that operates down to 1.5V Vdd. You could certainly wire up a LMC555 to act as a window comparator for your phototransistor (at 1/3Vdd and 2/3Vdd) if you wanted.
Thanks again.
Is it just the moderator that can tag as Solved?
-Phil
Did not know that! That is weird, wild stuff, as JC used to say.
The problem is ,aybe mor of the low light LED I want to monitor so the difference is about less than 200mA, so I put my REF voltage that compares in the middle, so leaving less than 100mA that can vary. Tanks for the link, I'll investigate in the future for improvement.
-Phil
But Erco, The thing was to get higher 1 value without raising too much the 0 value. I think i'ts difficult to divide a tension if there is no juice. Right now I am using a LM339 that pushes the output at the extremes. The sensor gain is at max with a 1M resistor. But I will experiment alternate solutions in the future, because the 0/1 gap is maybe too tight.
@PhiPi: Thanks, and IMO that's the "fudgiest" answer I recall from you recently.
@EMHmark7: C'est si bon, n'est-ce pas? Agreed, there is an optimum series resistor value to get the biggest voltage swing over the desired range of light, which doesn't necessarily yield the right voltage for the uC high/low transition at the desired light level. I forget exactly where I saw it, but the Dagu Mr. General robot (http://www.dagurobot.com/goods.php?id=2 ) uses a big IR emitter/phototransistor array. To increase sensitivity, it uses multiple pairs of phototransistors in parallel, plus a resistor to give a bigger voltage swing.
Edit: found it at http://www.destiny-electronic.com.my/userfiles/file/product/robotic/robot-learning-kit/1073512.pdf
Mmmmmm! Fudgy goodness!
Gahhgrrammmph!
As opposed to the seven documented remaining fruitcakes in circulation which remain untouched, unopened, and endlessly regifted.
If anyone receives a fruitcake in error this Holiday season, feel free to forward it to me. Address provided via PM.
Thank You!
P.S. I like fudge having spent the summers of my youth in Northern Michigan, the land of Fudge!!