Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: aruna1 on September 28, 2009, 06:37:11 PM

Title: opamp or comparator
Post by: aruna1 on September 28, 2009, 06:37:11 PM
hello guys I'm working on a line follower robot and i built following circuit as line sensor.it uses LM324 opamp as a comparator and RED LED as a sensor.
Circuit does what is built to do-identifying difference between black-white surface but it still has little problem.if i touch the circuit while its working it changes its readings.-its like op amp responds to static charge(or something like that) in my body.

So i was thinking if I replace LM324 opamp with LM339 comparator IC will this help to solve the problem?

and is there any quad comparator IC with same pinout as LM324? (LM339 has different pinout so i will have to built circuit all again :( )

thank you
Title: Re: opamp or comparator
Post by: Soeren on September 29, 2009, 09:35:06 AM
Hi,

[...] -its like op amp responds to static charge(or something like that) in my body.

So i was thinking if I replace LM324 opamp with LM339 comparator IC will this help to solve the problem?
Why would an LM339 change the amount of static your body collects?  ;D
Actually, I believe it is rather capacitive coupling to ground or to mains hum.

If you need an op-amp, don't use a comparator and if you need a comparator, don't use an op-amp.
It's a classical mistake, probably happens since the symbol for both are the same, but they are quite different beasts (although in less demanding circuits, sometimes they're semi-interchangeable - but you gotta know when to get decent results).


and is there any quad comparator IC with same pinout as LM324? (LM339 has different pinout so i will have to built circuit all again :( )
Yeah, life is hard, but squeeze it and make Bloody Marys - you'll get a bit more practise in soldering, a skill you need in this hobby (and I bet a bit of exercise won't be a total waste of time).
Then ponder over the fact that it's allways a sour grape to do it the second time (... Then squeeze the grapes and make wine :)


If you want to take the easy route to solving the problem, build it into a box made of iron/mild steel and connect the ground lead to the box.
If you want to solve the problem the right way, redesign the circuit - it shouldn't react to you touching it, unless you touch the leads going to the high impedance inputs and they should never ever have "antennas" (leads sticking out from the circuit).

If you're building on a solderless breadboard, rebuild on a real PCB and your problem will most likely go away.
Title: Re: opamp or comparator
Post by: aruna1 on September 29, 2009, 09:51:24 AM
Hi,

[...] -its like op amp responds to static charge(or something like that) in my body.

So i was thinking if I replace LM324 opamp with LM339 comparator IC will this help to solve the problem?
Why would an LM339 change the amount of static your body collects?  ;D
Actually, I believe it is rather capacitive coupling to ground or to mains hum.

If you need an op-amp, don't use a comparator and if you need a comparator, don't use an op-amp.
It's a classical mistake, probably happens since the symbol for both are the same, but they are quite different beasts (although in less demanding circuits, sometimes they're semi-interchangeable - but you gotta know when to get decent results).


and is there any quad comparator IC with same pinout as LM324? (LM339 has different pinout so i will have to built circuit all again :( )
Yeah, life is hard, but squeeze it and make Bloody Marys - you'll get a bit more practise in soldering, a skill you need in this hobby (and I bet a bit of exercise won't be a total waste of time).
Then ponder over the fact that it's allways a sour grape to do it the second time (... Then squeeze the grapes and make wine :)


If you want to take the easy route to solving the problem, build it into a box made of iron/mild steel and connect the ground lead to the box.
If you want to solve the problem the right way, redesign the circuit - it shouldn't react to you touching it, unless you touch the leads going to the high impedance inputs and they should never ever have "antennas" (leads sticking out from the circuit).

If you're building on a solderless breadboard, rebuild on a real PCB and your problem will most likely go away.


so how to redesign it right way?

(I'm kind a getting tired of this circuit.because in this semester I have lot of acedemic work.so do you think i should forget LEDs and go for LDR? (or IR tx rx pair)
i was thinking that LDR and photodiode gives large difference for evan small light so it will greatly affected by ambient light than using a LED as sensor
thanks