how to build a clock with pulse for the hours!

On Sun, 07 Jun 2009 00:03:06 +0100, Nobody <nobody@nowhere.com> wrote:

On Sat, 06 Jun 2009 18:53:16 +0000, Jon Kirwan wrote:

[The problem I have with "doing up a microcontroller solution" for you
(which I'd otherwise consider doing free for a moment, at least), is
that no matter what I did you'd need some way of "setting the time."
This means an input device and some means of letting you know what the
clock thinks. Two-way communication of some kind. It's possible,
though perhaps difficult, to consider doing this using a single push
button and a single LED. Short and long LED blinks can communicate
surprising amounts of information.

A piezo speaker is slightly more expensive than an LED, but still only
needs one pin, and allows for different frequency beeps. Or even speech
synthesis (but that's pushing it on a 12F508, though).
---
Oh, my, how smart you want us to think you are, what with that 12F508
reference.

How many piezo speakers with only one pin can you cite?
---

Even simpler electronically: telephone-style pulse dialling. One input,
no outputs.
---
Geez, where do you creeps come from?

I'm thinking bad coupling.

JF
 
John Fields wrote:
On Sun, 07 Jun 2009 00:03:06 +0100, Nobody <nobody@nowhere.com> wrote:

On Sat, 06 Jun 2009 18:53:16 +0000, Jon Kirwan wrote:

[The problem I have with "doing up a microcontroller solution" for you
(which I'd otherwise consider doing free for a moment, at least), is
that no matter what I did you'd need some way of "setting the time."
This means an input device and some means of letting you know what the
clock thinks. Two-way communication of some kind. It's possible,
though perhaps difficult, to consider doing this using a single push
button and a single LED. Short and long LED blinks can communicate
surprising amounts of information.

A piezo speaker is slightly more expensive than an LED, but still only
needs one pin, and allows for different frequency beeps. Or even speech
synthesis (but that's pushing it on a 12F508, though).

---
Oh, my, how smart you want us to think you are, what with that 12F508
reference.

How many piezo speakers with only one pin can you cite?
---

Even simpler electronically: telephone-style pulse dialling. One input,
no outputs.

---
Geez, where do you creeps come from?

I'm thinking bad coupling.

Pinholed comdoms.



--
You can't have a sense of humor, if you have no sense!
 
On Sun, 07 Jun 2009 01:50:06 +0000, Jon Kirwan wrote:

Even simpler electronically: telephone-style pulse dialling. One input,
no outputs.

I used to be perfectly able to dial a phone number merely using the
phone's hang-up mechanism. Yes, that can work. What I _have_ done
before is used the difference between a short press and a long one to
select different paths
a.k.a. Morse code. It's rather ironic that it disappeared into
obsolescence around the same time that everything has become digital.

and used the LED to signal the user what was
happening. Kind of a press short, LED blinks in certain way to let
you know that's what it interpreted; or press and hold and the LED
would go into a different state to indicate that it had registered the
long press as a long press. Different menu systems entered either
way. Etc. While cheap and easy enough to implement, it can be
tedious to the user. ;)
That's the advantage of the phone-dial system. Replace the button with a
photodiode plus a disc with 10 holes; the uC interface is the same, but
it's simpler for the user. I had originally thought of a safe-style
combination lock, but that requires two pins for quadrature encoding.
 
On Sat, 06 Jun 2009 21:10:28 -0500, John Fields wrote:

[The problem I have with "doing up a microcontroller solution" for you
(which I'd otherwise consider doing free for a moment, at least), is
that no matter what I did you'd need some way of "setting the time."
This means an input device and some means of letting you know what the
clock thinks. Two-way communication of some kind. It's possible,
though perhaps difficult, to consider doing this using a single push
button and a single LED. Short and long LED blinks can communicate
surprising amounts of information.

A piezo speaker is slightly more expensive than an LED, but still only
needs one pin, and allows for different frequency beeps. Or even speech
synthesis (but that's pushing it on a 12F508, though).

---
Oh, my, how smart you want us to think you are, what with that 12F508
reference.
What's your beef, exactly?

AFAICT, the 12F508 is the cheapest model which can drive an external
crystal.

How many piezo speakers with only one pin can you cite?
I said it only *needs* one pin on the uC.

Even simpler electronically: telephone-style pulse dialling. One input,
no outputs.

---
Geez, where do you creeps come from?
Again, what's your beef, exactly? If you think there's a technical
problem, maybe you should state it rather than just spewing ad-hominem
attacks.

FWIW, I find this problem interesting as it mirrors a common issue in
software development, namely that the code to provide the user interface
is often an order of magnitude more complex than the code it's interfacing
to.
 
On Sat, 06 Jun 2009 20:04:43 -0500, John Fields
<jfields@austininstruments.com> wrote:

On Fri, 05 Jun 2009 10:03:33 +0100, dave <dave@127.0.0.1> wrote:

Wonder if some kind person can describe how I can build a circuit that
is basically a black-box (clock) that provides a short pulse - that
outputs 1 pulse for 1 o'clcok 2 pulse for 2 o'clock etc?

I don't even need a display - but would need some means to set the
time for the pulses to be on the hour.

What I need it for is to drive a small solenoid to which is attached a
hammer that strikes a (real) metal gong. It's a novelty clock!

I can build the circuit ok but I don't have the expertise to design
the it.

---
Just for grins, let's say you want to drive this thing from 60Hz mains.

Then you'll have a very accurate 60Hz signal that you can use for a
timebase, and you can get your gong ringing signal like this:




+----+
+----------------+--------------|S |
| +------------+ | U2 | |
| | COUNT UP | | COUNT DN | |
| | +--------+ | | +--------+ | |
| +-|LOAD TC|-+ +--|LOAD TC|--|R Q|-+
+------------+ | | | | | +----+ |
60Hz>---| DIV 216000 |--1Hr-+---|> | +--|> | U3 |
+------------+ | | | | | |
0---|D3 Q3|---|--|D3 | |
0---|D2 Q2|---|--|D2 | |
0---|D1 Q1|---|--|D1 | |
1---|D0 Q0|---|--|D0 | |
+--------+ | +--------+ |
U1 | |
| ASTABLE |
| +--------+ |
+--|OUT E|---------+
| +--------+
| U4
|
| +V
| |
| +----------+
| | |K
| [SOLENOID] [DIODE]
| | |
[R] +----------+
| |
| C
+---B Q1
E
|
GND


Here's how it works:

Initially, a switch is pressed at precisely 1 o'clock which resets the
divide-by-216000 counter, loads binary 0001 into U1 and also into U2
when the "1" ripples through U1.

The switch isn't shown because it's a PITA to do the ASCII and the
circuitry is trivial.

Anyway...

Once 0001 is loaded into U2, its Terminal Count (TC) output will go
false, allowing U3-Q to go true since its SET "S" will be true when its
RESET "R" input goes false.

Then, when U3-Q goes true it will enable U4, an astable with an "ON"
time long enough to allow Q1 to energize the solenoid and create the
desired sound from the gong and a period long enough to allow the
ringing of the gong to decay as desired before the next strike.

The astable is also used as the clock source for U2, and once U2 counts
down to zero its TC output will go true, resetting U3, which will
disable U4.

Assuming that the output of U1 was 0001 because of the pushbutton reset,
then, when the next pulse comes out of the divide-by-216000 counter, an
hour later, U1 will increment to 0010, 0010 will be loaded into U2, U3
will be set, U4 will be enabled, will issue two pulses to the solenoid
driver, and then will shut down.

When the next pulse comes in from the one-hour divider, U1 will
increment, that value will be loaded into U2, and that number of
gong-strikes will be dealt with by U2 until U2 counts down to zero.
---
Oops...

U1 TC shouldn't load U1, decoded 1100 from its output should.

I'll post a real schematic sometime today on abse.

JF
 
On Sat, 06 Jun 2009 18:53:16 GMT, Jon Kirwan
<jonk@infinitefactors.org> wrote:

On Sat, 06 Jun 2009 12:11:26 +0100, dave <dave@127.0.0.1> wrote:

On Fri, 05 Jun 2009 20:06:29 -0500, John Fields
jfields@austininstruments.com> wrote:

On Fri, 05 Jun 2009 10:03:33 +0100, dave <dave@127.0.0.1> wrote:

Wonder if some kind person can describe how I can build a circuit that
is basically a black-box (clock) that provides a short pulse - that
outputs 1 pulse for 1 o'clcok 2 pulse for 2 o'clock etc?

I don't even need a display - but would need some means to set the
time for the pulses to be on the hour.

What I need it for is to drive a small solenoid to which is attached a
hammer that strikes a (real) metal gong. It's a novelty clock!

I can build the circuit ok but I don't have the expertise to design
the it.

---
1. How accurate does it have to be?

2. Can you use the AC mains as a time base?

JF

Thanks for all the replies. A few things.
For me, accuarcy here is not important (it would be nice if it was
though). This is more of means to exploit the very nice sound this
gong-thing makes. Just a light tap (even with finger) makes it sound.
I would like to keep it "mechanical" as possible (someone suggested
sampling the sound etc) but would rather not go that route.
I think maybe the small magnet on a real clock hand might be the one
to have go at in the spirit of this project (as the electronics is
probably beyond me).
I thought maybe there is a some "clock chip" I could use and then
somehow (some how :)) get the n pulses for each of the hours.
Thanks again.

The idea using a wire wrapped around the hour hand and making contact
with another wire is close to _mechanical_. The problem will be that
it makes contact for some period of time. Using it only as a simple
switch to the solenoid without something else may be a problem. You
might arrange things, also mechanically, so that the solenoid action
also disturbs the wire connection in just such a way as to move it to
the other side and break contact. But my imagination is short on
practical ideas there. Maybe someone else has a handy thought about
it.

The problem with wire wrapped around the hour hand is mechanical -
these modern quartz clocks have pressed on hands that have almost no
torque before the hand slips or twists. The old "baby ben" mechanical
alarm clocks could be used that way - sturdy hands and good mechanical
connection.

I suspect the only bomb designers (assuming the wire wrapped hand idea
came from seeing it on TV) are in Hollywood. Today, its lots easier
to just use the mechanical switch they use for the alarm to work the
ignition circuit for a bomb and that relies on a cam - but it wouldn't
be too obvious to the casual TV viewer like the wrapped hands or
digital count down timer.

The reason I know. Quartz analog clocks are a cheap and dirty way to
make "totalizing" meters. Want a cheap watt-hour meter that holds its
totals when power is removed? Quartz clocks can't be beat. But I had
to destroy several in the process of learning. The only difference
between the $30 "made in China" quartz alarm clock and the $1 one, is
the price tag and the external plastic it comes with.

The pulse output (using the WW hand idea) from a long contact could
easily be done with an electrolytic cap with a resistor across it in
series with the contact output. Cap charges and outputs amps for a
few milliseconds then has an hour to discharge once the contact opens.

Interesting unrelated floobydust: the stepper motor they use is
driven from an H-bridge inside the glob of epoxy - each second is
alternating polarity output to a single coil - the pole magnet shape
determine the direction it goes in.

[The problem I have with "doing up a microcontroller solution" for you
(which I'd otherwise consider doing free for a moment, at least), is
that no matter what I did you'd need some way of "setting the time."
This means an input device and some means of letting you know what the
clock thinks. Two-way communication of some kind. It's possible,
though perhaps difficult, to consider doing this using a single push
button and a single LED. Short and long LED blinks can communicate
surprising amounts of information. I've done crazier things before.
But it would require some thought about making that work well. So
that holds me back. Making the interface easier to use means more
expense and more design considerations, so that blocks me, too.]

Jon
Ditto that. But its a pain in the ass way of inputting data or
reading data. Easier to use Morse code in my opinion - save the
fact that you only are dealing with numerical data here. Easier to
use BCD maybe. Other than the bragging rights to being the only one
able to reset the clock - I'd stick with a very easily understood
technique.

You can "Charlieplex" twelve output bits from just four lines of a tri
state pic for a LED display . . .
--
 
On Sun, 07 Jun 2009 09:46:52 -0500, John Fields
<jfields@austininstruments.com> wrote:

On Sat, 06 Jun 2009 20:04:43 -0500, John Fields
jfields@austininstruments.com> wrote:

On Fri, 05 Jun 2009 10:03:33 +0100, dave <dave@127.0.0.1> wrote:

Wonder if some kind person can describe how I can build a circuit that
is basically a black-box (clock) that provides a short pulse - that
outputs 1 pulse for 1 o'clcok 2 pulse for 2 o'clock etc?

I don't even need a display - but would need some means to set the
time for the pulses to be on the hour.

What I need it for is to drive a small solenoid to which is attached a
hammer that strikes a (real) metal gong. It's a novelty clock!

I can build the circuit ok but I don't have the expertise to design
the it.

---
Just for grins, let's say you want to drive this thing from 60Hz mains.

Then you'll have a very accurate 60Hz signal that you can use for a
timebase, and you can get your gong ringing signal like this:




+----+
+----------------+--------------|S |
| +------------+ | U2 | |
| | COUNT UP | | COUNT DN | |
| | +--------+ | | +--------+ | |
| +-|LOAD TC|-+ +--|LOAD TC|--|R Q|-+
+------------+ | | | | | +----+ |
60Hz>---| DIV 216000 |--1Hr-+---|> | +--|> | U3 |
+------------+ | | | | | |
0---|D3 Q3|---|--|D3 | |
0---|D2 Q2|---|--|D2 | |
0---|D1 Q1|---|--|D1 | |
1---|D0 Q0|---|--|D0 | |
+--------+ | +--------+ |
U1 | |
| ASTABLE |
| +--------+ |
+--|OUT E|---------+
| +--------+
| U4
|
| +V
| |
| +----------+
| | |K
| [SOLENOID] [DIODE]
| | |
[R] +----------+
| |
| C
+---B Q1
E
|
GND


Here's how it works:

Initially, a switch is pressed at precisely 1 o'clock which resets the
divide-by-216000 counter, loads binary 0001 into U1 and also into U2
when the "1" ripples through U1.

The switch isn't shown because it's a PITA to do the ASCII and the
circuitry is trivial.

Anyway...

Once 0001 is loaded into U2, its Terminal Count (TC) output will go
false, allowing U3-Q to go true since its SET "S" will be true when its
RESET "R" input goes false.

Then, when U3-Q goes true it will enable U4, an astable with an "ON"
time long enough to allow Q1 to energize the solenoid and create the
desired sound from the gong and a period long enough to allow the
ringing of the gong to decay as desired before the next strike.

The astable is also used as the clock source for U2, and once U2 counts
down to zero its TC output will go true, resetting U3, which will
disable U4.

Assuming that the output of U1 was 0001 because of the pushbutton reset,
then, when the next pulse comes out of the divide-by-216000 counter, an
hour later, U1 will increment to 0010, 0010 will be loaded into U2, U3
will be set, U4 will be enabled, will issue two pulses to the solenoid
driver, and then will shut down.

When the next pulse comes in from the one-hour divider, U1 will
increment, that value will be loaded into U2, and that number of
gong-strikes will be dealt with by U2 until U2 counts down to zero.

---
Oops...

U1 TC shouldn't load U1, decoded 1100 from its output should.

I'll post a real schematic sometime today on abse.
---
news:c6br25hlloj0jc37uk5jihv7keehijegp5@4ax.com

"Something about a clock gong" on abse.

JF
 
On Tue, 09 Jun 2009 05:21:21 -0500, John Fields
<jfields@austininstruments.com> wrote:


news:c6br25hlloj0jc37uk5jihv7keehijegp5@4ax.com

"Something about a clock gong" on abse.
---
Geez... no comments? ;)

JF
 
On Wed, 10 Jun 2009 17:07:04 -0500, John Fields
<jfields@austininstruments.com> wrote:

On Tue, 09 Jun 2009 05:21:21 -0500, John Fields
jfields@austininstruments.com> wrote:

news:c6br25hlloj0jc37uk5jihv7keehijegp5@4ax.com

"Something about a clock gong" on abse.

---
Geez... no comments? ;)

JF
No good deed and all that, John.

Jon

P.S. Since I just started using this new-fanged (free) usenet site to
access ABSE, I've not seen your post showing up there. (Before using
it, I simply didn't have ANY access to ABSE because Verizon killed all
alt.* newsgroups, many many months ago.) So I couldn't look before
and can't seem to look now. That <news> link you gave just came up
'not found' when I fed it to Agent to go grab from this free usenet
service. And when I grab 'all headers' it still doesn't show up. I'm
not happy about that as I assume it is up there and you see it just
fine. Bugs me that it isn't coming up on my end.

While waiting for comments, how about adding transformerless line
powering together with the AC zero-cross detection circuit? Design in
specific component values. Might as well finish the job, since you
are assuming US 60Hz available (reasonable.) :)

Jon
 
"Jon Kirwan" <jonk@infinitefactors.org> wrote in message
news:qvo035911ha465l4r8j9ebp9v5sj6551c6@4ax.com...
On Wed, 10 Jun 2009 17:07:04 -0500, John Fields
jfields@austininstruments.com> wrote:

On Tue, 09 Jun 2009 05:21:21 -0500, John Fields
jfields@austininstruments.com> wrote:

news:c6br25hlloj0jc37uk5jihv7keehijegp5@4ax.com

"Something about a clock gong" on abse.

---
Geez... no comments? ;)

JF

No good deed and all that, John.

Jon

P.S. Since I just started using this new-fanged (free) usenet site to
access ABSE, I've not seen your post showing up there. (Before using
it, I simply didn't have ANY access to ABSE because Verizon killed all
alt.* newsgroups, many many months ago.) So I couldn't look before
and can't seem to look now. That <news> link you gave just came up
'not found' when I fed it to Agent to go grab from this free usenet
service. And when I grab 'all headers' it still doesn't show up. I'm
not happy about that as I assume it is up there and you see it just
fine. Bugs me that it isn't coming up on my end.

While waiting for comments, how about adding transformerless line
powering together with the AC zero-cross detection circuit? Design in
specific component values. Might as well finish the job, since you
are assuming US 60Hz available (reasonable.) :)

Jon
JF's circuit has been there for a day or more now.

What Usenet service are you using?

Teranews seems to work reasonably and has less than $10 once only setup
charge.

John G.
 
On Thu, 11 Jun 2009 15:02:02 +1000, "John G."
<greentest@ozemail.com.au> wrote:

"Jon Kirwan" <jonk@infinitefactors.org> wrote in message
news:qvo035911ha465l4r8j9ebp9v5sj6551c6@4ax.com...
On Wed, 10 Jun 2009 17:07:04 -0500, John Fields
jfields@austininstruments.com> wrote:

On Tue, 09 Jun 2009 05:21:21 -0500, John Fields
jfields@austininstruments.com> wrote:

news:c6br25hlloj0jc37uk5jihv7keehijegp5@4ax.com

"Something about a clock gong" on abse.

---
Geez... no comments? ;)

JF

No good deed and all that, John.

Jon

P.S. Since I just started using this new-fanged (free) usenet site to
access ABSE, I've not seen your post showing up there. (Before using
it, I simply didn't have ANY access to ABSE because Verizon killed all
alt.* newsgroups, many many months ago.) So I couldn't look before
and can't seem to look now. That <news> link you gave just came up
'not found' when I fed it to Agent to go grab from this free usenet
service. And when I grab 'all headers' it still doesn't show up. I'm
not happy about that as I assume it is up there and you see it just
fine. Bugs me that it isn't coming up on my end.

While waiting for comments, how about adding transformerless line
powering together with the AC zero-cross detection circuit? Design in
specific component values. Might as well finish the job, since you
are assuming US 60Hz available (reasonable.) :)

Jon

JF's circuit has been there for a day or more now.

What Usenet service are you using?

Teranews seems to work reasonably and has less than $10 once only setup
charge.

John G.
I just tried a couple of free servers: freenews.netfront.net and
news.teleportsv.net. Beyond Verizon, which has completely dumped all
alt.* newsgroups in a single breath, I haven't taken the trouble yet
to commit myself to a for-fee service. Still deciding just how badly
I want access to alt.*, I suppose. So far, the only reason is for
alt.binaries.schematics.electronic and that isn't a good enough reason
by itself to start paying fees.

Jon
 

Welcome to EDABoard.com

Sponsor

Back
Top