Maker Pro
Maker Pro

Is a comparator what I need?

P

pEhrlich

Jan 1, 1970
0
Hi

I know relatively little about electronics, and attempting to set up a
circuit thus: A 9vdc battery powers a small air pump. When the
voltage drops below 7.9 volts, it should shut off (ie, once air
pressure is achieved.) When voltage passes 7.9 (or a slightly higher
#), it should click on again, automatically.

A similar topic (1) was about the same thing, and using a comparator,
or "window comparator" was suggested. I've found a couple good info
sites through google, but am still unsure. Is what I want even
possible? If not, how about a current comparitor instead?

--Peter
(1)
http://groups.google.com/group/sci....f4/67b2fb7098d1148a?lnk=raot#67b2fb7098d1148a
 
M

martin.shoebridge

Jan 1, 1970
0
pEhrlich said:
Hi

I know relatively little about electronics, and attempting to set up a
circuit thus: A 9vdc battery powers a small air pump. When the
voltage drops below 7.9 volts, it should shut off (ie, once air
pressure is achieved.) When voltage passes 7.9 (or a slightly higher
#), it should click on again, automatically.

A similar topic (1) was about the same thing, and using a comparator,
or "window comparator" was suggested. I've found a couple good info
sites through google, but am still unsure. Is what I want even
possible? If not, how about a current comparitor instead?

--Peter
(1)
http://groups.google.com/group/sci....f4/67b2fb7098d1148a?lnk=raot#67b2fb7098d1148a
A comparator with hysteresis is what you want.
 

neon

Oct 21, 2006
1,325
Joined
Oct 21, 2006
Messages
1,325
First of all you need a reference either a or an LM136 or zener. some device that is lower then your treshold of 7.9 then then one input see this reference the other input sees the ratio of voltage divider of the input as the voltage decreases it will trigger the comparator now the trick is to modefy this input by a voltage window supplied by the output it is stricly a POSITIVE feedback calculation of resistors. Like take the output 7.9 and feed back a resistor value of 10mv or 100mv your choice .or if you like just stick 100k if the source input is 20k or so. is called histerysis. for 200mv.
 
Last edited:
P

pEhrlich

Jan 1, 1970
0
martin.shoebridge said:
A comparator with hysteresis is what you want.

How would one go about setting this up? The most I can find from
google is on the theoretical(ish) side.
 
E

ehsjr

Jan 1, 1970
0
pEhrlich said:
Hi

I know relatively little about electronics, and attempting to set up a
circuit thus: A 9vdc battery powers a small air pump. When the
voltage drops below 7.9 volts, it should shut off (ie, once air
pressure is achieved.) When voltage passes 7.9 (or a slightly higher
#), it should click on again, automatically.

A similar topic (1) was about the same thing, and using a comparator,
or "window comparator" was suggested. I've found a couple good info
sites through google, but am still unsure. Is what I want even
possible? If not, how about a current comparitor instead?

--Peter
(1)
http://groups.google.com/group/sci....f4/67b2fb7098d1148a?lnk=raot#67b2fb7098d1148a

If you set both the turn on and turn off voltages
the same (in this case 7.9 volts), the device will
cycle on/off forever, or until something breaks.

Hysterisis, as was mentioned in another reply, can
help to avoid that, but there may be a different
design problem. Controlling air pressure by reacting
to the battery voltage level as you described is not
a good idea, if you are looking for some specific
pressure. What are the actual design goals?
Control air pressure? Protect the battery?
What causes the battery voltage to rise?

Ed
 
L

Lostgallifreyan

Jan 1, 1970
0
How would one go about setting this up? The most I can find from
google is on the theoretical(ish) side.

If using an op-amp (maybe same for dedicated comparator IC), put a
reference voltage on the inverting input, the voltage you're watching on
the non-inverting input (reverse these if you want to switch on when that
would be switching off), and put a high resistance (try 1 meg or
more) between the output and the non-inverting input. That resistance adds
hysteresis, it prevents erratic switching when the two voltages are very
close together.
 
P

pEhrlich

Jan 1, 1970
0
If using an op-amp (maybe same for dedicated comparator IC), put a
reference voltage on the inverting input, the voltage you're watching on
the non-inverting input (reverse these if you want to switch on when that
would be switching off), and put a high resistance (try 1 meg or
more) between the output and the non-inverting input. That resistance adds
hysteresis, it prevents erratic switching when the two voltages are very
close together.

Hello again.

I posted this message before, but it seems to have failed. Here goes
again...

I've been able to start soldering, and to study more, and I've come up
with a couple of problems.

When the air pressure rises, the input voltage drops as it becomes
harder to pump. However, as the reference voltage is set by the same
battery, won't they drop together? This could be fixed by using two
batteries.

There is a much bigger and more fundamental problem. When the motor
is turned off, the battery voltage will jump back up to 9v, causing it
to switch back on. (this would loop until the air pressure lowers
again). This can't be simply solved by having two supplies. Unless
there is a clever solution to this floating around out there, it looks
like a pneumatic pressure microswitch is the way to go.

--Peter
 
P

pEhrlich

Jan 1, 1970
0
If you set both the turn on and turn off voltages
the same (in this case 7.9 volts), the device will
cycle on/off forever, or until something breaks.

Hysterisis, as was mentioned in another reply, can
help to avoid that, but there may be a different
design problem. Controlling air pressure by reacting
to the battery voltage level as you described is not
a good idea, if you are looking for some specific
pressure. What are the actual design goals?
Control air pressure? Protect the battery?
What causes the battery voltage to rise?

Ed


Hello again.

I posted this message before, but it seems to have failed. Here goes
again...

I've been able to start soldering, and to study more, and I've come up
with a couple of problems.

When the air pressure rises, the input voltage drops as it becomes
harder to pump. However, as the reference voltage is set by the same
battery, won't they drop together? This could be fixed by using two
batteries.

There is a much bigger and more fundamental problem. When the motor
is turned off, the battery voltage will jump back up to 9v, causing it
to switch back on. (this would loop until the air pressure lowers
again). This can't be simply solved by having two supplies. Unless
there is a clever solution to this floating around out there, it looks
like a pneumatic pressure microswitch is the way to go.

--Peter
 
L

Lostgallifreyan

Jan 1, 1970
0
When the air pressure rises, the input voltage drops as it becomes
harder to pump. However, as the reference voltage is set by the same
battery, won't they drop together? This could be fixed by using two
batteries.

There is a much bigger and more fundamental problem. When the motor
is turned off, the battery voltage will jump back up to 9v, causing it
to switch back on. (this would loop until the air pressure lowers
again). This can't be simply solved by having two supplies. Unless
there is a clever solution to this floating around out there, it looks
like a pneumatic pressure microswitch is the way to go.

--Peter

Don't rely on the battery voltage to tell you that the pressure has
changed. Your observation is good, but look further. It depends on the
battery type, state of charge, and probably other variables, too many to
get an accurate measure.

You're right that the reference could change, and that you need a fixed
one. Look up zener diodes if you're not familiar. That would be better than
nothing, but ideally you need something that directly converts a pressure
reading to an electrical signal. There might be cheap ways to do this, and
if you only need an on/off command based on a threshold, you might do ok
with a microswitch instead of a comparator circuit, as you suggest.

If you have access to the pump drive shaft (assuming it's a motor), you
could paint a black blob on it, and use a detector based on an LED and a
photodiode to detect speed. Those parts come in various forms, and are
often found in old printers, disk drives, scanners, all sorts of stuff.
Converting the pulse train to an analog voltage you can measure is easy to
do. If you ever want proportional control, this might be the way to go.
 
E

ehsjr

Jan 1, 1970
0
pEhrlich said:
Hello again.

I posted this message before, but it seems to have failed. Here goes
again...

I've been able to start soldering, and to study more, and I've come up
with a couple of problems.

When the air pressure rises, the input voltage drops as it becomes
harder to pump. However, as the reference voltage is set by the same
battery, won't they drop together? This could be fixed by using two
batteries.

There is a much bigger and more fundamental problem. When the motor
is turned off, the battery voltage will jump back up to 9v, causing it
to switch back on. (this would loop until the air pressure lowers
again). This can't be simply solved by having two supplies. Unless
there is a clever solution to this floating around out there, it looks
like a pneumatic pressure microswitch is the way to go.

--Peter

Ok, so the goal is to control pressure, not just protect
the motor. Use 2 pressure switches - one for low
to turn the motor on, and one for high, to turn it off.
Below is a complete diagram, but since the pressures
are unspecified, you will need to determine if the
switches in the parts list at the bottom will work for
you.


D2
+-------------------->|------------------+-----+
| | |
| PNP [MOTOR] [D3]
+9 ---+---+----+------ ----+------+ | |a
| | | e\ /c | | +-----+
| | o --- | [RY1] |
| | / HP | [D1] | |
| [1K] o | |a [33R] |
| | | | | | o---
| | +--------+ +------+ o--^
| | | | | | RY1-2
| | | | | |
| | | /c o--- |
| +----|--------+-----| NPN o--^ |
| | | \e | RY1-1 |
[47uF] [1K] o | | |
| | / LP | | |
| | o | | |
| | | | | |
Gnd --+--------+--------+-------+------+-------+

How it works: When turned on, both HP and LP switches are
open. The PNP transistor is biased on by the 1K resistor
to ground. The NPN transistor is turned on by the 1K
resistor to +9, which energizes the relay, closing the
RY1-1 contacts. When pressure builds up higher than the
lower limit, the LP switch closes, removing the + bias
from the NPN and turning it off. However, the RY1-1
normally open contact maintains a path to ground for the
relay coil, so the relay stays energized. Pressure
continues to build, until the HP switch transfers,
removing the negative bias from the PNP, which turns
off. That causes the relay to de-energize, and the motor
stops. Pressure decreases, and the HP switch opens,
removing the + from the PNP base, so it can turn on.
However, there is no path to ground, as the relay is
de-energized and the NPN is held off by the closed LP
switch, until the pressure drops below the lower limit.
That turns on the NPN, and the cycle repeats. The 47 uF
cap and D2 keep the voltage to the transistors stable
when the motor switches on and off.

Parts from Allelectronics:
http://www.allelectronics.com/
Cat # PSW-12 (pressure switch, $1.00 each) and
Cat # RLY-642 6 volt DPDT relay. The 33 ohm resistor
will drop the 9 volts down so the relay will work fine.
They also sell the transistors (any PNP and NPN
will work), cap, resistors and 1N4002 diodes.

You may need to make TEE fittings to connect the
tubing to the switches, with one leg of the TEE
going to a piece of tubing where you can bleed
off some of the pressure to get the switch to
operate at the right level.

Ed
 
Top