Go Down

Topic: Comparator and false triggering. (Read 4969 times) previous topic - next topic

Undert9281

Hello, I am having a problem with a LM324N (quad op amp) as a comparator with no feedback. I'm going to attach a schematic below. I'm going to provide a quick description for the system as a whole, this problematic piece is just a small portion of the whole circuit. Looking at the diagram from left to right you will see
A) Voltage divider feeding the base of a 2N222A NPN.
B) This creates a constant current to charge the capacitor at the collector of the 2N222A.
C) A 2N2907 PNP transistor is connected in parallel with the capacitor. A 555 timer sinks current through        the base of the PNP transistor essentially shorting out the capacitor.
D) Point is the 555 timer
E) A third connection runs from the Emitter/Capacitor/Collector to an LM324N to the inverting input.
D) A pot with a wiper runs to the non inverting input. (0V-9v)
E) A PWM signal leaves the op amp and goes through a 100 ohm resistor, this feeds a NPN power transistor which is controlling a 24V DC motor.

This all works great. Now let's get to what I can't understand.

I have an Arduino and I'm using the Ping)) sensor. I have the software running an If and Else If statement. I can see the pin reacting by going high and low based on distance. I proceed to send that signal to the non inverting input of the op amp (totally separate of the PWM op amp as I previosuly spoke of). A pot feeds the inverting input. I am using a single power supply (0V-9V). When the non inverting input excedes the inverting inputs voltage ( which I have set at 1V) the output should go high to 9 volts. The high 9 volts turns on a NPN which controls the power for a SPST relay. It is only working when I have the oscilloscope connected to two inputs of the op-amp. Why does the oscilloscope change anything? Are they not high impedance? Why does it only work when the probes become involved. All grounds are tied together and I am not seeing any interference in the power supply.

Undert9281

Image of schematic

weedpharma

#2
Jan 04, 2015, 05:21 am Last Edit: Jan 04, 2015, 05:23 am by weedpharma
Is one input of your CRO ground?


Also looks like a lot of circuit.  What are you trying to achieve? Must be a simpler way.

Weedpharma

Undert9281

CRO? Im not familiar with that term. Does it mean comparator? If so then no, one input is 1V from the pot and the other is the signal from the Ping sensor.

Undert9281

I want to be able to enable the motor when motion is detected. I picked the power to the 555 timer, If I don't short the cap I will not achieve the sawtooth wave, essentially cutting out PWM running the motor. Logically speaking I want the movement to enable the 555 timer.

Undert9281

It all works great, If i leave the scope hooked up...HA.

weedpharma


Undert9281

Digital Oscilloscope with ground removed from cord.

weedpharma

You can do most of this just with the Arduino

Weedpharma

weedpharma

Arduino can be used to detect the movement then use PWM to drive the motor.

Weedpharma

Undert9281

I've used the arduino to achieve the PWM, I want to use as many electronics components as possible and minimal Arduino board. It is a project for education.

Undert9281

The Arduino is detecting the movement, That part of the circuit is working.

weedpharma

That would explain it!

Weedpharma

Undert9281

When the Ping sensor goes high it should exceed the voltage set from pot, this should cause the output of the amp to swing to 9V closing the relay and allowing the 555 timer to turn on. The circuit is built exactly as shown.

weedpharma

The motor should be in the collector circuit, not the emitter circuit.

Weedpharma

Go Up