EEVblog Electronics Community Forum
Electronics => Projects, Designs, and Technical Stuff => Topic started by: con-f-use on July 16, 2015, 03:06:05 pm
-
What's the easiest/cheapest solution to create a pulse of about half a second every hour? It should run from between 3.3 to 6V @ <10mA and I don't care if the timing or pulse length is off by up to 50%. I.e. a two second pulse every half hour is fine, too. It will switch a small MOSFET as sort of a ghetto watchdog.
My idea is a 555 plus a CD4017 counter, but only because I have them lying around and they didn't cost me anything.
-
PIC10F200 cheap at 33 UK pennies but not the easiest because you have to program it >:D
-
I was thinking an ATTiny4, but you can get the PIC on aliexpres even cheaper at incredible 15 c € p.p. I'd be happier with a simple hardware solution, as I feel ashamed programming something so simple.
-
?No shame in using a programmable device for something so simple. If you want to make it more interesting, write it in assembly.
-
Hmmm. Its hard to beat a sot23-6 PIC or similar *IF* you already have the toolchain. Otherwise try a CD4060 ripple counter/oscillator, output from Q13, with Q13 diode ANDed with Q3 then to the RST pin (with a pullup) to make the Q13 pulse wide enough.
-
A recent chip, the LTC6991 :
http://www.linear.com/product/LTC6991 (http://www.linear.com/product/LTC6991)
It's much more expensive than a PIC10F200 though.
http://www.digikey.co.uk/product-search/en/integrated-circuits-ics/clock-timing-programmable-timers-and-oscillators/2556130?k=LTC6991 (http://www.digikey.co.uk/product-search/en/integrated-circuits-ics/clock-timing-programmable-timers-and-oscillators/2556130?k=LTC6991)
http://www.digikey.co.uk/product-detail/en/PIC10F200T-I%2FOT/PIC10F200T-I%2FOTCT-ND/665887 (http://www.digikey.co.uk/product-detail/en/PIC10F200T-I%2FOT/PIC10F200T-I%2FOTCT-ND/665887)
-
I feel ashamed programming something so simple.
In the nicest, most constructive way possible, take a slap in the face :box:
There are no bonus points awarded for making life difficult. If the easiest way to achieve a useful objective is to use a device that's theoretically much more capable, then use that device. A PIC won't get bored!
For what it's worth, I've used them myself for jobs which are no more complex. For example, I used one in an exhibition demo system to simulate pushing a button every few seconds. Power on, wait 10 seconds for the rest of the system to boot, then wiggle a pin up and down forever.
I have another PIC living inside a mouse, which I modified. I was playing a video game one evening in which rapid progress could be made by repeated clicking, so rather than suffer a repetitive strain injury, I opened the mouse and installed a PIC in between the left button and the mouse's CPU. That PIC simply reads the button state on one pin and drives it out on another, unless the button is held for more than 2 seconds, in which case the output wiggles.
Overkill? Inelegant? Sure, but all the project cost me was a 50p chip, and it provided a couple of hours' idle amusement. Much cheaper than a beer, and probably healthier too.