Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

4017 chip won't behave!

848 views
Skip to first unread message

orion....@virgin.net

unread,
Dec 9, 2012, 10:59:22 AM12/9/12
to
HI all,

I've been having problems with a timer circuit I'm building. It uses a chain of seven CD4017BE decade counters. The first in the chain gets clock pulses from a 555 running at about 10Hz. I take the last output from this chip (puts out one pulse for every 10 input pulses) and feed it to the input of the next chip where the same thing is done and so on so the pulses get time-divided by 10 at each stage. All's fine up to decade 4, then something odd happens. Instead of just pulsing, the output goes high and remains high until the next pulse comes along and toggles it back to low, so this stage's output is high for far too long.
For this prototype I'm using rat's nest on PCB construction and believe I've paid proper attention to grounding and decoupling. Funny thing is, if I transfer the components over to proto-board, the problem disappears. Do these symptoms ring a bell with anyone? Is the 4017 particularly layout-sensitive?
It's driving me nuts.

Any ideas?

Adrian Tuddenham

unread,
Dec 9, 2012, 11:44:33 AM12/9/12
to
Missing power or ground connection?

Most chips in the CD series will still work without at least one of
these connections by powering or grounding themselves from the
input-catching diodes as long as at least one input is in a suitable
state. When all inputs go to '0' (if the + is missing) or to '1' (if
the Ov is missing) the chip will get in a tangle. The chip will also be
isolated from its power supply decoupling, so it will be susciptible to
spurious effects from sharp edges on input waveforms or even nearby
tracks.

A floating reset line can also cause havoc.


--
~ Adrian Tuddenham ~
(Remove the ".invalid"s and add ".co.uk" to reply)
www.poppyrecords.co.uk

Tim Williams

unread,
Dec 9, 2012, 4:59:49 PM12/9/12
to
Could be signal bounce in your "rat's nest"?

More likely with 74LS and anything else with enough speed and drive (74HC,
AC, etc.), and rather unlikely with the weak outputs from CD4k, but...

This is different from supply decoupling: a sufficiently long wire or
trace will bounce (potentially causing multiple transitions) or rise
slowly (confusing clock inputs). The result can be seen on the 'scope.

If nothing else, you can try RC-filtering the signals and adding a schmitt
trigger buffer to maintain the necessary edge speed for the clock input.

Tim

--
Deep Friar: a very philosophical monk.
Website: http://seventransistorlabs.com

<orion....@virgin.net> wrote in message
news:724b1b72-adab-4b06...@googlegroups.com...

orion....@virgin.net

unread,
Dec 9, 2012, 6:25:08 PM12/9/12
to
On Sunday, 9 December 2012 22:59:49 UTC+1, Tim Williams wrote:
> Could be signal bounce in your "rat's nest"?
>
>
>
> More likely with 74LS and anything else with enough speed and drive (74HC,
>
> AC, etc.), and rather unlikely with the weak outputs from CD4k, but...
>
>
>
> This is different from supply decoupling: a sufficiently long wire or
>
> trace will bounce (potentially causing multiple transitions) or rise
>
> slowly (confusing clock inputs). The result can be seen on the 'scope.
>
>
>
> If nothing else, you can try RC-filtering the signals and adding a schmitt
>
> trigger buffer to maintain the necessary edge speed for the clock input.
>

The 4017 already has Schmidt trigger input anyway. I did consider long traces, but they're not long. Plus when I hook the thing up using proto-board I'm using patch wires that are several inches long and they don't seem to cause any problem; the thing seems to prefer protoboard and long patch wires to my PCB arrangement!

bloggs.fred...@gmail.com

unread,
Dec 9, 2012, 6:39:26 PM12/9/12
to
The main idea is to read the datasheet with comprehension. Phrases like "each decoded output remains high for one full clock cycle" and " a carry out signal completes one full cycle every 10 input clock cycles" should be clues. The datasheet is telling you the first O9 output stays high for 0.1 sec, the period of the 555 clock, and has a period of 10x0.1=1 sec. So the second counter O9 will remain high for 1s and has a period of 10 sec. The third counter O9 remains high for 10s and has a period of 100 sec, and the fourth counter O9 remains high for 100s and has a period of 1000 sec.In your case, the simplest fix to get the final output pulse width you want is to use another 555 like so:
Please view in a fixed-width font such as Courier.

.
.
.
.
. V+
. |
. .---[R]------+ 0.7xRC
. | | 555
. | -------------- ->| |<-
. | | V+ | __
. +-----+THRESH OUT|--> | |
. | | | __| |__
. O9 +-----+TRIG DIS|-.
. _. ..._ | | | |
. | | >--|-----|RST GND | |
. __| |__ | --------------- |
. | | |
. +-------------|--------'
. C | |
. === |
. | |
. '-------------+
. |
. ---
. ///
.
.
.

bloggs.fred...@gmail.com

unread,
Dec 9, 2012, 6:53:34 PM12/9/12
to
On Sunday, December 9, 2012 10:59:22 AM UTC-5, orion....@virgin.net wrote:
Revise the 555 one-shot to be as shown:

Please view in a fixed-width font such as Courier.

.
.
.
.
. V+
. |
. .-[R]------+ 1.1xRC
. | | 555
. | -------------- ->| |<-
. | | V+ | __
. +---+THRESH OUT|--> | |
. | | | __| |__
. O9 .--[10K]-+----|---+TRIG DIS|-.
. _. ..._ | | | | | |
. | | >-+-------------|---|RST GND | |
. __| |__ | | --------------- |
. | | | |
. | +-----------|--------'
. 470p| C | |
. === === |
. | | |
. '----+-----------+

petrus bitbyter

unread,
Dec 10, 2012, 11:51:03 AM12/10/12
to

<orion....@virgin.net> schreef in bericht
news:724b1b72-adab-4b06...@googlegroups.com...
Reading the thread so far there must be something wrong on your PCB. A
short, an open, a wrong or missing connection, a bad solder joint or
something like that. I simply can't come to another conclusion. Finding it
may take some old-fashioned, tedious legwork. Use your eyes, maybe a
magnifier and an ohmmeter that can measure real low resistances. Power- and
ground connections are primary suspects, as stated already but there are no
non-suspects. Did you try to increase the clock and check the circuit's
behavior with a 'scope? As the breadboard version works, one does not expect
flaws in the schematic. Nevertheless, if you can show it somehow I'd like to
look at it.



petrus bitbyter


orion....@virgin.net

unread,
Dec 10, 2012, 2:52:45 PM12/10/12
to


Perhaps I can load something up to abse if it's still possible. Thanks for your comments and I fully agree with what you say, but Fred Bloggs has just raised other valid points which need to be looked at (thanks, Fred) but there is still no explanation for why it works one way on breadboard and another way on PCB!

whit3rd

unread,
Dec 10, 2012, 4:34:17 PM12/10/12
to
On Sunday, December 9, 2012 7:59:22 AM UTC-8, orion....@virgin.net wrote:

> I've been having problems with... a chain of seven CD4017BE decade counters.

> For this prototype I'm using rat's nest on PCB construction and believe I've paid proper attention to grounding and decoupling. Funny thing is, if I transfer the components over to proto-board, the problem disappears.

Check to be sure you've connected all the unused inputs; the extra capacitance of
a protoboard can mask floating-input issues.

bloggs.fred...@gmail.com

unread,
Dec 10, 2012, 4:59:43 PM12/10/12
to
On Monday, December 10, 2012 2:52:45 PM UTC-5, orion....@virgin.net wrote:
> Perhaps I can load something up to abse if it's still possible. Thanks for your comments and I fully agree with what you say, but Fred Bloggs has just raised other valid points which need to be looked at (thanks, Fred) but there is still no explanation for why it works one way on breadboard and another way on PCB!

One explanation is that you misidentified a timing capacitor or resistor for the 555 astable on the proto-board and it is oscillating at a much higher frequency there.

orion....@virgin.net

unread,
Dec 10, 2012, 6:12:12 PM12/10/12
to
It's *only* the problem stage that I have rebuilt on protoboard; it's still being fed by the output from the last good stage of the rat's nest.

orion....@virgin.net

unread,
Dec 10, 2012, 6:17:08 PM12/10/12
to
You mean unused OUTputs, surely? There's only one clock input line. But if you DO mean unused outputs (pins 1 through to 7) they're not connected to anything; I just cut their leads off to save having to drill extra holes that wouldn't be used anyway. I'm guessing it's safe to leave unused outputs floating, right? They don't have to be grounded or whatever do they?

David Eather

unread,
Dec 10, 2012, 6:56:19 PM12/10/12
to
All CMOS INPUTS must be tied high or low - they do not like to float.
Outputs don't have to be connected to anything.
Have you thought of getting a copy of the CMOS cookbook by Lancaster? Full
of good information on the 4000 series.

bloggs.fred...@gmail.com

