Author Topic: Low power NOT gate  (Read 11504 times)

0 Members and 1 Guest are viewing this topic.

Offline mat_frTopic starter

  • Contributor
  • Posts: 42
  • Country: fr
Low power NOT gate
« on: December 17, 2014, 07:41:14 pm »
Hi,
I have a simple basic design question (maybe the answer won't be as simple). I want to make a dumb water level detector to light an LED when an opaque water tank is empty (love my plants...)
Problem is: I'd like to power it by battery, and if possible make it last very long. So I went with a simple Not gate with 2 NPN transistors.

This design is plain and simple, but actually it's when the probe is closed and the LED is off that the consumption is the most important. I measured about 600Kohms when the "probe", actually just 2 jumper wires, are in the water. I tried multiple resistor values, I can live with an LED consuming some mA, but the LED consumes less current than the R1 resistor put to ground by Q1. If I increase the values too much the LED is too dim. I tried to put another NPN in Darligton configuration, it worked better with high R1 values, but still too high for my liking. I also tried using a 555 to make the LED blink, hoping I would get a better lighting/consumption ratio, but it increased the quiescent consumption of course, so it doesn't solve my problem.
I measured values as low as 1mA, but with a 1200mA/h battery that would only last a month or so.

I'm curious about an elegant solution to this problem if there is any.

« Last Edit: December 17, 2014, 07:44:50 pm by mat_fr »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: Low power NOT gate
« Reply #1 on: December 17, 2014, 11:04:41 pm »
The solution is to use CMOS logic gates which hardly use any power, unless they're switching.

Another problem with your circuit is it uses DC which can cause electrolysis and corrosion. Using AC will get round the problem.
 

Offline mat_frTopic starter

  • Contributor
  • Posts: 42
  • Country: fr
Re: Low power NOT gate
« Reply #2 on: December 17, 2014, 11:13:51 pm »
The solution is to use CMOS logic gates which hardly use any power, unless they're switching.

I was thinking about bipolar transitors to keep it minimalistic but I also have some old logic gate chips, maybe I can use a "4 NOT gate" chip, though it sounds like a waste.

Quote
Another problem with your circuit is it uses DC which can cause electrolysis and corrosion. Using AC will get round the problem.

You're right, but it would complicate if not disqualify entirely battery powering, wouldn't it?
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: Low power NOT gate
« Reply #3 on: December 17, 2014, 11:21:36 pm »
The solution is to use CMOS logic gates which hardly use any power, unless they're switching.

I was thinking about bipolar transitors to keep it minimalistic but I also have some old logic gate chips, maybe I can use a "4 NOT gate" chip, though it sounds like a waste.
If it's a CMOS (CD4001, 74AC02 or 74HC02) not 7402 or 74LS02 then it'll work and have much lower power draw than the transistors. Just tie the unused inputs to either power supply rail. You can get single NOT gate ICs but they come in SMT packages.
http://www.nxp.com/documents/data_sheet/74HC_HCT1G04.pdf

Quote
Quote
Another problem with your circuit is it uses DC which can cause electrolysis and corrosion. Using AC will get round the problem.

You're right, but it would complicate if not disqualify entirely battery powering, wouldn't it?
It is very slightly more complicated but it doesn't disqualify using a battery power because an oscillator can convert the DC signal to AC.
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 28379
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Low power NOT gate
« Reply #4 on: December 17, 2014, 11:31:14 pm »
The solution is to use CMOS logic gates which hardly use any power, unless they're switching.

I was thinking about bipolar transitors to keep it minimalistic but I also have some old logic gate chips, maybe I can use a "4 NOT gate" chip, though it sounds like a waste.
If it's a CMOS (CD4001, 74AC02 or 74HC02) not 7402 or 74LS02 then it'll work and have much lower power draw than the transistors. Just tie the unused inputs to either power supply rail. You can get single NOT gate ICs but they come in SMT packages.
http://www.nxp.com/documents/data_sheet/74HC_HCT1G04.pdf

Quote
Quote
Another problem with your circuit is it uses DC which can cause electrolysis and corrosion. Using AC will get round the problem.

You're right, but it would complicate if not disqualify entirely battery powering, wouldn't it?
It is very slightly more complicated but it doesn't disqualify using a battery power because an oscillator can convert the DC signal to AC.
Hero999 made this post a while back with the best solution IMO
https://www.eevblog.com/forum/beginners/which-sensor-to-use-for-salt-water-level/msg499829/#msg499829
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline mat_frTopic starter

  • Contributor
  • Posts: 42
  • Country: fr
Re: Low power NOT gate
« Reply #5 on: December 18, 2014, 08:15:41 am »
Quote
If it's a CMOS (CD4001, 74AC02 or 74HC02) not 7402 or 74LS02 then it'll work and have much lower power draw than the transistors. Just tie the unused inputs to either power supply rail. You can get single NOT gate ICs but they come in SMT packages.
http://www.nxp.com/documents/data_sheet/74HC_HCT1G04.pdf
Thanks. I must admit that another goal for me was to make a pretty simple circuit on a perfboard to get back to electronics after a little pause, so I wasn't planning on making a PCB for SMT package or buy yet another component (my cupboard is full of unused parts) but, hey, why not after all?  ;D

Quote
It is very slightly more complicated but it doesn't disqualify using a battery power because an oscillator can convert the DC signal to AC.

True, and anyway I tried a 555 to make the LED blink and use less power while being more visible, so I suppose it wouldn't hurt to use it as a DC/AC converter, I'll look for an example circuit.

Quote
Hero999 made this post a while back with the best solution IMO
https://www.eevblog.com/forum/beginners/which-sensor-to-use-for-salt-water-level/msg499829/#msg499829

Thanks, I'll look into it :)
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: Low power NOT gatehttps://www.eevblog.com/forum/index.php
« Reply #6 on: December 18, 2014, 10:37:07 am »
If you need to flash the LED then you might as well use those spare gates.
 

Offline mat_frTopic starter

  • Contributor
  • Posts: 42
  • Country: fr
Re: Low power NOT gate
« Reply #7 on: December 18, 2014, 02:00:16 pm »
Quote
Hero999 made this post a while back with the best solution IMO
https://www.eevblog.com/forum/beginners/which-sensor-to-use-for-salt-water-level/msg499829/#msg499829

I'm not sure I understand how this circuit works... I don't see where the AC power kicks in and I see a lot of what I suppose to be decoupling caps, but I fail to see the whole logic behind the circuit... I'll try to model it in LTSpice to see how it goes, but since I don't know the power source I'll have to search a little :)

Quote
If you need to flash the LED then you might as well use those spare gates.

Hum... Here again I will definitely have to search for circuits able to make an LED blink using NOT gate...
 

Offline mat_frTopic starter

  • Contributor
  • Posts: 42
  • Country: fr
Re: Low power NOT gate
« Reply #8 on: December 18, 2014, 03:15:08 pm »
Quote
Hero999 made this post a while back with the best solution IMO
https://www.eevblog.com/forum/beginners/which-sensor-to-use-for-salt-water-level/msg499829/#msg499829

I'm not sure I understand how this circuit works... I don't see where the AC power kicks in and I see a lot of what I suppose to be decoupling caps, but I fail to see the whole logic behind the circuit... I'll try to model it in LTSpice to see how it goes, but since I don't know the power source I'll have to search a little :)

Ho! I think I just got it. The upper left gate switches regularly from the RC circuit below? I'll need to test that :)
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: Low power NOT gate
« Reply #9 on: December 18, 2014, 05:05:18 pm »
The origional design was for a level gauge. It's probably eaiser to understand if you just look at one section.

Yes, it's a Schmitt trigger oscillator.

C2 couple the AC to a rectifier and smoothing capacitor (D1, D2 & C4) which will be charged, unless there's water present.

When the chamber fills with water the AC is short circuited to 0V via C3 and the water and C4 discharges through R4.
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 1899
  • Country: au
    • Halestrom
Re: Low power NOT gate
« Reply #10 on: December 19, 2014, 07:36:43 am »
If you can get an N-channel mosfet then you can go the route of this circuit (see attached).  I've just tested it with a 2n7000, 3V from a flat pair of AA batteries and omitting the LED resistor.  If anything it's too sensitive to conduction :)

Disadvantage: corrosion -> not AC

Offline mat_frTopic starter

  • Contributor
  • Posts: 42
  • Country: fr
Re: Low power NOT gate
« Reply #11 on: December 19, 2014, 08:08:47 am »
Thank you both for your tips/explanations. I will test it this week end if I can (not sure I'll have the time before next month, Christmas is coming :) ).
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: Low power NOT gate
« Reply #12 on: December 19, 2014, 01:31:00 pm »
If you can get an N-channel mosfet then you can go the route of this circuit (see attached).  I've just tested it with a 2n7000, 3V from a flat pair of AA batteries and omitting the LED resistor.  If anything it's too sensitive to conduction :)

Disadvantage: corrosion -> not AC
The drain and source are the wrong way round. As drawn, the LED will light continuously.
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 1899
  • Country: au
    • Halestrom
Re: Low power NOT gate
« Reply #13 on: December 20, 2014, 01:35:22 am »
Woops :)  I draw them symmetrically when doing it by hand as you can generally infer the direction from diagram orientation, but not in this case.

Offline mat_frTopic starter

  • Contributor
  • Posts: 42
  • Country: fr
Re: Low power NOT gate
« Reply #14 on: December 28, 2014, 12:00:11 pm »
I couldn't find the time to fetch some 74hc14 to test the circuit before Christmas... Too bad, now all local stores are on vacation. So I ordered some from eBay and I'll have to wait a few weeks before I can test it.
Still, I already found the schematics really interesting, so even if I have to wait to test it I can already thank you for the schematics and explanations.

