Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 95
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
All today's birthdays', congrats!
BlakFyre (37)
SENTRY (32)


Next birthdays
05/01 Shaun (35)
05/01 Spedy (31)
05/02 Adam Munich (31)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: General Science and Electronics
« Previous topic | Next topic »   

Simple RC Timer help

 1 2 3 
Move Thread LAN_403
Dr. Slack
Tue Apr 16 2013, 07:06AM
Dr. Slack Registered Member #72 Joined: Thu Feb 09 2006, 08:29AM
Location: UK St. Albans
Posts: 1659
It's CMOS *inputs* that must not be allowed to float, outputs are driven, so don't float anyway. So leave all the Qs open except Q13. Connect the MR input to ground by a pulldown resistor (100k or so, value doesn't matter too much), otherwise it won't return low when the trigger switch opens.

Make sure the diode that stops the oscillator is a silicon type. Almost any silicon diode will have low enough leakage (a cooking grade 1N4148, big rectifiers, whatever), but there are some schottkies or Germanium diodes which could leak enough to upset high value resistors.

The HC4060 will operate over a range of 2v to 6v, so you still should be able to get away without the regulator. That type of RC oscillator tends to be fairly stable with varying rail voltage, especially with high value resistors. Three AA cells will be <5v max when new, and 3v at a quite conservative end of life will still light a LED. Four AAs will just top the 6v rating when new, but as the absolute max rating (no damage) level of the 74HC series is +7v, you would still get away with that. The 7805 is a very old design with quite high quiescent current. If you want micropower, and insist on a regulator, then there are plenty of lower current regulators available.

Pretty tip. If you take a few more of the Q outputs to LEDs through resistors, you will get a binary indication of how long to go before the time runs out.
Back to top
HV Enthusiast
Tue Apr 16 2013, 12:34PM
HV Enthusiast Registered Member #15 Joined: Thu Feb 02 2006, 01:11PM
Location:
Posts: 3068
4 hours? Thats a long time.

You can purchase a digital timing module for about $10 bucks that will do this and more.

Link2
Back to top
klugesmith
Tue Apr 16 2013, 04:44PM
klugesmith Registered Member #2099 Joined: Wed Apr 29 2009, 12:22AM
Location: Los Altos, California
Posts: 1716
4 hours? Thats a long time.
You can purchase a digital timing module for about $10 bucks that will do this and more.
Hey EVR, I hope you haven't been around Boston this week.
We know Sigurthr isn't a suspect.

Back to top
Steve Conner
Tue Apr 16 2013, 04:52PM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
That isn't funny.
Back to top
Sigurthr
Tue Apr 16 2013, 08:39PM
Sigurthr Registered Member #4463 Joined: Wed Apr 18 2012, 08:08AM
Location: MI's Upper Peninsula
Posts: 597
klugesmith wrote ...

4 hours? Thats a long time.
You can purchase a digital timing module for about $10 bucks that will do this and more.
Hey EVR, I hope you haven't been around Boston this week.
We know Sigurthr isn't a suspect.



I have to agree with Mr. Conner, but that being said I understand comedy is a way for people deal with trajedy. No offense taken here, though I'm not sure if I should take that last line as a compliment or not, haha.

I'm basically just looking for a very basic pocket count down timer with visual indictaion that needs no reference to the actual time so that I don't have to keep changing and setting alarms every four hours of my waking life. I have Addison's disease and have to take medication every four hours while awake for the rest of my life or wind up in a near death state. I've been very inconvenienced by using traditional timing devices since my pill schedule does not stay constant relative to actual time of day and needs to be modified on the fly depending on stress, illness, etc. I figure once I get the basic 4hr timer going for a simple LED indicator it isn't much harder to make a simple AFO driven piezo unit and add a sounder if I so choose.

As far as going out and buying something, yes it probably is cheaper, and may be easier, but I would learn nothing. I do have a passion for electrical engineering, and am very proud of my projects. They are like my children. If my house were on fire, the first inanimate objects I would save by running in to the inferno would be my laptop, my oscilloscope, and my SSTC.

I plan on revising the schematic today with everyone's additions/corrections and posting the update for review. In the meantime could you all clarify one point: the datasheet states 25mA for output current. I assume this to mean total output current, so multiple LEDs driven from the Q outputs would have to add up to less of a load than 25mA. I'm planning on ~10mA for the main Q13 output given 5V input (3AAA idea which I like would vary the actual current based on battery pack voltage) so this doesn't leave a lot of headroom for battery droop if multiple LEDs are used, even if run at much lower currents. I could add a NPN output stage to each additional Q output if I wanted to try the binary led sequence display (which is very cool but totally unnecessary) but this would greatly increase parts count and size. Also, I'm not familiar with any low drop out 5Vregs - the LM78XX line and LM317T are all I have ever used.

I find a lot of what holds me back in electronic project pursuit and design is simply not knowing various components exist. I did not know of the existance of the 4040 or 4060 prior to this thread. I remember reading a few paragraphs about flip-flop counters for frequency division from my ARRL / Ham studies, but no actual part info or application data was provided. Hell, the only bipolar transistors I know of are the 2N2222 and 3055. I have a basic idea on how to make a push/pull totem pole with bipolar transistors, but have never done it because I don't know any suitable PNP devices or how to pick them. I know basics of transistor implementation, but that is it. Most of my experience is with power electronics dealing with various MOSFETs from either motor control or high voltage devices. In comparisson their operation is quite simple! Voltage controlled with simple standardized operational region bounds. Anyway, I digress; I learn best from the help of people like those here on 4HV, who know vastly more than me and are generous enough to offer their time and advice.

Component name/part# + datasheet + application notes and example circuit for the intended application make me a VERY happy man.
Back to top
Sulaiman
Tue Apr 16 2013, 10:17PM
Sulaiman Registered Member #162 Joined: Mon Feb 13 2006, 10:25AM
Location: United Kingdom
Posts: 3140
Just a few ideas;
1) carry two timers, with such a dependency on medication I wouldn't trust to just one
2) look for 'kitchen' timer or similar .. in uk Poundland sells them (1GBP c$1.50)(up to 99minutes)
3) power your device from a single lithium cell
4) incorporate a battery low warning
5) solder all connections .. don't rely on spring-type connections
A momentary loss of battery power could reset the timer etc.
6) construct so that any off/cancel etc. button/switch cannot be accidentally operated
7) look for a timer APP if you carry a smart 'phone

