Week 08

Electronics Design

Brief Overview

In this week of FabAcademy, my individual assignment involved creating and implementing a program for a microcontroller development board that I made in Electronics production week. This program facilitates interaction with local input/output devices and communication with remote devices, utilizing both wired and wireless connections. As an extra credit endeavor, I incorporated different programming languages and development environments, and further expanded the project by connecting external components to the board. Concurrently, our group assignment revolved around an extensive exploration of the microcontroller's datasheet, allowing us to compare its performance and development workflows with other architectures. This comprehensive approach not only deepened my understanding of embedded programming but also provided valuable insights into the diverse landscape of microcontroller architectures and their applications, aligning seamlessly with the goals of FabAcademy.

My Heroshot for this Week







Basics of Electronics

Electronics, as a division of physics and electrical engineering, is concerned with the emission, behavior, and impacts of electrons through the utilization of electronic apparatus. Active devices within electronics regulate the flow of electrons via amplification and rectification, setting it apart from classical electrical engineering, where passive elements like resistance, capacitance, and inductance govern electric current flow exclusively.


The advent of electronics has wielded a profound impact on the evolution of contemporary civilization. The discovery of the electron in 1897, coupled with the subsequent creation of the vacuum tube capable of amplifying and rectifying minute electrical signals, marked the inception of the electronics era. Practical advancements commenced with Ambrose Fleming's development of the diode and Lee De Forest's creation of the triode in the early 1900s, enabling the detection of faint electrical voltages, such as radio signals, sans mechanical means. The expansion of electronics was swift, with commercial radio broadcasting and communication networks proliferating by the early 1920s, and electronic amplifiers finding diverse applications, including long-distance telephony and the burgeoning music recording industry.


Prior to delving deeper into electronic devices, components, testing apparatus, and similar topics, it is imperative to acquaint ourselves with fundamental terminologies, concepts, and principles in electronics, such as those listed below.


Current

The flow of electrical charge carriers, typically electrons or electron-deficient atoms, constitutes current. Denoted by the uppercase letter I, current is measured in amperes (symbolized by A), where one ampere represents one coulomb of electrical charge (6.24 x 10^18 charge carriers) passing through a specific point in one second . Physicists conventionally depict current as flowing from relatively positive to relatively negative points, known as conventional current or Franklin current, despite electrons, the predominant charge carriers, moving in the opposite direction from relatively negative to relatively positive points.

Two primary types of electrical signals exist: alternating current (AC) and direct current (DC).

In Alternating Current, electricity continually changes direction within the circuit, fluctuating back and forth. The frequency of these reversals, measured in Hertz, determines how frequently the direction alternates. For instance, a 50 Hz power supply in India means the direction reverses 100 times per second (twice per cycle).


Conversely, Direct Current flows unidirectionally between power and ground, maintaining a constant positive voltage source and a ground (0V) source. This can be verified by testing a battery with a multimeter.


Examples of DC include the current generated by an electrochemical cell and the output of a power-supply rectifier before filtering, characterized as pulsating DC. Conversely, common utility outlets provide AC.




Voltage


In simpler terms, voltage is the pressure that pushes electricity around a circuit. It's like water pressure in a pipe. Higher voltage creates a stronger push, which can influence how much electricity flows (current). Voltage is measured in volts (V). Voltage can also create an electric field, even if no current is flowing. This field is like an invisible force that gets stronger as the voltage increases or the distance between two points decreases.


Resistance


Imagine you're trying to push water through a pipe. The width of the pipe affects how easily the water flows. Similarly, resistance is like the tightness of a path for electricity. The more a material opposes the flow of current, the higher its resistance. Resistance is written with a capital R and measured in ohms, which can be spelled out or symbolized by the Greek letter omega (Ω).

Think of one ohm (Ω) as the ideal highway lane for electricity. If one volt (V) of pressure pushes one amp (A) of current smoothly through this lane, then the resistance is exactly one ohm. It's not too narrow to restrict flow, nor too wide to waste pressure. This relationship between voltage, current, and resistance is the foundation of Ohm's Law, which we'll explore later.


In most circuits, particularly those with direct current (DC), there's a simple relationship between resistance and current. Imagine keeping the water pressure (voltage) constant in our pipe analogy. If you double the tightness of the pipe (resistance), the water flow (current) gets cut in half. Conversely, halving the squeeze (resistance) allows double the water flow (current). This applies to household AC circuits as well. However, things get more complex in high-frequency AC circuits. Some components in these circuits can act like tiny reservoirs, storing and releasing energy along with using it. These extra energy pockets can influence how current behaves differently compared to regular DC circuits.


DC Series and Parallel Circuits


Imagine you have Christmas lights. You can connect them in two main ways:


Series:Think of this like a chain. Each light bulb goes in a line, one after the other. The electricity flows through one bulb, then to the next, and so on, until it reaches the end of the string. If one bulb burns out in a series circuit, the entire string goes out because the electricity can't complete the loop.


Parallel:This is like connecting all the lights to a central power strip. Each bulb gets its own connection to the power source. So, all the bulbs light up independently. If one bulb burns out in a parallel circuit, the others will stay lit because the electricity can still flow around the burnt-out bulb.



Kirchhoffs Circuit Laws


Imagine a highway network for electricity. Traffic on the roads represents current (amps), and junctions are like intersections where traffic can flow in or out. Kirchhoff's Laws are the two key rules that govern how electricity behaves in these networks:


Rule #1: Current In = Current Out (Conservation of Charge)This rule is like traffic flow at an intersection. The total number of cars entering the intersection must equal the number leaving. In a circuit, the total current flowing into a junction (connection point) must be equal to the total current flowing out. No charge can just disappear!


Rule #2: Voltage Drops Add Up to Zero (Conservation of Energy)Imagine traveling around a closed loop on the highway. The total change in elevation (going up hills and down) should be zero by the end of the loop. Similarly, in a closed loop circuit, the total voltage used up by components (like resistors) must exactly balance the voltage supplied by the source (like a battery). There's no room for leftover energy!


These rules, along with the properties of individual components like resistors, capacitors, and inductors, are the basic tools for analyzing electrical circuits. They become especially useful when dealing with complex circuits where Ohm's Law alone might not be enough. For instance, Kirchhoff's Laws help us calculate unknown currents and voltages in bridge or T networks, where multiple branches make it tricky to track electricity flow.


In short, Kirchhoff's Laws are like the traffic regulations that keep electrical circuits functioning smoothly!






Electronic Devices and Components


Imagine a box full of Legos, each with a unique function. Electronic components are like those Legos - tiny, individual parts that work together to build electronic devices. These components can influence the flow of electricity or the surrounding electric fields in a way that creates a specific outcome for the device.


These components are usually soldered onto a flat board called a printed circuit board (PCB). By connecting them together strategically, we can create circuits that perform various tasks, like amplifying sound, receiving radio signals, or generating oscillating electrical signals.


Some components come individually, while others are grouped together into complex mini-circuits called integrated circuits (ICs). Familiar examples of electronic components include resistors, capacitors, inductors, diodes, and transistors. Generally, components fall into two categories:


Active Components: These are like the powerhouse Legos. They require external power to control the flow of electricity and can amplify signals or perform switching functions. Examples include transistors and thyristors.


Passive Components: Think of these as the foundational Legos. They don't need external power on their own but can influence the flow or storage of electricity in a circuit. Examples include resistors, capacitors, inductors, and diodes.



Electronic Devices and Components


Microprocessor v/s Microcontroller



Microprocessors and microcontrollers are both integrated circuits (ICs) that contain a central processing unit (CPU). However, they have some key differences in their functionality and applications.

Functionality:

  • Microcontroller: A compact integrated circuit that includes a processor core, memory (RAM and/or ROM), input/output peripherals, timers, and sometimes additional features like analog-to-digital converters. Designed for specific applications in embedded systems.
  • Microprocessor: A central processing unit (CPU) that performs general-purpose processing tasks. Lacks built-in peripherals and is typically used in conjunction with external components like memory, input/output devices, and support chips. Found in devices requiring general-purpose computing capabilities.


Applications:

  • Microcontroller: Commonly used in embedded systems for specific applications, such as in consumer electronics (e.g., washing machines, microwave ovens), automotive control systems, industrial automation, and various electronic gadgets.
  • Microprocessor: Found in general-purpose computing devices, such as personal computers, servers, laptops, and workstations, where versatility and the ability to run a wide range of applications are crucial.


Feature Microprocessor Microcontroller
Components CPU only CPU, memory (RAM, ROM), and I/O peripherals
Integration Requires external components (memory, I/O) All components integrated on a single chip
Complexity More complex due to external connections Simpler due to integrated components
Cost Generally more expensive Generally less expensive
Power consumption Higher power consumption Lower power consumption
Applications Personal computers, laptops, smartphones Embedded systems (washing machines, toys, drones)

In summary, microprocessors are powerful and flexible general-purpose processors, while microcontrollers are self-contained, low-power devices designed for specific tasks in embedded systems.



Microcontroller


A microcontroller is a compact integrated circuit (IC) that combines a processor core (CPU), memory (RAM and/or ROM), and programmable input/output peripherals, all on a single chip. It is designed to execute specific tasks and control functions within embedded systems. Microcontrollers are commonly used in a variety of applications where precise control and real-time processing are essential, such as in consumer electronics, automotive control systems, medical devices, home appliances, and industrial automation.
Microcontrollers are programmed to perform specific tasks and are commonly used in systems where space, power consumption, and cost are critical considerations. They are a fundamental component of embedded systems, providing the intelligence and control necessary for the proper functioning of various electronic devices and applications.

This week there are two types of assignments, one group and one individual.



Group Assignment :-

  1. Use the test equipment in your lab to observe the operation of a microcontroller circuit board (in minimum, check operating voltage on the board with multimeter or voltmeter and use oscilloscope to check noise of operating voltage and interpret a data signal).
  2. Redraw one of the echo hello-world boards or something equivalent, add (at least) a button and LED (with current-limiting resistor) or equivalent input and output, check the design rules, make it, test it.
  3. Linked to the group assignment page.


Visit our Group assignment page here


Group Assignment Brief:

This week, it's all about understanding how the Echo Hello World board works! We'll use a special power supply to find the perfect voltage to turn it on. Then, we'll grab a tool called a multimeter to check its connections and make sure it's getting the right amount of power. We might even use it to measure how much power the board uses. Finally, we'll use another instrument called an oscilloscope to see the tiny electrical signals that make the LED blink. By looking at these signals, we can understand how the board works even better!

Step 9: Live Testing



Individual Assignment:-

  1. Documented what you have learned in electronics design.
  2. Explained problems and how you fixed them.
  3. Included original design files of PCBs.
  4. Included a ‘hero shot’ of your board.
  5. Loaded a program and tested if your board works


PCB Designing

PCB design is a fascinating process that bridges the gap between circuit schematics and functional electronic devices. Here's a look beyond the basic steps to give you a broader understanding:


Design Considerations:

  • Signal integrity: PCB layout significantly impacts signal quality. Consider factors like trace length, impedance, and crosstalk to ensure proper signal transmission and minimize noise.

  • Power integrity: Plan for adequate power distribution and grounding to avoid voltage drops and maintain stable power supply throughout the PCB.

  • Thermal management: Certain components generate heat. Consider heat sinks, copper plane size, and component placement to dissipate heat effectively and prevent overheating.

  • EMC (Electromagnetic Compatibility): Minimize unwanted electromagnetic interference (EMI) and susceptibility (EMS) by using proper grounding techniques, shielding, and component selection.

  • Manufacturability: Design your PCB with manufacturability in mind. Consider factors like minimum trace width, drill hole size limitations, and standard component footprints to avoid issues during fabrication.


Advanced PCB Design Techniques:

  • High-Density Interconnect (HDI): This technique allows for packing more components into a smaller space by using finer trace widths, microvias, and stacked layers.

  • Multi-layer PCBs: These PCBs have more than two copper layers, enabling complex routing and improved signal integrity for high-frequency circuits.

  • Rigid-Flex PCBs: These combine rigid and flexible sections, offering unique design possibilities for applications requiring flexibility or space constraints.

Software Features:

  • Design Rule Checks (DRC): Advanced DRC tools can identify potential electrical shorts, opens, and other layout violations during the design process.
  • Signal integrity analysis: Simulation tools within KiCad or other software can help analyze signal behavior on the PCB, allowing for adjustments before fabrication.
  • 3D modeling and visualization: Advanced PCB design tools offer 3D modeling capabilities for visualizing component clearances and potential assembly issues.


Learning Resources:

  • KiCad offers extensive documentation and tutorials: KiCad Downloads
  • Online communities and forums provide valuable insights and troubleshooting assistance.
  • Books and online courses dedicated to PCB design offer in-depth knowledge and best practices.


Designing a PCB in KiCad: From Schematic to Output Files

KiCad is a powerful open-source software suite for designing Printed Circuit Boards (PCBs). Here's a step-by-step guide to take you from creating a schematic to generating the files needed for PCB manufacturing:

1. Schematic Capture (Eeschema):

  1. Create a new schematic: Start by creating a new project in KiCad's Eeschema tool.




  2. Once a new project is open select Schematic Editor

  3. Add components: Place the electronic components you need from the library onto the schematic.


  4. Add the additional componets from external source other than KiCad libraries






  5. Connect components: Use wires (nets) to connect the components according to your circuit design.


  6. Annotate the schematic: Label nets with meaningful names for clarity.


4. PCB Routing (PCBNew):

  1. Now come to the Homepage and Select PCB editor option appeared on 3rd number


  2. A new Window opens on the screen, then select Tools from the Nav bar, in the drop down you will find upadte from schematics


  3. A new window will pop-up with Update PCB from Schematics, click on the Upadte PCB button


  4. Now all the components will be displayed on your screen.


  5. Route connections: Use the routing tools to connect components with copper traces following design rules (trace width, clearances).


  6. Design Rule Checks (DRC): Regularly run DRC to ensure your layout meets manufacturing specifications and avoid electrical shorts.
  7. I observed that its beong a trouble to connect with vonnection with crossing and keep the track apart, so I again switch to the Schematics window and edited the schematic


  • Then I Re-route the connection and made a final layout


  • 5. Giving the Edge Cuts

    1. Select any desired shape from the side bar, and make sure that you have selected the edge cut tool


    2. Now draw a desired cutting shape around your PCB, you made edit it and modify it as per you need.


    3. Finally your PCB is ready to view in 3D


    6. Exporting Files (PCBNew):

    1. Gerber files: Use "File" -> "Fabrication Outputs" to generate Gerber files. These are industry-standard files used by PCB manufacturers to define copper layers, soldermask, silkscreen, etc.


    2. Select Plots and define the path to save


    3. Drill file: Generate a drill file defining the drill holes for component leads and mounting.


    7. Additional Outputs (Optional):

    1. Bill of Materials (BOM): Generate a BOM listing all components used in your design.
    2. Schematic PDF: Use "File" -> "Plot" in Eeschema to create a PDF file of your schematic for documentation purposes.
    3. SVG File for MODs CE
    4. Go to file >> then Export>> SVG format


    5. A new Tab will appearead select the layer that you want to print, mill


    Tips:

    • Follow a consistent naming convention for nets and components.
    • Use libraries with pre-defined footprints for common components.
    • Start with simpler designs and gradually progress to more complex ones.
    • There are many online resources and tutorials available for learning KiCad.

    By following these steps, you can design your PCB layout in KiCad and generate the necessary files for PCB manufacturing. Remember, practice and exploration are key to mastering KiCad's functionalities.

    Reference Files

    1. Trace file click here
    2. Cutting Edge file click here
    3. KiCad file click here