Electronics Miscellaneous

RECTIFIER CIRCUIT

Why do we need a rectifier Circuit? Whenever DC power is needed that time, we need to convert an AC Power to DC Power and that process is known as Rectification. A simple PN junction diode acts as a rectifier. The forward biassing and reverse biassing conditions of the diode makes the rectification. Types of Rectifier circuits There are two main types of rectifier circuits, depending upon their output. They are Half-wave Rectifier Full-wave Rectifier A Half-wave rectifier circuit rectifies only positive half cycles of the input supply whereas a Full-wave rectifier circuit rectifies both positive and negative half cycles of the input supply.   Half-wave Rectifier Disadvantages of a half-wave rectifier Power is delivered only during the one-half cycle of the input alternating voltage. Ripple factor is high, therefore required to give steady dc output. They only allow a half cycle through per sine wave, and the other half cycle is wasted. This leads to power loss. Full-wave rectifier FWR has two types as follows: Centre tapped full wave rectifier Bridge full-wave Rectifier 1) Centre tapped full wave rectifier Advantages of a center-tapped full-wave rectifier: The ripple factor is much less than that of a half-wave rectifier. DC load current values are twice those of a half-wave rectifier. The rectification efficiency of the full-wave rectifier is double that of a half-wave rectifier. Disadvantages of center-tapped full-wave rectifier  Location of center-tapping is difficult. The dc output voltage is small. The PIV of the diodes should be high. 2) Full-wave bridge rectifier Advantages of bridge rectifier: The need for the center-tapped transformer is eliminated. It can be used in application floating output terminals; no output terminal is grounded. The transformer utilization factor, in the case of the bridge rectifier, is higher than that of a center tap rectifier. Disadvantages of Bridge Rectifiers over center tap rectifiers. It requires four diodes for operation, thus, circuit components requirements in the case of the bridge rectifier are more than that of center tap rectifiers. The voltage drop across diodes increases four times that of a center tap full-wave rectifier. Types of Components and Its Symbol used in circuit Schematic of bridge rectifier PCB Layout of bridge rectifier Track Width – 1.00 mm Bill of material During the PCB assembly process, a BOM provides information about the components under a single roof such as their quantity, reference designators, footprints, etc. Designers will save lots of time and effort during PCB design by preparing a bill of materials with all the updated parts list. Every line of the bill of materials (BOM) includes the product code, part name, part number, part revision, description, quantity, unit of measure, size, length, weight, and specifications or features of the product. Go to fabrication bar in Easyeda online tool Download BOM Gerber File Each artwork layer, copper circuitry, power, or ground must have a corresponding Gerber file to create the required pattern. The outermost layers, referenced as “top” and “bottom,” component and solder or by layer count will also have a conforming layer for solder mask and silkscreen to be applied. Summary In this second blog, we have created a schematic of bridge rectifier and pcb layout also and learnt about bill of material and Gerber file. Apart from that we have seen that type of rectifier and understood which one is suitable for industry. Reference https://www.powerelectronicsnews.com/power-supply-design-notes-rectifier-circuits/ https://www.tutorialspoint.com/electronic_circuits/electronic_circuits_full_wave_rectifier.htm https://www.allaboutcircuits.com/textbook/semiconductors/chpt-3/rectifier-circuits/

Daily Coding Miscellaneous

Static Variables in C

Static is a keyword in the c/cpp language. It is a storage class specifier that can be applied to any data type. A static keyword can be used with both variables and functions. The static keyword tells the compiler to make the variable or function limited to scope but allows it to persist throughout the life of a program. The static keyword limits the scope of variables or functions to the current source file only. So static keyword helps in hiding the data to one source file only.  Static words help in achieving encapsulation in c language. In this blog, we are going to cover the use of static keywords with variables. Static variables are stored in BSS or data segment of the C program Memory Layout. The BSS segment contains the uninitialized data. The DATA segment keeps the initialized data. The static variable is only initialized once, if it is not initialized then it is automatically initialized to 0. void demo(int value) { static int count  = 0; count = value; cout<<count; } count = value: is not initialization, it is an assignment. Static can be assigned as many times as we wish. static int count = 0: is initialization & that happens only once for static variables. We can have static global variables or static local variables. Static local variables Static variables are able to retain their value b/w function calls. Static keywords, when used with variables inside the function, are then called static local variables.  Static global variables The static keywords when used with variables outside the functions,  are then called static global variables. Static global variables help in achieving enumeration, that is they make the scope of the variable limited to the present file only. References: The static keyword in C (c-programming-simple-steps.com)

