• 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.

  • Raspberry Pi Pico W

    Raspberry Pi Pico W Datasheet
    Connecting to the Internet with Raspberry Pi Pico W
    RP2040 Datasheet

    NOTE: The CYW43439 supports both 802.11 wireless and Bluetooth, initially Pico W does not have Bluetooth support. Support may be added later, and will use the same SPI interface. If support is added existing hardware may require a firmware update to support Bluetooth, but there will be no hardware modifications needed.

    Technical Specification
    • RP2040 microcontroller with 2MB of flash memory
    • On-board single-band 2.4GHz wireless interfaces (802.11n)
    • Micro USB B port for power and data (and for reprogramming the flash)
    • 40-pin 21mm×51mm ‘DIP’ style 1mm thick PCB with 0.1″ through-hole pins also with edge castellations
      • Exposes 26 multi-function 3.3V general purpose I/O (GPIO)
      • 23 GPIO are digital-only, with three also being ADC capable
      • Can be surface-mounted as a module
    • 3-pin Arm serial wire debug (SWD) port
    • Simple yet highly flexible power supply architecture
      • Various options for easily powering the unit from micro USB, external supplies or batteries
    • High quality, low cost, high availability
    • Comprehensive SDK, software examples and documentation
    • Dual-core cortex M0+ at up to 133MHz
    • 264kB multi-bank high performance SRAM
    • External Quad-SPI flash with eXecute In Place (XIP) and 16kB on-chip cache
    • High performance full-crossbar bus fabric
    • On-board USB1.1 (device or host)
    • 30 multi-function general purpose I/O (four can be used for ADC)
      • 1.8-3.3V I/O voltage
    • 12-bit 500ksps analogue to digital converter (ADC)
    • Various digital peripherals
      • 2 × UART, 2 × I2C, 2 × SPI, 16 × PWM channels
      • 1 × timer with 4 alarms, 1 × real time clock
    • 2 × programmable I/O (PIO) blocks, 8 state machines in total
      • Flexible, user-programmable high-speed I/O
      • Can emulate interfaces such as SD card and VGA

    Schematic Diagram

    Raspberry Pi Pico W Schematic 2
    Raspberry Pi Pico W Schematic component Location
    Raspberry Pi Pico W Schematic 1

    Raspberry Pi Pico W Pinout

  • German Vocabulary 1 – Three Cooking Ingredients

    Three common ingredients that I use in cooking are:

    1. Red Onion
    2. Ginger
    3. Red Chilli

    They are translated into German as :

    1. rote Zwiebel
    2. Ingwer
    3. rote Chili

    I use them after chopping them so they are

    1. Chopped Red Onion
    2. Chopped Ginger
    3. Chopped Red Chili

    Which in german are:

    1. Gehackte rote Zwiebel
    2. Gehackter Ingwer
    3. Gehackte rote chili