Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

1 sec alternating polarity circuit

Hello all.
Please see the attached photo of a circuit I’d like to copy. I don’t have the actual board a friend of mine sent me the photo.

It’s a circuit to produce 1 second alternating pulse using the following IC’s-
CD4017B x2, CD4060B x1 and a CD4024B.

Can anyone point me to a circuit diagram for this, maybe there is something online, if there is I’m unable to find it.

I think this circuit is used so it can run on 3v so low power. It’s for pulsing a low voltage Brillie slave clock and needs to be a small footprint so it can go in to the back of the clock and run on batteries.

I look forward to hearing from you.

Regards
Mark
 

Attachments

  • IMG_2209.jpeg
    IMG_2209.jpeg
    1.7 MB · Views: 97
Solution
I’ve made my friend a small batch of pulsar boards now. I would like to say a big thank you to all that contributed to this, I can confirm that the boards are working perfectly.

My next challenge is to make the circuit but using less components while still
using a 3v supply. I would love to hear your feedback on this

IMG_2272.jpeg

I know the boards are a bit messy but I don’t do this every day ☺️

Again thanks
Hi All.
What is the purpose of using 5% resistors ?

None, it's just that it's a VERY, VERY old design, when 5% resistors were commonplace - nowadays you'd usually use 2% or 1% resistors.

Going back even further 10% (silver tolerance band) were normal, and before that 20% (no tolerance band at all).
 
My design libraries have parts created by seven different people over a couple of decades, so my concept schematics often have things like a 20 amp FET where a 1 A part will suffice. 5% still is the most common tolerance for small through-hole resistors, but there is nothing critical about the base-current-limiting resistor values.

ak
 
I’ve made my friend a small batch of pulsar boards now. I would like to say a big thank you to all that contributed to this, I can confirm that the boards are working perfectly.

My next challenge is to make the circuit but using less components while still
using a 3v supply. I would love to hear your feedback on this

IMG_2272.jpeg

I know the boards are a bit messy but I don’t do this every day ☺️

Again thanks
 
Solution
My next challenge is to make the circuit but using less components while still
using a 3v supply. I would love to hear your feedback on this
As suggested way back in this thread, a small PIC microcontroller would easily do the job, and greatly reduce component count.
 
To generate a 1 PPS signal youc an use some code on to do the design with
ATTINY85 :

Looking for a project using ATTINY85 to generate 1 pulse per second using a 32Khz clock crystal

ChatGPT said:​

Creating a 1 pulse per second (1Hz) signal using an ATtiny85 with a 32.768 kHz crystal is a great project. The 32.768 kHz crystal is commonly used in real-time clocks (RTC), so it's perfect for this kind of project.
Here’s an outline for how to achieve the goal of generating 1 pulse per second with an ATtiny85:

Components:​

  1. ATtiny85 microcontroller
  2. 32.768 kHz crystal oscillator (often used in RTCs)
  3. Two capacitors (typically 12-22pF for the crystal, depending on specifications)
  4. Resistors for stabilization (optional)
  5. LED or another output to display the pulse

Step-by-Step Guide:​

1. Crystal Oscillator Setup:​

  • The ATtiny85 doesn't have a built-in 32.768 kHz crystal oscillator. To use this crystal, you can configure the ATtiny85 to run the crystal on an external clock input.
  • You'll need to connect the crystal to the external pins of the ATtiny85. You may need two capacitors (typically around 12-22pF) connected to each pin of the crystal to stabilize the signal.

2. ATtiny85 Fuses:​

  • Set the fuses of the ATtiny85 to enable the external clock (32.768 kHz crystal) to be the system clock source. This step can be done via the avrdude tool or using an Arduino IDE with the ATtiny core.

3. Counter Setup:​

  • Since the 32.768 kHz clock provides 32,768 pulses per second, you need to divide this down to create a 1 Hz signal.
  • You can use the ATtiny85's internal Timer/Counter module to divide the 32.768 kHz clock down to a 1 Hz signal.
    A simple method would be to set the timer to overflow after every 32,768 pulses (this corresponds to 1 second). This is done using the Timer's prescaler and counter settings.

4. Timer Code:​

Here's a rough code example for generating a 1Hz pulse output on a pin (e.g., PB0) using the ATtiny85 and 32.768 kHz crystal:
cpp
Copy
#include <avr/io.h>
#include <avr/interrupt.h>

// Set the clock prescaler for the 32.768kHz crystal
#define F_CPU 32768UL // Define the clock frequency

void setup() {
// Set PB0 (pin 5 on ATtiny85) as an output
DDRB |= (1 << PB0);

// Set Timer0 to overflow every 32,768 cycles (1 second)
TCCR0A = 0; // Normal mode
TCCR0B = (1 << CS00); // No prescaler
TIMSK |= (1 << TOIE0); // Enable overflow interrupt

// Enable global interrupts
sei();
}

ISR(TIMER0_OVF_vect) {
// Toggle PB0 (LED or other output)
PORTB ^= (1 << PB0);
}

int main() {
setup();
while (1) {
// The ISR handles the toggling
}
}

5. How it Works:​

  • Timer Setup: The ATtiny85's timer overflows every 32,768 clock cycles from the 32.768 kHz crystal, generating an interrupt once per second.
  • Pulse Output: Each time the timer overflows, an interrupt service routine (ISR) toggles the output pin (PB0) to generate a pulse. This pulse can drive an LED or any other device.

6. Testing:​

  • Once the ATtiny85 is programmed and connected, you should see a 1 Hz pulse on the output pin (PB0), and if you connect an LED, it will blink once per second.

Additional Ideas:​

  • Power Consumption: Since the ATtiny85 is very power-efficient, this setup can be used for low-power applications, such as timekeeping or low-power sensors.
  • Extended Functionality: You can expand this project to work as a simple real-time clock or timer by adding a display, such as a 7-segment display or a small LCD.
Let me know if you need more details or specific help with the code or circuit!
 
Hi. I think the Microcontroller of some description is definitely the way to go, an ATiny85 or an Atmega328, I’m thinking barebones Arduino pro mini. It has to be low power consumption and low operating voltage.
The PCF8563 real-time clock looks to be the obvious choice for the RTC. unless otherwise advised.
The L9110H H-Bridge driver looks to also compatible with the requirements, again unless otherwise advised.

All in all the footprint will be small and the components minimal

Many thanks
Here is what I’d previously come up with.
 
Bit of overkill, a small PIC, with a 32KHz crystal on TMR1, permanently in sleep and woken every second by TMR1 to run an RTC will use almost no current at all, and use almost no components.
You could probably extend the wake interval beyond 1 second for this application. Timer limitations might dictate a power of two divide from the crystal, so you might only be able to extend to 2 seconds if something is to happen every 30 seconds.

Also, just in case of misunderstanding on the part of the OP, I am sure that you mean a 32.768 kHz crystal, which is often referred to as 32 kHz.
 
You could probably extend the wake interval beyond 1 second for this application. Timer limitations might dictate a power of two divide from the crystal, so you might only be able to extend to 2 seconds if something is to happen every 30 seconds.

Also, just in case of misunderstanding on the part of the OP, I am sure that you mean a 32.768 kHz crystal, which is often referred to as 32 kHz.

Obviously, they are commonly known as 32KHz watch crystals.

There's no problem using a 1 second wake-up timer, you need it to run an RTC - you simply increment an extra counter every second, toggle the I/O pins as required after a count of 30, and reset the counter.

The PIC16F18313 is a small cheap 8 pin device, which would easily do the job.

In fact I've recently written a similar bit of code, but using an I/O interrupt to wake a 16F18313 (rather than a 32KHz Timer), and toggle an I/O every ten (or whatever you want to set it to) pulses on the input.
 

Latest threads

New Articles From Microcontroller Tips

Back
Top