From: Shane H. <sha...@pa...> - 2003-11-26 09:33:48
|
I'm no great hardware engineer but I'd use a comparator. Take a look at: http://home.cogeco.ca/~rpaisley4/Comparators.html for example. Basic idea would be that you would feed the -ve input to the comparator with a reference voltage (the threshold that you want to detect). This could be done by a voltage divider. The +ve input would be driven by the line you want to detect the voltage on. If the +ve goes above the reference it switches the output on. If it is below, the output is off. Probably easier to run everything from 5V. Hence comparator supply would be 5 volts and your reference voltage as well. This would mean dividing down the input line with a resistor network so it never exceeded 5 volts. As example - say your input line had a maximum voltage of 20V. Use a resistor network to drop this to a maximum of 5V ie. 1/4. Clearly your thresholds would also be reduced by the same amount. Resistor voltage divider information should be easy to find on the net if you are new to that - or simply ask a few more questions. HTH Shane > -----Original Message----- > From: mis...@li... > [mailto:mis...@li...] On > Behalf Of Kirk Bauer > Sent: Monday, 24 November 2003 2:17 p.m. > To: mis...@li... > Subject: [misterhouse-users] How to watch for a specific > voltage with Weeder Digitial I/O board? > > > Okay, you would think that with my degree in Computer > Engineering I could figure this out for myself, but I'm just > not very good with > electronics. I'm hoping somebody can give me a idea of what > kind of circuit I should build and then I can do the calculations. > > Sure, I could do this with an Analog input card, but not only > are those more expensive, but they have fewer inputs, and it > seems a bit overkill. Plus, I don't have an Analog input card > laying around. > > So, here are the three things I want to monitor: > > Garage door "safety sensors" (light beam to keep it from > shutting on something, as seen at the two terminals on the > garage door opener: > No obstruction: 6.17V, 20mA > Obstructed: 6.52V, 14.5mA > > Garage door opener light (I found that the voltage on the > terminal going > to the open button changes when the light is turned on, and > I'd like to > monitor this): > Lights off: 17.30V > Lights on: 16.26V > > Door sensor hooked up to alarm system: > Door closed: 2.97V, 2.96mA > Door open: 12.8V, 0mA > > So, I basically have one Weeder Digital I/O board. I have > three voltages I want to monitor. Each has their own ground. > Each has two > positive voltages representing the two states. > > So, how do I turn, for example, 16.26V into a 0V input to the > Weeder board and 17.30V into a 5V input to the Weeder board? > > I"ll accept an answer of 'just buy an Analog input board' if > that is my best option. > > Thanks for any help you can provide. > > -- > Kirk Bauer <ki...@ka...> > http://linux.kaybee.org | www.autorpm.org | www.logwatch.org > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us > help YOU! Click Here: http://sourceforge.net/donate/ > ________________________________________________________ > To unsubscribe from this list, go to: > http://sourceforge.net/mail/?group_id=1365 > > > > |