Electronics-Related.com
Forums

Rising and Falling Edge triggered one-shot

Started by Unknown January 11, 2018
On 01/11/2018 03:49 PM, tedj121@gmail.com wrote:
> Hi and thanks for responding. > > I have a touch sensor. Goes on when touched and off when not. I > want my uC to do a service operation at each edge of that (possibly > long) 'pulse'. My uC needs about a second or so from power up to the > beginning of program start. The uC is energized by that sensor > signal being ON, at which point it immediately asserts another bit > that controls whether to continue power to itself and other circuits. > So the one-shot duration is just long enough to wake up the uC, which > then services the event and then goes back to sleep. > > I plan to use a four cell (or possibly six) penlight pack for power. > I'm hoping to tolerate battery decay to just above 3.3 volts from a > max of about 6 or 9. > > So the one-shots are about a second or so in duration and the spacing > between the sensor signal edges is typically several seconds. Most > one-shots I've found assume a trigger pulse much shorter than the > one-shot itself and I need the reverse. An input that initiates an > identical pulse at either edge would be ideal. > > Price is a consideration - a cheap timer and few external components > is a plus. > > I want to implement a sleep mode whose quiescent current only powers > the touch sensor (at ~ 5nA) to maximize battery life with all else > being off. > > Thanks, Ted > > On Thursday, January 11, 2018 at 1:23:18 PM UTC-5, ted...@gmail.com > wrote: >> Hi, >> >> I'd like to take a long input pulse and trigger a much shorter >> one-shot pulse at its rising and falling edges. Ideally, only a >> single input should be required (i.e. the one long pulse) for >> minimal part count. I've looked over several timer ics and none >> seem to fit the bill or are too pricey like the 6993s. Can anyone >> suggest an appropriate ic? I would think it a common enough >> function to warrant a dedicated chip. Thanks, Ted >
Well, that sort of lets out the XOR plus delay approach. You could use half of an MC14538A or CD14538A with the long pulse capacitively coupled into both trigger inputs (separately). That's one chip and three RCs, and will work over your supply range. The CD4047 is sort of a monostable/astable toolkit, with a separate pin to control retriggerability. Looks like you'd still need two RCs though. But before somebody else says it, you can do all this and more with a very small microcontroller such as an ATtiny5 (20 cents) and a micropower voltage regulator. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net https://hobbs-eo.com
On 1/11/2018 1:33 PM, tedj121@gmail.com wrote:
> Bluetooth Bee Standalone v1
I only spent a few minutes with google, but going from bluetooth bee to the chip specs http://electronut.in/atmega168-power-save-mode-and-pin-change-interrupt/ I'm a PIC person, so have no direct experience here.
On Thursday, January 11, 2018 at 4:48:19 PM UTC-5, Phil Hobbs wrote:
> On 01/11/2018 03:49 PM, tedj121@gmail.com wrote: > > Hi and thanks for responding. > > > > I have a touch sensor. Goes on when touched and off when not. I > > want my uC to do a service operation at each edge of that (possibly > > long) 'pulse'. My uC needs about a second or so from power up to the > > beginning of program start. The uC is energized by that sensor > > signal being ON, at which point it immediately asserts another bit > > that controls whether to continue power to itself and other circuits. > > So the one-shot duration is just long enough to wake up the uC, which > > then services the event and then goes back to sleep. > > > > I plan to use a four cell (or possibly six) penlight pack for power. > > I'm hoping to tolerate battery decay to just above 3.3 volts from a > > max of about 6 or 9. > > > > So the one-shots are about a second or so in duration and the spacing > > between the sensor signal edges is typically several seconds. Most > > one-shots I've found assume a trigger pulse much shorter than the > > one-shot itself and I need the reverse. An input that initiates an > > identical pulse at either edge would be ideal. > > > > Price is a consideration - a cheap timer and few external components > > is a plus. > > > > I want to implement a sleep mode whose quiescent current only powers > > the touch sensor (at ~ 5nA) to maximize battery life with all else > > being off. > > > > Thanks, Ted > > > > On Thursday, January 11, 2018 at 1:23:18 PM UTC-5, ted...@gmail.com > > wrote: > >> Hi, > >> > >> I'd like to take a long input pulse and trigger a much shorter > >> one-shot pulse at its rising and falling edges. Ideally, only a > >> single input should be required (i.e. the one long pulse) for > >> minimal part count. I've looked over several timer ics and none > >> seem to fit the bill or are too pricey like the 6993s. Can anyone > >> suggest an appropriate ic? I would think it a common enough > >> function to warrant a dedicated chip. Thanks, Ted > > > > Well, that sort of lets out the XOR plus delay approach. You could use > half of an MC14538A or CD14538A with the long pulse capacitively coupled > into both trigger inputs (separately). That's one chip and three RCs, > and will work over your supply range.
I'm not sure I understand the problem, but my first thought was an inverter and some RC high passes. George H.
> > The CD4047 is sort of a monostable/astable toolkit, with a separate pin > to control retriggerability. Looks like you'd still need two RCs though. > > But before somebody else says it, you can do all this and more with a > very small microcontroller such as an ATtiny5 (20 cents) and a > micropower voltage regulator. > > Cheers > > Phil Hobbs > > -- > Dr Philip C D Hobbs > Principal Consultant > ElectroOptical Innovations LLC / Hobbs ElectroOptics > Optics, Electro-optics, Photonics, Analog Electronics > Briarcliff Manor NY 10510 > > http://electrooptical.net > https://hobbs-eo.com
On 2018-01-11, tedj121@gmail.com <tedj121@gmail.com> wrote:
> Hi and thanks for responding. > > I have a touch sensor. Goes on when touched and off when not. I
want my uC to do a service operation at each edge of that (possibly long) 'pulse'. My uC needs about a second or so from power up to the beginning of program start. The uC is energized by that sensor signal being ON. At program start it immediately asserts another bit that controls whether to continue power to itself and other circuits. So the one-shot duration is just long enough to wake up the uC, which then services the event and then goes back to sleep. how much of that interconection is non-negotiable? why do you need the one-shot when the sensor turns on?
> So the one-shots are about a second or so in duration and the > spacing between the sensor signal edges is typically several seconds. > Most one-shots I've found assume a trigger pulse much shorter than the > one-shot itself and I need the reverse. An input that initiates an > identical pulse at either edge would be ideal.
> Price is a consideration - a cheap timer and few external components is a plus.
I still dont know what you want.
> I want to implement a sleep mode whose quiescent current only powers the touch sensor (at ~ 5nA) to maximize battery life with all else being off.
so, how does ths work when the sensor turns off again - what powers the one-shot? -- This email has not been checked by half-arsed antivirus software
On 11/01/2018 20:57, tedj121@gmail.com wrote:
> Hi and thanks for responding. > > I have a touch sensor. Goes on when touched and off when not. I > want my uC to do a service operation at each edge of that (possibly > long) 'pulse'. My uC needs about a second or so from power up to the > beginning of program start. The uC is energized by that sensor > signal being ON. At program start it immediately asserts another bit > that controls whether to continue power to itself and other circuits. > So the one-shot duration is just long enough to wake up the uC, which > then services the event and then goes back to sleep.
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. The sleep and hibernate modes are worth studying (as is figuring out the minimum clock rate you can operate at and still be just fast enough). 32kHz watch crystals are cheap and plenty fast enough for a user interface or slowish mechanical event timing. Rough and ready RC clock timing is even cheaper and you can have a turbo mode if you need one by having the CPU alter the resistor if it needs a burst of speed. It seems a bit brute force and crude to start up from cold every time.
> I plan to use a four cell (or possibly six) penlight pack for power. > I'm hoping to tolerate battery decay to just above 3.3 volts from a > max of about 6 or 9.
The batteries will leak and destroy their battery compartment if you push them that far. Duracells these days seem particularly prone to leaking if used in low voltage tolerant low current drain LCD devices. I notice in passing that Everyready are advertising their latest alkaline offering as "leak free" - that *is* a brave claim.
> > So the one-shots are about a second or so in duration and the spacing > between the sensor signal edges is typically several seconds. Most > one-shots I've found assume a trigger pulse much shorter than the > one-shot itself and I need the reverse. An input that initiates an > identical pulse at either edge would be ideal. > > Price is a consideration - a cheap timer and few external components > is a plus. > > I want to implement a sleep mode whose quiescent current only powers > the touch sensor (at ~ 5nA) to maximize battery life with all else > being off.
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 find on very low current draw devices <10uA the battery life is more dependent on the ambient temperature than the load. -- Regards, Martin Brown
On 01/11/2018 05:55 PM, George Herold wrote:
> On Thursday, January 11, 2018 at 4:48:19 PM UTC-5, Phil Hobbs wrote: >> On 01/11/2018 03:49 PM, tedj121@gmail.com wrote: >>> Hi and thanks for responding. >>> >>> I have a touch sensor. Goes on when touched and off when not. I >>> want my uC to do a service operation at each edge of that (possibly >>> long) 'pulse'. My uC needs about a second or so from power up to the >>> beginning of program start. The uC is energized by that sensor >>> signal being ON, at which point it immediately asserts another bit >>> that controls whether to continue power to itself and other circuits. >>> So the one-shot duration is just long enough to wake up the uC, which >>> then services the event and then goes back to sleep. >>> >>> I plan to use a four cell (or possibly six) penlight pack for power. >>> I'm hoping to tolerate battery decay to just above 3.3 volts from a >>> max of about 6 or 9. >>> >>> So the one-shots are about a second or so in duration and the spacing >>> between the sensor signal edges is typically several seconds. Most >>> one-shots I've found assume a trigger pulse much shorter than the >>> one-shot itself and I need the reverse. An input that initiates an >>> identical pulse at either edge would be ideal. >>> >>> Price is a consideration - a cheap timer and few external components >>> is a plus. >>> >>> I want to implement a sleep mode whose quiescent current only powers >>> the touch sensor (at ~ 5nA) to maximize battery life with all else >>> being off. >>> >>> Thanks, Ted >>> >>> On Thursday, January 11, 2018 at 1:23:18 PM UTC-5, ted...@gmail.com >>> wrote: >>>> Hi, >>>> >>>> I'd like to take a long input pulse and trigger a much shorter >>>> one-shot pulse at its rising and falling edges. Ideally, only a >>>> single input should be required (i.e. the one long pulse) for >>>> minimal part count. I've looked over several timer ics and none >>>> seem to fit the bill or are too pricey like the 6993s. Can anyone >>>> suggest an appropriate ic? I would think it a common enough >>>> function to warrant a dedicated chip. Thanks, Ted >>> >> >> Well, that sort of lets out the XOR plus delay approach. You could use >> half of an MC14538A or CD14538A with the long pulse capacitively coupled >> into both trigger inputs (separately). That's one chip and three RCs, >> and will work over your supply range. > I'm not sure I understand the problem, but my first thought was an inverter > and some RC high passes. > > George H.
For microseconds, I agree, but the OP wants seconds. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net https://hobbs-eo.com
On Thu, 11 Jan 2018 10:23:09 -0800 (PST), tedj121@gmail.com wrote:

>Hi, > >I'd like to take a long input pulse and trigger a much shorter one-shot pulse at its rising and falling edges. Ideally, only a single input should be required (i.e. the one long pulse) for minimal part count. I've looked over several timer ics and none seem to fit the bill or are too pricey like the 6993s. Can anyone suggest an appropriate ic? I would think it a common enough function to warrant a dedicated chip. Thanks, Ted
The "standard" approach... <http://www.analog-innovations.com/SED/PulseOnBothEdges.png> ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | STV, Queen Creek, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | It's what you learn, after you know it all, that counts.
On 2018-01-12, Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> wrote:
> On 01/11/2018 05:55 PM, George Herold wrote: >> On Thursday, January 11, 2018 at 4:48:19 PM UTC-5, Phil Hobbs wrote: >>> On 01/11/2018 03:49 PM, tedj121@gmail.com wrote: >>>> Hi and thanks for responding. >>>> >>>> I have a touch sensor. Goes on when touched and off when not. I >>>> want my uC to do a service operation at each edge of that (possibly >>>> long) 'pulse'. My uC needs about a second or so from power up to the >>>> beginning of program start. The uC is energized by that sensor >>>> signal being ON, at which point it immediately asserts another bit >>>> that controls whether to continue power to itself and other circuits. >>>> So the one-shot duration is just long enough to wake up the uC, which >>>> then services the event and then goes back to sleep. >>>> >>>> I plan to use a four cell (or possibly six) penlight pack for power. >>>> I'm hoping to tolerate battery decay to just above 3.3 volts from a >>>> max of about 6 or 9. >>>> >>>> So the one-shots are about a second or so in duration and the spacing >>>> between the sensor signal edges is typically several seconds. Most >>>> one-shots I've found assume a trigger pulse much shorter than the >>>> one-shot itself and I need the reverse. An input that initiates an >>>> identical pulse at either edge would be ideal. >>>> >>>> Price is a consideration - a cheap timer and few external components >>>> is a plus. >>>> >>>> I want to implement a sleep mode whose quiescent current only powers >>>> the touch sensor (at ~ 5nA) to maximize battery life with all else >>>> being off. >>>> >>>> Thanks, Ted >>>> >>>> On Thursday, January 11, 2018 at 1:23:18 PM UTC-5, ted...@gmail.com >>>> wrote: >>>>> Hi, >>>>> >>>>> I'd like to take a long input pulse and trigger a much shorter >>>>> one-shot pulse at its rising and falling edges. Ideally, only a >>>>> single input should be required (i.e. the one long pulse) for >>>>> minimal part count. I've looked over several timer ics and none >>>>> seem to fit the bill or are too pricey like the 6993s. Can anyone >>>>> suggest an appropriate ic? I would think it a common enough >>>>> function to warrant a dedicated chip. Thanks, Ted >>>> >>> >>> Well, that sort of lets out the XOR plus delay approach. You could use >>> half of an MC14538A or CD14538A with the long pulse capacitively coupled >>> into both trigger inputs (separately). That's one chip and three RCs, >>> and will work over your supply range. >> I'm not sure I understand the problem, but my first thought was an inverter >> and some RC high passes. >> >> George H. > > For microseconds, I agree, but the OP wants seconds. >
microfarads,megaohms and a CD4070BE will achieve that, seems an unpopular part, but TI is still making them. -- This email has not been checked by half-arsed antivirus software
On 2018-01-12, Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:
> On Thu, 11 Jan 2018 10:23:09 -0800 (PST), tedj121@gmail.com wrote: > >>Hi, >> >>I'd like to take a long input pulse and trigger a much shorter one-shot pulse at its rising and falling edges. Ideally, only a single input should be required (i.e. the one long pulse) for minimal part count. I've looked over several timer ics and none seem to fit the bill or are too pricey like the 6993s. Can anyone suggest an appropriate ic? I would think it a common enough function to warrant a dedicated chip. Thanks, Ted > > The "standard" approach... > ><http://www.analog-innovations.com/SED/PulseOnBothEdges.png> > > ...Jim Thompson
I guess that's always good for a pulse wide enough to clock a flip-flop. -- This email has not been checked by half-arsed antivirus software
On 12 Jan 2018 20:10:01 GMT, Jasen Betts <jasen@xnet.co.nz> wrote:

>On 2018-01-12, Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: >> On Thu, 11 Jan 2018 10:23:09 -0800 (PST), tedj121@gmail.com wrote: >> >>>Hi, >>> >>>I'd like to take a long input pulse and trigger a much shorter one-shot pulse at its rising and falling edges. Ideally, only a single input should be required (i.e. the one long pulse) for minimal part count. I've looked over several timer ics and none seem to fit the bill or are too pricey like the 6993s. Can anyone suggest an appropriate ic? I would think it a common enough function to warrant a dedicated chip. Thanks, Ted >> >> The "standard" approach... >> >><http://www.analog-innovations.com/SED/PulseOnBothEdges.png> >> >> ...Jim Thompson > >I guess that's always good for a pulse wide enough to clock a >flip-flop.
If you're squeamish add an even number of inverters between pin-5 of the 'HC74 and pin-2 of the'HC86. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | STV, Queen Creek, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | It's what you learn, after you know it all, that counts.