Electronics Miscellaneous

DESIGNING STEPS OF PCB

Hello Friends, This is the second blog of the series of PCB designing. Today we are discussing Steps for PCB Designing, Types of Component and methods for mounting components onto a PCB and designing steps. So before discussing the Method for Mounting Components on PCB, first we will discuss the process or different stages of PCB designing. In order to design a PCB, one has to follow below steps : 1. Create the schematic 2. Link footprints to the components in the schematic 3. Generate a netlist 4. Create desired PCB shape in PCB editor 5. Import the netlist in PCB editor 6. Define design rules 7. Place the footprint of the component at desired location 8. Route the tracks to form electrical connections       between various components 9. Add labels and identifiers on PCB 10. Generate design file Types of Components and Its Symbol :- So these are some symbols that are used to prepare the schematic. Methods for mounting components onto a PCB. 1. Through Hole: Through-hole components are best used for high-reliability products that require stronger connections between layers. Through-hole component leads run through the board, allowing the components to withstand more environmental stress. This is why through-hole technology is commonly used in military, automobile, and aerospace products that may experience extreme accelerations, collisions, or high temperatures. Through-hole technology is also useful in test and prototyping applications that sometimes require manual adjustment and replacement. 2. SMD (surface-mount devices): SMD components are much smaller than THM components. This will increase the overall density of the board tremendously. Using a Pick and Place machine for placing the components will reduce production time.SMD components are mostly cheaper compared to THM components. surface-mount devices (SMDs) are secured only by solder on the surface of the board SMD components are not suitable for prototyping or testing of small circuits. SMDs cannot be used directly with breadboards SMD solder connections may be damaged by potting compounds going through thermal cycling. EasyEDA Online Tool We will start from EasyEDA, a great web-based EDA(Electronics Design Automation) tool for electronics engineers, educators, students, makers, and enthusiasts. There is no need to install any software. Just open EasyEDA in Browser. EasyEDA Provides: Simple, Easy, Friendly, and Powerful drawing capabilities Works Anywhere, Anytime, on Any Device Real-time Team Cooperation Sharing Online Thousands of open-source projects Integrated PCB fabrication and Components purchase workflow API provided Script support Schematic Capture PCB Layout: Design Rules Checking(DRC) Multi-Layer, 6 copper layer supported Document export(PDF, PNG, SVG) Altium Designer format export BOM export 3D View Generate fabrication file(Gerber) Export Pick and Place file Auto Router Designing Steps Open EasyEDA Tool On Browser Register in EasyEDA Create New Project Draw Schematic Convert that file into BoARD FILE Track the air wire Select needed layers Print the Document Summary In this second blog, we introduced designing steps. Then we discussed the method of mounting components. Introduced the Easyeda Online tool. Reference : https://payatu.com/blog/rupesh/PCB%20Designing%20-%20Basics https://blog.thedigisource.com/through-hole-smt https://www.vishay.com/docs/45242/throughholevssmdcomponents.pdf https://eprpartner.com/through-hole-vs-surface-mounted https://docs.easyeda.com/en/Introduction/Introduction-to-EasyEDA/index.html https://circuitdigest.com/article/design-electronic-circuits-online-with-easyeda

Tech

Overview of Programming languages

