Circuitry for striking clock.

Thread Starter

RMHC

Joined Nov 13, 2019
45
What you could do is look at the "Nano" board of the Arduino line. It is smaller than one C cell.
You should also download the Arduino IDE and see if it looks like something you'd want to use.

If you want to use pure logic, we'd have to use a counter or two along with some gates. We'd also need a clock signal to get one counter to count maybe once every second to ding the bell once per second. Not sure what timing you want here though.
MrAl,
I am sorry about the delay in replying but I have been suffering from an infection. I have decided not to proceed with the Arduino approach as the learning curve seems steep. If I do decide to continue with this idea it will be using discrete components. Many thanks for the help. RMHC
 

MrAl

Joined Jun 17, 2014
7,466
MrAl,
I am sorry about the delay in replying but I have been suffering from an infection. I have decided not to proceed with the Arduino approach as the learning curve seems steep. If I do decide to continue with this idea it will be using discrete components. Many thanks for the help. RMHC
I was going to write the code for you but hey this makes it easier on me too now.

So you probably want to check out post #60 where member "cruts" was nice enough to provide what looks like a working design. You can probably tweek the timing to suit your needs.
 

Thread Starter

RMHC

Joined Nov 13, 2019
45
Below is the LTspice simulation of a counter-based solution.
It uses 5 IC's plus associated parts.
Counter U1 increase its count by 1 for every clock pulse to generate the chime count.
When it reaches count 13 it resets.
This U1 count is parallel loaded into counter U2 at each clock pulse, which then counts down to zero to generate the chimes, with chime frequency generated by the CMOS 555 timer U4.
The chime frequency can be changed as desired, which is determined by the values of R1, R2, and C1.

The top amber trace is the signal from the clock contacts (S1).
For simulation purposes I set its period at 15 seconds but, of course, that will be 1 hour for the real clock.

After S2 PB manual reset (purple trace) it starts with two chimes, so set the clock to just after 1 when synchronizing the chime.

The bottom yellow expanded trace shows the 12 (o'clock) count chime followed by a 1 (o'clock) count chime.

View attachment 194480
Mr C,
I regret the delay replying to your very helpful cct. but I have been nursing an infection for a few days. I have been studying the cct. and I have some questions about it. 1. Am I correct in thinking that S2 is a manual switch to get the chimes synced with clock? 2. Does U5 o/p P go to U6 i/p P? 3. Does U2 COUT go to U4 RST? 4. Does U2 PE go to U1 CLK with the o/p of U7?
5. What do V1/V4 represent? 6. Is there a reason to change M1 to IRLHS6376? Thanks for all help, RMHC.
 

MrAl

Joined Jun 17, 2014
7,466
Mr C,
I regret the delay replying to your very helpful cct. but I have been nursing an infection for a few days. I have been studying the cct. and I have some questions about it. 1. Am I correct in thinking that S2 is a manual switch to get the chimes synced with clock? 2. Does U5 o/p P go to U6 i/p P? 3. Does U2 COUT go to U4 RST? 4. Does U2 PE go to U1 CLK with the o/p of U7?
5. What do V1/V4 represent? 6. Is there a reason to change M1 to IRLHS6376? Thanks for all help, RMHC.
Once you get that circuit going maybe in the future you might want to go to an Arduino or Microchip solution. I forgot to tell you that when you use a uC you can pair it with a RTC (real time clock) that is accurate to some seconds per year. That way everything would be self contained no physical clock required. If you want to use the wall clock though you can use that too anyway.
 

crutschow

Joined Mar 14, 2008
24,710
1. Am I correct in thinking that S2 is a manual switch to get the chimes synced with clock?
Yes.
2. Does U5 o/p P go to U6 i/p P?
Yes.
3. Does U2 COUT go to U4 RST?
Yes.
5. What do V1/V4 represent?
V1 is just for simulation to drive the S1 simulated clock contacts.
V4 drives the simulated Reset contacts.

(Most of the above questions could be answered by remembering that all nodes with the same name are tied together).

6. Is there a reason to change M1 to IRLHS6376?
I changed to a logic-level type MOSFET which is designed for low voltage gate operation (below 10V for Vgs to be fully on).
 

Thread Starter

RMHC

Joined Nov 13, 2019
45
Yes.
Yes.
Yes.
V1 is just for simulation to drive the S1 simulated clock contacts.
V4 drives the simulated Reset contacts.

(Most of the above questions could be answered by remembering that all nodes with the same name are tied together).

I changed to a logic-level type MOSFET which is designed for low voltage gate operation (below 10V for Vgs to be fully on).
Mr C, Many belated thanks for the cct. Sorry not to respond earlier. Your clarifications are fine and pretty obvious, I should have figured them out! However I do have one more query for you -- U2/Q1/pin6-where does Q2A connect? Cheers RMHC.Clock striking cct4.jpg
 

Thread Starter

RMHC

Joined Nov 13, 2019
45
Yes.
Yes.
Yes.
V1 is just for simulation to drive the S1 simulated clock contacts.
V4 drives the simulated Reset contacts.

(Most of the above questions could be answered by remembering that all nodes with the same name are tied together).

I changed to a logic-level type MOSFET which is designed for low voltage gate operation (below 10V for Vgs to be fully on).
Mr C, Many belated thanks for the cct. Sorry not to respond earlier. Your clarifications are fine and pretty obvious, I should have figured them out! However I do have one more query for you -- U2/Q1/pin6-where does Q2A connect? Cheers RMHC.
Actually, nowhere else.
That node was just labeled to help understand the circuit operation during simulations.
Sorry for any confusion about that.
Hi Mr C. I am getting the cct on a breadboard, but before I apply power I see there are 3 Vdd inputs to U1-pins 4,9,10. Is this correct?? U2 just has Vdd on 9. Sorry to bother but I don't want to make too much smoke when the 6v is switched ON. Cheers Richard.
 

crutschow

Joined Mar 14, 2008
24,710
I see there are 3 Vdd inputs to U1-pins 4,9,10. Is this correct?
Yes, all Vdd points go to the power supply.
Also you need to pick up the power (pin 16) and ground (pin 8) on U1 and U2.

And for proper decoupling, add a 10uF (or greater) cap from the Vdd at L1 to ground, and a 100nF cap from Vdd at U4 to ground.
 

Thread Starter

RMHC

Joined Nov 13, 2019
45
Yes, all Vdd points go to the power supply.
Also you need to pick up the power (pin 16) and ground (pin 8) on U1 and U2.

And for proper decoupling, add a 10uF (or greater) cap from the Vdd at L1 to ground, and a 100nF cap from Vdd at U4 to ground.
Mr C. Just to confirm, I must also connect pin 16 to B+, and pin 8 to ground on both U1 & U2. Also decouple the top of L1 and U4 pin 8 to ground. Felicitations for the holidays and be safe. Many thanks, Richard Coombs.
 

Thread Starter

RMHC

Joined Nov 13, 2019
45
Mr C. Just to confirm, I must also connect pin 16 to B+, and pin 8 to ground on both U1 & U2. Also decouple the top of L1 and U4 pin 8 to ground. Felicitations for the holidays and be safe. Many thanks, Richard Coombs.
Mr C, It seems probable that pins 7 & 14 on the CD4023 & CD4093 should also be connected to ground & B+. Am I nuts or correct about this? THE mosfet you recommended-- IRLHS6376 -- is miniscule and unsolderable, I have been unable to find a mount for it at Mouser's. how do you work with it on a PCB? Cheers, Richard.
 

Thread Starter

RMHC

Joined Nov 13, 2019
45
Yes.
I forgot about that. That was just one I had a model for.
Just about any logic-level N-MOSFET should work.
Hi Mr C, Do you know where it is possible to have a paper circuit converted to a PCB ready for installation of components? RMHC.
 

crutschow

Joined Mar 14, 2008
24,710
Do you know where it is possible to have a paper circuit converted to a PCB ready for installation of components?
Not offhand.
And it would be quite expensive if you did find one.
Most experimenters do the job themselves with a layout program such as Eagle or one of these.
Doing that is not all that difficult but it does take a reasonable learning curve.

