Frat Boy wrote: > I basically want to turn on an LED when a voltage goes from 1.80 to > 1.86. Being able to shift the range would be nice to. I just want to > know the easiest way possible. I'm really new to all this... > > What i'm doing is this: my fraternity is building a 5 story beer bong > controlled by a solenoid valve. I want to build maybe twenty cheap, > simple little devices that I attatch to points in the clear tube. When > beer goes past that point I want an LED to light up. I took a high > output red LED and aimed it into one end of the tube. On the other end > i places a photoresistor. When the beer goes through the voltage goes > up from about 1.80 to 1.86 I was surprised the voltage went up - i was > planning on it going down...by a lot. You need to spend more time with electronics and less with the beer (I'm assuming you're an EE major). First, go back and review photoresistors. Note that they change *resistance* as the incident light changes. Usually more light decreases the resistance. These things are cheap and can be quite sensitive. Now, note that since the basic sense element works on changing resistance, it doesn't inherently produce a rising or falling voltage when light is decreased. So, for homework: 1 - Show a simple circuit using an LDR (light dependent resistor) where the output voltage increases as light increases. Assume a 5V supply is available. 2 - Same as #1 except make voltage decrease as light increases. 3 - For extra credit, show a circuit that produces two voltages. One is dependent on incident light as in #1 or #2 above, and the other is a reference voltage for a particular light level. The reference voltage will still correspond to the same light level even if the power supply voltage is varied a few volts in either direction. Hint: You might want to familiarize yourself with "bridge" circuits before trying this problem. When you've completed this assignment, come back and we'll talk about the next step. There's a lot to learn from doing this project right, so don't waste the opportunity. > But i'm using cheap frat beer > (Old German, Boh Ice) and it's the color of piss...totally translucent. Since beer appears yellow or brownish, it must absorb more blue than red light. The light detection scheme would probably work better with a shorter wavelength than what a red LED provides. Try a green LED, or maybe even a blue LED if you can get hold of one. However, I sortof remember (perhap incorrectly) that CdS photoresitor sensitivity falls off over the visible spectrum from red to blue. But, these things are quite sensitive to start with, so using a shorter wavelength is probably still a win. You will have to expriment here. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads