Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
LinkBack Thread Tools Display Modes
Old 28th November 2007, 11:11 PM   (permalink)
Default

Quote:
Originally Posted by ClydeCrashKop
If you use an LM339 comparator with a pot giving a 4.5 volt reference to the - pin, it will turn on when the input on the + pin rises to 4.5 volts. This is open collector out put so you need a pull up resistor. If you swap the inputs, you get inverted output that you can use to ground the LED at 4.5 volts so no pull up is required.
There are 4 comparators on that chip. Ground all unused inputs. With 4 different reference voltages you could use it to make a bar graph of 1 input.

iv went over what you have said and come up with a schematic for my application, i have swapped the pins over so i dont have to use a pullup resistor, is this schematic correct???

i have not purchased the LM339 yet to test this as im not sure if this schematic is right?
Attached Images
File Type: png LM339.PNG (13.8 KB, 22 views)
shaneshane1 is offline  
Old 29th November 2007, 12:43 AM   (permalink)
Default

Looks good, except for the LED details. See below. You should also connect a 0.1uF ceramic capacitor from +V to ground to prevent oscillation. You can also use LM393, which is the same comparator, but there are only two of them, in a 8 pin package.
Attached Images
File Type: png LM339mod.PNG (14.3 KB, 15 views)
__________________
Ron (aka Rube)

Roff is offline  
Old 29th November 2007, 01:22 AM   (permalink)
Default

so is the output a 0 or a 1????????

and whats the best way to get the input from 7 down to 4.5 for my input,eg: resistors...,im just a little unsure how to go about it, because iv never had to do it.
shaneshane1 is offline  
Old 29th November 2007, 01:47 AM   (permalink)
Default

Quote:
Originally Posted by shaneshane1
so is the output a 0 or a 1????????

and whats the best way to get the input from 7 down to 4.5 for my input,eg: resistors...,im just a little unsure how to go about it, because iv never had to do it.
The output of the comparator will go from off Open circuit) to on (zero volts) when the cap voltage exceeds 4.5V, or whatever voltage you set the noninverting (+) input to. Look at it like this: When the - input is higher than the + input, the output will go low, and vice-versa.
Use a resistor divider to get 4.5V from 7V. The resistor to ground will have 4.5V across it, and the resistor to +7V will have (7 - 4.5) 2.5V across it. So, the resistors have to be in the ratio of 4.5 to 2.5, which equals 1.8 to 1. I would use 180k from the + input to ground, and 100k from the + input to +7V.
__________________
Ron (aka Rube)

Roff is offline  
Old 29th November 2007, 02:07 AM   (permalink)
Default

thank's for the help i really appreciate it, one last question before i go and buy the LM339, does the current coming out of the voltage divider need to be around a certain current (mA) to work properly on the input or is it just reliant on the volts???
shaneshane1 is offline  
Old 29th November 2007, 02:30 AM   (permalink)
Default

Quote:
Originally Posted by shaneshane1
thank's for the help i really appreciate it, one last question before i go and buy the LM339, does the current coming out of the voltage divider need to be around a certain current (mA) to work properly on the input or is it just reliant on the volts???
The inputs of the voltage comparator takes practically very little current(nA ranges) and can in most cases be ignored completely.

You can also consider buying the LM393 which is a 8-pin device having exactly the same type of comparators as LM339(two instead of four) inside.
__________________
L.Chung
eblc1388 is offline  
Old 29th November 2007, 02:31 AM   (permalink)
Default

Quote:
Originally Posted by shaneshane1
thank's for the help i really appreciate it, one last question before i go and buy the LM339, does the current coming out of the voltage divider need to be around a certain current (mA) to work properly on the input or is it just reliant on the volts???
The LM339 input current is very low (less than a quarter of a microamp max), so if you use the resistor values I mentioned, the error due to bias current will be less than 16 millivolts. This is 1/10 the error you could get if you use 5% tolerance resistors, which I wouldn't worry about. If you don't have 100k and 180k, you can use almost any other two resistors with approximately that ratio. I would keep the lowest value greater than 1kohms, just to avoid wasting current (and draining your battery?).
Your biggest source of possible error is the tolerance of your 470uF capacitor.
It is good that you are aware of the possible consequences of using resistors whose values are too high.
__________________
Ron (aka Rube)

Roff is offline  
Old 29th November 2007, 05:24 AM   (permalink)
Default

i went and bought the LM339 and set it all up and it works great But i didnt take into account that when the power is off the capacitor takes forever to discharge, is there some way i can have the cap discharge fast when the power gets turned off?
shaneshane1 is offline  
Old 29th November 2007, 05:48 AM   (permalink)
Default

Yes.

You can discharge the capacitor using a diode to connect the positive end of the capacitor to the +ve power supply rail. When you switch the power off, the LM339 supply will falls and when its voltage falls to below capacitor terminal voltage minus one diode drop, the diode will conduct and dump the charge of the capacitor to the LM339 circuit until the whole circuit reaches 0.6V.

This diode is reversed biased when the supply is healthy so plays no part in charging the capacitor and your RC time constant will remain the same.
__________________
L.Chung
eblc1388 is offline  
Old 29th November 2007, 06:54 AM   (permalink)
Default

Quote:
Originally Posted by eblc1388
Yes.

You can discharge the capacitor using a diode to connect the positive end of the capacitor to the +ve power supply rail. When you switch the power off, the LM339 supply will falls and when its voltage falls to below capacitor terminal voltage minus one diode drop, the diode will conduct and dump the charge of the capacitor to the LM339 circuit until the whole circuit reaches 0.6V.

This diode is reversed biased when the supply is healthy so plays no part in charging the capacitor and your RC time constant will remain the same.
Thanks!!! I was expecting a lot more of a difficult answer than that, thats very helpfull, iv tested all different time delays using different formulars and changing resistors to see if they match my time calculations,and they all do.

so thanks to everyone for all the help on this topic, i now know alot more about RC time constant and how to put it to practice.
shaneshane1 is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
Using Oscilloscopes mechie Electronic Theory 9 29th November 2007 10:49 PM
microphone question ulot General Electronics Chat 7 29th January 2005 06:16 PM
Question on 3-phase power Kurupt General Electronics Chat 1 8th January 2005 07:12 AM
Pic Basic Question Tako Kichi Micro Controllers 2 13th November 2003 08:54 PM
PIC Programming question Tako Kichi Micro Controllers 3 14th October 2003 09:02 PM



All times are GMT. The time now is 04:51 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker