• Inductor

    Inductors are electronic components that store energy in the form of a magnetic field. They are used in a wide range of applications, from simple circuits to power supplies and filters. Understanding the principles of inductors is essential for designing and analyzing electronic circuits.

    Inductance is the property of an inductor that opposes any change in the current flowing through it. The unit of inductance is the henry (H). The inductance of an inductor depends on the number of turns in the coil, the shape and size of the core, and the material of the core. The formula for calculating the inductance of an inductor is:

    L = (μ * N^2 * A) / l

    where L is the inductance in henries, μ is the magnetic permeability of the core material, N is the number of turns in the coil, A is the cross-sectional area of the core, and l is the length of the core.

    Another important parameter of an inductor is its reactance, which is the opposition of an inductor to a change in the flow of alternating current. The reactance of an inductor is proportional to its inductance and the frequency of the alternating current. The formula for calculating the reactance of an inductor is:

    XL = 2πfL

    where XL is the reactance in ohms, f is the frequency in hertz, and L is the inductance in henries.

    In addition to storing energy, inductors can also be used to filter out unwanted frequencies in a circuit. A low-pass filter, for example, can be created by connecting an inductor in series with a resistor and a capacitor. The inductor blocks high frequencies while allowing low frequencies to pass through, while the capacitor blocks low frequencies and allows high frequencies to pass through.

    To illustrate the concept of inductance, let’s consider the following example:

    Suppose we have a coil with 100 turns, a core with a cross-sectional area of 0.01 m^2, and a length of 0.1 m. The core is made of iron, which has a magnetic permeability of 2000. Calculate the inductance of the coil.

    Using the formula for inductance, we have:

    L = (μ * N^2 * A) / l L = (2000 * 100^2 * 0.01) / 0.1 L = 2,000 H

    Therefore, the inductance of the coil is 2,000 henries.

    Induktoren sind elektronische Bauteile, die Energie in Form eines magnetischen Feldes speichern. Sie werden in einer Vielzahl von Anwendungen eingesetzt, von einfachen Schaltkreisen bis hin zu Stromversorgungen und Filtern. Das Verständnis der Prinzipien von Induktoren ist wesentlich für das Entwerfen und Analysieren von elektronischen Schaltungen.

    Induktivität ist die Eigenschaft eines Induktors, die jeder Änderung des durch ihn fließenden Stroms entgegenwirkt. Die Einheit der Induktivität ist das Henry (H). Die Induktivität eines Induktors hängt von der Anzahl der Windungen in der Spule, der Form und Größe des Kerns sowie dem Material des Kerns ab. Die Formel zur Berechnung der Induktivität eines Induktors lautet:

    L = (μ * N^2 * A) / l

    wobei L die Induktivität in Henry, μ die magnetische Permeabilität des Kernmaterials, N die Anzahl der Windungen in der Spule, A die Querschnittsfläche des Kerns und l die Länge des Kerns ist.

    Ein weiterer wichtiger Parameter eines Induktors ist seine Reaktanz, die dem Widerstand eines Induktors gegen eine Änderung des Wechselstromflusses entspricht. Die Reaktanz eines Induktors ist proportional zu seiner Induktivität und der Frequenz des Wechselstroms. Die Formel zur Berechnung der Reaktanz eines Induktors lautet:

    XL = 2πfL

    wobei XL die Reaktanz in Ohm, f die Frequenz in Hertz und L die Induktivität in Henry ist.

    Neben der Speicherung von Energie können Induktoren auch zum Filtern unerwünschter Frequenzen in einem Schaltkreis verwendet werden. Ein Tiefpassfilter kann beispielsweise durch Anschließen eines Induktors in Serie mit einem Widerstand und einem Kondensator erstellt werden. Der Induktor blockiert hohe Frequenzen und lässt niedrige Frequenzen durch, während der Kondensator niedrige Frequenzen blockiert und hohe Frequenzen durchlässt.

    Um das Konzept der Induktivität zu veranschaulichen, betrachten wir das folgende Beispiel:

    Angenommen, wir haben eine Spule mit 100 Windungen, einen Kern mit einer Querschnittsfläche von 0,01 m^2 und einer Länge von 0,1 m. Der Kern besteht aus Eisen, das eine magnetische Permeabilität von 2000 hat. Berechnen Sie die Induktivität der Spule.

    Mit der Formel für Induktivität haben wir:

    L = (μ * N^2 * A) / l
    L = (2000 * 100^2 * 0,01) / 0,1
    L = 2.000 H

    Daher beträgt die Induktivität der Spule 2.000 Henry.

  • What is turtle.Turtle() in python?

    In Python, turtle.Turtle() is a function that creates and returns a new turtle object that can be used to draw graphics on a canvas.

    The turtle graphics library in Python provides a simple way to create graphics and animations by allowing you to control a virtual turtle that moves on a canvas. The turtle can be moved around the canvas using commands such as forward(), backward(), left(), right(), etc.

    To use the turtle graphics library, you first need to import the turtle module. Then, you can create a new turtle object using the turtle.Turtle() function. For example, the following code creates a new turtle and moves it forward by 100 units:

    import turtle
    
    t = turtle.Turtle()
    t.forward(100)
    

    You can also customize the appearance and behavior of the turtle object by setting various attributes such as its color, size, shape, and speed. For example, the following code creates a red turtle with a size of 5 and a speed of 2:

    import turtle
    
    t = turtle.Turtle()
    t.color("red")
    t.pensize(5)
    t.speed(2)
    t.forward(100)
    

    Overall, the turtle.Turtle() function is the starting point for creating and controlling turtle objects in the turtle graphics library.

  • DIY PCB Etching: How to Make Printed Circuit Boards at Home

    Materials:

    • Copper clad board
    • Laser printer and paper
    • Ferric chloride
    • Plastic container
    • Gloves
    • Safety glasses
    • Water
    • Sandpaper
    • Steel wool
    • Drill

    Tools:

    • Iron
    • Ruler
    • Scissors

    Steps:

    1. Design your PCB using PCB design software or draw it on paper.
    2. Print your design using a laser printer on glossy paper. Be sure to print it in reverse so that the toner transfers onto the copper.
    3. Cut the copper board to the appropriate size using a ruler and scissors.
    4. Clean the copper board with sandpaper and steel wool to remove any dirt, dust, or oxidation.
    5. Heat up the iron to a high temperature and place the printed design onto the copper board.
    6. Apply pressure with the iron onto the paper for a few minutes until the toner melts and transfers onto the copper board.
    7. Once cooled, gently peel off the paper.
    8. Place the board into a plastic container filled with ferric chloride solution and let it sit for around 15-20 minutes.
    9. Shake the container occasionally to ensure the solution reaches all parts of the board.
    10. After 15-20 minutes, remove the board from the solution and rinse it with water.
    11. Use a drill to make holes in the board where necessary.
    12. Your PCB is now ready for use.

    Note: Be sure to follow proper safety precautions when handling ferric chloride and wear gloves and safety glasses. Additionally, dispose of the ferric chloride solution properly and do not pour it down the drain.

    Free software options for making PCB

    1. KiCAD – https://kicad.org/
    2. EasyEDA – https://easyeda.com/
    3. Fritzing – http://fritzing.org/home/
    4. DesignSpark PCB – https://www.rs-online.com/designspark/pcb-software
    5. ExpressPCB – https://www.expresspcb.com/
    6. FreePCB – https://www.freepcb.com/
    7. gEDA – http://www.geda-project.org/
    8. Osmond PCB – https://www.osmondpcb.com/

    FAQ

    Question: What trace width be achieved at home?
    Answer: The achievable trace width at home depends on various factors such as the PCB fabrication process, equipment and materials used, and the skill level of the person performing the etching. Generally, the achievable trace width can range from around 8 mils (0.2 mm) to 20 mils (0.5 mm) with standard home etching methods. However, it is possible to achieve even smaller trace widths with advanced techniques such as photoresist etching, but these methods require more specialized equipment and materials.

    Question: Why do you use mil instead of mm?
    Answer: Mil is a commonly used unit of measurement in the electronics industry, particularly for specifying trace widths on printed circuit boards. It is equivalent to 1/1000th of an inch, or about 0.0254mm. While millimeters are a more commonly used unit of measurement in many parts of the world, mils are preferred for PCB design because they allow for finer resolution when specifying trace widths and clearances. Additionally, many PCB design tools are optimized for use with mils, making it easier to create and edit PCB designs using this unit of measurement.

    Question: What are the common trace width for some common sections of PCB?
    Answer: The common trace width for some common sections of PCB is:

    1. Power traces: 20-30 mils or more, depending on the current carrying capacity required.
    2. Signal traces 6-10 mils, depending on the frequency of the signal and the required impedance.
    3. Differential pair traces: 8-12 mils, depending on the required impedance and the tolerances of the PCB manufacturing process.
    4. Through-hole component pins: 20-30 mils, to ensure sufficient copper coverage around the hole and good solder joint strength.
    5. SMD component pads: 12-20 mils, depending on the size of the component and the PCB manufacturer’s recommendations.

    Question: Can we draw all the trace with a single trace width?
    Answer: It’s possible to use a single trace width for all traces on a PCB, but it’s not always the best approach. Some sections of the PCB may require wider traces to handle higher current or to reduce voltage drop. Other sections may require narrower traces to fit in tight spaces or to reduce signal crosstalk. It’s important to consider the specific requirements of each section of the PCB and adjust the trace widths accordingly. However, for a simple circuit, using a single trace width may be sufficient.

  • AVR Input Output Port Programming

    In AVR microcontroller programming, input/output ports are used to interface with external devices such as sensors, switches, LEDs, motors, and other peripherals. Here’s an example of how to program AVR input/output ports using C language:

    #include <avr/io.h>
    #include <util/delay.h>
    
    int main(void)
    {
        // Set PORTB as output and PORTC as input
        DDRB = 0xFF;
        DDRC = 0x00;
    
        while(1)
        {
            // Read the value of PINC3
            if(PINC & (1 << PINC3))
            {
                // If PINC3 is high, turn on LED connected to PB0
                PORTB |= (1 << PB0);
            }
            else
            {
                // If PINC3 is low, turn off LED connected to PB0
                PORTB &= ~(1 << PB0);
            }
        }
    }
    

    In this example, we set PORTB as an output port by setting all of its pins to output mode. We set PORTC as an input port by setting all of its pins to input mode. Then, we use a while loop to continuously check the value of PINC3. If PINC3 is high, we turn on an LED connected to PB0 by setting the corresponding bit in PORTB to high. If PINC3 is low, we turn off the LED by setting the corresponding bit in PORTB to low.

    Note that the & and | operators are used to manipulate individual bits in the port registers. The << operator is used to shift the binary value of 1 to the left by a certain number of bits to set a particular bit high or low. The ~ operator is used to invert the value of a bit. The util/delay.h library is used to create a delay between each loop iteration.

  • How to make comments in python

    In Python, you can make comments using the hash symbol (#).

    Any text that appears after the hash symbol (#) on the same line is considered a comment and is ignored by the Python interpreter.

    For example:

    # This is a comment
    print("Hello, world!")  # This is also a comment
    

    In the above example, the first line is a comment, and it is ignored by the Python interpreter. The second line is a print statement, which will print “Hello, world!” to the console when executed. The third line is another comment, which is also ignored.

    You can also use multi-line comments by enclosing them in triple quotes (“”” “””). For example:

    """
    This is a multi-line
    comment in Python.
    """
    
    print("Hello, world!")
    

    In this example, the first three lines are a multi-line comment, and they are ignored by the Python interpreter. The fourth line is a print statement, which will print “Hello, world!” to the console when executed.

  • Removed the faulty touch screen from STM32F429I-DISC1

    The LCD display on this touchscreen is having issues. It is not responding to touch. And suddenly the display stopped working. So I cut the foam and suddenly the ribbon tore off completely.

    As you can see the screen is completely removed.

    It now gives access to all the pins that are being used by the LCD.

    I am planning to make a VGA controller using this board since the microcontroller has an LTDC (LCD TFT Controller)

  • TIP3055 NPN BJT

    It is a power transistor capable of handling power dissipation up to 90W for a few microseconds(generally less than 300 microseconds). Also, it has a Vceo of 60 V and a collector current of 15A.

    TIP3055 is a widely used NPN power transistor that can handle high power and high voltage applications. It has a maximum collector-emitter voltage of 60V and a maximum collector current of 15A, making it ideal for use in power supplies, audio amplifiers, and motor control circuits. TIP3055 is a versatile transistor that can be used in a variety of circuit designs due to its high current gain and fast switching speeds. Its popularity can be attributed to its low cost, high reliability, and ease of use. With its ability to handle high power and voltage, TIP3055 is a go-to component for any circuit designer looking for a reliable power transistor.

    It comes in a TO-247 package.
    This is handy as it can be mounted to a heat sink with a nut bolt.

    Datasheet Links

    ST – https://www.st.com/resource/en/datasheet/tip3055.pdf

    Onsemi – https://www.onsemi.com/pdf/datasheet/tip3055-d.pdf

    Do all the companies that manufacture TIP3055 have exactly the same pinouts?

    The TIP3055 transistor has a standardized pinout, which means that all manufacturers of this transistor must follow the same pinout configuration. The pinout configuration for the TIP3055 transistor is as follows:

    • Pin 1: Base
    • Pin 2: Collector
    • Pin 3: Emitter

    Therefore, no matter which company manufactures the TIP3055 transistor, the pinout configuration should always be the same, and you can expect the same pinout configuration for TIP3055 transistors from different manufacturers. However, it is always recommended to check the datasheet provided by the manufacturer to confirm the pinout configuration and other specifications before using the transistor in a circuit.

  • STM32F103C8T6 Blue Pill

    The STM32F103C8T6 development board which is also known as Blue Pill is a small and affordable development board. It is based on the ARM Cortex-M3 processor and features 64KB of flash memory, 20KB of SRAM, and a maximum clock speed of 72MHz. The Blue Pill is a popular choice for hobbyists and developers who want to experiment with embedded systems and microcontrollers. In this blog post, we will take a closer look at the Blue Pill’s schematic diagram and pinout.

    Documents

    STM32F103C8 Product Page
    Datasheet

    How to program the stm32f103c8t6?

    Step 1: Setting up the development environment

    To program the Blue Pill, you will need a development environment that includes the necessary tools and software. A popular choice is the STM32CubeIDE, which is an integrated development environment (IDE) that includes a compiler, debugger, and other tools. You will also need to download the STM32F1xx HAL library, which provides a set of functions for configuring and controlling the microcontroller.

    what are the other IDE which can be used to program stm32f103c8t6?

    • Keil MDK: Keil MDK is an integrated development environment (IDE) that supports the ARM Cortex-M processor family, including the STM32F103C8T6. It includes a compiler, linker, debugger, and other tools for developing embedded applications.
    • Eclipse IDE: Eclipse is a popular open-source IDE that supports a wide range of programming languages and platforms, including the STM32F103C8T6. Eclipse provides a plugin called “GNU ARM Eclipse” that includes tools for building and debugging ARM-based projects.
    • Visual Studio Code: Visual Studio Code is a popular open-source code editor that supports a wide range of programming languages and platforms, including the STM32F103C8T6. You can use Visual Studio Code with extensions to provide support for C/C++ development, debugging, and uploading code to the board.

    Can IAR Embedded Workbench be used to program?

    Yes, IAR Embedded Workbench is another popular IDE that can be used to program the STM32F103C8T6. IAR provides a comprehensive toolchain that includes a C/C++ compiler, linker, and debugger, as well as tools for code analysis and optimization.

    Step 2: Configuring the microcontroller

    Before writing code for the Blue Pill, you need to configure the microcontroller’s peripherals and registers. This involves setting up clock and power management, GPIO pins, timers, interrupts, and other peripherals, depending on your project’s requirements. The STM32F1xx HAL library provides functions for configuring the microcontroller, which you can use in your code.

    Step 3: Writing and compiling the code

    Once the microcontroller is configured, you can write your code using a programming language such as C or C++. You can use the STM32F1xx HAL library functions to interact with the microcontroller’s peripherals and registers. Once you have written your code, you need to compile it using the compiler included in your development environment.

    Step 4: Uploading the code to the board

    Once you have compiled your code, you need to upload it to the Blue Pill board. This involves connecting the board to your computer using a USB cable and using a programming tool such as ST-Link or J-Link to upload the code. You can use the programming tool’s software or your development environment’s built-in upload tool to upload the code.

    Schematic Diagram:

    The STM32F103C8T6 Blue Pill’s schematic diagram is relatively simple and straightforward. The board features a 3.3V voltage regulator, which is used to provide power to the microcontroller and other components. The board also includes an external crystal oscillator (HSE) and a 32.768 kHz crystal oscillator (LSE) for real-time clock (RTC) functionality.

    Other key components on the board include:

    Reset circuitry: The Blue Pill features a reset button and an external reset circuit to ensure the reliable and safe operation of the microcontroller.
    USB connector: The board includes a USB connector that can be used for programming and communication with the microcontroller.
    LED indicators: There are two LED indicators on the board, one for power and one for user-defined purposes.

    Pinout:

    The STM32F103C8T6 Blue Pill’s pinout is organized into four rows of headers, with a total of 20 pins. Here is a brief overview of the pin functions:

    • PA0 to PA15: These pins are general-purpose input/output (GPIO) pins that can be used for a variety of purposes, including digital input/output and analog input.
    • PB0 to PB15: These pins are also GPIO pins, with the same capabilities as the PA pins.
    • PC13 to PC15: These pins are typically used for the onboard LED indicators, but can also be used as GPIO pins.
    • VDD: This is the 3.3V power supply pin.
    • VSS: This is the ground pin.
    • BOOT0: This pin is used to select between the bootloader and the user code during programming.
    • NRST: This is the reset pin.
    • SWDIO and SWCLK: These pins are used for programming and debugging the microcontroller using the Serial Wire Debug (SWD) protocol.

    The STM32F103C8T6 Blue Pill is a versatile and affordable development board that is well-suited for a wide range of projects. Its simple schematic diagram and clear pinout make it easy to work with, even for beginners. With its powerful ARM Cortex-M3 processor, ample memory, and rich set of peripherals, the Blue Pill is a great choice for anyone looking to dive into the world of microcontroller programming.

  • Convert mA to A

    Enter milli Ampere (mA):
    Ampere (A)=

    Definition

    Ampere = One coulomb of charge going through per second

    Milliampere = one-thousandth of an ampere

    Formula

    mA = A / 1000

    Where:
    mA = milliampere
    A = Ampere

    Example

    Question: How to convert 800mA to A?
    Answer:
    800 x 10-3 = 800 milliampere
    800 / 1000 = 0.8A

    deutsche Sprache

    Frage: Wie rechnet man 800 Milliampere in Ampere um?
    Antwort:
    800 x 10-3 = 800 milliampere
    800 / 1000 = 0.8A

  • BD139 Pinout

    The BD139 is a general-purpose NPN bipolar junction transistor (BJT). It has three pins:

    1. Base (B)
    2. Collector (C)
    3. Emitter (E)

    There are two companies that manufacture the transistor

    1. STMicroelectronics
    2. onsemi

    The pinout diagram according to STMicroelectronics is as follows:

    When looking at the center hole and keeping the metal side down the pins are arranged from right to left as:

    1. Base (B)
    2. Collector (C)
    3. Emitter (E)

    It’s important to note that the metal tab is connected to the Collector pin.

    The pinout diagram according to ON Semiconductor is as follows:

    When looking at the flat side of the transistor with the pins facing down and the metal tab facing up, the pins are arranged from left to right as follows:

    1. Emitter (E)
    2. Collector (C)
    3. Base (B)

    It’s important to note that the metal tab is connected to the Collector pin.