unread,
Dec 10, 2012, 7:34:46 PM12/10/12
to
You need to make more quantitative observations. Telling us the final output pulse is "far too long" doesn't cut it. At your clock frequency the final stage outputs are supposed to be high for 100 seconds, and they're supposed to last high until the next clock pulse comes along. How long are they high now and how long do you want them to stay high? It may have been the rats nest was in error, it's really easy to get unwanted cross-coupling into inputs with messy wiring, so the last stage in the rats nest could be getting double triggered on its clock input.

orion....@virgin.net

unread,
Dec 11, 2012, 3:25:35 AM12/11/12
to

> All CMOS INPUTS must be tied high or low - they do not like to float.
>
> Outputs don't have to be connected to anything.
>
> Have you thought of getting a copy of the CMOS cookbook by Lancaster? Full
>
> of good information on the 4000 series.

Oh, I wasn't aware of that. I've just basically 'plugged' the output of one 4017 into the input of the next with no pull-down resistors at all; never occurred to me that might be necessary, quite honestly. I'll modify accordingly. Hopefully that might fix that aspect of the problem.
Many thanks!

orion....@virgin.net

unread,
Dec 11, 2012, 3:33:41 AM12/11/12
to

> You need to make more quantitative observations. Telling us the final output pulse is "far too long" doesn't cut it. At your clock frequency the final stage outputs are supposed to be high for 100 seconds, and they're supposed to last high until the next clock pulse comes along. How long are they high now and how long do you want them to stay high? It may have been the rats nest was in error, it's really easy to get unwanted cross-coupling into inputs with messy wiring, so the last stage in the rats nest could be getting double triggered on its clock input.

I see. Well obviously I've made a fundamental mis-assumption about how these chips work. I'd assumed the pulse duration (the ON state)would remain the same throughout the chain of 4017s and that only the OFF time *between* them would increase. Clearly from what you say that's not what happens. So basically if I want to end up with say one, one second long 'high' on the final output after a delay of 7 days (for example) I need to back calculate so the first pulses from the 555 have a much shorter ON duration than 1 second. That's what your suggested mod is designed to do, I guess? I can see that now. Many thanks for the clarification.

Rocky

unread,
Dec 11, 2012, 5:59:37 AM12/11/12
to
On Tuesday, December 11, 2012 10:25:35 AM UTC+2, orion....@virgin.net wrote:
> > All CMOS INPUTS must be tied high or low - they do not like to float.
>
> Oh, I wasn't aware of that. I've just basically 'plugged' the output of one 4017 into the input of the next with no pull-down resistors at all; never occurred to me that might be necessary, quite honestly. I'll modify accordingly. Hopefully that might fix that aspect of the problem.
Only the unused inputs need pullups or pulldowns. If they are connected to a permanently enabled output then they don't need them.

John Fields

unread,
Dec 11, 2012, 6:35:05 AM12/11/12
to
On Tue, 11 Dec 2012 00:25:35 -0800 (PST), orion....@virgin.net
wrote:
---
CMOS inputs only require being pulled high or low if they aren't
connected to anything. That is, if an output is connected to an
input, then a pull-up or a pull-down resistor is neither necessary or
desired.

Unused inputs need to be connected directly to Vcc or GND, with no
resistor.

--
JF

orion....@virgin.net

unread,
Dec 11, 2012, 6:49:36 AM12/11/12
to
All the 'reset' pins in the chain of 4017s I have tied to ground via 10k resistors. Looks like another thing worth investigating....

John Fields

unread,
Dec 11, 2012, 7:05:13 AM12/11/12
to
On Tue, 11 Dec 2012 00:33:41 -0800 (PST), orion....@virgin.net
wrote:

>
>> You need to make more quantitative observations. Telling us the final output pulse is "far too long" doesn't cut it. At your clock frequency the final stage outputs are supposed to be high for 100 seconds, and they're supposed to last high until the next clock pulse comes along. How long are they high now and how long do you want them to stay high? It may have been the rats nest was in error, it's really easy to get unwanted cross-coupling into inputs with messy wiring, so the last stage in the rats nest could be getting double triggered on its clock input.
>
>I see. Well obviously I've made a fundamental mis-assumption about how these chips work. I'd assumed the pulse duration (the ON state)would remain the same throughout the chain of 4017s and that only the OFF time *between* them would increase. Clearly from what you say that's not what happens. So basically if I want to end up with say one, one second long 'high' on the final output after a delay of 7 days (for example) I need to back calculate so the first pulses from the 555 have a much shorter ON duration than 1 second. That's what your suggested mod is designed to do, I guess? I can see that now. Many thanks for the clarification.

Take a look at the timing diagram on page 4 of the 4017 data sheet at:

http://www.nxp.com/documents/data_sheet/74HC_HCT4017.pdf

and you'll see that the outputs advance with each leading edge of the
clock.

That means that if you ripple clocked the chain, the leading edges of
the output used to drive the next higher stage would be ten times
wider than the edges of the clock being used to drive the lesser
stage, the result being that the output pulse widths would increase by
a factor of 10 for each counter in the chain.

If you want your final output pulse to be as wide as one period of
your 555's output, then the way to do it is shown in Figure 12 on page
15 of the data sheet.

There may be better counters out there for your application, depending
on what it is. Can you share and post a schematic of your circuit
somewhere?

--
JF

John Fields

unread,
Dec 11, 2012, 9:36:58 AM12/11/12
to
---
True, but I don't think that's what you want since all that looks like
is a Johnson counter with more outputs than a single 4017.

If you're looking to output a single pulse as wide as your clock,
after a long delay, then you'll need to do it using a different
counter.


--
JF

orion....@virgin.net

unread,
Dec 11, 2012, 10:09:23 AM12/11/12
to
On Tuesday, 11 December 2012 15:36:58 UTC+1, John Fields wrote:

OK. Thanks for the datasheet link. The sheets I've seen up until now have been very terse affairs, badly photocopied and hard to see. This one is way more informative.
I'm not in a position to post a schematic at this time, but from what you said in your last post it wouldn't assist much if the chips I'm using are wrong.

Basically all I want to do is make up a time-lock for a cash safe. After a 7 day delay during which the safe remains locked shut, one timed pulse of 1 second releases its electromagnetic lock and the safe can be opened. Obviously that pulse if it's from CMOS will need to be beefed up to actuate the lock, but that's the easy bit.
Why are 4017s not suitable for the timing part of the application?

John Fields

unread,
Dec 11, 2012, 12:24:29 PM12/11/12
to
On Tue, 11 Dec 2012 07:09:23 -0800 (PST), orion....@virgin.net
wrote:
---
Now that we know your application, the 4017's can be used successfully
by treating them like decade counters and decoding the outputs to
correspond to the seven day delay.

Since there are 604800 seconds in seven days, you'll need six counters
hooked up like this: (View using a fixed-pitch font)


. X100000
. +-------+
. +---|MR Q5-9|
. +--O|CP1 |
. | +-|CP0 |
. | | | Q6|---------+
. | | +-------+ |
. | | |
. | +-----------+ |
. | X10000 | |
. | +-------+ | |
. +---|MR Q5-9|-+ |
. +--O|CP1 | |
. | +-|CP0 | |
. | | | Q0|-------+ |
. | | +-------+ | |
. | | | |
. | +-----------+ | |
. | X1000 | | | Vcc
. | +-------+ | | | |
. +---|MR Q5-9|-+ | | | +----+
. +--O|CP1 | | | +-|A |
. | +-|CP0 | | | +-|B |
. | | | Q4|-----+ | +----|C |
. | | +-------+ | +------|D |
. | | +--------|E |
. | +-----------+ | Y|O-+
. | X100 | +--------|F | |
. | +-------+ | | +------|G | |
. +---|MR Q5-9|-+ | | +----|H | |
. +--O|CP1 | | | | +----+ |
. | +-|CP0 | | | | HC30 |
. | | | Q8|-----+ | | |
. | | +-------+ | | |
. | | | | |
. | +-----------+ | | |
. | X10 | | | |
. | +-------+ | | | |
. +---|MR Q5-9|-+ | | |
. +--O|CP1 | | | |
. | +-|CP0 | | | |
. | | | Q0|-------+ | |
. | | +-------+ | |
. | | | |
. | +-----------+ | |
. | X1 | | |
. | +-------+ | | |
. +---|MR Q5-9|-+ | |
.GND>----+--O|CP1 | | |
.1Hz>--------|CP0 | | |
. | Q0|---------+ |
. +-------+ |
. |
. +-----------------------------------------+
. |
. | Vcc
. | |
. | +---------+-----+-------+--------+----+
. | |R1 |R2 |R3 8| |R4 |
. | [10k] [10k][910k] +---+---+ [1M] |
. | | C1 | Rt| 2|_ Vcc _|4 | |C3
. +---+-[100nF]-+-----|--O|T R|O---+ [100nF]
. | 6| | |C4 |
. +---|TH 555| [10nF] |
. | 7|_ |3 | |
. +--O|D OUT|O---|----|--->1 SECOND
. +| | GND | | |
. [1�F] +---+---+ | |
. Ct|C2 1| U1 | |
. +-------+--------+----+
. |
. GND

So what happens is that when the counter chain gets to 604800, the
output of the HC30 will go low, triggering the 555, which is where
your lock-unlatching pulse comes from, with its width being totally
independent of the clock pulse's.

I'd be a little careful about what I used for the 1Hz source, since
with just a 1% error there'll be about a +/- 2 hour window when the
latch will let go.

--
JF

Jim Thompson

unread,
Dec 11, 2012, 1:25:14 PM12/11/12
to
An excellent digital guru buddy of mine _always_ ties unused inputs
thru resistors. Need to test/debug something, it makes it easy to
insert extra signals.

...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.

orion....@virgin.net

unread,
Dec 11, 2012, 1:36:37 PM12/11/12
to
> . [1�F] +---+---+ | |
>
> . Ct|C2 1| U1 | |
>
> . +-------+--------+----+
>
> . |
>
> . GND
>
>
>
> So what happens is that when the counter chain gets to 604800, the
>
> output of the HC30 will go low, triggering the 555, which is where
>
> your lock-unlatching pulse comes from, with its width being totally
>
> independent of the clock pulse's.
>
>
>
> I'd be a little careful about what I used for the 1Hz source, since
>
> with just a 1% error there'll be about a +/- 2 hour window when the
>
> latch will let go.
>
>
>
> --
>
> JF

Many thanks, John!
I haven't studied your circuit in detail yet, so may have to ask for clarification on a few things, but it sounds good by your description. I'm not the least concerned with a 1% error; it can be out by up to 12hrs either way as far as I'm concerned and would still be absolutely fine for my purposes.

Thanks again.

bloggs.fred...@gmail.com

unread,
Dec 11, 2012, 2:22:47 PM12/11/12
to
On Tuesday, December 11, 2012 12:24:29 PM UTC-5, John Fields wrote:

> I'd be a little careful about what I used for the 1Hz source, since
>
> with just a 1% error there'll be about a +/- 2 hour window when the
>
> latch will let go.
>

Very good point- one of the most accurate long duration timebases available for applications like this is the power line. You should get +/- a few seconds accuracy over a seven day interval. The OP really needs something like this:
http://www.intersil.com/en/products/timing-and-digital/rtcs/real-time-clocks/ISL12032.html
There he has provisions for battery backup and external crystal timebase to coast through black/brown-outs. It can't miss. The drawback is it needs a controller, but it's worth the effort for the vastly improved performance over what he has now.

orion....@virgin.net

unread,
Dec 11, 2012, 4:14:58 PM12/11/12
to
Thanks, but it's way too much for my modest requirements. JF's design should do nicely if I can get it up and running.

John Fields

unread,
Dec 12, 2012, 11:40:07 AM12/12/12
to
On Tue, 11 Dec 2012 10:36:37 -0800 (PST), orion....@virgin.net
wrote:


>Many thanks, John!
>I haven't studied your circuit in detail yet, so may have to ask for clarification on a few things, but it sounds good by your description. I'm not the least concerned with a 1% error; it can be out by up to 12hrs either way as far as I'm concerned and would still be absolutely fine for my purposes.
>
>Thanks again.

---

I tried to simulate the circuit and it seems that something is very
wrong.

I'll see if I can find out what the problem is and post back when I
do.

Sorry 'bout that. :-(


--
JF

orion....@virgin.net

unread,
Dec 12, 2012, 5:27:42 PM12/12/12
to
Thanks very much, John. I'm sure a man of your caliber won't struggle too much to get to the root of the problem, whatever it is. I've already ordered the NAND gat chip but haven't laid out a new board yet, so no harm done! :)
I'll be interested to read your findings in due course...

bloggs.fred...@gmail.com

unread,
Dec 12, 2012, 5:34:11 PM12/12/12
to
You want to use Q0 of each counter to clock the succeeding stage and not Q9. A rising edge on Q0 of any single stage means it has received ten clocks, so that is the time to increment the next decade by one. You probably want to include a manual MR input too. Maybe not a bad idea to add some filtering to the 555 trigger to avoid false triggering due to decoding hazards by the '30.

bloggs.fred...@gmail.com

unread,
Dec 12, 2012, 5:41:32 PM12/12/12
to
You could use the CARRY_OUT too, same difference, the leading edges are coincident.

orion....@virgin.net

unread,
Dec 12, 2012, 6:17:31 PM12/12/12
to
Thank you for your interest, Fred. The more the merrier.
John, if you could post the LTSpice netlist for your suggested circuit that would be very helpful to my understanding at this end. Thanks again.

josephkk

unread,
Dec 13, 2012, 1:17:05 AM12/13/12
to
On Tue, 11 Dec 2012 07:09:23 -0800 (PST), orion....@virgin.net wrote:

Oh my. Hitting a one second window once a week is very difficult in human
operated systems. Perhaps you may wish to be more thoughtful about your
design requirements.

All in all this application begs for a micro-controller based solution.

?-)

Jasen Betts

unread,
Dec 13, 2012, 3:08:15 AM12/13/12
to
On 2012-12-11, orion....@virgin.net <orion....@virgin.net> wrote:

> Basically all I want to do is make up a time-lock for a cash safe. After a 7 day delay during which the safe remains locked shut, one timed pulse of 1 second releases its electromagnetic lock and the safe can be opened. Obviously that pulse if it's from CMOS will need to be beefed up to actuate the lock, but that's the easy bit.
> Why are 4017s not suitable for the timing part of the application?

For large counts chips like 4060 and 4040 may be easier to use

A 4060 running with the oscillator running at 16Hz will produce
1hz pulses on pin 7 and a period of 1024 seconds on pin 3

A week is 604800 seconds so you need to divide that rate by 590

Which can probably be done using a diode-and and a 4040 counter.

A D-type flip-flop to mix that with the 1hz rate to get the 1 second
pulse and another flip-flop to halt the circuit after that.

If you can live with slightly wider pulses to the output you can use
a divide bt 512 instead of 590 which is easier to arrange using these
binary counters.

if you need more precision than the R-C oscillator at the input can
provide perhaps you can use the frequency of the AC supply.

--
⚂⚃ 100% natural

--- news://freenews.netfront.net/ - complaints: ne...@netfront.net ---

orion....@virgin.net

unread,
Dec 13, 2012, 4:11:41 AM12/13/12
to
On Thursday, 13 December 2012 07:17:05 UTC+1, josephkk wrote:

>
> All in all this application begs for a micro-controller based solution.


Too unnecessarily complicated for my modest purposes, I'd say. That's why I'd like to stick to something close to the original concept. The circuit John Fields posted, if it can be fixed-up, would be close to ideal for me.

orion....@virgin.net

unread,
Dec 13, 2012, 4:16:37 AM12/13/12
to
On Thursday, 13 December 2012 09:08:15 UTC+1, Jasen Betts wrote:

> if you need more precision than the R-C oscillator at the input can
>
> provide perhaps you can use the frequency of the AC supply.

I had considered this. Sniff some mains inductively, then pass it through a rectifier and an inverter/Schmidt trigger to convert it to a square wave and then count the pulses up to a pre-determined limit. Accurate for sure, but not being terribly au fait with what chips are out there I don't know of an IC that could count up to 604,800 decimal and put out a signal pulse when that target has been reached. I'd still rather stick with JF's design...

orion....@virgin.net

unread,
Dec 13, 2012, 4:18:27 AM12/13/12
to
On Thursday, 13 December 2012 10:16:37 UTC+1, orion....@virgin.net wrote:

> I had considered this. Sniff some mains inductively, then pass it through a rectifier and an inverter/Schmidt trigger to convert it to a square wave and then count the pulses up to a pre-determined limit. Accurate for sure, but not being terribly au fait with what chips are out there I don't know, of an IC that could count up to 604,800 decimal and put out a signal pulse when that target has been reached. I'd still rather stick with JF's design...

Sorry, that should have been 604,800 x 50 from a 50Hz mains source...

John Fields

unread,
Dec 13, 2012, 10:05:07 AM12/13/12
to
On Wed, 12 Dec 2012 15:17:31 -0800 (PST), orion....@virgin.net
wrote:


>John, if you could post the LTSpice netlist for your suggested circuit that would be very helpful to my understanding at this end. Thanks again.

---
Done.

It's at abse under "4017 counter chain".

BTW, the circuit is fine; I was counting the clocks incorrectly. :-(

--
JF

John Fields

unread,
Dec 13, 2012, 11:28:38 AM12/13/12
to
On Thu, 13 Dec 2012 01:18:27 -0800 (PST), orion....@virgin.net
wrote:

>On Thursday, 13 December 2012 10:16:37 UTC+1, orion....@virgin.net wrote:
>
>> I had considered this. Sniff some mains inductively, then pass it through a rectifier and an inverter/Schmidt trigger to convert it to a square wave and then count the pulses up to a pre-determined limit. Accurate for sure, but not being terribly au fait with what chips are out there I don't know, of an IC that could count up to 604,800 decimal and put out a signal pulse when that target has been reached. I'd still rather stick with JF's design...
>
>Sorry, that should have been 604,800 x 50 from a 50Hz mains source...

---
That's 30,420,000 pulses, easily done with 2 HC4020s and an HC30

--
JF

orion....@virgin.net

unread,
Dec 13, 2012, 2:11:48 PM12/13/12
to
Thanks for the update, John. Nice to hear you didn't have to do any further mods on it. After a great deal of fruitless searching my ISP has informed me they no longer provide access to alt.binaries hierarchy and couldn't or wouldn't give me a reason! The netlist is just ascii so could you post it here, perhaps?
TIA.

John Fields

unread,
Dec 13, 2012, 2:47:38 PM12/13/12
to
On Thu, 13 Dec 2012 11:11:48 -0800 (PST), orion....@virgin.net
wrote:

>Thanks for the update, John. Nice to hear you didn't have to do any further mods on it. After a great deal of fruitless searching my ISP has informed me they no longer provide access to alt.binaries hierarchy and couldn't or wouldn't give me a reason! The netlist is just ascii so could you post it here, perhaps?

---
Yes, but it uses different parts than those supplied with LTspice so
you couldn't see the schematic properly, or run it.

If you email me your email address I'll get the files to you that way.

--
JF

orion....@virgin.net

unread,
Dec 13, 2012, 5:36:17 PM12/13/12
to
You're a gentleman, sir.


lang...@fonz.dk

unread,
Dec 13, 2012, 5:44:27 PM12/13/12
to
complicated? it is an 8pin part and a few lines of code

-Lasse

orion....@virgin.net

unread,
Dec 13, 2012, 5:48:37 PM12/13/12
to
Yes. Complicated for *my* modest needs. I don't require a Raspberry Pi or even a mere PIC for a 7 day timer!

lang...@fonz.dk

unread,
Dec 13, 2012, 5:58:08 PM12/13/12
to
guess there's different kinds of complicated there': a 50cent pic/avr
etc. with everything including the oscillator in a 8 pin package and
then there's a whole gaggle of logic ic's and some sort of oscillator

-Lasse


John Fields

unread,
Dec 13, 2012, 7:15:07 PM12/13/12
to
---
Actually, it's a little more complicated than that since to get the
timing exactly right, going that way, one needs to consider the
instruction execution time.

Have you considered that?

--
JF

Jim Thompson

unread,
Dec 13, 2012, 7:19:04 PM12/13/12
to
uP's are the "solution" to all problems... and generally also the
failure mechanism.

Michael A. Terrell

unread,
Dec 13, 2012, 7:26:30 PM12/13/12
to

Jim Thompson wrote:
>
> uP's are the "solution" to all problems... and generally also the
> failure mechanism.


The solution for those who can't think through the actual circuit
logic needed, to do it without a processor. As someone who has seen too
much poorly designed crap with a PIC, I prefer a real design that can be
repaired in a few years when the PIC of the week is NLA.

Jim Thompson

unread,
Dec 13, 2012, 8:12:46 PM12/13/12
to
The closest I've come is a number of my chip designs now include a
self-calibration procedure built-in. "Almosta" uP, but not quite :-)

Ralph Barone

unread,
Dec 13, 2012, 8:56:25 PM12/13/12
to
So divide it twice. 30,240,000 must have two factors that make the design
simple. Choose one to be a large power of two for elegance and just brute
force the other divider.

Jeroen Belleman

unread,
Dec 14, 2012, 5:52:43 AM12/14/12
to
You know quite well that the hardware complexity of a micro-
controller solution has nothing in common with that of wired
logic.

The hassle of installing the software, learning the chip's
structure and language, getting to grips with flashing the
thing, etc. is a good deal more involved than wiring a few
CD4017s together. Of course, once you've mastered all that,
the project becomes immensely easier and blows most slow
discrete logic designs completely out of the water.

It's a hurdle, to be sure, but it's worth the investment.

Jeroen Belleman

lang...@fonz.dk

unread,
Dec 14, 2012, 7:08:43 AM12/14/12
to
On Dec 14, 1:15 am, John Fields <jfie...@austininstruments.com> wrote:
> On Thu, 13 Dec 2012 14:44:27 -0800 (PST), "langw...@fonz.dk"
have you? where, in counting the number of timer ticks until you
reach 7 days,
does instruction time enter the equation?

you are concerned about the few nanonseconds it takes to set an output
when
the 7 days has passed?

-Lasse

lang...@fonz.dk

unread,
Dec 14, 2012, 7:10:42 AM12/14/12
to
On Dec 14, 1:19 am, Jim Thompson <To-Email-Use-The-Envelope-I...@On-My-
Web-Site.com> wrote:
> On Thu, 13 Dec 2012 18:15:07 -0600, John Fields
>
>
>
>
>
>
>
>
>
> <jfie...@austininstruments.com> wrote:
> >On Thu, 13 Dec 2012 14:44:27 -0800 (PST), "langw...@fonz.dk"
> ><langw...@fonz.dk> wrote:
>
> >>On Dec 13, 10:11 am, orion.osi...@virgin.net wrote:
> >>> On Thursday, 13 December 2012 07:17:05 UTC+1, josephkk wrote:
>
> >>> > All in all this application begs for a micro-controller based solution.
>
> >>> Too unnecessarily complicated for my modest purposes, I'd say. That's why I'd like to stick to something close to the original concept. The circuit John Fields posted, if it can be fixed-up, would be close to ideal for me.
>
> >>complicated? it is an 8pin part and a few lines of code
>
> >---
> >Actually, it's a little more complicated than that since to get the
> >timing exactly right, going that way, one needs to consider the
> >instruction execution time.
>
> >Have you considered that?
>
> uP's are the "solution" to all problems... and generally also the
> failure mechanism.
>

so are transistors ic's etc. I don't see the difference

-Lasse

lang...@fonz.dk

unread,
Dec 14, 2012, 7:21:18 AM12/14/12
to
On Dec 14, 1:26 am, "Michael A. Terrell" <mike.terr...@earthlink.net>
wrote:
or maybe those who insist on gaggles of logic chips when a mcu is a
better simpler cheaper
solution is those who are too old to understand them

a processor isn't always the right solution but more and more often it
is,
and dismissing it as "not a real design" that is just stupid


-Lasse

Jasen Betts

unread,
Dec 14, 2012, 7:12:43 AM12/14/12
to
Do you now of a cheap usb pic programmer with linux support?

Jasen Betts

unread,
Dec 14, 2012, 7:14:52 AM12/14/12
to
microcrontrollers typically have internal counters.
just set one of them at a suitable rate etc...

lang...@fonz.dk

unread,
Dec 14, 2012, 7:51:34 AM12/14/12
to
On Dec 14, 1:12 pm, Jasen Betts <ja...@xnet.co.nz> wrote:
> On 2012-12-13, langw...@fonz.dk <langw...@fonz.dk> wrote:
>
> > On Dec 13, 10:11 am, orion.osi...@virgin.net wrote:
> >> On Thursday, 13 December 2012 07:17:05 UTC+1, josephkk  wrote:
>
> >> > All in all this application begs for a micro-controller based solution.
>
> >> Too unnecessarily complicated for my modest purposes, I'd say. That's why I'd like to stick to something close to the original concept. The circuit John Fields posted, if it can be fixed-up, would be close to ideal for me.
>
> > complicated? it is an 8pin part and a few lines of code
>
> Do you now of a cheap usb pic programmer with linux support?
>

I've not used pic

for AVR I build one of these: http://www.fischl.de/usbasp/
on a veroboard and programmed it in an old computer with parallelport

but you can get one based on the same design all over the place for a
few $

http://www.ebay.com/itm/1PCS-AVR-Programmer-USB-USBasp-USBISP-3-3V-5V-ATMEGA8-New-/370713301056?pt=LH_DefaultDomain_0&hash=item56503c1040

it should work out of the box on linux, Mac and with libusb on Win

-Lasse

Michael A. Terrell

unread,
Dec 14, 2012, 8:32:39 AM12/14/12
to
Why wait a week for the auction to end when you can BIN for $3.42 US?

http://www.ebay.com/itm/300807526071

Spehro Pefhany

unread,
Dec 14, 2012, 9:59:17 AM12/14/12
to
On 14 Dec 2012 12:12:43 GMT, the renowned Jasen Betts
<ja...@xnet.co.nz> wrote:

>On 2012-12-13, lang...@fonz.dk <lang...@fonz.dk> wrote:
>> On Dec 13, 10:11 am, orion.osi...@virgin.net wrote:
>>> On Thursday, 13 December 2012 07:17:05 UTC+1, josephkk  wrote:
>>>
>>> > All in all this application begs for a micro-controller based solution.
>>>
>>> Too unnecessarily complicated for my modest purposes, I'd say. That's why I'd like to stick to something close to the original concept. The circuit John Fields posted, if it can be fixed-up, would be close to ideal for me.
>>
>> complicated? it is an 8pin part and a few lines of code
>
>Do you now of a cheap usb pic programmer with linux support?

PICkit 2 or 3 has Linux support, depending on what exactly you need-
IDE/debugger, command-line programmer etc. The genuine ones are $45 at
Digikey, clones of the PICkit 2 are available starting at $10 or so.
Supports a wide range of uChip chips.

Lots of different chips in the $0.50-$2 range in small quantities..
and many of them include usable power-on reset circuits and other
useful peripherals.

It used to cost the equivalent of six month's salary for an engineer
to get a crappy pokey emulator- now you can do it for a few minutes
worth of time.. and the tools are infinitely better.


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
sp...@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com

John Fields

unread,
Dec 14, 2012, 10:04:13 AM12/14/12
to
---
Just as I thought...
---

>you are concerned about the few nanonseconds it takes to set an output
>when
>the 7 days has passed?

---
So this thing is running about a 300MHz clock?

--
JF

John Fields

unread,
Dec 14, 2012, 10:07:09 AM12/14/12
to
---
Then you obviously can't see the fact that a device with a million
transistors in it is more likely to fail than one with a hundred in
it.


--
JF

John Fields

unread,
Dec 14, 2012, 10:18:27 AM12/14/12
to
On Fri, 14 Dec 2012 04:21:18 -0800 (PST), "lang...@fonz.dk"
<lang...@fonz.dk> wrote:

>On Dec 14, 1:26 am, "Michael A. Terrell" <mike.terr...@earthlink.net>
>wrote:
>> Jim Thompson wrote:
>>
>> > uP's are the "solution" to all problems... and generally also the
>> > failure mechanism.
>>
>>    The solution for those who can't think through the actual circuit
>> logic needed, to do it without a processor.  As someone who has seen too
>> much poorly designed crap with a PIC, I prefer a real design that can be
>> repaired in a few years when the PIC of the week is NLA.

>or maybe those who insist on gaggles of logic chips when a mcu is a
>better simpler cheaper
>solution is those who are too old to understand them

---
Or have no need or desire to.

What you seem to be intent on misunderstanding is that the OP
specifically asked for help with a hardware problem, and _not_ for a
software solution to be shoved down his throat as you PIC Nazis so
dearly love to do.

--
JF

lang...@fonz.dk

unread,
Dec 14, 2012, 10:22:07 AM12/14/12
to
On Dec 14, 4:07 pm, John Fields <jfie...@austininstruments.com> wrote:
> On Fri, 14 Dec 2012 04:10:42 -0800 (PST), "langw...@fonz.dk"
that's not the point, everything can fail if you build something with
transistors and it fails it is the transistors fault. if you build it
with an uP irt's the uPs fault

And is more likely to fail? a single tested part with 1mill
transistors
or 10 * 100 transistor ics, 100's of solderings and what not

it all depends

-Lasse

Jim Thompson

unread,
Dec 14, 2012, 10:27:07 AM12/14/12
to
Excess complexity equals asking for trouble.

lang...@fonz.dk

unread,
Dec 14, 2012, 10:41:00 AM12/14/12
to
On Dec 14, 4:04 pm, John Fields <jfie...@austininstruments.com> wrote:
> On Fri, 14 Dec 2012 04:08:43 -0800 (PST), "langw...@fonz.dk"
>
>
>
>
>
>
>
>
>
> <langw...@fonz.dk> wrote:
> >On Dec 14, 1:15 am, John Fields <jfie...@austininstruments.com> wrote:
> >> On Thu, 13 Dec 2012 14:44:27 -0800 (PST), "langw...@fonz.dk"
>
> >> <langw...@fonz.dk> wrote:
> >> >On Dec 13, 10:11 am, orion.osi...@virgin.net wrote:
> >> >> On Thursday, 13 December 2012 07:17:05 UTC+1, josephkk wrote:
>
> >> >> > All in all this application begs for a micro-controller based solution.
>
> >> >> Too unnecessarily complicated for my modest purposes, I'd say. That's why I'd like to stick to something close to the original concept. The circuit John Fields posted, if it can be fixed-up, would be close to ideal for me.
>
> >> >complicated? it is an 8pin part and a few lines of code
>
> >> ---
> >> Actually, it's a little more complicated than that since to get the
> >> timing exactly right, going that way, one needs to consider the
> >> instruction execution time.
>
> >> Have you considered that?
>
> >have you?  where, in counting the number of timer ticks until you
> >reach 7 days,
> >does instruction time enter the equation?
>
> ---
> Just as I thought...


please enlighten me, in what way does instruction execution time have
any relevance?


> ---
>
> >you are concerned about the few nanonseconds it takes to set an output
> >when
> >the 7 days has passed?
>
> ---
> So this thing is running about a 300MHz clock?
>

you can pick 1MHz if you like and it'll be microseconds

just be sure to get a really really really good clock reference if you
want
that seven day period to be accurate down to microseconds


-Lasse

John Fields

unread,
Dec 14, 2012, 11:21:45 AM12/14/12
to
OK, let's say you have a subroutine which generates 1ms ticks and you
want to use it to generate a 100ms delay.

Looking at Motorola's 68HCXXX code for a jump to a subroutine can
result in 7 machine cycles to execute the instruction, and the return
from the subroutine costs 6 machine cycles.

That's 700 cycles for the JSR and 600 for the RTS, a total of 1300.

Now, if you're running the thing with a 1µs clock and a machine cycle
is 2 clocks, then your 100ms is going to be - instead of 100ms -
101.26ms.

Plus, you'll need an index in to keep track of how many 1ms ticks have
gone by, so that's even more error added, all because you thought
instruction execution time is irrelevant.


>
>
>> ---
>>
>> >you are concerned about the few nanonseconds it takes to set an output
>> >when
>> >the 7 days has passed?
>>
>> ---
>> So this thing is running about a 300MHz clock?
>
>you can pick 1MHz if you like and it'll be microseconds

---
Dance?
---

>just be sure to get a really really really good clock reference if you
>want that seven day period to be accurate down to microseconds

---
I think the OP said something about a +/- 3 hour window around the
target time would be OK, so your feigned concern is irrelevant.

--
JF

lang...@fonz.dk

unread,
Dec 14, 2012, 11:37:27 AM12/14/12
to
On Dec 14, 5:21 pm, John Fields <jfie...@austininstruments.com> wrote:
> On Fri, 14 Dec 2012 07:41:00 -0800 (PST), "langw...@fonz.dk"
> Now, if you're running the thing with a 1 s clock and a machine cycle
> is 2 clocks, then your 100ms is going to be - instead of 100ms -
> 101.26ms.
>
> Plus, you'll need an index in to keep track of how many 1ms ticks have
> gone by, so that's even more error added, all because you thought
> instruction execution time is irrelevant.
>

why on earth would you use a subroutine to generate a delay?

setup the timer to do X ms ticks and count, done ..


>
>
> >> ---
>
> >> >you are concerned about the few nanonseconds it takes to set an output
> >> >when
> >> >the 7 days has passed?
>
> >> ---
> >> So this thing is running about a 300MHz clock?
>
> >you can pick 1MHz if you like and it'll be microseconds
>
> ---
> Dance?

you seem to be doing it already ;)

> ---
>
> >just be sure to get a really really really good clock reference if you
> >want that seven day period to be accurate down to microseconds
>
> ---
> I think the OP said something about a +/- 3 hour window around the
> target time would be OK, so your feigned concern is irrelevant.
>

so use a timer and instruction time has no relavance

-Lasse

lang...@fonz.dk

unread,
Dec 14, 2012, 11:51:27 AM12/14/12
to
On Dec 14, 4:27 pm, Jim Thompson <To-Email-Use-The-Envelope-I...@On-My-
Web-Site.com> wrote:
> On Fri, 14 Dec 2012 04:10:42 -0800 (PST), "langw...@fonz.dk"
>
>
>
>
>
>
>
>
>
> <langw...@fonz.dk> wrote:
> >On Dec 14, 1:19 am, Jim Thompson <To-Email-Use-The-Envelope-I...@On-My-
> >Web-Site.com> wrote:
> >> On Thu, 13 Dec 2012 18:15:07 -0600, John Fields
>
> >> <jfie...@austininstruments.com> wrote:
> >> >On Thu, 13 Dec 2012 14:44:27 -0800 (PST), "langw...@fonz.dk"
> >> ><langw...@fonz.dk> wrote:
>
> >> >>On Dec 13, 10:11 am, orion.osi...@virgin.net wrote:
> >> >>> On Thursday, 13 December 2012 07:17:05 UTC+1, josephkk wrote:
>
> >> >>> > All in all this application begs for a micro-controller based solution.
>
> >> >>> Too unnecessarily complicated for my modest purposes, I'd say. That's why I'd like to stick to something close to the original concept. The circuit John Fields posted, if it can be fixed-up, would be close to ideal for me.
>
> >> >>complicated? it is an 8pin part and a few lines of code
>
> >> >---
> >> >Actually, it's a little more complicated than that since to get the
> >> >timing exactly right, going that way, one needs to consider the
> >> >instruction execution time.
>
> >> >Have you considered that?
>
> >> uP's are the "solution" to all problems... and generally also the
> >> failure mechanism.
>
> >so are transistors ic's etc. I don't see the difference
>
> >-Lasse
>
> Excess complexity equals asking for trouble.
>

so when you make an IC has self-calibration procedure built-in and
uses more
transistors than a discrete solution that does more or less the same
it is
asking for trouble?


-Lasse

lang...@fonz.dk

unread,
Dec 14, 2012, 11:55:29 AM12/14/12
to
On Dec 14, 4:18 pm, John Fields <jfie...@austininstruments.com> wrote:
> On Fri, 14 Dec 2012 04:21:18 -0800 (PST), "langw...@fonz.dk"
>
> <langw...@fonz.dk> wrote:
> >On Dec 14, 1:26 am, "Michael A. Terrell" <mike.terr...@earthlink.net>
> >wrote:
> >> Jim Thompson wrote:
>
> >> > uP's are the "solution" to all problems... and generally also the
> >> > failure mechanism.
>
> >> The solution for those who can't think through the actual circuit
> >> logic needed, to do it without a processor. As someone who has seen too
> >> much poorly designed crap with a PIC, I prefer a real design that can be
> >> repaired in a few years when the PIC of the week is NLA.
> >or maybe those who insist on gaggles of logic chips when a mcu is a
> >better simpler cheaper
> >solution is those who are too old to understand them
>
> ---
> Or have no need or desire to.

the Amish way?

>
> What you seem to be intent on misunderstanding is that the OP
> specifically asked for help with a hardware problem, and _not_ for a
> software solution to be shoved down his throat as you PIC Nazis so
> dearly love to do.

PIC nazi?

must have really hit a sore spot

-Lasse

John Fields

unread,
Dec 14, 2012, 11:55:20 AM12/14/12
to
---
Lots of reasons, but I see you haven't gotten there yet.
---

>setup the timer to do X ms ticks and count, done ..

---
The count has no overhead?
---

>> >> >you are concerned about the few nanonseconds it takes to set an output
>> >> >when
>> >> >the 7 days has passed?
>>
>> >> ---
>> >> So this thing is running about a 300MHz clock?
>>
>> >you can pick 1MHz if you like and it'll be microseconds
>>
>> ---
>> Dance?
>
>you seem to be doing it already ;)

---
How so?
---

>> >just be sure to get a really really really good clock reference if you
>> >want that seven day period to be accurate down to microseconds
>>
>> ---
>> I think the OP said something about a +/- 3 hour window around the
>> target time would be OK, so your feigned concern is irrelevant.
>>
>
>so use a timer and instruction time has no relavance

---
That's precisely what I did in hardware.

--
JF

lang...@fonz.dk

unread,
Dec 14, 2012, 12:18:41 PM12/14/12
to
On Dec 14, 5:55 pm, John Fields <jfie...@austininstruments.com> wrote:
> On Fri, 14 Dec 2012 08:37:27 -0800 (PST), "langw...@fonz.dk"
no, set the timer to auto reload and it'll keep ticking at X ms

the few instruction it takes to see that it has ticked and
increment a count does not accumulate

> ---
>
> >> >> >you are concerned about the few nanonseconds it takes to set an output
> >> >> >when
> >> >> >the 7 days has passed?
>
> >> >> ---
> >> >> So this thing is running about a 300MHz clock?
>
> >> >you can pick 1MHz if you like and it'll be microseconds
>
> >> ---
> >> Dance?
>
> >you seem to be doing it already ;)
>
> ---
> How so?

you seem to be working real hard to make up artifical reasons why
solving a problem with a uP solution in a single 50cent 8 pin IC
is an inferior solution to a bunch of logic ICs


> ---
>
> >> >just be sure to get a really really really good clock reference if you
> >> >want that seven day period to be accurate down to microseconds
>
> >> ---
> >> I think the OP said something about a +/- 3 hour window around the
> >> target time would be OK, so your feigned concern is irrelevant.
>
> >so use a timer and instruction time has no relavance
>
> ---
> That's precisely what I did in hardware.
>

and that is precisely what you would do in a uP

-Lasse

John Fields

unread,
Dec 14, 2012, 4:17:54 PM12/14/12
to
On Fri, 14 Dec 2012 08:55:29 -0800 (PST), "lang...@fonz.dk"
<lang...@fonz.dk> wrote:

>On Dec 14, 4:18 pm, John Fields <jfie...@austininstruments.com> wrote:
>> On Fri, 14 Dec 2012 04:21:18 -0800 (PST), "langw...@fonz.dk"
>>
>> <langw...@fonz.dk> wrote:
>> >On Dec 14, 1:26 am, "Michael A. Terrell" <mike.terr...@earthlink.net>
>> >wrote:
>> >> Jim Thompson wrote:
>>
>> >> > uP's are the "solution" to all problems... and generally also the
>> >> > failure mechanism.
>>
>> >> The solution for those who can't think through the actual circuit
>> >> logic needed, to do it without a processor. As someone who has seen too
>> >> much poorly designed crap with a PIC, I prefer a real design that can be
>> >> repaired in a few years when the PIC of the week is NLA.
>> >or maybe those who insist on gaggles of logic chips when a mcu is a
>> >better simpler cheaper
>> >solution is those who are too old to understand them
>>
>> ---
>> Or have no need or desire to.
>
>the Amish way?

---
And you're demeaning the Amish; why?

What I was talking about was that most of the "clients" we get around
here have needs for rather simple solutions for rather simple problems
- a lot of which could certainly be solved with an MCU - but they have
neither the need nor the desire to learn how to do that; all they want
is instructions on how to wire up some hardware in order to get their
job done.

You and your ilk seem to think there's something wrong with that and
never fail to diss the simple hardware solutions while offering no
code or solution of your own but the neverending mantra "MCU is best
for you."
---

>> What you seem to be intent on misunderstanding is that the OP
>> specifically asked for help with a hardware problem, and _not_ for a
>> software solution to be shoved down his throat as you PIC Nazis so
>> dearly love to do.
>
>PIC nazi?
>
>must have really hit a sore spot

---
I've been designing with microcontrollers since the 6502, so your
comments are largely passe, Lasse.

But, I will admit that you're annoying in that you cast aspersions on
what you seem to know very little about.

--
JF

orion....@virgin.net

unread,
Dec 14, 2012, 5:43:46 PM12/14/12
to
I've been following this thread with an increasing amount of frustration over this Lasse character's inability to see reason. I stated I wasn't bothered if the timer was half a day out by 7 days, yet he's going on about microsecond precision which is *totally not necessary* for my purposes. I guess he didn't read the very simple spec I outlined. If I went down the route he suggests I'd *never* get the damn thing running. NEVER!

bloggs.fred...@gmail.com

unread,
Dec 14, 2012, 11:07:42 PM12/14/12
to
On Wednesday, December 12, 2012 6:17:31 PM UTC-5, orion....@virgin.net wrote:
>
> Thank you for your interest, Fred. The more the merrier.
>
> John, if you could post the LTSpice netlist for your suggested circuit that >would be very helpful to my understanding at this end. Thanks again.

You could get away with 3x 74HC40103 downcounters and lose the output decode and one-shot, but the drawback is you have to tie 24 preset bit inputs to 1s and 0s. So it's not as easy to put together as the 4017 approach.

Jasen Betts

unread,
Dec 15, 2012, 2:49:36 AM12/15/12
to
Shipping to: Worldwide
Excludes: Alaska/Hawaii, US Protectorates, APO/FPO, Africa, Asia,
Central America and Caribbean, Europe, Middle East, North America,
Oceania, Southeast Asia, South America, Albania, Andorra, Austria,
Belarus, Belgium, Bosnia and Herzegovina, Bulgaria, Croatia, Republic
of, Cyprus, Czech Republic, Denmark, Estonia, Finland, France,
Germany, Gibraltar, Greece, Guernsey, Hungary, Iceland, Ireland,
Italy, Jersey, Latvia, Liechtenstein, Lithuania, Luxembourg,
Macedonia, Malta, Moldova, Monaco, Montenegro, Netherlands, Norway,
Poland, Portugal, Romania, San Marino, Serbia, Slovakia, Slovenia,
Spain, Svalbard and Jan Mayen, Sweden, Switzerland, Ukraine, Vatican
City State

Dunno what their game is,

Jasen Betts

unread,
Dec 15, 2012, 2:58:43 AM12/15/12
to
On 2012-12-14, John Fields <jfi...@austininstruments.com> wrote:
> On Fri, 14 Dec 2012 07:41:00 -0800 (PST), "lang...@fonz.dk"
><lang...@fonz.dk> wrote:
>
> ---
> OK, let's say you have a subroutine which generates 1ms ticks and you
> want to use it to generate a 100ms delay.

that would be doing it the hard way.

John Fields

unread,
Dec 15, 2012, 4:47:34 AM12/15/12
to
---
I've posted a simpler solution on abse using a 4020 and a 4024.

Check out Re: Simpler 7 day counter.

--
JF

John Fields

unread,
Dec 15, 2012, 4:59:08 AM12/15/12
to
On Fri, 14 Dec 2012 14:43:46 -0800 (PST), orion....@virgin.net
wrote:


>I've been following this thread with an increasing amount of frustration over this Lasse character's inability to see reason. I stated I wasn't bothered if the timer was half a day out by 7 days, yet he's going on about microsecond precision which is *totally not necessary* for my purposes. I guess he didn't read the very simple spec I outlined. If I went down the route he suggests I'd *never* get the damn thing running. NEVER!

---
I tried emailing you at the virgin.net address, but it bounced. Do you
have another address?

BTW, I've come up with a simple 5 chip solution for the timer
including the clock, the decode and control circuitry, and the output
pulser.

--
JF

John Devereux

unread,
Dec 15, 2012, 7:48:26 AM12/15/12
to
Is it? That entirely depends on the devices I think, and what failure
mode your are talking about. Most of the recent microcontrollers I have
seen seem to have 2kV ESD pin ratings. I wonder what the equivalent
rating is for 4000 series CMOS?

What is the relative reliability of a modern single chip microcontroller
vs a board full of CMOS logic?

--

John Devereux

bloggs.fred...@gmail.com

unread,
Dec 15, 2012, 7:49:17 AM12/15/12
to
I'd like to see it, but all the providers have discontinued access to binaries because of the pedophilia activity.

John Fields

unread,
Dec 15, 2012, 8:36:21 AM12/15/12
to
On Sat, 15 Dec 2012 04:49:17 -0800 (PST),
bloggs.fred...@gmail.com wrote:

>On Saturday, December 15, 2012 4:47:34 AM UTC-5, John Fields wrote:
>> On Fri, 14 Dec 2012 20:07:42 -0800 (PST),
>>
>> bloggs.fred...@gmail.com wrote:
>>
>>
>>
>> >On Wednesday, December 12, 2012 6:17:31 PM UTC-5, orion....@virgin.net wrote:
>>
>> >>
>>
>> >> Thank you for your interest, Fred. The more the merrier.
>>
>> >>
>>
>> >> John, if you could post the LTSpice netlist for your suggested circuit that >would be very helpful to my understanding at this end. Thanks again.
>>
>> >
>>
>> >You could get away with 3x 74HC40103 downcounters and lose the output decode and one-shot, but the drawback is you have to tie 24 preset bit inputs to 1s and 0s. So it's not as easy to put together as the 4017 approach.
>>
>>
>>
>> ---
>>
>> I've posted a simpler solution on abse using a 4020 and a 4024.
>>
>>
>>
>> Check out Re: Simpler 7 day counter.
>>
>
>I'd like to see it, but all the providers have discontinued access to binaries because of the pedophilia activity.

---
I don't think that's true, since most of them provide over 3 years of
binary retention. Here's a list:

http://www.ngprovider.com/

You're using Google and I don't believe they've _ever_ provided access
to alt.binaries.*

But no matter; if you like I'll email the files to you.

What's your email address?

--
JF

ChairmanOfTheBored

unread,
Dec 15, 2012, 8:52:50 AM12/15/12
to
On Sat, 15 Dec 2012 12:48:26 +0000, John Devereux <jo...@devereux.me.uk>
wrote:

>John Fields <jfi...@austininstruments.com> writes:
>
>> ---
>> Then you obviously can't see the fact that a device with a million
>> transistors in it is more likely to fail than one with a hundred in
>> it.
>
>Is it?

Brainless much?

> That entirely depends on the devices I think,

That's what he said. A single failure mode is far more likely on the
million transistor element device.

> and what failure
>mode your are talking about.

Works. Doesn't work. Real simple.

> Most of the recent microcontrollers I have
>seen seem to have 2kV ESD pin ratings.

Whoopie!

> I wonder what the equivalent
>rating is for 4000 series CMOS?

Do you know how ANY modern chips are fabbed?

>What is the relative reliability of a modern single chip microcontroller
>vs a board full of CMOS logic?

Relatively miles from your flawed assessment.

Michael A. Terrell

unread,
Dec 15, 2012, 9:23:17 AM12/15/12
to
Earthlink still provides access through Giganews. 'Fred' used to have
an Earthlink Email address.

orion....@virgin.net

unread,
Dec 15, 2012, 9:25:31 AM12/15/12
to
I was wondering why it was proving impossible to find that board!
Seems things are worse than that, even. My latest ISP wasn't able to give me the string for setting up my newsreader (something like "news.shiteisp.com") because their tech support personell had never heard of Usenet!
Seems like the net as we knew it is being replaced by a clone of the broadcast media. :(

orion....@virgin.net

unread,
Dec 15, 2012, 9:27:02 AM12/15/12
to
Yup. I'll be mailing you shortly. ISP problems this end causing me grief! :(

Michael A. Terrell

unread,
Dec 15, 2012, 9:29:36 AM12/15/12
to

Jasen Betts wrote:
>
> Shipping to: Worldwide
> Excludes: Alaska/Hawaii, US Protectorates, APO/FPO, Africa, Asia,
> Central America and Caribbean, Europe, Middle East, North America,
> Oceania, Southeast Asia, South America, Albania, Andorra, Austria,
> Belarus, Belgium, Bosnia and Herzegovina, Bulgaria, Croatia, Republic
> of, Cyprus, Czech Republic, Denmark, Estonia, Finland, France,
> Germany, Gibraltar, Greece, Guernsey, Hungary, Iceland, Ireland,
> Italy, Jersey, Latvia, Liechtenstein, Lithuania, Luxembourg,
> Macedonia, Malta, Moldova, Monaco, Montenegro, Netherlands, Norway,
> Poland, Portugal, Romania, San Marino, Serbia, Slovakia, Slovenia,
> Spain, Svalbard and Jan Mayen, Sweden, Switzerland, Ukraine, Vatican
> City State
>
> Dunno what their game is,


Ask them, not me. I don't see the United States on that list. It
looks like poorly composed boiler plate that you are supposed to delete
the areas you do sell to.

It was listed in US dollars, on the US site. If the really don't ship
to the US, then file a compliant with Ebay. I had no problem buying
several. They are the reason i was asking about a crimper for
Berg/Dupont header terminals a while back.

Michael A. Terrell

unread,
Dec 15, 2012, 9:38:49 AM12/15/12
to

orion....@virgin.net wrote:
>
> fred wrote:
> >
> > I'd like to see it, but all the providers have discontinued access to binaries because of the pedophilia activity.
>
> I was wondering why it was proving impossible to find that board!
>
> Seems things are worse than that, even. My latest ISP wasn't able to give me the string for setting up my newsreader (something like "news.shiteisp.com") because their tech support personell had never heard of Usenet!
>
> Seems like the net as we knew it is being replaced by a clone of the broadcast media. :(


Usenet Replayer has short term storage of some binary newsgroups.
Text only messages are spotty at best, but most binary mesages get
through for the groups they do host.

bloggs.fred...@gmail.com

unread,
Dec 15, 2012, 10:03:45 AM12/15/12
to
The email address listed here for NG should work....

John Fields

unread,
Dec 15, 2012, 10:44:17 AM12/15/12
to
On Sat, 15 Dec 2012 07:03:45 -0800 (PST),
bloggs.fred...@gmail.com wrote:


>> What's your email address?
>>
>>
>>
>> --
>>
>> JF
>
>The email address listed here for NG should work....

---
Done!

--
JF

bloggs.fred...@gmail.com

unread,
Dec 15, 2012, 1:37:19 PM12/15/12
to
On Saturday, December 15, 2012 10:44:17 AM UTC-5, John Fields wrote:

>
> Done!

It's not getting there for some reason.

John Fields

unread,
Dec 15, 2012, 1:45:59 PM12/15/12
to
---
Yeah, I just now looked and it bounced. I sent it to:

bloggs.fred...@gmail.com

Probably should be just fredb...@gmail.com, huh?


--
JF

bloggs.fred...@gmail.com

unread,
Dec 15, 2012, 2:45:41 PM12/15/12
to
bloggs.fred...@gmail.com is how my gmail are addressed...maybe it has something to do with a binary attachment.

John Fields

unread,
Dec 15, 2012, 3:40:20 PM12/15/12
to
On Sat, 15 Dec 2012 11:45:41 -0800 (PST),
bloggs.fred...@gmail.com wrote:

>On Saturday, December 15, 2012 1:45:59 PM UTC-5, John Fields wrote:
>> On Sat, 15 Dec 2012 10:37:19 -0800 (PST),
>>
>> bloggs.fred...@gmail.com wrote:
>>
>>
>>
>> >On Saturday, December 15, 2012 10:44:17 AM UTC-5, John Fields wrote:
>>
>> >
>>
>> >>
>>
>> >> Done!
>>
>> >
>>
>> >It's not getting there for some reason.
>>
>>
>>
>> ---
>>
>> Yeah, I just now looked and it bounced. I sent it to:
>>
>>
>>
>> bloggs.fred...@gmail.com
>>
>>
>>
>> Probably should be just fredb...@gmail.com, huh?
>>
>>
>>
>>
>>
>> --
>>
>> JF
>
>bloggs.fred...@gmail.com is how my gmail are addressed...maybe it has something to do with a binary attachment.

---
None of the attachments are binary; there are two .zip files, two .lib
files, and two .asc files.

In any case, there are free file transfer sites around, and I just
found one, ofile, which seems like it'll work.

I'm going to try to upload the files there and I'm successful
(or not), I'll let you know.

Didn't work...

Got any ideas?

--
JF

bloggs.fred...@gmail.com

unread,
Dec 15, 2012, 6:11:23 PM12/15/12
to
Try renaming the attribute for the zip file to something else like ".sch"- a lot of virus protection programs block .zip as a matter of course. Or maybe you can describe your logic system scheme in words.

orion....@virgin.net

unread,
Dec 15, 2012, 7:32:15 PM12/15/12
to
On Sunday, 16 December 2012 00:11:23 UTC+1, bloggs.fred...@gmail.com wrote:

> Try renaming the attribute for the zip file to something else like ".sch"- a lot of virus protection programs block .zip as a matter of course. Or maybe you can describe your logic system scheme in words.

I'm getting a problem with unzipping the two .zip files here too. The .asc files won't complete the schematic without them by the look of it. Which program were they created with, John?

John Fields

unread,
Dec 15, 2012, 7:35:01 PM12/15/12
to
On Sat, 15 Dec 2012 15:11:23 -0800 (PST),
bloggs.fred...@gmail.com wrote:

>On Saturday, December 15, 2012 3:40:20 PM UTC-5, John Fields wrote:
>> On Sat, 15 Dec 2012 11:45:41 -0800 (PST),

>> Didn't work...
>>
>>
>>
>> Got any ideas?
>>
>>
>>
>> --
>>
>> JF
>
>Try renaming the attribute for the zip file to something else like ".sch"- a lot of virus protection programs block .zip as a matter of course. Or maybe you can describe your logic system scheme in words.

---
Better yet, since a picture is worth a thousand words, I'll try to
email you a .pdf of the LTspice schematic so you can see what's going
on and, if you want to run the sim, I'll upload the schematic to the
LTspice user group at:

http://groups.yahoo.com/group/LTspice/

where you can find the support files necessary to run it.

--
JF

bloggs.fred...@gmail.com

unread,
Dec 15, 2012, 9:37:31 PM12/15/12
to
In the meantime, the 40103 counter based schematic would look like so. I wouldn't let the crystal scare you away from using it, they are dog simple, cheap and readily available. Almost any tuning fork style 32.768KHz will do, idealy you just match up the specified loading capacitance to be within the range of the capacitance shown. Any other form of timing for this duration doesn't make any sense at all. An RC-based oscillator with a time constant on the order of 1-second could easily be off by days.
Please view in a fixed-width font such as Courier.

.
.
. 7 DAY TIMER 2HZ CLK OPTION
.
. NOMINAL TIMING ERROR LESS THAN 1 MINUTE
.
.
. MANUAL START/ RESET VCC
. |
. .----------------+---------+
. | | 1N4148 |
. | --- |
. | / \ | CD40106
. | CNT --- | U1:A RST
. '---o | |\ ----
. \o--[100K]--+--[1K]--| o-------. |
. .---o | |/ | | CNT
. | RST | | | ----
. | | | |
. | === | |
. | 0.68u| | |
. | | | |
. +----------------+---------' |
. | |
. --- .----------------'
. COM |
. .-----------|---------------------------.
. | | |
. | | U2:A U1:B |
. | | __ U2:B |
. | '----\ \ |\ __ |
. | | o--+--| o----\ \ | __
. | .----/__/ | |/ | o-' TO PL U3-5
. | | | .--/__/ ASYNC LOAD
. | | | |
. | U2:C | | |
. | __ | CD4002 | |
. +----\ \ | U2 | |
. | | o--' | '-------.
. .--|----/__/ | |
. | | | |
. | | | U2:D |
. | | PRELOAD SYNCHRONIZER | __ |
. | | '------\ \ | __
. | | | o---+ TO TE U3
. | +------------------------------/__/ | CNT ENABLE
. | | |
. | | |
. | | .-----------------------------------'
. | | |
. .---|--|--|---------.
. | | | | | - 0 - - 0 - 2HZ CLK
. | | +--|------. | 1 0 0 0 0 0 0 0 0
. | | | | | | | | | | | | | | |
. | | | | ----------------------------------
. | | | | |__ __ __ |
. | | | | |PL PE MR P0 P1 P2 P3 P4 P5 P6 P7 |
. | | | | |__ |
. | | | '-----|TE __|
. | | | | 74HC40103 TC|--.
.2HZ | | | | U3 | |
.CLK>-|---+--|--------|>CP | |
. | | | | LSByte | |
. | | | ---------------------------------- |
. | | | |
. | | | .----------------------------------------'
. | | | |
. +---|--|-----|------. - 5 - - 7 - 2HZ CLK
. | | +-----|---. | 1 1 0 1 0 1 1 1 0
. | | | | | | | | | | | | | | |
. | | | | ----------------------------------
. | | | | |__ __ __ |
. | | | | |PL PE MR P0 P1 P2 P3 P4 P5 P6 P7 |
. | | | | |__ |
. | | | '--|TE __|
. | | | | 74HC40103 TC|--.
. | | | | U4 | |
. | +--|--------|>CP | |
. | | | | NSByte | |
. | | | ---------------------------------- |
. | | | |
. | | | .----------------------------------------'
. | | | |
. +---|--|-----|------. - 2 - - 1 - 2HZ CLK
. | | '-----|---. | 1 0 1 0 0 1 0 0 0
. | | | | | | | | | | | | | | 1/2s
. | | | ----------------------------------
. | | | |__ __ __ | ->| |<-
. | | | |PL PE MR P0 P1 P2 P3 P4 P5 P6 P7 | -- --
. | | | |__ | |__|
. | | '--|TE __|
. | | | 74HC40103 TC|-+-> OUT
. | | | U5 | | TO PULSE
. | '-----------|>CP | | STRETCHER
. | | MSByte | |
. | ---------------------------------- |
. | |
. '----------------------------------------------------'
. __
. <-- TO PE U3-5
. SYNC LOAD
.
. STARTS NEW 7-DAY COUNT
.
.
. 2HZ CLK OSC
.
. ----------------------------
. .---|RST |
. | | Q14|--->2HZ CLK
. --- | CD4060 |
. COM | U6 ____ |
. |PHI1 PHI0 |
. ----------------------------
. | |
. +--------[15M]--------+
. | |
. | |
. | CRYSTAL [330K]
. | _ |
. +--------||_||--------+
. | |_
. 10P | 32.768KHZ 39P |/|
. === ===
. | /|
. '---------+-----------'
. |
. ---
. COM
.
.
.
.
. OUTPUT PULSE STRETCHER
.
. VCC
. |_
. |/|
. [1M]
. U1 /|
. CD40106 |
. [10K]
. |\ |\ 1N4148 | |\
. OUT >--| o---| o--|<|---+-----+------| o--> TO SOLENOID DRVR
. |/ |/ 1U| | |/
. === === |<-1s->|
. - - | |0.01U ------
. | | --- --- | |
. |__| COM COM _| |_
.
.
.
. unused
. |\
. .--| o--
. | |/
. ---
. COM
.
.
.
.
.

John Fields

unread,
Dec 16, 2012, 5:47:21 AM12/16/12
to
On Sat, 15 Dec 2012 16:32:15 -0800 (PST), orion....@virgin.net
wrote:

>On Sunday, 16 December 2012 00:11:23 UTC+1, bloggs.fred...@gmail.com wrote:
>
>> Try renaming the attribute for the zip file to something else like ".sch"- a lot of virus protection programs block .zip as a matter of course. Or maybe you can describe your logic system scheme in words.
>
>I'm getting a problem with unzipping the two .zip files here too. The .asc files won't complete the schematic without them by the look of it. Which program were they created with, John?

---
http://www.startsdownload.com/winrar/

--
JF

orion....@virgin.net

unread,
Dec 16, 2012, 8:28:10 AM12/16/12
to
On Sunday, 16 December 2012 11:47:21 UTC+1, John Fields wrote:

>
> ---
>
> http://www.startsdownload.com/winrar/
>

OK, well they unpack fine now using Winrar. Hmmm. Interesting. Some unfamiliar bits here. Going to have to concentrate and study this. Which method are you recommending out of the two, BTW? The one using the Johnson Counters or the ripple counter one?

orion....@virgin.net

unread,
Dec 16, 2012, 8:46:29 AM12/16/12
to
Sorry, I mean the one using the 4017s or the one using the 4020/4024s?
It is loading more messages.
0 new messages