:)
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Low power NOT gate
« Reply #15 on: December 28, 2014, 03:07:21 pm »
You can replace Q1/Q2 with one mosfet, like 2n7000/7002.

Put the led on the collector / drain.
================================
https://dannyelectronics.wordpress.com/
 

Offline mat_frTopic starter

  • Contributor
  • Posts: 42
  • Country: fr
Re: Low power NOT gate
« Reply #16 on: January 31, 2015, 12:11:20 am »
Hi,
Sorry I went quiet for some time: I was waiting for the chips and since I received it I was too busy to try the circuit.

Thank Dannyf but since I'm aware of the DC current problem I'm willing to try the Hero999's solution (besides, it's interesting to understand how it works)

C2 couple the AC to a rectifier and smoothing capacitor (D1, D2 & C4) which will be charged, unless there's water present.
When the chamber fills with water the AC is short circuited to 0V via C3 and the water and C4 discharges through R4.

Weren't you talking about C4 discharging through R3?
I just tried the circuit but I couldn't make it work. I used different resistors values for R2 (1M) and R3(2M). I don't know how critical the values are, I suppose resistors have to be properly sized compared to the caps. With 3.3V VCC I could see oscillations on both sides of R1 (with 0-3.3V and 33%-66% of VCC on the other side, which seems the expected behavior) bu nothing after R2 (no water present so the C3 pin is floating). I supposed 3.3V is too thin for these resistors/caps values so I tried with 5V. But then I couldn't see any understandable state. I suppose I got it wrong somewhere, but I'll try to understand how to properly size res and caps. I've never went into A/C yet.

Thanks for the help anyway.
 

Offline 22swg

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: gb
Re: Low power NOT gate
« Reply #17 on: February 01, 2015, 11:37:48 am »
From experience anything metal dipped in water with a current ... wont last long . I saw a water sensor design that shone light through a filter to determine the levels. I was looking for a soil moisture sensor at the time after using the resistance of two copper wires , even with ac , lasted a month .     
Check your tongue, your belly and your lust. Better to enjoy someone else’s madness.
 

Offline mat_frTopic starter

  • Contributor
  • Posts: 42
  • Country: fr
Re: Low power NOT gate
« Reply #18 on: February 01, 2015, 12:24:22 pm »
Thanks for sharing your experience.
I still can't make it work on my breadboard. Even the oscillation on the schmitt trigger is not stable (I think I have some contacts problems on my breadboard, but still, with 2 different ICs on 2 different locations the problem occurs), and I can't make the thing work properly. I'll try again later I think...
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Low power NOT gate
« Reply #19 on: February 01, 2015, 12:55:55 pm »
The original solution was simple enough and can be made to work for your application with simple modifications - as others have posited.

The new solution you are trying seems to be overly complicated for such a simple task.

Maybe it is of value as an learning exercise. Good luck with it.
================================
https://dannyelectronics.wordpress.com/
 

Offline KM4FER

  • Regular Contributor
  • *
  • Posts: 81
  • Country: us
Re: Low power NOT gate
« Reply #20 on: February 01, 2015, 03:26:43 pm »
Going back to the requirements I understand this to be for a plant watering system.  In that case I wouldn't think continuous sensing is necessary.  Checking water level once every 1, 5 or 10 minutes might be enough to meet your needs.

