go_away

Author Topic: wth is wrong with my comparators!?  (Read 845 times)

0 Members and 1 Guest are viewing this topic.

Offline random robotsTopic starter

  • Full Member
  • ***
  • Posts: 108
  • Helpful? 3
  • he drives worse than my robot... thats sad
wth is wrong with my comparators!?
« on: August 15, 2010, 03:43:55 PM »
ok so using the lm339 comparators and i have a problem. the led load is always on. the led is connected correctly. ive gone through 6 of these and this is the result every time. have any of you had this ever happen, and/or have a solution? datasheet: http://www.fairchildsemi.com/ds/LM/LM239A.pdf

thanks,
Patrick
« Last Edit: August 15, 2010, 03:46:55 PM by random robots »
this is a signature.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 98
Re: wth is wrong with my comparators!?
« Reply #1 on: August 15, 2010, 05:04:15 PM »
Can you post a schematic of your circuit with the LM339?

Offline msprague

  • Jr. Member
  • **
  • Posts: 35
  • Helpful? 1
Re: wth is wrong with my comparators!?
« Reply #2 on: August 15, 2010, 05:11:39 PM »
The LM339 output is open-collector, so it works by grounding out the minus side of the load.  If you use it to try to switch the positive voltage to the LED, it will not work right.  Could that be your problem?

Offline random robotsTopic starter

  • Full Member
  • ***
  • Posts: 108
  • Helpful? 3
  • he drives worse than my robot... thats sad
Re: wth is wrong with my comparators!?
« Reply #3 on: August 16, 2010, 05:04:08 AM »
the led+resistor goes from supply to the output. this dosent work. that is the problem.

Patrick
this is a signature.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 98
Re: wth is wrong with my comparators!?
« Reply #4 on: August 16, 2010, 07:55:36 AM »
There are many wrong ways the wire LM339s, I've done a few. So without a schematic of how you have them wired, what the input and reference voltages are I can't even guess at what might be wrong.

Offline random robotsTopic starter

  • Full Member
  • ***
  • Posts: 108
  • Helpful? 3
  • he drives worse than my robot... thats sad
Re: wth is wrong with my comparators!?
« Reply #5 on: August 17, 2010, 07:03:41 AM »
schematic: the pot is connected to the positive side and the fixed resistors on negative.
this is a signature.

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: wth is wrong with my comparators!?
« Reply #6 on: August 17, 2010, 08:00:00 AM »
339s can only sink 16ma at best - use a PNP transistor instead of directly driving the LED

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 98
Re: wth is wrong with my comparators!?
« Reply #7 on: August 17, 2010, 10:30:18 AM »
Ok, the schematic picture is a bit blurry and I can see how the LM339 is wired but can not read the resistor values.
Can you list these resistor values and the voltage powering the circuit?
What color is the LED? Different LEDs have different threshold voltages.

In general the schematic looks correct so here is some troubleshooting help:
Make the following measurements with a voltmeter, DVM or DMM.

What is the Voltage on the -input? Comparator reference.
What is the Voltage range of the + input? Turn the pot.
What is the output Voltage when the + input is greater then the -input? Also when the +input is less than the -input?

You could try changing the LED resistor on the output to a 10k Ohm resistor and use your voltmeter to see if the output switches when the +input goes above and below the reference (-input). This will tell you if the LM339's output is too heavily loaded by the LED as Razor suggests.

Do you have a by-pass cap across the power and ground of the LM339?

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: wth is wrong with my comparators!?
« Reply #8 on: August 17, 2010, 06:49:16 PM »
Hi,

schematic:
You're kidding, right?!

If this schematic is how much time you care to spend on your circuit, why would anyone else?
Post a crisp (or at least decipherable) schematic if you truly want help.


the pot is connected to the positive side and the fixed resistors on negative.
Say what?
You mean the non-inverting and the inverting inputs perhaps?
Positive/negative side sounds like the power rails.

A simple comparator circuit is not that hard to get working - it's probably one of the most error tolerant circuits of the entire comparator/op-amp family.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

 


Get Your Ad Here

data_list