The easiest are those that are provided by a FAB house, such as Express PCB, or 4PCB, as there's a seamless connection between the layout and getting the board fabricated.
The boards may cost a little more, but they save a lot of hassle.

Cheaper to just build on a proto-board (vector board).
 

atferrari

Joined Jan 6, 2004
3,917
No matter who finally draws the PCB, it is to be done considering the actual shapes / sizes of the components to populate ir.
 

djsfantasi

Joined Apr 11, 2010
6,335
Here is the code required to add the chime feature. I haven’t compiled it so there may be a typo. You can use this on a Nano or with slight PIN number changes, with a 6-8 pin ATTiny...that’s pretty small. You can do everything in the space of a 555 alone You may need a resistor or two and perhaps a driver for the chime. But it still only takes one large component.

C:
#define setPin 6
#define donePin 7
#define hourPin 8
#define chimePin 9

int Hour = 0;


void setup() {
pinMode(setPin,INPUT_PULLUP);
pinMode(donePin,INPUT_PULLUP);
pinMode(hourPin,INPUT_PULLUP);
pinMode(Chime,OUTPUT);

while(checkPin(donePin)) {
    if(check(setPin)) Hour++
    if(Hour==13) Hour=1;
}


void loop() {

if(digitalRead(hourPin)) {
    Hour++;
    if(Hour == 13) Hour=1;
    Chime(Hour);
    }

void checkPin(int myPin) {
//  code to debounce pin input
//  either with Bounce library
//  or a debounce routine.
}

void Chime(int myHour) {
int on_time 1000
int off_time 1000

for (chime=1, chime<=myHour, chime++) {
    digitalWrite(chimePin, HIGH);
    delay(on_time);
    digitalWrite(chimePin,
LOW);
    delay(off_time);
    }
}
It features using a couple of buttons to set the hour. Then, whenever it receives an hour signal, it uses one output pin to control a chime. The chime sound could be generated by the MCU, but this example uses an external circuit.
 

Thread Starter

RMHC

Joined Nov 13, 2019
45
Not offhand.
And it would be quite expensive if you did find one.
Most experimenters do the job themselves with a layout program such as Eagle or one of these.
Doing that is not all that difficult but it does take a reasonable learning curve.

The easiest are those that are provided by a FAB house, such as Express PCB, or 4PCB, as there's a seamless connection between the layout and getting the board fabricated.
The boards may cost a little more, but they save a lot of hassle.

Cheaper to just build on a proto-board (vector board).
Hi Mr C, I have completed the circuit on a breadboard but sad to say it does not function, and I do not have enough knowledge to find the problem and get it running. The gong makes one stroke when power is applied but then stubbornly refuses to do any more. Grounding R5 which is what the clock contacts do has no effect. Sorry to have to tell you this, but many thanks for all your help. Cheers, RMHC.Clock striking cct7.jpgClock striking cct7.jpg
 

Thread Starter

RMHC

Joined Nov 13, 2019
45
Here is the code required to add the chime feature. I haven’t compiled it so there may be a typo. You can use this on a Nano or with slight PIN number changes, with a 6-8 pin ATTiny...that’s pretty small. You can do everything in the space of a 555 alone You may need a resistor or two and perhaps a driver for the chime. But it still only takes one large component.

C:
#define setPin 6
#define donePin 7
#define hourPin 8
#define chimePin 9

int Hour = 0;


void setup() {
pinMode(setPin,INPUT_PULLUP);
pinMode(donePin,INPUT_PULLUP);
pinMode(hourPin,INPUT_PULLUP);
pinMode(Chime,OUTPUT);

while(checkPin(donePin)) {
    if(check(setPin)) Hour++
    if(Hour==13) Hour=1;
}


void loop() {

if(digitalRead(hourPin)) {
    Hour++;
    if(Hour == 13) Hour=1;
    Chime(Hour);
    }

void checkPin(int myPin) {
//  code to debounce pin input
//  either with Bounce library
//  or a debounce routine.
}

void Chime(int myHour) {
int on_time 1000
int off_time 1000

for (chime=1, chime<=myHour, chime++) {
    digitalWrite(chimePin, HIGH);
    delay(on_time);
    digitalWrite(chimePin,
LOW);
    delay(off_time);
    }
}
It features using a couple of buttons to set the hour. Then, whenever it receives an hour signal, it uses one output pin to control a chime. The chime sound could be generated by the MCU, but this example uses an external circuit.
Here is the code required to add the chime feature. I haven’t compiled it so there may be a typo. You can use this on a Nano or with slight PIN number changes, with a 6-8 pin ATTiny...that’s pretty small. You can do everything in the space of a 555 alone You may need a resistor or two and perhaps a driver for the chime. But it still only takes one large component.

C:
#define setPin 6
#define donePin 7
#define hourPin 8
#define chimePin 9

int Hour = 0;


void setup() {
pinMode(setPin,INPUT_PULLUP);
pinMode(donePin,INPUT_PULLUP);
pinMode(hourPin,INPUT_PULLUP);
pinMode(Chime,OUTPUT);

while(checkPin(donePin)) {
    if(check(setPin)) Hour++
    if(Hour==13) Hour=1;
}


void loop() {

if(digitalRead(hourPin)) {
    Hour++;
    if(Hour == 13) Hour=1;
    Chime(Hour);
    }

void checkPin(int myPin) {
//  code to debounce pin input
//  either with Bounce library
//  or a debounce routine.
}

void Chime(int myHour) {
int on_time 1000
int off_time 1000

for (chime=1, chime<=myHour, chime++) {
    digitalWrite(chimePin, HIGH);
    delay(on_time);
    digitalWrite(chimePin,
LOW);
    delay(off_time);
    }
}
It features using a couple of buttons to set the hour. Then, whenever it receives an hour signal, it uses one output pin to control a chime. The chime sound could be generated by the MCU, but this example uses an external circuit.
Hi,
Could you please give me some more details about the cct. needed to make the chime work.? What do I need to get? Is it based on an Arduino board or some other base. Thanks for any help. RMHC.
 

Thread Starter

RMHC

Joined Nov 13, 2019
45
Hi Mr C, I have completed the circuit on a breadboard but sad to say it does not function, and I do not have enough knowledge to find the problem and get it running. The gong makes one stroke when power is applied but then stubbornly refuses to do any more. Grounding R5 which is what the clock contacts do has no effect. Sorry to have to tell you this, but many thanks for all your help. Cheers, RMHC.View attachment 196452View attachment 196452
Mr C,
Could you help me sort out the cct? When I ground R5 nothing happens....How should I go about finding what is going wrong in the cct. Any help would be appreciated. TIA...RMHC.
 

Thread Starter

RMHC

Joined Nov 13, 2019
45
Here is the code required to add the chime feature. I haven’t compiled it so there may be a typo. You can use this on a Nano or with slight PIN number changes, with a 6-8 pin ATTiny...that’s pretty small. You can do everything in the space of a 555 alone You may need a resistor or two and perhaps a driver for the chime. But it still only takes one large component.

C:
#define setPin 6
#define donePin 7
#define hourPin 8
#define chimePin 9

int Hour = 0;


void setup() {
pinMode(setPin,INPUT_PULLUP);
pinMode(donePin,INPUT_PULLUP);
pinMode(hourPin,INPUT_PULLUP);
pinMode(Chime,OUTPUT);

while(checkPin(donePin)) {
    if(check(setPin)) Hour++
    if(Hour==13) Hour=1;
}


void loop() {

if(digitalRead(hourPin)) {
    Hour++;
    if(Hour == 13) Hour=1;
    Chime(Hour);
    }

void checkPin(int myPin) {
//  code to debounce pin input
//  either with Bounce library
//  or a debounce routine.
}

void Chime(int myHour) {
int on_time 1000
int off_time 1000

for (chime=1, chime<=myHour, chime++) {
    digitalWrite(chimePin, HIGH);
    delay(on_time);
    digitalWrite(chimePin,
LOW);
    delay(off_time);
    }
}
It features using a couple of buttons to set the hour. Then, whenever it receives an hour signal, it uses one output pin to control a chime. The chime sound could be generated by the MCU, but this example uses an external circuit.
 
Top