If that is the case then a circuit that would sleep most of the time and only wake up occasionally to perform the test could extend battery life considerably.  It could also have the positive side effect of minimizing corrosion of sensor electrodes since the amount of time there is current flow between them would be minimal.

I'm thinking a small cheap microcontroller would be perfect for this but that is a whole different direction than the totally analog circuit you have been persuing.  However there might be an analog way for you to use a timer to turn on the power to your sensor circuit only when sampling which could get you both longer battery and sensor life.  Of course this would require a method of latching the LED to the ON state when a low level was detected.

 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Low power NOT gate
« Reply #21 on: February 01, 2015, 03:30:43 pm »
Quote
I'm thinking a small cheap microcontroller

There are mcu-based urination alarms for kids: it detects moisture. Precisely the same way.
================================
https://dannyelectronics.wordpress.com/
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: Low power NOT gate
« Reply #22 on: February 01, 2015, 04:39:17 pm »
Hi,
Sorry I went quiet for some time: I was waiting for the chips and since I received it I was too busy to try the circuit.

Thank Dannyf but since I'm aware of the DC current problem I'm willing to try the Hero999's solution (besides, it's interesting to understand how it works)

C2 couple the AC to a rectifier and smoothing capacitor (D1, D2 & C4) which will be charged, unless there's water present.
When the chamber fills with water the AC is short circuited to 0V via C3 and the water and C4 discharges through R4.

Weren't you talking about C4 discharging through R3?
I just tried the circuit but I couldn't make it work. I used different resistors values for R2 (1M) and R3(2M). I don't know how critical the values are, I suppose resistors have to be properly sized compared to the caps. With 3.3V VCC I could see oscillations on both sides of R1 (with 0-3.3V and 33%-66% of VCC on the other side, which seems the expected behavior) bu nothing after R2 (no water present so the C3 pin is floating). I supposed 3.3V is too thin for these resistors/caps values so I tried with 5V. But then I couldn't see any understandable state. I suppose I got it wrong somewhere, but I'll try to understand how to properly size res and caps. I've never went into A/C yet.

Thanks for the help anyway.
Yes, that's how it works.

The capacitor values aren't critical, so long as they provide negligible impedance at the frequency of the oscillator compared to the resistors.



Lowering the frequency may help if you're using a breadboard. Changing C1, C2 & C3 to 1nF and C4 to 10nF would make it work at 27kHz.

Analysis of the circuit can be simplified by assuming all the capacitors are short circuit at AC, closed circuit at DC and the diodes just convert AC to DC minus one diode drop.

R2 and R3 can then be treated as a potential divider with the resistance of the water as the load which is in parallel with R3.

The problem then 47M is not a widely available resistor value. The resistor values could be divided by roughly 20, giving 1M for R2 and 2M2 of R3 (nearest E3 values) but that would reduce the sensitivity of the circuit to water.

Another thing you could try is to eliminate R3 altogether and use a leaky capacitor for C3 such as an electrolytic capacitor and keep R2 at 2M2: try 1uF. It will take much longer to respond because of the large capacitor value but it shouldn't matter too much.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Low power NOT gate
« Reply #23 on: February 01, 2015, 08:43:30 pm »
Quote
R2 and R3 can then be treated as a potential divider with the resistance of the water as the load which is in parallel with R3.

That's not how the circuit works.
================================
https://dannyelectronics.wordpress.com/
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: Low power NOT gate
« Reply #24 on: February 01, 2015, 08:57:19 pm »
Quote
R2 and R3 can then be treated as a potential divider with the resistance of the water as the load which is in parallel with R3.

That's not how the circuit works.
The oscillator produces a squarewave which is coupled to a rectifier (D1 and D2) via C2 and R2. The charge is accumulated on C4 which is discharged by R3.

C3 couples the AC signal to the probe which detects water.

When there's water present the AC signal is diverted to 0V.

When the impedance of the capacitors is negligible compared to R2 and R3, at the oscillator frequency, the steady state voltage on C3 can be approximated by modelling the circuit as a potential divider consisting of a diode connected in series with R2 and the water's resistance in parallel with R3.

The capacitor values and frequency of the oscillator are not important providing the impedance of the capacitors is low enough, so they can be eliminated from the calculation.

Schottky diodes could be a better choice but watch out for the leakage current, especially given the high resistor values used.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf