0

For a very low-power-project (where I want to keep the micro-controller asleep or powerless as much as possible), I need to detect the rising and the falling of an input-signal (which could power-on the controller and send a signal).

I tried sleeping and waking up the controller via an interrupt, but it would be even better to switch of the controller completely and just power up when there is a change in input signal (only a few times a day, with a signal length of several minutes).

Making the controller powerless (and processing all there is to be done in the setup before switching off again) is a better solution than the deep sleep solution, because of the low frequency of occurence of the input signal changes.

signalexample

The output does not have to be exactly 30 seconds, it can be any other value. It could use a power latch.

I looked at monostable circuits but they only detect (generate a pulse) on rising.

Does anyone have a solution (which only costs a few uAmps) for this?

Thanks.

Addendum:

Voltage is 3.3V, current is "as low as possible" because this circuit should work as long as possible on a few cells. The input signal is generated by a mercury switch mounted on a bridge (which can be opened and closed)...

Instead of waking up from deep sleep (and being able to calculate the number of hours the circuit can last on an small battery) it is far better to power off "completely" and being able to calculate the number of activations from the bridge-movement (as long as the electronics I am looking for consume less than the deep sleep). Power consumption by the micro-controller+circuits is in deep sleep >10mA (too much for battery).

  • 1
    Powerless or deep sleep may not make a sizable difference. Anything below 1 µA is less than the self-discharge of the battery. I have an ATmega running since 2012 off the same pair of AA cells, sleeping most of the time. – Edgar Bonet Dec 31 '17 at 22:41
  • what generates the input signal? what is the voltage and available current, if any? – jsotola Dec 31 '17 at 23:13
  • 1
    What board are you using? 10mA is quite a lot. – Gerben Jan 1 '18 at 17:00
0

You can generate a pulse on any edge of a signal using some logic gates. For instance combining a rising edge detector with a falling edge detector and adding a time delay would probably achieve what you want:

schematic

simulate this circuit – Schematic created using CircuitLab

Simulate it here.

The length of time the pulse is on for is (roughly) defined by the time constant of R1 and C1. That's T=RC, so in this instance 100 x 0.0000001 = 10uS.

for a time of (say) 30 seconds, you will want to massively increase those values. For example, 470uF and 80K would give you around 32 seconds.

Power consumption? Well, that's all dependent on the logic gates and how you build the circuit. 74HC chips are pretty efficient now (far better than the old 74LS ones), but you will want to reduce it down to as few chips and gates as possible. That means converting the circuit to just one gate type (for example NAND) and reducing redundancy in the circuit to minimise power consumption.

  • 1
    You can replace all the gates by a single XOR between the current and the delayed input. – Edgar Bonet Jan 1 '18 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.