Author: syedzainnasir - Page 152 of 153

1521 articles found.

Modified Sine Wave Design With Code

sine wave curve, modified square waveform, square waveform, voltage versus time axes

Hello friends, I hope you are doing well. In this tutorial, we will design the timing logic for a modified sine-wave inverter and study the original CD4047B and CD4017B approach. We will also develop an equivalent microcontroller timing example so you can see exactly how the positive, zero and negative intervals are produced. This article follows our tutorials on the basics of inverter topologies, the major inverter components and the pure sine-wave inverter. A modified waveform is simpler than filtered SPWM, but its harmonic content limits the loads that should use it. A modified sine wave is a stepped bipolar waveform. During each cycle, the inverter applies a positive voltage, remains at zero, applies a negative voltage and returns to zero. It is also called a modified square wave or quasi-square wave. The stepped output is not a sine wave with small imperfections. It is a different waveform with a strong harmonic spectrum. The zero intervals let us adjust RMS voltage and can reduce selected harmonics compared with a continuous square wave, but they do not provide the broad compatibility of a low-distortion sine source. Let the output magnitude be Vpk during the positive and negative plateaus. Let the two plateaus occupy a combined fraction D of the full period. The output is zero during the remaining fraction. Its RMS voltage is: Vrms = Vpk × √D If a transformer secondary produces plateaus of 325 V and we want 230 V RMS: D = (Vrms / Vpk)² = (230 / 325)² = 0.501 The ...

Pure Sine Wave Inverter Design With Code

sine wave curve, modified square waveform, square waveform, voltage versus time axes

Hello friends, I hope you are doing well. In the previous tutorials, we studied the basics of inverter topologies and the major components of an inverter. We will now connect those ideas and study how an AVR controller can create a sine reference for a pulse-width-modulated inverter. This tutorial explains the signal chain, frequency calculations, H-bridge states, LC filter and transformer. The AVR code is an educational SPWM reference generator for an ATmega16 running at 8 MHz. It is useful for simulation and low-energy waveform testing, but it must not be connected directly to power MOSFET gates. A physical inverter needs proper high-side and low-side gate drivers, hardware dead time, current limiting, voltage feedback, thermal protection and a safe PCB layout. The original project package is still available here: Pure Sine Wave Inverter Design, Code and Report You can also study the related pure sine-wave inverter simulation in Proteus before working with physical power hardware. A low-frequency transformer design can be divided into five blocks: The exact order of filter and transformer depends on the topology. A filter placed on the low-voltage, high-current side requires a large-current inductor. A high-voltage-side filter carries less current but needs components rated for hazardous voltage. The feedback sensing point must match the voltage that the controller is expected to regulate. Before calculating PWM, define the input range, output voltage, output frequency, ...

Major Components of Inverters

yellow inverter enclosure, front ventilation grille, AC output socket, power and status controls

Hello friends, I hope you are doing well. In the previous tutorial, we studied the basic inverter topologies. We will now examine the components that turn a topology into a working power converter. An inverter is a system rather than a single H-bridge. The controller creates switching commands, gate drivers translate those commands into high-current gate pulses, power semiconductors process energy, capacitors and magnetics store and filter it, sensors close the feedback loop, and protection circuits stop unsafe operation. The thermal design, PCB layout and enclosure are also functional parts of the converter. We will follow the energy path from the DC input to the AC output and add the control and protection blocks around it. The exact parts depend on voltage, power, isolation, switching frequency, waveform and applicable safety standards. The DC source determines the current level seen by the input stage. A 1 kW inverter operating from 12 V at 90% efficiency requires approximately: Iin = Pout / (efficiency × Vdc) Iin = 1000 W / (0.90 × 12 V) = 92.6 A This current is before surge allowance and before battery voltage falls under load. The fuse, disconnect, cable, connector, PCB copper and current sensor must carry the worst continuous and transient current. Place the primary fuse close to the battery or source so an upstream cable fault is also protected. A soft-start or precharge circuit limits the current that charges an empty DC-link capacitor. Without it, connecting a ...

Basics of Inverters With Topology

yellow inverter enclosure, front ventilation grille, AC output socket, power and status controls

Hello friends, I hope you are doing well. This is the first tutorial in our inverter series. We will begin with the purpose of an inverter, study the common output waveforms and then compare the power-stage topologies used to produce AC from a DC source. An inverter looks simple in a block diagram, but a useful design must control voltage, frequency, waveform quality, current, temperature and fault energy at the same time. A circuit that produces an alternating voltage on an oscilloscope is not automatically a safe or well-regulated AC power source. Our goal here is to understand the engineering decisions before selecting components or writing control code. An inverter is a power electronic converter that changes direct-current electrical power into alternating-current electrical power. The DC source may be a battery, photovoltaic array, fuel cell, rectified mains bus or another converter. The AC output may supply a stand-alone load, drive a motor or exchange power with an electrical grid through the required control and protection system. The word inverter describes the conversion function, not one fixed circuit. A 12 V battery inverter that supplies 230 V, 50 Hz is one example. A variable-frequency motor drive that converts a DC link into three-phase AC is another. A solar string inverter may begin with hundreds of DC volts and feed a synchronized grid current without using a 50 Hz step-up transformer. A practical stand-alone inverter normally contains several functional ...

Relay Interfacing With Microcontroller using ULN2003A

black relay housing, through-hole terminals, enclosed coil and contacts, relay component photograph

Hello friends, I hope you are doing well. In the previous tutorial, we studied the working principle of a relay. Today, we will connect a 12 V relay to a PIC18F4550 microcontroller through a ULN2003A driver. A relay coil needs more voltage and current than a microcontroller pin should provide. It is also an inductive load, so it produces a voltage transient when switched off. The ULN2003A solves these interface problems by providing seven low-side Darlington drivers and seven internal clamp diodes in one package. The key point is that the ULN2003A does not convert a 5 V logic signal into a 12 V output. The 12 V energy comes from a separate 12 V supply. A logic high merely turns on one internal driver, which connects the low side of the relay coil to ground. We will examine that current path, calculate the important values, build the circuit and write a small test program. Suppose the relay has a 12 V coil rated at 400 mW. Its approximate current is: Icoil = Pcoil / Vcoil = 0.400 W / 12 V = 0.0333 A = 33.3 mA The approximate coil resistance is: Rcoil = Vcoil / Icoil = 12 V / 0.0333 A = 360 ohms A PIC18F4550 output operates from its logic supply and is not a 12 V power output. Microchip's PIC18F2455/2550/4455/4550 datasheet lists 25 mA per pin under absolute maximum ratings, but an absolute maximum is a damage boundary rather than a recommended operating point. Output-voltage specifications, total port current and device power dissipation impose additional restrictions. A 33.3 ...

Introduction to Relay

relay pinout diagram, coil and contact schematic, 12 V relay photograph, labeled terminal overview

Hello everyone! I hope you are doing well. In this tutorial, we will study the relay from its basic construction to practical selection and control. A relay allows one electrical circuit to operate contacts in another circuit. This makes it useful when a low-power controller must switch a different voltage, a larger load or an electrically isolated circuit. Libraries Relay Simulation Libraries Latest library: Relay Module Library for Proteus V1.0 (October 2026) Other motor drivers: L298 · L9110S · TB6612FNG · BTS7960 · A4988 / DRV8825 · 28BYJ-48 + ULN2003 · PCA9685 Servo · 30A Brushless ESC · TB6600 Stepper Driver · 60A Brushed ESC · DRV2605L Haptic Driver · ZS-X11H BLDC Driver · SimpleFOC Mini Driver · AC Dimmer Module · TMC2209 Stepper Driver · DRV8833 Motor Driver · L293D Motor Shield Helping Tools We will focus first on the common electromechanical relay because its moving contacts make the operating principle easy to understand. We will then compare electromagnetic, reed, solid-state, thermal and hybrid relays, calculate coil current, discuss contact ratings and examine a safe microcontroller driver. A relay is often described as an automatic switch, but that short definition hides several important details. The coil and contacts have separate ratings, the terms normally open and normally closed refer to the unenergized state, and an inductive load can be much harder to switch than a resistive load carrying the same steady current. Let us build the complete picture step ...

How to use Serial Port in VB 2010

serial terminal window, COM port selector, baud rate selector, transmit and receive fields

Hello friends, I hope you are doing well. In this tutorial, we will build a simple serial terminal in Visual Basic 2010. The application will detect the COM ports available on a Windows computer, open a selected port, transmit text, receive incoming data and close the connection cleanly. This article keeps Visual Basic 2010 because that is the environment used in the original project and screenshots. According to the official Microsoft lifecycle record, Visual Studio 2010 reached the end of support in July 2020, so you should use a supported Visual Studio and.NET version for a new production application. However, the serial communication principles explained here still apply to maintenance work, laboratory computers and older engineering projects. We will begin with the electrical and protocol basics, create the Windows Forms interface, write the complete VB code and then test the terminal with a loopback connection. I will also explain why received data cannot be written directly to a Windows Forms control from the serial event handler. Serial communication transfers bits one after another over a communication channel. In a basic asynchronous UART link, one device transmits on its TX line and the other receives on its RX line. The devices normally share a ground reference. A full-duplex link uses separate TX and RX conductors, so both sides can transmit at the same time. A COM port is the Windows name for a serial interface. A built-in RS-232 port, a USB-to-UART converter ...

