▷ Circuit for power stages

A power circuit is based on receiving digital signals from a control circuit, processing them, and activating a high voltage power output such as motors, light bulbs, coils, etc.

In this post, we will focus on the connection of the power circuit and its operation. For the exercise, we use a PIC as a controller.

The microcontroller provides us with an on and off signal; we will use those signals to activate a relay which will serve as a switch when turning on an AC load, in this case, a lamp.

MATERIALS:

Below, I describe the materials we will be using for this project

  • PIC 16F628A
  • 1 LED diode
  • 1 resistor of 220 ohms
  • 1 resistor of 1k
  • 1 NPN transistor
  • 1 diode
  • 1 optocoupler PC817
  • 1 5v relay with 220v output
  • 1 AC voltage source of 220v

CONNECTIONS:

We connect the LED to pin b0 of the PIC 16F628A.

We are going to make the LED blink, for this we will use the following code.

TRISB = %1
PORTB = %0
led VAR PORTB.0
start:
    HIGH LED
    PAUSE 500 
    LOW LED
    PAUSE 500
GOTO start

The LED will turn on for five seconds and will turn off for five seconds, this will repeat indefinitely. In the following image you can observe the simulation.

To activate a load of 110 - 220V, we will add several components to our circuit: a relay, a transistor, a diode, and a resistor. The aforementioned components will be connected as follows.

How does everything work? When the pin is in a low or off state, the transistor is in cutoff mode, which does not allow powering the coil. When the pin is set to a high state, the transistor is in saturation mode, powering the coil and activating the relay, which closes the power circuit and turns on the lamp.

By building this circuit, we will be able to activate an AC load. Below I show you the simulation of the circuit.

To better isolate the control circuit from the power circuit, we add an optocoupler to the previous circuit as follows.

0/Leave a comment/Comments

Hello! We're so glad you've made it this far and are reading this article on Edeptec.

This form is an open space for you: you can leave a comment with your questions, suggestions, experiences, or simply your opinion on the topic discussed.

» Did you find the information helpful?
» Do you have any personal experiences you'd like to share?
» Do you have any topics you'd like to see covered in future articles?

Remember that this space is for learning and sharing, so we encourage you to participate respectfully and constructively. Your comments can help other readers who are on the same path, whether in electronics, programming, sports, or technology.

Thank you for being part of this learning community! Your participation is what makes this project grow.