Rising and Falling Edge triggered one-shot

Hi, thanks for the responses. Give me a moment to study them and I'll respond to every post. In the meantime, if you know of any good repositories for spice .SUBCKTs or .MODELs or Eagle files or LTCSpice schematics, please point me to em. thx Ted

Reply to
tedj121
Loading thread data ...

Currently, that would require my Bluetooth Bee Standalone v1 (the uC) to re main energized to catch the interrupt, but it's for development. The final choice of uC is still up in the air, I know some uCs have a low power stan dby wake on interrupt mode, and I'm open to suggestions like Phil's and you rs to make that power savings an intrinsic part of the design if possible.

Thanks, Ted

Reply to
tedj121

I've simulated in LTSpice an RC (1Meg,0.5u) input to XOR approach that is simple, cheap, detects both edges, and produces the needed 'one-shot' width to wake up the uC. Just an RC into the XOR. Unless it's flawed. Thanks, Ted

Reply to
tedj121

snipped-for-privacy@gmail.com wrote on 1/13/2018 4:17 PM:

Simulations are rarely real world realistic. So you need to know where the bodies are buried. In this circuit it will be the noise sensitivity.

A simple approach is to use a FF to hold a state set by the MCU and the XOR to detect edges on the incoming pulse. The pulse edge rises, the XOR wakes the CPU, the CPU changes the FF and the wakeup pulse ends. In essence the CPU becomes your delay element. Picking a FF that is easy to manipulate is where the bodies are buried on this approach. You can use a $0.25 part and a pair of pins on the CPU or a bit more complex one wire part (I think a dollar?) and a single pin on the MCU. Can the MCU remember the present state of the FF? If not the $0.25 part will need an input pin to read the value or maybe a resistor to allow the FF to drive the data signal when the MCU output is tristate. The one wire solution still only uses one wire.

Multisecond analog delays are asking for trouble in a digital design.

--

Rick C 

Viewed the eclipse at Wintercrest Farms, 
on the centerline of totality since 1998
Reply to
rickman

yeah, like Jim's circuit but with the microcontroller in the loop in addition to the flip-flop, that seems pretty solid.

--
This email has not been checked by half-arsed antivirus software
Reply to
Jasen Betts

Guess I assumed wrong. Good find. There is an energy management user library available at the Arduino website. And an example using it compiles. Haven't tested it yet, but thanks for giving me another path to explore. Ted

Reply to
tedj121

A power enable to the uC long enough for the uC to wake up and get ready fo r it's little digital day and control continued power to itself. The senso r indicates a change in condition that must be serviced.

ne-shot?

I was incomplete when I said the sensor being on powers the uC. Currently, the touch sensor output is ORed with the uC's stay-on bit and with the edg e detector's output (which remains on for the wake-the-uC interval). Three attached collectors of three NPN inverters are tied high at a P-Channel MO SFET gate.

Reply to
tedj121

See reply to Mike. Looking into the Enerlib library posted at the Arduino website. Also, I'm not locked into the Bee (hosting the ATMEGA168), which is for ease of development even as I see that it's time to choose that final uC at this stage.

I just have this shweet touch sensor that only consumes 5nA and actually works (with a little shielding).

Reply to
tedj121

Thanks for that. Looks good for high speed circuits. I may not need any m emory function and the sensor out directly to an RC (low pass filter) to a Schmidt comparator may fit the bill by supplying both the edge detection fu nction and the one-shot function in a remarkably simple circuit (a resistor , a capacitor and an XOR), whether or not noise becomes an issue as Rick su ggests. Ted

Reply to
tedj121

I think that's the simplest approach. I think the R and the C can be tweaked if necessary and still get the same time constant. Ted

Reply to
tedj121

Ugh. I'd rather use up the unneeded three extra XOR gates in a (never seems to be smaller than 14 pins) XOR chip. Are there no 8pin XOR chips anymore? Or even 6pin? Ted

Reply to
tedj121

Den tirsdag den 16. januar 2018 kl. 00.44.10 UTC+1 skrev snipped-for-privacy@gmail.com:

formatting link

Reply to
Lasse Langwadt Christensen

I like the idea. No RC. Just an XOR. The CPU is powered exactly as long as it needs to be. Should work for both edges. I'll try it with some of those 'extra' XOR gates. :-) Ted

Reply to
tedj121

Since price is so important you probably don't want a discrete solution with lots of parts because of the pick & place machine charges.

Consider an external watchdog timer (WDT) chip. Often they come in the same package with a power supply supervisor. They are cheap and used by people (like myself) who do not trust on-chip supervisor functions on micro controllers.

The way these work: Their output goes high for a certain time after either a rising or falling edge on the input signal. If no such transition occurs for a while their output goes low (meant to issue a micro controller reset) and this time would be your one-shot pulse length. You'd just have to pick one with the desired number of seconds. Some also have a voltage supervisor in there which keops the outut low until the supply is above a certain threshold. If you don't want that use one without or one with a low enough voltage threshold.

Another method is to take the cheapest micro controller you can find and program its internal timer so it will trigger a one-shot period after a "state change", thus after a falling as well as a rising edge.

--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg

I'm drooling, but still stuck in the 'through hole' world just now until ev erything is proven. I'm just basement entrepreneurial with an eye toward q uantity in the future. Surface mount is a challenge in development. Gotta solder those little suckers on manually. Ted

Reply to
tedj121

Den tirsdag den 16. januar 2018 kl. 01.22.28 UTC+1 skrev snipped-for-privacy@gmail.com:

everything is proven. I'm just basement entrepreneurial with an eye toward quantity in the future. Surface mount is a challenge in development. Got ta solder those little suckers on manually. Ted

I find surface mount to be easier, no messing around with constantly flippi ng the board and trying to hold in parts before soldering, just align part and tack one pin and solder

Reply to
Lasse Langwadt Christensen

There are a number of us who do prototype stuff with SMT parts. John Larkin has shown a lot of examples of the "dead bug" school of prototyping. You really should get the proper tools and leave thru-hole behind. You're really limiting yourself - thru-hole is dead.

Reply to
krw

Through hole still lives where you want mechanical resilience for items like connectors. Otherwise I entirely agree.

--
Mike Perkins 
Video Solutions Ltd 
www.videosolutions.ltd.uk
Reply to
Mike Perkins

Oh, certainly. PTH capacitors may have lower ESL and ESR, as well. We often use PTH capacitors, inductors, and of course, connectors.

Reply to
krw

snipped-for-privacy@gmail.com wrote on 1/15/2018 7:01 PM:

Unless your MCU can remember and hold an output pin when powered down (not entirely unlikely) you will need some FF external to the MCU in addition to the XOR.

--

Rick C 

Viewed the eclipse at Wintercrest Farms, 
on the centerline of totality since 1998
Reply to
rickman

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.