Compiled language: are translated to the target machine\’s native language by a program called a compiler. This can result in very fast code, especially if the compiler is effective at optimizing however the resulting code may not port well across the operating system & the compilation process may take a while e.g C or CPP. Interpreted Language: is read by a program called an interpreter & is executed by that program called an interpreter and is executed by that program. While they are portable as their interpreter & have no long compile times. e.g Python & Java. High-Level Programming: Refers to how much the nature of language reflects the understanding system. In other words, a programming language level refers to how similar the language is to a computer\’s native language. Low-Level language is generally quite similar to machine code & thus is more suitable for programs like device drivers or very high-performance programs that really need access to hardware. Since a low-level language is subject to all the nuances of the hardware it\’s accessing. Supported Paradigm:      

AVR MCU Embedded MCU's

Starting Up with AVR

Table of Contents Introduction AVR stands for a Alf and Vegard’s RISC processor and is a microcontroller. Microcontroller is like a mini computer or a processor dedicated for a particular task. We can code AVR using C, C++ or Assembly language. AVR PINOUT Brief description of AVR pins Pin 1 – Pin 8 (PB0 – PB7): General Input / Output pins used as GPIOs i.e. General purpose Input-Output. Pin 9: It is a reset pin and resets the microcontroller. The bar above the RESET represents that it is active low i.e. when the reset pin is grounded then it resets the microcontroller. Pin 10, Pin 11 (Power Supply): These pins are used to give power to the microcontroller. We give a positive line to the VCC (Pin 10) and ground to GND (Pin 11). Generally, 5V is given as input. Pin 12, Pin 13 (Crystal Oscillator) : These pins are used to connect a crystal oscillator with AVR to give it an external clock. Pin 14 – Pin 21 (PD0 – PD7) : General Input / Output pins used as GPIOs i.e General purpose Input Output. Pin 22 – Pin 29 (PC0 – PC7) : General Input / Output pins used as GPIOs i.e General purpose Input Output. Pin 30 (AVCC) : It is used to provide power to Analog to Digital Converter of AVR. Also provides immunity to noise while conversion. Pin 31 (GND) : It is a common ground provided to be used. Pin 32 (AREF) : It is used to give a reference voltage to Analog to digital converter of AVR. Pin 33 – Pin 40 (PA0 – PA7) : These pins are used to take analog input and have Analog to Digital converter. For eg: we can sense temperature and convert from values 0-255 (8 bit) or 10 bit values. Programming AVR For any microcontroller to perform any action we need to put some code i.e. a set of instructions in it which it can follow. We write code in computer and then transfer the code to microcontroller using specific toolchain. For AVR MCU,  we can write code using different IDE like Atmel Studio, Arduino IDE, VsCode in Embedded-C language,  C and C++ for hardware purposes. Some SDK used for writing code of AVR are ATMEL STUDIO IDE, Arduino IDE, WinAVR etc. All of the mention SDK are recommended where Atmel Studio is a bit heavy software with loads of features for high performance laptops whereas WinAVR is a really light software to achieve the main motive of AVR coding with some basic and few extra features. WinAVR is recommended for people with laptops having low configurations. WinAVR is a pretty simple tool and can be installed easily. Here we will be discussing on how to install and get Atmel Studio ready for coding of AVR. Setting Up Atmel Studio You should refer to Video 6 – Video 9 of the following playlist created by Gettobyte for detailed tutorial on Atmel Studio. AVRDude AVRDude is a tool or so called utility to download/upload/manipulate the contents of ROM and EEPROM of AVR microcontrollers using your PC and uses ISP i.e. in system programming technique. It is a command line tool and has a huge list of commands which can be referred from its documentation or directly found from the internet as required. Link of Documentation is provided : http://download-mirror.savannah.gnu.org/releases/avrdude/avrdude-doc-6.3.pdf. For quick reference you can also use command: ‘avrdude help’ in command line. To use avrdude, you need to first download and install it which can be done from the provided link: http://download.savannah.gnu.org/releases/avrdude/avrdude-6.3-mingw32.zip. After downloading follow the below steps: 1) Copy the address of folder containing unzipped files 2) Type Env in search bar in start 3) Select ‘Edit the system environment variables’ 4) A dialog box will pop up. Click on environment variables in bottom right corner. 5) Select ‘Path’ in ‘System Variables’. 6) Click on edit button below system variables box. 7) Click on ‘New’ 8) Paste the address that you copied. 9) Click ‘Ok’ on all the dialog boxes. Now you are AVRDude is setup and ready to use. Applications and use of AVR AVR consist of multiple input output pins, ADC, oscillator, timer, interrupts and many more features hence useful in integrating multiple sensors and actuators (Devices that takes signal from microcontroller to perform some action in real world). This lead to use of AVR in variety of applications like home automation, automobiles, medical devices etc. AVR comes in small size with less memory as well as big size with huge memory size and more processing power and features to cover from most simple to much complex applications. Conclusion Congratulations, now your pc is completely ready to code AVR microcontroller. In further blog series of AVR we will dive deep into concepts of programming the AVR and understand different concepts of AVR programming, AVR microcontroller and electronics itself so stay tuned!!

