Electronics-Related.com
Forums

Rising and Falling Edge triggered one-shot

Started by Unknown January 11, 2018
On 15/01/2018 23:12, tedj121@gmail.com wrote:
>> Doesn't the CPU support a hibernate mode with wake on change for >> certain pins? Even if it was only for one edge transition then a >> pair of those pins and a single inverter would get you what you >> want. >> >> It seems a bit brute force and crude to start up from cold every >> time. > > 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 had a quick look at the ATM168 datasheet and not only does it support several decent power saving modes it also supports interrupt on any transition for certain pins whilst in a low power state. You will have to write an interrupt handler but that need not be a very complex one just something that does whatever you want to do and returns to sleep mode again. You might need to deal with the situation where the down transition occurs whilst you are processing the up transition or vice-versa (but that would be a problem for a hardware one shot too).
> >> It probably isn't worth getting average quiescent current much >> below the self discharge rate of typical alkaline batteries (ie >> <5uA). If you were running it off a tiny battery then it might be >> worth trying harder. > > I just have this shweet touch sensor that only consumes 5nA and > actually works (with a little shielding).
So long as you keep the overall power consumption under 5uA you will find that in service battery life pretty much depends on ambient temperature and how badly stored the battery was before you bought it. -- Regards, Martin Brown
On 2018-01-15 22:02, rickman wrote:
> tedj121@gmail.com wrote on 1/15/2018 7:01 PM: >>> 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. >> >> 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 > > 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. >
That's what depletion mode FETs and charge pumps are for :-) -- Regards, Joerg http://www.analogconsultants.com/
On 2018-01-15 16:51, krw@notreal.com wrote:
> On Mon, 15 Jan 2018 16:22:19 -0800 (PST), tedj121@gmail.com wrote: > >>> http://www.ti.com/lit/ds/symlink/sn74lvc1g86.pdf >> >> I'm drooling, but still stuck in the 'through hole' world just now until everything is proven. I'm just basement entrepreneurial with an eye toward quantity in the future. Surface mount is a challenge in development. Gotta solder those little suckers on manually. Ted > > There are a number of us who do prototype stuff with SMT parts.
I'd say nearly all of us.
> ... 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. >
Absolutamente. Ted would be missing out on most of the good stuff these days. I adopted SMT in 1986 and never looked back. It's actually easier to hand-solder than through-hole, no constant turning around of the board, nothing falls back out because the wires weren't bent sideways enough. Another nice thing is that resistors and capacitors can be stacked for trimming experiments or when the correct value is not at hand. Ted: You can get what is often called "surfboards" that adapt SMT to through-hole. You could also just use those "copper-striped" boards and cut or score out a center line in each strip which would give you the 0.05" spaing of SO packages. It's easy once you get the hang of it. For soldering fine stuff the ETS tip for Weller irons works great. Horror story that really happened: A friend was soldering a digital through-hole board, didn't immediately notice that one IC had slipped out when turning the board, the phone rang, he got up, pushing himself off the table with one hand .... YOOOUUUWWEEE ... all IC pins were solidly embedded in his palm. He had sort of a DIP-16 tattoo for a long time. -- Regards, Joerg http://www.analogconsultants.com/