Maybe others have some useful suggestions ?

Back to top
Sigurthr
Wed Apr 17 2013, 02:43AM
Sigurthr Registered Member #4463 Joined: Wed Apr 18 2012, 08:08AM
Location: MI's Upper Peninsula
Posts: 597
I have a timer app on my phone but it continually counts down from the set time duration with no lasting indication that the time period has passed. It will beep once but that is it. I've been relying on sheer focus of mind to keep track of time for months, but as things get busier or I get distracted it gets harder to not slip up. Luckily, I can go 6 hours without too serious of complications and have always caught "late" swings in time. This timer I'm designing is aimed to be another layer of indication, not just the only one. I checked around for timers which can do the 4Hrs needed but the best I could find were all 90min or so. I want to stick to battery types I can buy locally, which is pretty much just alkaline cells. I kind of live out in the middle of no where, heh.

Here's the updated schematic, with the optional binary style display added in. I may or may not go for the optional stuff in the final build, it depends on budget and space constraints in the end. Link2

As for a low battery indicator, I've never made one, but I think it can be done with a zener and a 2N2222. I'd want it to trigger at ~7.5V since 7.2V is basically a dead 9V cell, and I'd like some notification before it goes dead. So, trigger voltage = zener voltage + 2n2222 turn on voltage of 0.66V. If I use a 6.8V zener like a 1N4736 then there won't be enough voltage to turn the 2N2222 on below 7.46V. The LED would be on as long as the battery isn't low, so it would be more of an "adequate battery indication" than a low battery indicatior. With a low current LED and adequate limiting resistor it shouldn't draw too much power as long as it is placed after the on/off switch but before the Vreg.

I think I have caught all the errors and changes, as well as refined the timing accuracy, let me know what ya think, and once again, my sincere thanks to you all!
Back to top
Dr. Slack
Wed Apr 17 2013, 08:02AM
Dr. Slack Registered Member #72 Joined: Thu Feb 09 2006, 08:29AM
Location: UK St. Albans
Posts: 1659
A few observations

While a 4060 is a 14 stage counter, Q13 is the 14th stage, so there are only 13 stages before it. This means that it toggles high after 8192 counts, not 16384, so you'll have to drop your RC oscillator to 1.75s period. At least on my reading of the data sheet. It's easy to adjust once you've built it so you can check against reality. Set the RC to 10kHz temporarily so you can check it in a second, rather than witing for four hours.

It's difficult to know how much attention to put into reliability. As it's a health threatening situation, perhaps a lot, but as it's not your only device, perhaps that's not so critical. What you do not want to do is be in a worse position after you've built it than before, so have it so not trustworthy and cause you stress about whether it's working correctly.

There are components in a circuit that can be guarranteed not to cause problems. Those components are the ones that you choose not to fit. There is a great benefit in simplifying the circuit to the essentials, less to design, to test, to mis-solder, and to fail in operation.

Sulaiman's point about momentary power loss is well made. Soldering the battery is one protection. A power loss alarm is another. Reducing the power consumption to the minimum so you can use a large decoupling cap (1000uF cap is small and cheap if only 6.3v, I'll bet it would power a 4060 for ages) to carry you through power outage is another.

I'd sincerely like to see the back of that regulator. The power taken by the 4060 is so miniscule it could be dwarfed by that wasted by the regulator. And you probably don't need it, it's a component you can leave out. Once you have the operating current down to near zero, you can think about soldering a battery. You don't have to take my assertion that the VCO period is reasonably independent of supply voltage. When you get your 4060s, build one up and test the period stability over supply voltage. Again, test at kHz, not sub-Hz, and change the oscillator capacitor, not the resistors, to change the period. Then see whether you need the regulator. If you find that the variation of period over the expected lifetime voltage from say 3 alkaline cells is too high, then the relatively contant 3v output of a lithium cell would be better, but only if the quiescent current is low enough. Those pretty count-down LEDs increase the quiescent current by orders of magnitude, so if you have a watch as well, they will be the first things to leave out.

There's always the danger of trying to over-think this sort of thing. It's known in the trade as 'paralysis by analysis', and as you might be able to tell, I'm particularly prone to it. So after you've read all the advice in the thread, just build and play with a 4060 type circuit, and see what parameters are important.
Back to top
Sigurthr
Wed Apr 17 2013, 09:22AM
Sigurthr Registered Member #4463 Joined: Wed Apr 18 2012, 08:08AM
Location: MI's Upper Peninsula
Posts: 597
Dr. Slack wrote ...

A few observations

While a 4060 is a 14 stage counter, Q13 is the 14th stage, so there are only 13 stages before it. This means that it toggles high after 8192 counts, not 16384, so you'll have to drop your RC oscillator to 1.75s period. At least on my reading of the data sheet.

Oh wow, thanks for catching that drastic datasheet interpretation error! Yes I didn't pay careful enough attention to the line up of the pulse train waveform to see it was the 8192 division that was the 14th stage, not the 16340 division. By my math I should be able to just change the timing capacitor to 7uF with no other changes and correct for the mistake, and still be very close to my 4hr mark (within a few minutes iirc). I'll just need a good way of hitting 7uF, an uncommon value. I'm thinking either 2x 3.3uF + a 0.47uF all in parallel.

The LDO I picked seemed to have an applicable current range and the lowest dropout I could find. 0.16V @ even 50mA draw is only 8mW of wasted power, so it seemed a good choice compared to the 7805 I chose earlier on. I agree about the simplification being important, if I add bells and whistles it will be in a later revision. I'm certainly not opposed to putting a 10,000uF 6.3V 'lytic across the regulated 5V line to protect against battery failure or power interruption, hell I might be able to find one of those 1F 5V supercaps they use in med eqiupment. I chose the 9V over the 1.5V cells for size and fitting a pocket better. I'm not going to be using any specially designed case for this so the smallest radioshack project box I can cram it in to, the better. Besides, I think a 9V can handle the 25mA draw without too much issue. If I went with a Li cell I would have to find an outside source as they are not available locally and I would complicate the build by needing new resistors for the LED(s) and a lowered operational voltage margin. I'm pretty twitchy when it comes to low voltage stuff, I'm used to mains powered equipment, so the idea of going to just 3v scares me a bit.
Back to top
Steve Conner
Wed Apr 17 2013, 10:45AM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
Interesting project! Now we know you're going to carry it around all the time, and you want something "medical grade", that puts a new spin on it. You could make something like the old Sinclair LED watch: pressing a button would turn on a time display. You could easily connect a binary LED display to the 4060, or use a Nixie tube if you're afraid of low voltages smile

FWIW, a quick google search for "medication reminder app" shows dozens of apps for IPhone and Android that will remind you when to take your pills.
Back to top
 1 2 3 

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.