Embedded MCU's Nordic SoC

Introduction of Nordiac NRF5xx SoC\’s

Table of Contents Overview on Nordic IoT Chips Nordic Semiconductor is a semiconductor MNC, which designs & develops a wide range of SoCs supporting IoT protocols. These SoC’s have all functionalities of Microcontroller(MCU) based on ARM cortex Processors, plus they embed 2.4ghz RF transceivers into the chips using RF-CMOS technology for making IoT chips. NRF52 and NRF51 series of SoC’s are widely accepted across the industries where there is a need for Low Power/Ultra Low Power consumption IoT solutions. Nordic Semiconductor NRF5xxx SoC is ideal for Ultralow power and cost-effective short-range wireless solutions. Typical applications for NRF5xxx SoC are: IoT(Internet of Things) devices Wearables Smart Home Wireless Mobile Phone Accessories PC Peripherals Beacons Bluetooth-enabled consumers NRF51 & NRF52 Series have all hardware support of MCU peripherals like ADC, SPI, I2C, UART, GPIO, TIMERS, etc, and 2.4ghz RF transceivers for hardware support of IoT protocols into the chip. Thus NRF5xxx series of SoC can be used for Embedded devices applications(Using MCU peripherals like UART, SPI, I2C, TIMERS, ADC, RTC, USB, etc.)and IoT applications( using protocols like BLE, ZigBee,  Thread, ANT, etc.) simultaneously. NRF5x Series supports the following short-range IoT protocols: BLE THREAD ZigBee ANT Near Field Communication  NRF Proprietary IoT protocols: ESBP & Gazell. Nordic Semiconductor also provides a full suite of IoT stacks to support of above IoT protocols. Nordic Semiconductor has named them Softdevices. To get to know about IoT protocols supported by Nordic chips you can refer to this. Nordic Semiconductor provides a wide range of development hardware from development kits to USB dongles for fast prototyping and hobbyists to play with NRF5x IoT Soc.  How to get started??  We will be using Nordic NRF52840 – DK, which is the official development board for the NRF52840 SoC. Now when I first got the NF52840 DK, it is very different from Arduino, STM, ESP boards. It has lots and lots of chips on it and quite fascinating to explore what all hardware is on it for what purposes. nRF52840-Development Kit At the same time, it is very confusing for me also on how to start with these IoT chips as they have so many features and functionalities on them. From MCU peripherals to IoT stacks, Crypto engines, Power management, analog features, and many more. nRF52 and nRF51 Chips So what I decided at first will start from exploring MCU peripherals, understanding peripheral driver header, and source files: HAL & LL. Subsequently will get to know about the Development environment and SDK of NRF chips. Starting from basics at first and then will move to IoT protocols, in that also we will first start from BLE and then to other IoT protocols. Those who don’t want to explore NRF52840 MCU peripherals can directly start from the BLE part of NRF5x chips. At first, we will make some application code using NRF5x MCU peripherals like GPIO, UART, SPI, I2C, TIMERS and etc. Will understand the HAL APIs provided by Nordic SDK for these peripherals. Will then interface different sensors and modules for making embedded devices. Then will understand the supported IoT protocols architecture and stacks. Now to get started with any MCU or SoC the first couple of things we have to understand are: Its Development Software: Software Development KIT(SDK), Integrated Development Environment (IDE), Debuggers, Environment setup for cross-compilation from our laptop/desktop to the designated MCU processor. Then we have to gather & understand the development board of the corresponding semiconductor chip. As development boards are the fastest and easiest way to get started with semiconductor chips. We will be using NRF52840- Development Board in this series and all the blogs and videos will be on it only.  Development Software for Nordic SoC’s Toolchain setup for Nordic SoC’s At first, we need an IDE. IDE provides a complete solution and one-stop environment for firmware development on microcontrollers. So Nordic Semiconductor provides 2 IDE for the development: Seger Embedded Studio and Arm® Keil µVision. The one which is recommended and preferred to use is Seger Embedded Studio (SES). So, in this tutorial series, we are going to use Seger Embedded Studio (SES). SES is a professional IDE that is highly recommended and used in the industry. SES is free to use for Nordic chips and its installation is pretty easy, can be downloaded from this link. Seger Embedded Studio Nordic chips are programmed and debugged using J-Links. Nordic NRF52840-DK has an onboard Jlink debugger and programmer. So we don’t have to care much about the hardware side of the debugger, but we have to install some software packs for using the Onboard J-Link debugger. We will install the Segger J-link Software and save it along with the same directory as that of SES. So that all that we have to set up for the toolchain of Nordic Chips, successfully installed the IDE and Debugger pack for Developing for Firmware on Nordic chips. At first, when we open the Segger Embedded Studio, it will open with a Hello world example as shown below. Segger Embedded Studio first time open page. How to get started with Seger Embedded Studio for NRF52840 nRF5 Series: Developing with SEGGER Embedded Studio (nordicsemi.com) Software Development Kit for Nordic SoC’s Once we have set up the toolchain, we will now explore and understand the SDK provided by Nordic. SDK includes the building blocks for developing applications. This includes the framework, peripheral libraries, Source & Header files of drivers, RF stacks, example codes for various applications, bootloaders and etc. Every MCU vendor provides the SDK, which is written in C/C++ languages to get started. One will write the source code in SES IDE using SDK provided by Nordic. Now as we navigate to the Nordic Semiconductor website under the Development Software Section, we will see there are a number of SDK packs which are listed: nRF 5 SDK nRF SDK for Mesh/Zigbee/Thread nRF Connect SDK nRF MDK Softdevices Overview of Nordiac SDK’s At first, it is very confusing for me & can’t figure out which SDK is for what