LED Blinking Project using PIC16F877a

PIC16F877A microcontroller, eight illuminated LEDs, external crystal circuit, Proteus simulation

Hello friends! In this tutorial, we will design an LED blinking project using the PIC16F877A microcontroller. It is a simple project, but it introduces several ideas that appear in almost every embedded system: configuring an I/O port, choosing an oscillator, building a reset circuit, calculating LED resistors, generating a time delay, compiling a program, and loading the resulting HEX file into Proteus. We will connect eight LEDs to PORTB and switch the complete port between logic low and logic high. Once this basic version works, you can change the output patterns and timing to create a running light, binary counter, or status display. The important objective is to understand why every connection and every program statement is present. The PIC16F877A is an 8-bit microcontroller from Microchip's PIC16F87XA family. It has a 14-bit instruction word, Flash program memory, RAM, data EEPROM, timers, an analog-to-digital converter, two Capture/Compare/PWM modules, a USART, and serial interfaces that can operate as SPI or I²C. For this first project, we only need its clock, reset, power, and PORTB digital-output functions. The 40-pin PDIP device provides eight PORTB pins named RB0 through RB7. The TRISB register controls their direction. A TRIS bit equal to 1 makes its corresponding pin an input; a bit equal to 0 makes it an output. Therefore, writing TRISB = 0x00 configures all eight PORTB pins as outputs. Microchip lists the PIC16F877A as an in-production device and provides the ...

XBee Arduino Interfacing

XBee radio module, wire antenna, blue circuit board, pin header connections

Hello friends! We have already covered the Introduction to XBee Module and Interfacing of XBee with Computer. In this tutorial, we will connect our configured radios to two Arduino UNO Rev3 boards and use a pushbutton on one board to control the built-in LED on the other. Libraries XBee Simulation Libraries Latest library: XBee Library for Proteus V1.0 (January 2016) Other RF modules: nRF24L01 · nRF24L01 PA LNA · CC1101 · RFM69HCW · HC-12 · 433MHz RF Helping Tools We will build the project in stages. First, we will establish the power and serial connections. Next, we will define the messages sent between the boards. Finally, we will write separate sender and receiver sketches and examine how they handle button bounce, incomplete messages, and a lost wireless connection. The example assumes two compatible radios already configured for transparent serial communication at 9600 baud. The address values carried forward from the previous lesson apply to classic S1 802.15.4 firmware. Radios using another supported protocol can carry the same application messages after you configure their network using the correct product instructions. Arduino A reads a pushbutton. When you hold the button down, it asks Arduino B to turn its built-in LED on. Releasing the button asks B to turn the LED off. The sender also repeats the current state once per second, allowing the receiver to recover when an individual message is missed. Arduino B accepts only two complete commands: LED,1 and LED,0, each ...

Interfacing of XBee with Computer

XBee radio module, wire antenna, blue circuit board, pin header connections

Hello friends! In the previous lesson, we discussed what an XBee module does and how it transfers serial data between devices. Now we will connect two modules to a computer, configure their addresses, and send messages in both directions. This gives us a working radio link before we introduce Arduino code. Libraries XBee Simulation Libraries Latest library: XBee Library for Proteus V1.0 (January 2016) Other RF modules: nRF24L01 · nRF24L01 PA LNA · CC1101 · RFM69HCW · HC-12 · 433MHz RF Helping Tools We will keep the original tutorial's simple addressing exercise: the first module uses address 1111, and the second uses 2222. The detailed command example is for classic XBee S1 modules running 802.15.4 firmware. If your module uses Zigbee or DigiMesh, identify it in XCTU and use that firmware's configuration procedure. Matching the case shape does not make these command settings interchangeable. By the end, you should understand the difference between a computer's serial port and a radio address, why the electrical adapter matters, and how to locate a problem when the modules do not communicate. We will then use the same working pair in XBee Arduino Interfacing. Two computers are convenient, but one computer with two adapters also works. Each adapter should appear as a separate serial port. One adapter is sufficient to configure the radios in turn, but a two-way computer demonstration needs serial access to both powered endpoints. Label the radios A and B before you begin. Record ...