STEP 1 / 6ELECTRONICS

Mains Interruption Counter with Indicator

This mains interruption counter circuit keeps track of how many times the power from the mains goes out (up to 9) and shows that number on a 7- segment display. It is very useful for batt…

Mains Interruption Counter with Indicator - source illustration from page 521
PROJECT#271
TRACKElectronics
PARTS01
STAGES06
STEP 1 / 6 · Overview

Know the mission before touching a wire.

Understand what you are making, prepare the right tools, and make the workbench safe.

01

Project details

Mains Interruption Counter with Indicator is a electronics project. This mains interruption counter circuit keeps track of how many times the power from the mains goes out (up to 9) and shows that number on a 7- segment display. It is very useful for batt…

Source pages
520-522
Named parts
1
Build goal
Working, tested prototype
02

Tools you need

  • Digital multimeter
  • Wire stripper and side cutters
  • Soldering iron with a fine tip
  • Current-limited bench supply

Use eye protection, good lighting, and a clean insulated surface throughout the build.

03

Safety precautions

  • Disconnect every power source before changing a connection.
  • Check component polarity, pinout, and supply voltage twice.
  • Use a current limit for the first power-up.
  • This project may involve hazardous voltage. Work only with qualified supervision and proper isolation.
Ready to continue?
STEP 2 / 6 · Parts library

Gather, identify, and understand every part.

Use the standardized inventory, then open What's this? to learn each part's role, advantages, limitations, handling, and specifications.

NAMED PROJECT INVENTORY1 PART LINES
PARTTYPEQTYREADY
SCD4033SEMICONDUCTOR1
What's this?Image, role, pros, cons, handling & specifications
Mains Interruption Counter with Indicator - source illustration from page 521SEMICONDUCTOR LEARNING VIEW

CD4033

A semiconductor stage performs switching, amplification, regulation, rectification, or logic.

What it does here

It controls current or signal flow at a defined point in the circuit.

Buy / compare this part

Advantages

  • Fast and efficient
  • Compact
  • Can control larger loads from smaller signals

Limitations

  • Pin order varies
  • Sensitive to overvoltage and reverse polarity
  • May need cooling or bias components

Handling

  • Verify the datasheet pinout
  • Avoid static and soldering heat
  • Check notch, stripe, or flat-face orientation

Specifications to verify

  • Use the exact model, value, package, and rating listed for CD4033; similar-looking parts are not always interchangeable.
  • Confirm pinout, maximum voltage/current, dissipation, gain or forward voltage, and package.
Ready to continue?
STEP 4 / 6 · Source code

Confirm the hardware-only control path.

This project does not include firmware in the source. The circuit itself provides the required behaviour.

01

How to connect

  1. Match every controller label to the circuit view and source pin map.
  2. Join grounds before signal wires when separate low-voltage supplies are used.
  3. Keep motors, relays, pumps, and other loads on a suitable driver and external supply.

Common mistakes

Reversed VCC/GND, board-label versus GPIO-number confusion, missing common ground, and charge-only USB cables.

Troubleshoot

Disconnect loads, continuity-test one path at a time, then test with a current limit.

02

Software preparation

No IDE, board package, library, or firmware upload is required for this project.

If you add a programmable controller as an extension, document its pin map separately.

03

How to upload code

The original design is implemented entirely in hardware, so proceed after verifying the circuit and supply.

Ready to continue?
STEP 5 / 6 · Build

Assemble, deploy, test, and troubleshoot.

Use the complete source notes in build order, then pass the final checks before calling the project finished.

ASSEMBLY

Build in functional stages

  • Power and regulation
  • Controller or processing stage
  • Inputs and sensors
  • Outputs and loads
  • Enclosure and strain relief
TEST

Power up safely

  • Inspect unpowered continuity first
  • Apply the lowest safe current limit
  • Measure supply rails before signals
  • Add one load at a time
  • Record expected and actual results
TROUBLESHOOT

Work from simple to complex

  • Confirm power, ground, polarity, and orientation
  • Compare each pin with the source
  • Test inputs separately from outputs
  • Replace only one variable at a time
  • Power off before every correction
PROJECT-SPECIFIC BUILD NOTES

Follow the documented instructions.

These notes come from this project's source and remain in their original order.

01

Project overview

Project build note

This mains interruption counter circuit keeps track of how many times the power from the mains goes out (up to 9) and shows that number on a 7- segment display. It is very useful for battery chargers for cars. Lead-acid batteries can take longer to charge depending on how many times the power goes out. Mains interruption counter circuit The circuit of the interruption counter with indicator is shown in Fig. 1. The whole circuit is powered by a 9V (PP3 or 6F22) battery. Figure 2 shows a block diagram of the mains interruption counter circuit, a battery charger,

and a lead-acid battery, all of which are used in shops that charge car batteries. When 9V is put into the circuit, the power-on-reset signal from capacitor C3 and resistor R5 resets IC2, and the 7-segment display (DIS1) shows the number "0." The 230V AC mains are sent to the mains-voltage detection optocoupler IC MCT2E (IC1) through capacitor C1 and resistors R1 and R2. Fig. 1: Circuit of mains interruption counter with indicator This is followed by the bridge rectifier BR1, the smoothing capacitor C2, and the current-limiting resistor R2. When the LED inside optocoupler IC1 is turned on, it turns on the phototransistor inside, which pulls down the clock input pin 1 of IC2 to a low level. IC CD4033 (IC2) is a decade counter/7-segment decoder. Its pin 3 is held high, which makes the display show "0" at first. Clock pulses are applied to clock input pin 1 and clock- enable pin 2 is held low to enable the counter.

Fig. 2: Block diagram of the arrangement used in automobile battery charger shops The number of power interruptions is shown on the seven-segment, common-cathode display DIS1 (LTS543). Capacitor C2 provides a small turn-on delay for the display. Circuit operation When mains fail for the first time, clock input pin 1 of IC2 again goes high and display DIS1 shows ‘1.’ When the mains power comes back on, pin 1 of IC2 goes low, and DIS1 keeps showing "1." When the power goes out for the second time, pin 1 of IC2's clock input goes high, and the DIS1 display shows the number 2. When mains resume, pin 1 of IC2 again goes low and DIS1 continues to show ‘2.’ This way, the counter keeps incrementing by ‘1’ on every main interruption. Note that this circuit can count up to nine mains interruptions only.

Ready to continue?
PROJECT ACHIEVED

You built Mains Interruption Counter with Indicator.

You followed the full workflow from understanding the mission to testing the finished project. That is a real engineering achievement - well done.

FM Adaptor for Car Stereo project thumbnail featuring NEAR
NEXT ELECTRONICS ADVENTURE

FM Adaptor for Car Stereo

Ready to reuse what you learned in another project from the same track?

Start this project
Browse all 500 projects