Current/Power Sensors I2C Modules Sensors and Modules

Allegro\’s AC Power monitoring IC ACS71020

In many applications, we want to monitor AC electrical parameters like Solar chargers, motor control, Battery Charging stations, or Smart energy meters. Measurement of AC current and voltage, by the means of the electronics, is a quite tricky part, unlike traditional electromechanical systems. Below is a basic block diagram to know about it. AC voltage and current signals are first steps down to low voltage and current values.One can not feed High AC electrical voltage and Current signals which can range from 0-1000 units and are even larger than that, in some applications(Power systems, AC motors and etc)  to the electronics and digital world.  So at first by the use of one of the below listed three methods AC signals are brought to low values( 0-10V, 0-5A) Use of Current Transformer,  Potential Transformer, or  Rogowski coil. Use of shunt resistors. Use of Hall effect-based principal for current measurement.  The signals which we get after processing from these methods are fed into the Digital System where there are signal conditioning circuits, data acquisition circuits, digital signal processing by the use of Digital and Analog Electronics. The Digital System part is designed to embedded into the Integrated chips(ASIC) which are specially designed with the purpose of Energy Metering application. For the digital computation of key electrical parameters like Power factor, Active power, reactive power, Vrms, Irms and etc. Using these key parameters we can monitor the AC electrical parameters through serial interfaces like SPI/I2C with Host MCU. ACS71020 Energy Metering IC Allegro microsystem\’ AC power monitor module ACS71020 is a Single-phase energy monitoring IC that works on the principle of the HALL effect sensing technique (To know about ways to measure current refer to this blog) to measure the AC current and resistor divider network to measure the input AC voltage. It calculates the key electrical parameters using its  Metrology Engine and digital system from which it sends the data to the host MCU via I2C and SPI interfaces. The Voltage and current reading that we get from AC voltage and Current measurement blocks via the sense amplifiers are analog in nature. The analog signals from respective Voltage and Current blocks are then fed into the internal ADC\’s(Analog to Digital converter). ADC samples the current and voltage channels at high frequency and then digitally converts them by filtering and decimating the output signal from sense amplifiers to avoid large anti-aliasing filters. The digital word from the ADC is 16 bits for both the current and voltage, which is fed to the digital system for further calculation of other electrical parameters. Its Key Features are: Without the need for any Transformer, Rogowski coils, oversized current transformers, or the power loss of shunt resistors one can calculate Vrms and Irms up to 517V and 90A respectively It has an advanced digital system with galvanically isolated current sensing technology which achieves reinforced isolation ratings in a small PCB footprint Apart from the calculation of Electrical Key parameters it also has many extra features too which are essential for monitoring purposes. ACS71020 IC Pinout Diagram and Pins description ACS71020 IC has 16 pins, Starting from Pin 1-8 are current channel pins, out of which pins 1-4(Fused internally) are all IP+ and pins 5-8(fused internally) are all IP-.  Pins 16-15 are Voltage measurement pins  ACS71020 IC Schematic For using ACS71020 for typical applications its schematic is pretty easy and less complicated in oppose to other metering IC\’s(STMP32 & ADE series). ACS71020 can be powered directly from the same supply as the system\’s MCU, through its reinforced isolation technology it does need multiple power supplies to power it up. So Vcc and GND pins are connected directly to MCU Vcc and GND pins. I2C  pins are at a high level(5V or 3v3), before the start of the I2C Serial Communication, thus SDA and SCL lines are connected with a pull-up resistor. When using in I2C mode, pins 9 & 10 act as DIO_1 and DIO_0( Digital Input/Output)  respectively, which are connected directly to MCU Digital Pins( Will get in detail about DIO pins in a later section) For SPI communication, MOSI, MISO, CE pin are at a high level and CLK is at GRND before the start of SPI serial Communication. When using in SPI mode, pins 9 &10 are used as MOSI and CS pins. ACS71020 IC  measures the Current and voltage of the input AC signal to calculate all other key parameters. So for inputting the AC voltage & current signals to the ACS71020 IC we will focus on Voltage channel pins(VINP & VINN) and Current channel pins(IP+ & IP-). One thing to recall is that in a single-phase AC supply there are two terminals: Live Wire (Black/Red) carries electricity from the power supply and takes it to the load. Neutral wire(Blue wire) returns the electricity from the load to the power supply to make the circuit complete. VINN &VINP are terminals from where AC voltage is measured, so resistor network divider of 1mega ohm and shunt resistor is made in b/w the VINP and VINN terminals to fit the input AC voltage within the Range of the differential voltage input buffer of ACS71020( +-275mv) as specified in electrical characteristics of the datasheet. IP+[1:4] & IP-[5-8] pins are terminals for AC current measurement. IP+ terminals are fused internally and are connected to a neutral wire of load and IP- terminals are also fused internally and are connected to a neutral wire of supply to complete the current loop of the current channel. EVE ACS71020 Module For doing the practical demonstration with ACS71020 IC we are going to use the EVE ACS71020 breakout board, which is manufactured by the Evelta. The module is cheap and can be used easily with HOST MCU via I2C or SPI communication. The module has pull-up resistors of 10k ohm placed with SDA and SCL pins( pins 12 & 11) of ACS71020  and no pull-up resistors are connected with MOSI and CS  pins(pins 10 & 9) means we can use these

Stay Updated With Us

Error: Contact form not found.