Metal Fabrication in Engineering Masterpieces

Have you ever gazed in awe at a towering skyscraper, a sports car, or a crafted medical device and wondered, "How was that created?" The answer often lies in one factor; accuracy. Accuracy in engineering isn't a term; it's the essential element that transforms a great concept into an exceptional reality. At the core of this accuracy is metal fabrication—a routine process that is indispensable for bringing engineering marvels to life.

The Essential Role of Precision in Engineering

Let's be honest within the realm of engineering even the smallest error can lead to issues. Picture a bridge that is just slightly miscalculated. It's quite unsettling, isn't it? This is why accuracy is so critical. It's not about getting things it's about getting them precisely right. Accuracy ensures that everything fits seamlessly operates perfectly and, above all else endures the test of time.

You might be pondering now "How does metal fabrication contribute to all this?" To put it simply metal fabrication is the process that breathes life into those engineering blueprints. Cutting, bending, and welding are just a few of the processes that custom metal fabrication services include, and each one requires an extraordinary degree of precision to guarantee that the finished product will meet every specification. Without this precision, the remarkable engineering achievements we admire would not be achievable.

Consider the Golden Gate Bridge as an illustration. It is not just a marvel of architecture; it is a testament to engineering made possible by crafted metal parts. This serves as one instance showcasing how precision in metal fabrication underpins engineering triumphs.

Critical Techniques for Ensuring Precision

So how do engineers attain accuracy? It all boils down to techniques in metal fabrication.

CNC Machining; Crafting Metal Components

CNC machining enables the cutting and shaping of metal parts with accuracy. Imagine a robot sculpting metal with the meticulousness of an artist chiseling away at a marble statue—that's CNC machining in action.

Laser Cutting and Water Jetting

Laser cutting harnesses powered lasers to slice through metal with pinpoint precision. It's akin to using a lightsaber to slice through steel—. With greater accuracy. This method proves essential for crafting shapes and designs, within metal components. Water jetting involves utilizing a high-pressure stream of water to slice through the toughest materials. It's a precise technique ideal for projects where heat could harm the material.

Crafting Metal Shapes with Strength

Metal stamping and extrusion are methods that enable the creation of durable metal shapes. Whether it's shaping the body of a car or crafting airplane components these processes ensure that each piece is meticulously formed.

The Significance of Precision in Engineering Results

Precision may sound like a buzzword. What does it mean for the product? Well, to put it simply it can determine the success or failure of the result. Picture this; if a metal part is off it could disrupt the system. Precision guarantees that every component functions seamlessly resulting in a product that not only performs admirably but has an extended lifespan.

But wait there's more. Precision also plays a role, in cost-effectiveness. By getting things on the try manufacturers can minimize waste and steer clear of costly errors. In the realm of engineering where resources are often limited this presents an advantage. Moreover maintaining accuracy, in metal fabrication is essential to meet the standards set by industries. Whether it's within the aerospace industry or the healthcare sector adherence to these standards is a must with precision playing a role in ensuring compliance.

Challenges Encountered in Achieving Precision

Certainly reaching levels is not without its obstacles. Significant challenges exist. Firstly the selection of materials holds importance. Different metals react diversely to pressure, heat, and other factors; hence selecting the material is crucial for achieving the desired precision.

Additionally, technological aspects pose challenges. Despite having tools such as CNC machines, laser cutters, and water jets at our disposal they are not flawless. These tools require handling and expertise during operation. Furthermore, there's also a factor at play. Regardless of top-tier machinery used it's ultimately the skill and experience of engineers and fabricators that ensure everything comes together with precision.

The Outlook for Precision in Metal Fabrication

So what lies ahead concerning precision in metal fabrication? Encouragingly technology continues to advance. Innovations, like AI and robotics, are continually pushing boundaries. Expanding possibilities. Enabling the attainment of even greater levels of precision. Imagine a future where machines can learn from their mistakes and constantly enhance their accuracy. This is the direction we are moving towards.

Looking ahead sustainability is becoming increasingly important. Precision, in metal fabrication, not only leads to products but also helps in reducing waste making the entire process more environmentally friendly. This creates a win-win situation particularly as industries are emphasizing sustainability.

Furthermore, with global projects becoming larger and more intricate the need for precision in metal fabrication will continue to rise. Whether it involves constructing a skyscraper or developing cutting-edge medical technology precision will always be essential for engineering excellence.

In conclusion

Although precision in metal fabrication may not always attract attention-grabbing headlines it plays a role in engineering success stories. From ensuring optimal product performance to managing costs and meeting industry standards precision is what transforms engineering concepts into realities. So the next time you admire an engineering feat remember that it was precision—and a significant amount of skill—that made it achievable. If you embark on your engineering endeavor never underestimate the impact of precision in metal fabrication—it could be the factor that separates good, from exceptional.

Step-by-Step Guide to Calculate Antilog

In mathematics, antilogarithms (or antilogs) are a fundamental concept that often comes across in scientific calculations, engineering, and various applied fields. Understanding how to calculate antilogarithms is important for anyone working with logarithms or exponential functions. 

This article aims to guide you through the process of calculating antilogarithms step-by-step, ensuring a clear and comprehensive understanding of the concept.

What is Antilog?

The antilogarithm commonly called antilog, is the mathematical operation that undoes the logarithm. It's a fine function that helps us find the original value from a given logarithmic value. In simpler terms, the antilog allows us to determine the actual number when we only have the logarithm of that number.

The formula:

Antilog(x) = bx.

Here, 'x' represents the logarithmic value, and ‘b’ represents the base.

How do we calculate the Antilog?

Understanding the parts of the logarithm mantissa and its characteristics is important to find the antilog of a number. Let's explore each part:

  1. Characteristic: The characteristic is an integer part of the logarithm. In a logarithm expression like log(x), the characteristic represents the whole number part of the result.
  2. Mantissa: The decimal part of the logarithm is the mantissa. It is the fractional portion following the characteristic. In a logarithm expression like log(x), the mantissa represents the decimal value that gives the complete logarithm when combined with the characteristic.

When finding the antilogarithm, separate the characteristic and mantissa parts.

  • The characteristic helps identify the number of digits before the decimal point in the antilogarithm result.
  • The mantissa helps determine the decimal value.

Steps:

To calculate the antilogarithm, follow these steps:

  1. Identify the characteristic and mantissa from the logarithm value.

  2. Compute the antilogarithm of the mantissa

  3. Adjust for the characteristic: Move the decimal point in the antilogarithm result depending on the characteristic value. 

1. If the characteristic is positive:

  1. Count the number of digits in the characteristic.

  2. Move the decimal point in the antilogarithm result to the right by the same number of digits.

  3. If the antilogarithm result is a whole number, add zeros as necessary after moving the decimal point.

2. If the characteristic is negative:

  1. Take the absolute value (positive value) of the characteristic.

  2. Count the number of zeros before the first non-zero digit in the antilogarithm result.

  3. Move the decimal point in the antilogarithm result to the left by the same number of zeros.

  4. If the antilogarithm result is less than one, add zeros as necessary before moving the decimal point.

Manual calculation of antilogarithms can be time-consuming and prone to errors. To simplify the process, consider using Antilog Calculator by Allmath . This tool is useful for anyone dealing with complex logarithmic data. Enter your logarithm value and base in the provided box and click the calculate button.

How do we use an Antilog Table?

An antilog table provides calculated values of antilogarithms for a range of logarithmic values, it's also known as a logarithm table. To avoid the complex calculations this table helps us. 

To use an antilog table:

  1. Locate the characteristic and Mantissa value in the table.
  2. Focus on the mantissa. Use the first two digits after the decimal point as the row number and the third digit as the column number in the antilog table.
  3. Look for the mean difference in the same row corresponding to the fourth digit of the mantissa. Add this mean difference to the value obtained in Step 2.
  4. Place a decimal point right after the first digit obtained in Step 3.
  5. Multiply the number obtained in Step 4 by 10 raised to the power of the characteristic. The result is the antilog of the given number.

Properties of Antilog

Antilogarithms possess several interesting properties that are useful in various mathematical calculations. Some of the key properties of anti-logarithms include:

  1. Identity property: The algorithm of 0 is always 1.

  2. Inverse property: antilog(log(x)) = x log(antilog(x)) = x.

  3. Product property: antilog (x + y) = x log (antilog (x)) = x.

  4. Quotient Property: (x - y) = antilog (x) / antilog (y).

These properties enable us to perform various calculations and simplify complex mathematical expressions involving antilogarithms.

Applications of Antilog

Antilogarithms have numerous applications in various fields, including mathematics, physics, engineering, finance, and scientific research. Some noteworthy uses of anti-logarithms are:

  1. Exponential Growth and Decay: Antilogarithms aid in modeling exponential growth and decay phenomena. They are used to calculate the values at different time points based on growth rates or decay rates.

  2. Signal Processing: Antilogarithms are utilized in signal processing algorithms to convert logarithmic measurements back into linear scale values. This conversion is crucial in applications such as audio and image processing.

The versatility of antilogarithms allows for their extensive application across diverse scientific and technical domains.

Example of Antilog

This section will demonstrate how to calculate antilog with the help of examples.

Example 1: (with table)

Calculate the antilog of 2.4856 

Solution:

Using an antilog table.

Step 1:

Locate the characteristic and Mantissa value in the table.

Characteristic: 2

Mantissa: 0.4856.

Step 2:

Focus on the mantissa. Use the first two digits after the decimal point 48 as the row number and the third digit 5 as the column number in the antilog table.

Row number = 48

Column number = 5

Corresponding value = 3055 + 4

Step 3:

Look for the mean difference in the same row corresponding to the fourth digit of the mantissa. Add this main difference of 4 to the value obtained in Step 2.

 = 3055 + 4 = 3059.

Step 4:

Place a decimal point right after the first digit obtained in Step 3:

 = 3.059.

Step 5:

Multiply the number obtained in Step 4 by 10 raised to the power of the characteristic. The result is the antilog of the given number.

= 3.059 × 103 = 305.9

Hence, the antilog of 2.4856 is 305.9.

Example 2: (without table)

Find antilog of 2.4856 without table.

Solution:

Step 1: 

Identify the characteristic and mantissa from the logarithm value.

Characteristic: 2

Mantissa: 0.4856

Step 2:

Compute the antilogarithm of the mantissa.

Using the exponential function, calculate the antilogarithm of the mantissa value:

Antilogarithm of 0.4856 = 10(0.4856)

Step 3: 

Adjust for the characteristic.

Since the characteristic is 2, move the decimal point two places to the right.

Multiply the antilogarithm result by 100:

Adjusted antilogarithm = Antilogarithm of 0.4856 × 100

Now, we need to evaluate the exponential function using a calculator or mathematical software:

Antilogarithm of 0.4856 ≈ 3.0445

Step 4: 

Adjusted antilogarithm = 3.0445 × 100

Multiply 3.0445 by 100:

Adjusted antilogarithm ≈ 304.45.

Conclusion

In this article, we explored the concept of antilogarithm, its calculation method, properties, and applications, and provided examples. Antilog is essential in undoing logarithms and finding the original values. Whether using an antilog table or mathematical calculations, understanding the characteristics and mantissa helps in accurate results. Antilog finds applications in various fields like exponential growth, signal processing, and more.

What is Vacuum Casting? Definition, Working, Pros & Cons

Vacuum casting is the key technique for plastic or rubber part fabrication using a vacuum and stands out as a premier method for small batches of polyurethane products. This method is particularly valuable for the creation of samples of products so the manufacturer can assess the trend, market response, customer feedback, and product performance before working on full-scale production.

Injection molding is another technique used for plastic model manufacturing, but vacuum casting is cost-effective and most suitable for small production. This article will shed light on the vacuum casting introduction, its working principles, pros and cons. Let’s discuss each point in detail.

Vacuum Casting Definition 

Vacuum casting, also termed polyurethane casting or urethane casting, is the process of creating plastic or rubber models utilizing silicon molds under vacuumed conditions. Here, the vacuum is primarily used to get the intricate parts, while the vacuum is used to eliminate any air bubbles and improve the material flow from the mold. This is particularly useful for small- to medium-sized production and results in rapid and clean prototyping.

This process deserves consideration when choosing the plastic or rubber parts for easy prototyping. Unlike the traditional molding technique, which the metal molds, vacuum casting utilizes plastic or silicon molds that are lower in cost and can be molded in a short amount of time. The use of a vacuum is a game changer here because it is helpful to get the perfect mold with less material waste and boasts a smooth structure without any flaws. 

Vacuum Casting Precautions

Just like all molding techniques, vacuum casting requires some precautions for safety, and before rushing towards its work, it is important to discuss some important points to be considered when starting to work on it.

  • Always wear personal protective equipment (PPE), including gloves, dust masks, and goggles, for safety. This will protect you from the chemicals and other protective measures.
  • Ensure that the place has proper ventilation in the casting area so that the fumes or vapors are eliminated continuously.

  • Sometimes, the flammable material is also included in the vacuum casting process; therefore, it is crucial to have the fire safety kit with you all the time.
  • Regularly inspecting the vacuum equipment, tools, and molds will help you have a safe procedure.
  • When mixing the casting material, make sure you are measuring and combining the material well to get the best results.
  • Keep an eye on the vacuum level to eliminate air bubbles or any other deformation without affecting the mold's health.
  • Clean the mold after every batch to avoid any residue left behind.
  • Allow sufficient curing time for the product before demolding so no product is damaged or deformed.

Vacuum casting is professional work and should always be done with great care, using all precautions. If you are confident and experienced, then you can do it yourself, but always get expert vacuum casting services for the best output and even the lowest cost. 

Vacuum Casting Working

Vacuum casting’s work resembles the traditional casting method known as injection molding, as both of these methods utilize a cavity mold shaped according to the intended part. However, the vacuum casting distinguishes itself by conducting the whole procedure in the vacuum chamber. The controlled environment eliminates any bubbles or imperfections from the mold and results in high-quality product formation. The subsequent section outlines the step-by-step procedure to create the final product using vacuum casting:

Step 1: 3D Design Creation in Vacuum Casting

The process begins with the creation of a 3D master model, keeping the intended component in mind. 3D designers or CAD software are considered ideal for this step, and the most common recommendations for these models are listed below:

  • SolidWorks

  • CATIA

  • AutoCAD

  • Autodesk Fusion 360

  • Rhinoceros (Rhino)

Before commencing the modeling procedure, it is important to make the calculations for the model to prevent any deformations or errors in the final product. These calculations are responsible for the perfect shape and professional finish. Moreover, this step is fundamental because the whole procedure is carried out on the basis of this step. Usually, the experts prefer to check the final 3D design through 3D laser scanning and create 3D files to be used further. 

Step 2: Master Model Creation in Vacuum Casting

This step translates the 3D design and creates the master model. The master model is the prototype that the designers use for silicon mold development. This step enhances the model's security because the cast model is a replica of the master model, and any deformation in it can cause the same error in all the pieces. Therefore, high accuracy and care are required for the master model's creation. 

Previously, the manufacturers used CNC machining for this process, but now they choose 3D printing technology, which plays the marker’s role as it is a quick and more affordable approach. Yet, it is important to mention that CNC machines offer more precision and professional output, and the choice depends on the product type. 

Step 3: Silicon Rubber Mold Creation in Vacuum Casting

This step requires the master mold and the casting box. For convenience, I am dividing it into different phases:

Once the master mold is created and approved, it is experts fit the mold and the necessary components in the casting box. These components may be cores, inserters, casting gates, and some others. The risers are also included to ensure proper air escape during the molding process. As a result, the casting box is now fully packed with the master model in it.

The molten silicon is then poured into the casting box and vacuumed around the master mold, allowing the silicon to be filled in every detail.

Now, the liquid silicon cures in the oven at around 40℃ for 8–16 hours, and the timing for this step varies depending on the silicon mold dimensions. After this, it's time to retrieve the risers and remove the casting box.

The mold is now split using the scalpel and to reveal the negative shapes part cavity. Different mold removal agents are suggested here for easy removal without any breakage.

Step 4: Polyurethane Resin Mixing

Multiple types of polyurethane resin are available, with varying structural properties relative to the manufacturing product. The mixing involves two phases:

  1. Heating the polyurethane resin at 40℃

  2. Combining the two components, casting resin with pigment

The amount of resin must be very precise according to the size of the casting product. The manufacturers then mix the required pigment with the resin in the machine and pour the mixture into the machine’s bowl for at least 50 to 60 seconds; this step is termed the auto-pouring process. Subsequently, they pour the resin into the molds under vacuum and pressure to avoid gaps or air bubbles. As a result, the gravity power creates a seamless and smooth filling of mold. The product formed in this way is crack-free and does not have any major breakable points, so the manufacturer gets a product with high quality and strength. 

Step 5: Cure and Demold the Casting Part 

This is the last step, and here, the manufacturers heat the resin in the curing room until the final product solidifies. Once the product is fully hard, they take the casting out of the molds, the gates and risers are removed, and the finishing treatments are performed if required. Resultantly, the required high-quality product is formed, and this process is preferred over others because of its reliability and fine finishing. 

Pros and Cons of Vacuum Casting

This section elaborates on the merits and demerits of using vacuum casting for product manufacturing. Let’s commence the debate with the positive points:

Advantages of Vacuum Casting

  • The most prominent advantage is rapid prototyping using vacuum casting. These are made with intricate and finely detailed shapes in small batches. Hence, these are considered ideal for low-cost or low-scale prototypes and production parts. 

  • Vacuum casting is popular because of the wide range of colors and designs available for a diverse range of product types. It provides 3D printing geometry flexibility and, therefore, can create products easily that are considered difficult in other types of production. The fine design with great details are major feature of products made with vacuum casting. 

  • When comparing vacuum casting with other methods, such as a CNC machine as a prototyping method, we find vacuum casting cost-effective with a more detailed output. It involves the creation of reusable molds in just a few hours, therefore being the first choice for most manufacturers. The small parts created with this technique connect each other without any requirement of additional procedures such as drilling or sanding. 

  • This process involves the 3D master molds; therefore, high quality and precision are expected. 3D printing involves intricate precision and accurate size and shape that beats other techniques. 

  • A wide range of resins are suitable for vacuum casting; therefore, the manufacturer has more domains when using this technique. 

  • It is a quick process as compared to other techniques, such as injection molding, so it yields high production in less time. 

  • It provides the same quality of the product throughout the process, so the products made have uniform shapes and colors, no air bubbles, or any other issues. 

  • When comparing it with other methods, the manufacturers always prefer vacuum casting because it requires less labor and less technical information. 

  • This process has less waste as compared to some other techniques and, therefore, is considered more environmentally friendly. 

Disadvantages of Vacuum Casting

  • Vacuum casting involves the use of silicon molds that have less life span as compared to the molds used in other techniques. For instance, injection molding uses metal molds; hence, a longer life span is expected. Silicon molds wear and tear more frequently in vacuum casting. 

  • Vacuum casting can create small-scale production because of the limiting size of the vacuum chamber and casting box. Hence, it is not a suitable process for mass production. 

  • This method is not suitable for the production of high-temperature applications. The molds can be deformed or even break at high temperatures. 

  • There is a regular requirement for cleaning and maintaining the molds; otherwise, the residue of a batch can affect the subsequent casting. 

  • The production price of this method is low, but the setup has a high cost because it involves the vacuum chamber and necessary tools according to the product. 

  • Vacuum casting has the risk of shrinking the product when working. 

Vacuum Casting Technical Specifications

Before starting work on the vacuum casting, you must know the technical specifications to ensure minimal defects. The subsequent table is helpful for getting started with the information you must have while working on this technique. 


Parameter

Technical Specification

Production Scale

1-50 parts per mold

Maximum Product Dimensions

The dimensions of the vacuum chamber determine the mold’s size.

Minimum Wall Thickness

  • The minimum wall thickness: 0.75 mm (to ensure even mold filling). 

  • Recommended wall thickness: 1.5 mm

Accuracy

± 0.3%

Material Choice

Mostly rubber or plastic.

Surface Structure

  • Glossy

  • Matt 

Time Frame

30–50 pieces in 24 hours-5 working days.

Hence, today we have learned a lot about the vacuum casting technique for product formation. There are multiple other techniques, such as injection molding for the same output, but vacuum casting is preferred for small-scale production because it provides a smooth finish, quick product formation, and an easy procedure at a low cost. The working of these techniques starts with the 3D design creations, and then the master mold is formed, which acts as the heart of silicon rubber model formation. After that, the polyurethane and pigments are mixed and molded in the vacuum chamber, and after the product hardens, the curing and demolding process starts.

This is a quick and uncomplicated technique that is useful for small-scale production and has its merits and demerits that we discussed before. We also shed light on the precautions and technical specifications, so you may know the basis of this process, but always get the assistance of professional vacuum casting services to get your product safely and with the perfect finish. I hope you find this article useful. 

Laser Drilling vs Mechanical Drilling in PCB Manufacturing

The printed circuit board (PCB) is the backbone of electronic circuits, and for complex circuits, multi-layer PCBs are utilized to enhance productivity. PCB drilling is a crucial process, especially in multilayer PCB production, and involves precise via creation through laminate material. We know that vias are important conduits that bridge the gaps between multiple layers of PCBs. These are considered the conductive connections in a PCB, especially if it has multiple layers. Without vias, the multilayer PCBs have limited design flexibility and are impractical. In PCB manufacturing, there are multiple drilling types, but today I am going to discuss the comparison between the two most important methods, i.e. mechanical drilling and laser drilling.

The appropriate drilling technique selection ensures the right hole placement, optimal hole quality and reliable performance. Lasers and mechanical drilling have their own merits and demerits. Drilling is a sensitive process, and even a small mistake can damage the PCB if the manufacturer does not keep the required measures in mind. Multiple factors affect the best choice between the two but choosing the best PCB platform can make this task easy.

Best Laser/Mechanical Drilling PCB Manufacturer

PCBx Fabrication House is the leading platform that provides high-quality, low-priced PCBs and turnkey assembly services. PCBx offers all types of PCBs and has the prestige of presenting a seamless solution for laser drilling or mechanical drilling in PCBs. Drilling is a delicate process in PCBs, and we use advanced technologies for sharp, clean, and accurate drilling results, no matter if you are interested in laser drilling or mechanical drilling.

With the latest cutting-edge technology (including AI), the PCB order process is smooth, and we deliver the best PCBs with a smooth assembly and drilling process. Our top-notch automated inspection (SPI, AOI, and AXI) services make it possible for us to deliver the best products in mass production in the least time. With the 3D SPI, 3D AOI, and 3D AXI, the whole production process is under critical inspection to deliver the best product.

The latest technology not only helps to perform a smooth production process, but the top-quality drilling process is the prominent feature of PCBx services. So, if you want to get instant quoting, the most convenient ordering process, and top-quality drilling in your PCB, then you should check PCBx. Let me show you the face of the PCBx website:

The drilling process is crucial for multiple-layer PCBs, and we are offering competitive prices for drilling and multi-layer PCB production I would encourage you to try out our services and get the best quote not only for mechanical or laser drilling PCB manufacturing but also for assembly and design.

Now, let's discuss the comparison between mechanical and laser drilling and then choose the best option according to your needs.

Mechanical Drilling in PCB Manufacturing

The mechanical drilling in PCB production relies on the rotating bit tool to drill small holes in the laminated material. Usually, the drill bit can be used repeatedly because of its micro-granule cemented carbide structure. It can be reshaped and reused up to three times, depending on the type of PCB vias. In the case of mechanical drilling, the standard fiberglass and resin content laminate is used with a copper foil covering as a substrate, also termed FR4. 

The drilling element in this method consists of the pneumatic mandril, which provides almost  300,000 rpm speed to the drill; therefore, high accuracy is required for holes of small sizes. For this, the drill is mounted on the servo-mechanical system so it may move along the X and Y axes. Moreover, the particular actuator works for the PCB movement in the Z axis. As a result, the user gets a smooth, clean, and accurate output.

Mechanical Drilling Advantages in PCBs

Here is the list of common pros of the mechanical drilling process in PCBs:

  • The most common advantage is control over the hole depth with mechanical drilling. The bit tool penetrates deeper than the laser drilling hole. This is an important factor, especially if the manufacturer is working with a PCB with a large number of layers. 

  • It gives high-quality holes consistently with the same sharpness, and it doesn’t matter how many holes are drilled.

  • The mechanical drill does not have any tapers at the end; therefore, the holes are completely drilled through the substrate without any bevels. As a result, the manufacturer gets a clean knee of the wall and a sharp edge finish. 

  • This method allows the user to have a faster drilling speed than laser drilling, resulting in a good throughput level at a given time if all the preparations are done correctly. It works even better on PCBs with dense vias.

Mechanical Drilling Disadvantages in PCBs

Now, let’s have a look at the negative aspects of this technique:

  • Mechanical drilling is an old and outdated method; therefore, it is not perfect for all types of projects. 

  • When using mechanical drilling, the manufacturers have constraints on drill bit size, resulting in fewer via-size options. The narrow holes require a narrow drill, which has a great chance of breakage. For instance, if a high trace dense PCB requires less than 5 mils in diameter via holes, the required bits of diameter 0.008 inches, or 1/64ths of an inch, are too delicate for use in mechanical drilling. 

  • Usually, the bits have a large size; therefore, this technique is not suitable for the latest, smaller but more complex PCBs. 

  • If the right precaution is not taken, the mechanical drilling can cause tiny metal fragments (usually copper) that can stick to the PCB surface and affect its performance, so there is a need to clean the PCB after drilling. 

  • There is a need to deburr the PCB vias after drilling, which is a time-consuming task. 

  • It is an expensive method, and its preparation and post-processing are time-consuming. 

Laser Drilling in PCB Manufacturing

Laser drilling is the PCB drilling process that consists of a complex optics set that makes holes in different PCB layers with 200 μm or even less. As a result, highly precise and sharp drills can be drilled in the PCBs. The size and diameter depend on the laser beam opening, and the exposure time of this bean determines the hole depth. There is a set of particular lenses that perform the duty of bean concentration on a particular point for PCB drilling. This drilling type allows the beam to create even micro vias, blind vias, etc. but also eliminates the delamination. The beam shaping technology is responsible for projecting the laser on the substrate, and as a result, this energy breaks the chemical bond. This process releases the steam that generates the recoil pressure and applies the downward force to the molten material. This results in the molten material flowing out of the hole, so the manufacturers get a clean and sharp hole.

The beam ablates a fine hole in the copper layer, following the substrate materials and the beam type is selected depending on the substrate type of PCB manufacturing. The two most common laser types are:

  1. UV lasers

  2. CO2 lasers

The ultraviolet lasers are more precise and find applications in high-density interconnect (HDI) PCBs. Not only for vias, but this method is considered ideal for PCB cuttings. Conversely, carbon dioxide (CO2) lasers are less expensive but have larger wavelengths. It finds its applications in dealing with different materials in PCB, such as plastics, ceramics, and composites.

Laser Drilling Advantages in PCB Manufacturing

Have a look at some important pros of laser drilling:

  • Laser drilling ablates through a large variety of substrate materials. Therefore, has a great scope for PCBs related to different industries. 

  • It is a non-contact technology, and most processes are automatic; therefore, there are fewer chances of PCB breakage or damage. 

  • Once the laser beam settings are done and the drilling process starts, there is no need for manual changes at every point but just supervision. The laser machine performs all the duties. 

  • It has a high production rate because a large number of holes can be drilled into a single PCB at a time.

  • It is the latest technology and, therefore, suits the latest complex, smaller, and more advanced PCBs. 

Laser Drilling Disadvantages in PCB Manufacturing

Here are some negative points about the laser drilling technology:

  • A metal stop layer is required in PCBs to halt the laser drilling process. Without this layer, the stopping process is challenging. 

  • Lasers suit the smaller hole size because the chemical bond breakage requires a lot of time, effort, and energy. 

  • The aspect ratio (AR) is the hole’s copper plating indicator, and there must be great accuracy in maintaining the AR ratio; otherwise, it’s difficult to get the ideal output. The formula for the AR is given next:


AR= Depth of the hole / Diameter of the drilled hole

PCBx offers the perfect AR ratio; therefore, our clients get a clean and sharp drilling process at all times, even for mass production.

Considerations When Choosing Between Mechanical Drilling and Laser Drilling

Multiple factors affect the best choice for the particular PCB type. The following parameters will help you choose the best technology for your PCB manufacturing:

Size of Vias in PCB

One of the most crucial points to consider while choosing the drilling technique is the size of the vias. As discussed before, laser drilling allows the manufacturers to drill small-sized holes with accuracy as compared to mechanical drilling. When studying the vias size, the two most important parameters to keep in mind are:

  1. Pad to Hole Ratio=Hole Diameter/Pad Diameter​

  2. Aspect Ratio= Depth of the hole / Diameter of the drilled hole

Hence, mechanical drilling is suitable for PCBs with large vias and thicker borders otherwise, laser drilling works with smaller vias size.

Through Hole Vias in PCB

This is the type of vias that goes throughout the PCB while manufacturing and the uncomplicated type of vias because there is no need to take care of the particular layer length. For the PCBs where the manufacturer has to create multiple through-hole vias, mechanical drilling is a better option due to its superior control and grip in depth. On the contrary, if the via size is small then you have to choose laser drilling. 

Substrate Type in PCB

The drilling technique must be according to the type of substrate and other PCB material. For instance, laser drilling can cause thermal stress or delamination in the substrate like FR-4 (Fiberglass) but for polyamide, laser drill is a good choice. 

Mechanical drilling is effective for substrates like FR-4, metalcore, polyimide, etc but for the flexible substrate, laser drilling is preferred. 

Cost of Drilling in PCB Manufacturing

The cost is another fundamental criterion for choosing the best drilling technique for your PCB. Mechanical drilling and laser drilling are distinct each with varying operational costs. Although laser drilling provides more production and can deal with small vias effectively its processing cost is high and due to its complex handling, experts are required.

On the other hand, mechanical drilling is slow but it uses traditional machinery and costs less but the regular maintenance of drill bits and machine make it expensive for bulk orders. PCB manufacturers have the machinery for mechanical drilling which does not require much technical skills so usually, it costs less as compared to laser drilling. 

Hence, the cost of any of these methods depends on the number of PCBs, via size, via type, and other parameters. 

Conclusion

In PCB manufacturing, mechanical drilling and laser drilling are two of the major drilling techniques that are widely used in different PCB types. Mechanical drilling is a conventional, easy, and accurate drilling method that is useful for larger via size, hard substrates, and high AR, and pad hole ratios. On the other hand, laser drilling is the latest, cleanest, and most automated drilling technique. Different types of vias and their size play a role in choosing the right drilling technique. Each method has its demerits and drawbacks, and I hope I’ve cleared up different points. Now you can choose the best technique according to your PCB. If you want more assistance, you can contact us directly.

Introduction to the PCB Etching Process

Hello everyone, I hope you all are doing well. In today’s tutorial, we are going to discuss the PCB Etching process, a fundamental step in PCB manufacturing. The PCB Etching process is used to remove the unwanted copper from the PCB surface to reveal the desired circuit pattern.

As we know, a PCB board has a complete copper layer in its raw form. We design our circuit in the software(i.e. Eagle, Altium, Proteus etc.) and place the pattern on the PCB board. This circuit pattern is normally protected by the tin plating, as shown in the below figure:

Now, there’s a need to remove the extra/unwanted copper layer from the PCB board and this process is called the PCB Etching Process. PCB Etching is carried out in various ways and the most commonly used is the Chemical Etching Process, where a chemical named Ferric Chloride is used to remove the copper. A completely Etched PCB is shown in the below figure:

Finally, we can remove the tin layer, polish the leftover copper layer (of our circuit), drill the holes and our PCB is ready for component placing & soldering.

Where to Order High-Quality Etching for PCBs

PCBway is the leading PCB manufacturing platform that offers all PCB services, from fabrication to assembly, in mass production with instant quotes. We ensure a smooth order process and one-on-one assistance for all your PCB manufacturing services, with the best value in direct pricing. We use modern technology and processes for PCB etching; therefore, we provide a wide range of etching techniques, including laser etching, chemical etching, and much more, to ensure the exact product you are searching for. 

At PCBway Fabrication House, they provide real-time fabrication tracking for your orders so you can get the most satisfying and quick ordering process. Our professional workers know etching is a crucial step in PCB fabrication, and with the modernization of PCBs, they are becoming compact and complex, so etching provides accuracy and precision in the circuit design. Therefore, they follow the best practices and always get positive feedback for the services. For more information, follow the website’s link, and here is the main page:

The safe payment method and worldwide delivery are our prestige to satisfy the customers and work on bulk orders with the buyer’s protection. We deal with every type of PCB and provide multiple packages to grab the attention of every type of buyer. 

In this article, I am going to discuss the introduction, types, workings, and other basic information that you must know before you get started with the etching process. 

Introduction to the PCB Etching Process

PCB etching is a highly intricate process in PCB fabrication that involves the removal of unwanted material from the PCB surface. It is the controlled dissolution or erosion of unwanted copper where the specific PCB areas of the copper layer are removed to get the required pattern. It is also termed PCB printing, where circuit patterns are designed on the surface for the electric components. 

Before starting the PCB etching, there is a need to create the layout of the desired design for the board. Great care is required to create the exact design and layout, and then, it is transferred onto the PCB through a process known as photolithography. During this step, the PCB is coated with light-sensitive materials, and the pattern is then transferred to the board using light. As a result, the blueprint of the design is ready to be etched with sharp results.

PCB etching is part of the manufacturing stage of PCBs, and it takes place just before the electronic components are mounted on them. This crucial part forms the pathways necessary for PCB operations by defining the electronic connections. It is considered the last stage of PCB fabrication, and then the board is moved towards the assembly stage.

PCB Etching Processes

As discussed before, etching is the fundamental part of PCB manufacturing. For that reason, various etching techniques are employed for the specific type and material of the board. Understanding each of them ensures the manufacturer gets the required output and sharp design. Etching is broadly characterized into two major classes:

  1. Wet etching

  2. Dry etching

Let’s discover both these classes and the methods related to them. 

Wet Etching

The wet etching removes the undesired material from the PCB through chemical reactions. The next section will elaborate on its workings:

Wet Etching Working on PCB

An etchant is a chemical substance that is used in the wet etching process to react with and dissolve the excessive  material on the masked PCB. It is usually in liquid form; therefore, this type of etching is known as wet etching. Mainly, the etchants used in this method are acids, bases, or other solvents, and the selection of the right etchant depends on the type of PCB, masking, and some other important parameters. The following steps are required in wet etching:

Surface Preparation in Wet Etching

The patterns we see on the PCB are formed by a layer of metal or oxide on the surface. At the start, a plain layer of this material is coated on the PCB along with the photoresists (coating layer) through photolithography. As a result, only the dischargeable areas of metal or oxide are exposed for the etching. 

Immersion in Etchant

Now, when the board is ready for the dissolving process, it is immersed in the etchant bath, where the  exposed material undergoes the reaction process. Usually, the metal layer made of copper and ferric chloride is the etchant. This is a relatively time-consuming process, and the total time depends on the type of etchant used in this step. As a result, the underlying layer starts showing. At this point, it is important to take the board out of the etchant solution bath.

Rinsing and Cleaning in Wet Etching

After removing the substrate from the etchant solution, the board is thoroughly washed with water or other neutralizing agent to stop the chemical reaction.  

Photoresist Removal in Wet Etching

This is the final step in this process, in which the photoresist layer is stripped away from the board and the user sees the desired pattern on the board.

Wet etching is a simple and effective method to get a precise design, but it requires a lot of care to avoid over-etching or underlying layer damage. Generally, the wet etching is isotropic, which means it etches in all directions. It requires a less complicated method and does not have strong ions; therefore, it has a low risk of board damage.

Types of Wet Etching Processes

The following are the most common wet etching types:

Alkaline Etching on the PCB

The alkaline etching, or alkaline permanganate etching, utilizes an alkaline solution, usually NaOH (sodium hydroxide) and potassium permanganate (KMnO4). The solution dissolves the copper from the PCB, and this process is known for providing uniform etching at a high etching rate. 

Usually, the manufacturers select this etching type in high-pressure and conveyorized chambers to improve efficiency and reaction rate. It is a good option for etching PCBs with an uncomplicated etching design and larger surface areas. Exposing the PCB to the refreshed etch spray within the chamber helps the manufacturer achieve less toxicity than with many other etching processes.

Acidic Etching in PCB

Acidic etching on PCB involves etching away unwanted copper from the surface through the chemical reaction of the acidic solution. The acidic solution can be applied to the PCB through different means, such as dipping it in the bath, spraying the solution on the board, or brushing it on the surface. 

Once the acidic solution dissolves all the discardable copper layer areas, it is then washed and dried completely to stop the chemical reaction. Generally, the acidic method is considered best for the inner layer as it helps minimize the lateral erosion of the etched material of the masked metal layer. The chemical reaction is more controlled in this type; therefore, it provides an intricate and refined circuitry design. Manufacturers consider this method for smaller designs and dense boards because it provides a fine line width.

Dry Etching in PCB

Dry etching is a technique in PCB that involves the removal of unwanted metal coating areas through reactive gases or plasma instead of liquid chemical reactions. It is a highly precise method to create sharp patterns and fine features on PCB. The most common methods of dry etching are described next:

Plasma Etching on the PCB

Plasma etching has been used for PCBs since the 1960s but was not a prominent technique until the 1970s. This method was considered useful for reducing liquid waste disposal and getting sharper results as compared to wet etching. Another prominent benefit of using plasma etching is that it uses excitation and dissociation techniques to remove a particular part without causing damage to PCB surfaces. As a result, it is considered a good option for sensitive and delicate PCBs.

The method involves the use of a plasma system, also known as the plasma chamber. A high voltage is applied to the reactive gases such as oxygen (O2), chlorine (Cl2), argon, fluorine, etc., which break down the molecules into the constituent gas atoms. For this, the plasma system has a radio frequency source that produces electromagnetic waves. Some of these atoms are ionized (acquire charge) and then react with the exposed metal layer. As a result, the discardable copper molecules are broken down and removed. Mostly, the frequency range is 13.56 Mhz, 40 Khz, 80 Khz, 100 Khz, and 2.45 GHz. 

The process does not involve any chemicals and is a dry, clean, and effective method for etching. The positive points of this method are that it is a clean, controlled, and precise method for etching that can be applied on small scales. Unlike some other techniques, there is no risk of vias contamination or solvent absorption. Moreover, it works better on high-density printed circuit boards, often utilized for fine-line circuitry. On the contrary, it is an incredibly costly technique and is not profitable until the etching is done in large quantities regularly. The chamber system requires maintenance and expertise. 

Laser Etching on the PCB

Laser etching is also termed laser ablation or laser direct imaging (LDI) and was used at the start of 1987. It is the process in which a high-power laser beam is incident to the PCB surface to remove the unwanted copper layer and get pinpoint accuracy. It is a computer-controlled method, and the excessive copper is either evaporated entirely or flaked off.

On a larger scale, laser etching has the following sub-types:

  • Fiber Laser

  • Ultra Violet Laser

  • CO2 Laser

Ventilation, eye protection, protective clothes, laser beam reflection maintenance, and limited direction viewing are some of the fundamental precautions required to apply this method. A benefit to using this method is that the number of steps in the whole process is very minimal if all the precautions and machinery are ready to use. No ink, acid, toxic material, or wet chemical is required for this process. 

The disadvantage is, that etching the large board is challenging. Moreover, it requires a lot of investment at the start to get the equipment and system ready. The operational cost is also high in this process. 

Comparing Wet Etching and Dry Etching

The following table shows the difference between wet and dry etching for the printed circuit board:


Feature

Wet Etching

Dry Etching

Process

A liquid chemical solution is required for etching

Gas, plasma, and lasers are required for the etching

Etching Material

Liquid chemicals (e.g., acids, alkaline solutions).

Reactive gases or plasma.

Material Removal

Isotropic (removes material uniformly in all directions), can lead to undercutting.

Can be anisotropic (directional etching), providing more precise control.

Equipment

Requires chemical baths, masks, and washing stations.

Needs vacuum chambers, plasma sources, and more sophisticated equipment.

Cost

Generally lower cost due to simpler equipment.

Higher cost due to complex and high-precision equipment.

Applications

Preferred for use for large-scale material removal in simpler PCB designs.

Preferred for high-precision applications, especially in advanced and complex PCB designs.

Advantages

  • Cost-effective

  • Straightforward

  • Widely used.

  • Precision control

  • Minimal undercutting

  • Suitable for fine features.

Disadvantages

  • Can lead to undercutting

  • Less precision

  • Chemical waste disposal is required.

  • Expensive

  • Requires complex equipment

  • More energy-intensive.

Etching is one of the most basic steps in PCB manufacturing, in which the excess copper layer is removed from the PCB surface to get the desired circuit design. A copper layer is applied to the PCB, and, a mask of unreactive material is applied to the areas required on the board. The unneeded part is then allowed to react with the etchant and is dissolved. After that, the solvent is then removed and dried if required, and masking is then removed. As a result, sharp and fine designs are obtained. Etching is broadly classified into wet and dry etching. Examples of wet etching include alkaline and acetic etching, whereas dry etching includes plasma and laser etching. The choice of method depends on the board size, density, type of board, etc. Each method has its merits and demerits, and we have discussed all the basic points to clear up the topic.

Web-Controlled IoT Notice Board using Raspberry Pi

Welcome to the next tutorial of our Raspberry Pi programming tutorial. The previous tutorial showed us how to Interface weight sensor HX711 with pi 4. We learned that a weight sensor HX711 and load cell could be easily interfaced with a Raspberry Pi 4 with careful attention to wiring and software configuration. However, now we're one step ahead of that by using the Internet as the wireless medium to transmit the message from a Web browser to an LCD screen attached to a Raspberry Pi. This project will be added to our collection of Internet of Things (IoT) projects because messages can be sent from any Internet-connected device, such as a computer, smartphone, or tablet.

A bulletin board serves as a vital means of communicating and collecting information. Notice boards are common at many public and private establishments, including schools, universities, train and bus stations, retail centers, and workplaces. You can use a notice board to get the public's attention, promote an upcoming event, announce a change in schedule, etc. A dedicated staff member is needed to pin up the notices. It will take time and effort to fix the problem. Paper is the primary medium of communication in traditional analog notice boards. There is a limitless amount of data available to use. As a result, a lot of paper is consumed to show off those seemingly endless numbers.

We set up a local web server for this demonstration for the Web Controlled Notice Board, but this could be an Internet-accessible server. Messages are shown on a 16x2 LCD connected to a Raspberry Pi, and the Pi uses Flask to read them in from the network. In addition, raspberry will update its LCD screen with any wireless data it receives from a browser. In this piece, I'd like to talk about these topics.

Components Required:

  • Raspberry Pi 4

  • Wi-Fi USB adapter 

  • 16x2 LCD

  • Bread Board

  • Power cable for Raspberry Pi

  • Connecting wires

  • 10K Pot

Implementation Description and Website Development

Raspberry Pi is the central component in this project and is utilized to manage all associated tasks. Such as operating an LCD screen, getting server-sent "Notice messages," etc.

Here we will learn how to use Flask to set up a web server that will allow you to send a "Notice Message" from your browser to a Raspberry Pi. In Python, the Flask serves as a miniature framework. Designed with the hobbyist in mind, this Unicode-based tool includes a development server, a debugger, support for integrated unit testing, secure cookie support, and an intuitive interface.

We have built a simple web page with a message box and a submit button so that users can type in their "Notice Message" and send it to the server. HTML was used extensively in the creation of this web app. The source code for this page is provided below and is written straightforwardly.

A user can create an HTML file by pasting the code above into a text editor (like notepad) and saving the file as HTML. It is recommended that the HTML file for this Web-based message board be placed in the same folder as the Python code file. Now you can execute the Python code on your Raspberry Pi, navigate to the IP address of your Pi:8080 URL in your web browser (for example, http://192.168.1.14:8080), type in your message, and hit the submit button; your message will immediately appear on the LCD screen attached to the Pi.

The webpage is coded in HTML and features a textbox, submit button, and heading (h1 tag) labeled "Web Control Notice Board." When we hit the submit button, the form's "change" action will be carried out via the post method in the code. However, the "Notice Message" label on the slider blocks its use.

We may add a line after that to display the text that we've transmitted to the RPi over the server.

The text box is checked to see if it contains any data, and if it does, the content is printed on the webpage itself so the user can view the provided message. In this context, "value" refers to the text or notification message we enter in the text box or slider.

Circuit Explanation

To assemble this wireless bulletin board, you need to use a few connectors on a breadboard to link an LCD to a Raspberry Pi board. The PCB count for user connections can be zero. Pins 18 (GND), 23 (RS/RW), and 18 (EN) are hardwired to the LCD. The Raspberry Pi's GPIOs (24, 16, 20, 21) are linked to the LCD's data ports (D4, D5, D6, D7). The LCD backlight may be adjusted with a 10K pot.

Remember that earlier versions of the Raspberry Pi do not include Wi-Fi as standard; therefore, you must connect a USB Wi-Fi adapter to your device if you do not have a Raspberry Pi 3.

What is Flask?

A web framework, Flask. That's right; Flask gives you everything you need to make a web app: tools, libraries, and technologies. A web application might be as small as a few pages on the Internet or as large as a commercial website or web-based calendar tool.

The micro-framework includes the category "flask." Micro-frameworks, in contrast to their larger counterparts, typically have, if any, reliance on third-party libraries. Like with anything, there are benefits and drawbacks to this. Cons include that you may have to do more work on your own or raise the number of dependencies by adding plugins, despite the framework's lightweight, low number of dependencies, and low risk of security vulnerabilities.

What are template engines?

Do you have experience creating websites? Have you ever found that you needed to write the same thing several times to maintain the website's consistent style? Have you ever attempted to modify the look of a site like that? Changing a website's face with a few pages will take time, but it is manageable. But, this can be a daunting effort if you have several pages (like the list of products you sell).

You may establish a standard page layout with templates and specify which content will be modified. Your website's header may then be defined once and applied uniformly across all pages, with only a single maintenance point required in the event of a change. Using a template engine, you may cut down on development and upkeep times for your app.

With this new knowledge, Flask is a micro-framework developed with WSGI and the Jinja 2 templates engine.

Key benefits of Flask include:

  1. Setup and operation are simple.

  2. Independence in constructing the web application's architecture.

Because it lacks "flask rules" like other frameworks like Django, Flask places a more significant burden on the developers to properly structure their code. This framework will serve as the basis for the growing complexity of the web app.

Explanation of Code with Flask

The programming language of choice for this project in Python. Users must set up Raspberry Pi before writing any code. If you haven't already, look at our introductory Raspberry Pi guide and the one on installing and setting up Raspbian Jessie on the Pi.

The user must run the following instructions to install the flask support package on the Raspberry Pi before programming it:

pip install Flask

It is necessary to change the Internet protocol address in the Program to the Internet address of your RPi before running the Program. By entering the ifconfig command, you may see your RPi board's IP address:

Ifconfig

To carry out all of the tasks, the programming for this project is crucial. We begin by including the Flask libraries, initializing variables, and defining LCD pins.

from flask import Flask

from flask import render_template, request

import RPi.GPIO as gpio

import os, time

app = Flask(__name__)

RS =18

EN =23

D4 =24

D5 =16

D6 =20

D7 =21

Call the def lcd init() function to configure an LCD in four-bit mode. Next, to send a command or data to an LCD, call the def lcdcmd(ch) or the lcddata(ch) functions. Finally, to send a data string to an LCD, call the def lcdstring(Str) function. The provided code allows you to test each of these procedures.

The code snippet below is used to communicate between a web browser and Raspberry Pi through Flask.

@app.route("/")

def index():

    return render_template('web.html')

@app.route("/change", methods=['POST'])

def change():

 if request.method == 'POST':

    # Getting the value from the webpage

   data1 = request.form['lcd']

   lcdcmd(0x01)

   lcdprint(data1)

 return render_template('web.html', value=data1)

if __name__ == "__main__":

    app.debug = True

    app.run('192.168.1.14', port=8080,debug=True)

This is how we can create an Internet of Things–based, Web–controlled wireless notice board using a Raspberry Pi LCD and a web browser. Below is a video demonstration and the complete Python code for your perusal.

Advantages IoT Bulletin Board Managed Using Web Interface

There are numerous benefits to using the Internet for message delivery. The benefits are multiple: a faster data transfer rate, higher quality messages, less time spent waiting, etc. Using user names and passwords provides a more robust level of security. Here, a raspberry pi can serve as a minicomputer's brain. This means we can now send high-quality picture files such as Jpg, jpeg, png, and pdf documents in addition to standard text communications. 

The delete option contributes to the new system's ease of use. This makes it possible to undelete any transmission at any moment. This method is the initial step in realizing the dream of a paperless society. Communities that use less paper have a more negligible impact on the environment. Adding visuals to screens is now possible thanks to the benefits of Raspberry Pi. Including visuals increases readability and interest. 

All different kinds of bulletin boards have the same overarching purpose: to disseminate information to as many people as possible. This device can reach more people than traditional bulletin boards made of wood. Data downloaded from the cloud can be kept in the Raspberry pi's onboard memory. The system's stability will be ensured in this manner. The data is safe against loss even if the power goes out. These benefits allow the suggested method to be expanded to global, real-time information broadcasting.

Complete code

from flask import Flask

from flask import render_template, request

import RPi.GPIO as gpio

import os, time

app = Flask(__name__)

RS =18

EN =23

D4 =24

D5 =16

D6 =20

D7 =21

HIGH=1

LOW=0

OUTPUT=1

INPUT=0

gpio.setwarnings(False)

gpio.setmode(gpio.BCM)

gpio.setup(RS, gpio.OUT)

gpio.setup(EN, gpio.OUT)

gpio.setup(D4, gpio.OUT)

gpio.setup(D5, gpio.OUT)

gpio.setup(D6, gpio.OUT)

gpio.setup(D7, gpio.OUT)

def begin():

  lcdcmd(0x33) 

  lcdcmd(0x32) 

  lcdcmd(0x06)

  lcdcmd(0x0C) 

  lcdcmd(0x28) 

  lcdcmd(0x01) 

  time.sleep(0.0005)

def lcdcmd(ch): 

  gpio.output(RS, 0)

  gpio.output(D4, 0)

  gpio.output(D5, 0)

  gpio.output(D6, 0)

  gpio.output(D7, 0)

  if ch&0x10==0x10:

    gpio.output(D4, 1)

  if ch&0x20==0x20:

    gpio.output(D5, 1)

  if ch&0x40==0x40:

    gpio.output(D6, 1)

  if ch&0x80==0x80:

    gpio.output(D7, 1)

  gpio.output(EN, 1)

  time.sleep(0.0005)

  gpio.output(EN, 0)

  # Low bits

  gpio.output(D4, 0)

  gpio.output(D5, 0)

  gpio.output(D6, 0)

  gpio.output(D7, 0)

  if ch&0x01==0x01:

    gpio.output(D4, 1)

  if ch&0x02==0x02:

    gpio.output(D5, 1)

  if ch&0x04==0x04:

    gpio.output(D6, 1)

  if ch&0x08==0x08:

    gpio.output(D7, 1)

  gpio.output(EN, 1)

  time.sleep(0.0005)

  gpio.output(EN, 0)

 def lcdwrite(ch): 

  gpio.output(RS, 1)

  gpio.output(D4, 0)


  gpio.output(D5, 0)

  gpio.output(D6, 0)

  gpio.output(D7, 0)

  if ch&0x10==0x10:

    gpio.output(D4, 1)

  if ch&0x20==0x20:

    gpio.output(D5, 1)

  if ch&0x40==0x40:

    gpio.output(D6, 1)

  if ch&0x80==0x80:

    gpio.output(D7, 1)

  gpio.output(EN, 1)

  time.sleep(0.0005)

  gpio.output(EN, 0)

  # Low bits

  gpio.output(D4, 0)

  gpio.output(D5, 0)

  gpio.output(D6, 0)

  gpio.output(D7, 0)

  if ch&0x01==0x01:

    gpio.output(D4, 1)

  if ch&0x02==0x02:

    gpio.output(D5, 1)

  if ch&0x04==0x04:

    gpio.output(D6, 1)

  if ch&0x08==0x08:

    gpio.output(D7, 1)

  gpio.output(EN, 1)

  time.sleep(0.0005)

  gpio.output(EN, 0)

def lcdprint(Str):

  l=0;

  l=len(Str)

  for i in range(l):

    lcdwrite(ord(Str[i]))

begin()

lcdprint("Circuit Digest")

lcdcmd(0xc0)

lcdprint("Welcomes You")

time.sleep(5)

@app.route("/")

def index():

    return render_template('web.html')

@app.route("/change", methods=['POST'])

def change():

 if request.method == 'POST':

    # Getting the value from the webpage

   data1 = request.form['lcd']

   lcdcmd(0x01)

   lcdprint(data1)

 return render_template('web.html', value=data1)

if __name__ == "__main__":

    app.debug = True

    app.run('192.168.1.14', port=8080,debug=True)

Conclusion

We accomplished our goal of constructing a minimal IoT-based bulletin board. The world is becoming increasingly digital; thus, new methods must be applied to adjust the currently used system. Wireless technology allows for quick data transfer even across great distances. It reduces setup time, cable costs, and overall system footprint. Information transmission is global in scope. There is a password- and username-based authentication mechanism available for further fortifications. Before, a Wi-Fi-enabled bulletin board served this purpose. While coverage was restricted in the former, in the latter, we make use of the Internet as a means of communication. Hence, the scope of coverage is smooth. A chip or an SD card can be used to store multimedia information. The speed and quality of receiving and viewing text and multimedia data are maximized.

Scalar or Dot Product of Vectors

Hi friends, I hope you are all well. In this article, we can discuss the scalar or dot products of the vectors. In previous articles, we have discussed vectors and their addition in the rectangular or cartesian coordinate system in depth. Now we can talk about the scalar product of two vectors, also known as the dot product. Scalar or dot products can play an essential role in solving the operation of vector algebra and also they have various applications in numerous fields like computer sciences, mathematics, engineering, and physics.

By doing the scalar or dot products, two vectors are combined when we can do their product, then they produce the scalar quantity which has both magnitude and direction by a single operation in a very efficient way. Simply the scalar and the dot product are algebraic operations that can be especially used in physics and mathematics. scalar quantity can only provide the magnitude but when we can do the product of two vectors, the result of this product is scalar quantity which provides and describes both magnitude and direction. The angle between the two vectors can also be found through the scalar or dot product. The dot product term can be derived from the word dot operator and it can be used for the product of two vectors but it can also known as a scalar product because it can always give the result as a scalar quantity so that is why it can also be known as scalar product rather than the vector product.

Now we can start our detailed discussion but the dot or the scalar product, their definition, algebraic operations, characteristics, applications, and examples. At the end of this discussion, the reader easily understands vectors, how we can make the scalar product, and their application in numerous fields of science, especially in physics or mathematics.

Definition: 

Dot/Scalar products can be defined geometrically or algebraically. But in the modern form, the scalar and the dot product can be defined and rely on the Euclidean space which has the cartesian or rectangular coordinate system. The basic and simple definition of the scalar and the dot product are given there:

“The product of two vectors is a scalar quantity so that's why the product is termed scalar product”.

 Mathematical expression:

The mathematic expression which can express the dot or scalar product is given there:

A B = AB cosθ

Where,

A is the magnitude of the vector A.

B is the magnitude of the vector B.

And,

The cosθ is the angle between the two vectors A and the vector B.

Coordinate definition of the scalar product:

The dot product or the scalar product produces a single scalar quantity which can be produced through their mathematical operation. The product of the two vectors based on orthonormal base or in n-dimensional space, their mathematical expression or definition are given there:

A B =  A1b1 + A2B2+ ……… + AnBn

There;

A = A1 , A2, ........ , An

B = B1, B2 , ......... , Bn

A B can also be mathematically written as;

A B =  i=1naibi

there n represented the dimension of the vector in the Euclidian space or the summation is represented through. 

For example, the dot or scalar product of  the vector A = ( 5, 4, 4) or vector B = (2, 1, 6) in the three dimensions is calculated as:

A B =  A1b1 + A2B2+ ……… + AnBn

By putting the values we can get, 

A B = ( 5 2) + ( 4 1) + ( 4 6) 

A B  = 10 + 4 + 24

A B  =  38 

moreover, the vectors ( 6, 3, -2 ) themselves can do dot or scalar products which can be written as: 

( 6, 3, -2) ( 6, 3, -2) = (6 6) + (3 3) + (-2 -2)

= 36 + 9 + 4 

= 49

Another example for the dot or scalar product of the vector A= ( 4,6) and the vector B= ( 2, 8) in the two dimensions can be expressed or calculated as:

( 4, 6) ( 2,8 ) = ( 4 2) + ( 6 8) 

=  8 + 48

= 56

The product of the two vectors can also be written in the form of a matrix. The formula that can be used for the matrix product of two vectors can be written as

A B = At. B

There, 

At = transpose of the vector A

For instance, 

4 3 2 4 9 4  then this matrix has vectors column 1 1 = 1

And the column in this vector is 3 3 = 6 

In this way, we can write the vectors in the matrix row or column form and the result is a single entity. 

Geometrical definition of the scalar or the dot product:

In geometry, Euclidean vectors can describe both magnitude and direction through the scalar product or from the dot product. The length of the vector represents the magnitude and the direction of these vectors can be represented through the arrow points that are present on the vectors. The scalar and the dot product in geometry can be written as;

A B = A B cosθ

 There,

A represented the magnitude of the vector A.

B represented the magnitude of the vector B.

And, 

θ represented the angle between the magnitude of the vector A and the vector B.

Orthogonal vectors: 

If the vector A and the vector B are orthogonal then the angle between them θ = 90° or also equal to the π2 it can be written as:

A B = cosπ2                                 

hence, 

The cosπ2 is equal to 0. It can be written as:

A B = 0

Codirectional:

If the vector A and the vector B are codirectional then the angle between their magnitude is equal to 0. Then,

A B = cos 0 

hence,

cos0 = 1 and written as:

A B = A B

Itself vector product:

If the vector A does scalar or the dot product itself then it can be written as: 

A A = A2

That can also written as:

A = A . A

This formula can be used to determine the length of the Euclidean vector.

Physical meaning:

The simple physical meaning of the scalar or dot product is that the product of the dot or scalar product is equal to the magnitude of the one vector and the other is equal to the component of the second vector which is placed in the direction of the first vector.

Mathematically it can be expressed as:

A B = A ( projection of the vector B on the A).

A B = B (the component of vector B magnitude along with the vector A )

Then it can also be written as: 

A B = A ( B cosθ )

Then for the vector B we can write as: 

B . A = B ( projection of the vector A on the vector B)

B . A = B ( the component of vector A magnitude along with the vector B). 

Then it can also be written as:

B . A = B ( A cosθ)

First property and the scalar product projection: 

The other physical meaning or the projection of vectors with their first property can discussed in detail. the projection of vector A  in the direction of the vector B can also be written as: 

Ab = A cosθ

The θ is the angle between the two vectors A and the vector B. 

Geometric definition: 

This product can also be written according to the definition of geometrical dot product then it can be written as:

Ab = A B

There,

B = BB

so, geometrically we can write the projection of A on the vector B as:

A B = Ab B

For the vector B, it can be written as: 

A B = BaA

Distributive law:

The dot product can also prove the distributive law, the distributive law is written as: 

A ( B + C) =  A B + A C

This law can be satisfied by the dot product because the scaling of any variable is homogenous. For example, if we can take the scalar B then it can be written as: 

( BB) A =  B ( B A) 

Also written as,

( BB) A = B ( B A )

The dot product of the B B is always positive it never be negative but it may also equal to zero. 

Interchangeability of the definitions: 

Determine the standard basic vectors E1, E2, E3,  ……., En. So we can also write this as:

A = A1, A2, A3, ...... , An also equal to iAiEi

B =  B1, B2, B3, ...... , Bn also equal to iBiEi

This formula Ei can represent the unit length of the vectors. Also represented that the length of the unit is at the right angle.

The normal unit length of the vector is equal to 1 and written as:

Ei Ei = 1

But when the length of unit vectors is at the right angle then it can be written as:

Ei Ej = 0

there, i ≠ j. 

Basically, we can write the all formulas as:

Ei Ej = δij 

there, Ei or the Ej represented the orthogonal vectors unit length and the δij represented the Korenckar delta. 

Geometrical definition for the vector A and the vector Ei:

According to the geometrical definition of the dot or scalar product, we can write the given expression for any different type of vector A and the vector Ei. the mathematical expression is written as: 

A Ei = A Ei cosθi

or, 

Ai = A cosθi

Distributive law: 

Now apply the distributive law on the given formula which is according to the geometrical scalar product or the dot product. The distributive version of this formula is given there: 

A B = A i BiEi

It can also equal to, 

= i Bi( A Ei)

= i Bi Ai

= i AiBi

Now it interchangeability of all definitions can be proved. It can be shown that all definitions of formulas are equal to each other.

Geometric interruptions: 

In the dot product or the scalar product the geometrical interpretations are essential because they can relate the magnitude of the vectors through the dot product and the dot product can also give the angle between the vectors which are cosine. The main geometrical interruptions are given there: 

  • Projection

  • Orthonogolity

  • Parallel vectors

  • Anti-parallel vectors 

Their details are given there: 

Projection: 

By the dot or the scalar products, we can measure the direction and the projection of the vector how much the vector lies on the other vector in the projected direction. For instance, A B through we can measure the projection of vector A on the vector B in a very efficient way. 

Orthogonality:

When the two vectors are perpendicular to each other, then their dot or the cross product is zero because the angle θ is equal to 90 degrees and the cos90 degree is equal to zero. So if the dot or cross product of the vector quantity is zero then it means that the vectors are orthogonal. 

Parallel vectors: 

In the dot or the cross product, if the vectors are parallel then the angle θ is equal to 0 degrees then the cos θ = 1, which means that the dot or cross product reached their maximum positive or negative magnitude.

Anti-parallel vectors: 

In the dot or the cross product, if the vectors are anti-parallel then the angle θ is equal to 180 degrees then the cos θ = 1, which means that the dot or cross product reached their maximum positive or negative magnitude.

Characteristics and the properties of the scalar or the dot product: 

The main properties and the characteristics of the scalar and the dot product which can help to understand the dot or scalar product are given there. By understanding pr follow the given properties we can easily use this dot product in different fields of science and physics. The characteristics in detail are given there:

  • Distributive property 

  • Parallel vectors 

  • Anti parallel vectors 

  •  Self scalar products

  • Scalar multiplications

  • Commutative property 

  • Perpendicular vectors 

  • Magnitude

  • Product rule

  • Orthogonal 

  • Scalar product in the term of rectangular component.

  • Zero vector

Distributive property: 

The distributive property of the dot or the scalar product can be strewed upon the vector addition. The basic and general expression for the distributive property for the dot or cross product is given there: 

A ( B + C ) = A B + A C 

Parallel vector: 

The scalar or dot product of the two vectors is equal to their positive magnitude when the vectors which are used in the dot or scalar product are parallel to each other and their angle θ is equal to 0 degrees, it can be written as: 

θ   =  0° 

The mathematical expression for parallel; vector can be written as:

A B = AB cos 0°

and, cos 0° equal to 1 and written as:

A B = AB (1) 

A B = Ab 

hence, it can be shown in the above equation that the product of two vectors is equal to their magnitudes. It can also be the positive maximum value of the scalar or the dot product.

Anti-parallel vectors: 

The scalar or dot product of the two vectors is equal to their negative magnitude when the vectors which are used in the dot or scalar product are anti-parallel to each other and their angle θ is equal to 180 degrees, it can be written as: 

θ   =  180° 

The mathematical expression for an anti-parallel vector can be written as:

A B = AB cos 180°

and, cos 0° equal to 1 and written as:

A B = AB (-1) 

A B = -Ab 

hence, it can be shown in the above equation that the product of two vectors is equal to their magnitudes. It can also be the negative maximum value of the scalar or the dot product. 

Scalar multiplication: 

The dot product or the scalar product can directly affect the scaling of the vector. Through this property of the dot or cross product, we can observe this effect efficiently. The equation that can be used for the scalar multiplication property is given there: 

(c1 A ) ( c2 B ) = c1c2 ( A B) 

There c represented the scalar quantity. 

Self scalar product: 

When the vector can do their self-product then the result is always equal to the square of their magnitudes.

The basic and the general equation is written below:

A B = AA cos 0°

A B = AA (1) 

A B = A2

 It can be shown in the given equation that the self-product was always equal to the square of their magnitudes. 

Self product of unit vectors: 

The self-product of the unit vectors is always equal to the 1. Their clarification through mathematical expression is given there: 

i i = (1) (1) cos 0°

i i = (1) (1) (1)

i i  = 1

So, 

j j  = 1

k k = 1 

Hence,

i i =  j j  =   k k

Commutative property: 

The scalar or the dot product of two vectors A and B are always commutative. Their mathematical justification is given there: 

A B = AB cos θ …….. (i) equation

there, A represented the vector 

B also represented the other vector 

And θ represented the angle between the vectors A and B. 

then, 

B A = BA cos θ  ………. (ii) equation

Then, by comparing the equation i and the equation ii,

A B =     B A  

Hence proved that the dot or scalar product is always commutative.

Zero vector:

In the product of two vectors if one vector A = 0 then the other vector B = 4 but their product is always equal to zero. Their mathematical expression is written there as:

= A B 

= (0) (4)

Then,

A B = 0 

Orthogonal: 

If the two vector scalar or dot products are equal to zero then it can't be orthogonal but if the two vectors are non-zero variables it can be orthogonal.

Product rule: 

In the scalar or the dot product, the values are different or variable and their deviation can be represented through the sign which is known as the prime ′. Their mathematical expressions are given there: 

( A B) ′ =  A′ B +  A B′

Scalar products in terms of rectangular components:

Determine the two vectors, the vector A and the B in the Euclidean space in the three-dimensional cartesian coordinate system. Their derivation is given there: 

Let, 

A = Axi + Ayj + Azk

B = Bxi + Byj + Bzk

then, we can perform their product with their unit vectors and it can be written as:

A B = (Axi + Ayj + Azk) (Bxi +B yj + Bzk)

After this, we can multiply the all components with each other and it can be written as:

A B = AxBx ( i i ) + AxBy (  i j) + AxBz (  i k) + AyBx ( ji )

  • AyBy ( j j ) + AyBz (  jk ) + AzBx ( ki) + Az By ( k j) + Az Bz( k k)

Now, by putting the values of the unit vectors then we get, 

 A B = AxBx (1 ) + AxBy ( 0 ) + AxBz ( 0 ) + AyBx (0 )

  • AyBy (1 ) + AyBz ( 0 ) + AzBx ( 0 ) + Az By (0) + Az Bz(1)

Then, 

A B = AxBx + AyBy + Az Bz ……… (i) equation

We know that ;

A B = AB cos θ ………… (ii) equation

Then put equation (ii) in equation (i) and we get,

AB cos θ = AxBx + AyBy + Az Bz

Or it can also be written as;

cos θ = AxBx + AyBy + Az BzAB 

Or, 

θ = cos-1AxBx + AyBy + Az BzAB

This formula or the equation can be used to find the angle θ between the vector A and the vector B. 

Applications of scalar or dot product: 

Scalar or dot products can play a very essential and fundamental role in different fields of modern science or physics, computer graphics, engineering, or data analysis. The details of these applications are given below:

  • Data analysis or machine learning 

  • Mathematics 

  • Physics 

  • Engineering 

  • Computer graphics

Data analysis or machine learning: 

Dot or scalar products can be used in data analysis or machine learning in a very efficient way their applications in this field mostly occur in the given fields area which are;

  • Natural languaging processing 

  • Principal component analysis 

  • Neural networks

Their description is given below: 

Natural languaging processing: 

The differences and the similarities that may be present in the natural languaging processor ( NLP) can be detected through the scalar and the dot product because the words can be represented in the form of vectors in NLP. and it can also help to do many numerous tasks like the machine translation, data analysis and the document clustering in a very efficient way.

Principal component analysis: 

Principal component analysis which can also be denoted as PCA, to determine and find the principal components that are present in the data can be detected by using the dot or cross-product method. Because it can simplify the most complex data or analyze them in a very efficient way. So that's why cross or dot products can be widely used in this field.

Neural networks:

For the sum of the neurons, we can use the dot or the scalar product. Because of all the neurons, the input vector calculation can always be done through the dot or the cross product, and by the activation the output can be produced.

Mathematics: 

In mathematics, the dot and cross product can be used commonly because geometry and the algebraic operation can be solved easily or efficiently through the dot and the cross product. The main fields of math in which the dot and cross product can be used are given there:

  • Cosine similarity 

  • Orthogonality 

  • Projection

  • Vector spaces 

Physics: 

In physics to simplify the complex quantities and products dots or scalar products can be used. The main application fields are given there:

  • Molecular dynamics 

  • Work done 

  • Electromagnetic theory 

Engineering:

In engineering, algebraic operations can be simplified efficiently through the dot or scalar product. But the main areas of this field where mainly dot and scalar products can be used are given there:

  • Robotics 

  • Signal processing

  • Structural processing 

Computer Graphics: 

Like other fields of science, the dot and the scalar product can also be used in computer graphics because through using the dot or scalar product we can efficiently understand or solve the complex codes of words that can be represented in the form of vectors.

  • Vector projection

  • Lighting calculations

  • Shading models 

Calculations and some examples: 

  • Work done: 

Work is the scalar quantity but it can be a product of two vector quantities through the dot or scalar product. The product of force and displacement produced the scalar product work. Which can be written as: 

W = F A

There, 

F represented the force. 

A represented the displacement.

Calculation: 

Consider the force F is ( 4, 5) and the displacement of the object is ( 2, 8 )

Then their product can be written as:

W = F A

By putting the values we can get, 

W = ( 4 5) ( 2 8) 

W = (20) (16)

W = 36 J

 The work that can be done by the body is equal to the 36 J. 

  • Magnetic flux:

The magnetic flux is the product of the two vectors which are magnetic field strength  and the vector area which can be expressed as:

Øb = B A

  • Power : 

Power( scalar product ) is the product of two scalar quantity which are force and velocity which are expressed as:

P = F v 

  • Electric flux:

Flux is the scalar quantity and it is the product of the two vector quantities which are electric intensity or the vector area. it can be written as:

Øe = E A

IoT Based Weather Station in Raspberry Pi 4 | Part 2

Welcome to the next tutorial in our Raspberry Pi 4 programming tutorial. In the previous tutorial, we learned the basics of using a Raspberry Pi as the basis for an Internet of Things-based weather station. However, this is a continuation of the previous tutorial. In the subsequent session, we will learn how to develop the Python code that will bring our weather station circuit design to life. Before that, let us learn how to measure wind direction and rainfall.

Wind direction

Wind vanes

Despite their name, wind vanes do not indicate a change in wind direction. Since the arrow on most television weather maps goes in the opposite direction, this may come as a surprise at first. To determine the wind's direction, a wind vane uses the force of the wind on a vertical blade, which then spins to the point of least wind resistance.

How your wind vane works

The wind vane employed here is more sophisticated than the rain gauge and operates entirely differently, although sharing some of the same components. You may find eight reed switches, resembling the spokes of a wheel, within the recommended wind vane.

In addition to the magnet, the wind vane has eight resistors, and each is turned on and off by the opening and closing of a matching reed switch as the magnet rotates.

The role of the resistors

In electronics, these components slow down the passage of electricity without completely blocking it. Different resistors have varying resistance levels, measured in ohms; low resistance resistors allow nearly all current to pass through, whereas high resistance resistors allow very little current to pass through. Resistors are commonly used to prevent harmful currents from reaching components or distributing circuit power.

You should be able to read the values of the eight resistors displayed in white next to each one. Because the magnet may close two adjacent reed switches when positioned halfway between them, the wind vane can have 16 distinct resistance settings. Since most Pi-compatible wind vanes function in a similar fashion, you can find the resistor values in the product info sheet of your specific model.

Measuring the resistance

To determine the wind's direction, a sensor's resistance must be measured and converted to an angle's value. This procedure involves a number of stages. It is much simpler to record a value from the wind vane that changes depending on the resistance value used. Thus, you will make an analog measurement, as the wind vane constantly returns a dynamic voltage reading. Conversely, the anemometer merely reports a 'HIGH' or 'LOW' voltage, all or nothing, thus sending a digital signal.

Measuring analog voltages with a Raspberry Pi

Raspberry Pi has just digital inputs, but an Arduino has analog ones. Thus, a specialized component known as an analog-to-digital converter is required to decode an analog signal (ADC).

The MCP3008 is a widely used and flexible ADC. It's a 16-pin IC with eight input signals and can be utilized with a breadboard without much hassle. In other words, the MCP3008 can detect voltage changes as small as 4.88mV for a 5V reference voltage because it is a 10-bit ADC with 210 = 1024 possible output values.

Now that you know how to utilize the MCP3008 to measure a fluctuating analog signal, you can employ yet another ingenious circuit to generate a value that varies with the wind vane's resistance.

Using a voltage divider

One of the essential electronic circuits is a voltage divider, which splits a significant voltage into smaller ones.

You can use the following formula to determine the voltage output Vout in the circuit above:

Vout = Vin * R2/(R1 + R2)

So, you can lower the input value Vin to the voltage output Vout by adjusting the value of R1 and R2. Create an entirely new Python program with the name voltage-divider.py that has the function voltage divider that determines Vout for a set of specified values for R1, R2, and Vin using this formula.

Verify that your function returns the correct value from a given set of inputs. The function should provide an answer of 3.837V, for instance, when R1 = 33K ohms, R2 = 10K ohms, and Vin = 5V.

print(voltage_divider(33000,10000,5.0))

According to the circuit, if R2 is a variable resistor, we may determine its resistance by monitoring its output voltage, Vout, and the resistance of its counterpart, R1. Due to the wind vane's behavior as a variable resistor, its resistance value may be determined using a voltage divider circuit. Initially, it would help if you determined the optimal value for R1.

Designing a voltage divider

A voltage-divider circuit schematic and a table detailing angles, resistances, and voltages can be found on the second wind vane data sheet. R1 is depicted here with a value of 10K ohms. Vin, however, is referenced to 5V in this circuit. Although the Raspberry Pi uses 3.3V logic levels, these Vout values are off.

Create a small Python program named vane values.py that uses the datasheet's list of resistances and the potential divider formula to determine the updated values for a 3.3V Vin and an R1 resistant of 10K ohms.

A reference voltage of 5V allows a value of R1 = 10K ohms to be used successfully. However, with 3.3V, you'll see that some of the potential values are very close. Setting R1 to a lower value can minimize the voltage jumps between vane-generated resistance levels.

To try out different options for R1, use your vane values.py program. Keep in mind that there are only a small number of predefined resistance settings to choose from. The most typical values (in tens of thousands of ohms):

It would be best to use a wind vane with an ohms value of 4.7K. You may now connect your ADC and Raspberry Pi to the rest of the circuitry, as you have the value for Resistor1 in the voltage-divider circuit.

The gpiozero package makes it simple to read data from an MCP3008 ADC.

from gpiozero import MCP3008

import time

adc = MCP3008(channel=0)

print(adc.value)

This code samples the ADC's channel 0 and outputs the value scaled between Zero and one. The recorded analog voltage can be calculated by multiplying the result by the reference voltage fed into the ADC.

Ensure your circuit can tell the difference between the wind vane's various angular locations by testing it. Make a simple Python script in the directory /home/pi/weather-station/wind direction byo.py to tally the data your circuit outputs when the vane is turned.

While the wind vane is turning, your code should be executed. Using the Python shell, you should see the total number of different voltages encountered thus far shown.

Red warning highlighting for 'SPISoftwareFallback' may also appear. You can safely disregard this warning, but if you never want to see it again, navigate to Raspberry > Pi Configuration in the Raspberry menu. Afterward, you should go to the Interfaces tab and enable SPI before rebooting your Pi.

At most, you can record 16 distinct voltages if your equipment is functioning well. Still, the Analogue to digital converter may record an increasing or decreasing voltage, so a moderate jiggling of the vane may allow you to generate a few additional values.

Update your program to verify that each ADC reading is compared to a predetermined set of valid values. If your code is able to do so, it should output a helpful message after each reading indicating whether or not the value was within the acceptable range.

The final process involves transforming the vane's measurements into angles. The angle-resistance-voltage relationship is fundamental. A wind vane's resistance design reflects the blade angle in direct proportion to the voltage value read from the ADC.

The resistance-voltage relationship can be determined with the help of the voltage divider function you programmed before. After you know the angle, you can find the equivalent value in the manual. An ADC reading of 0.4V, for instance, translates to a resistance of 3.3K ohms, representing a zero-degree angle.

Make the necessary edits to the wind direction byo.py file to convert the voltages in the list into a Python dictionary, where the voltages will serve as the keys and the related angles will serve as the values.

It would help to modify your print statements to show the angle of the vane. You can now measure wind direction using your very own Python program. You may verify the code is functioning properly by adjusting the wind vane to a known position and seeing if it matches what is displayed. To try out other roles, keep repeating the process.

Taking many readings in a short amount of time and averaging them together is a final way to increase the reliability of your data. Include the following procedure in wind-direction-by.py.

def get_average(angles):

    sin_sum = 0.0

    cos_sum = 0.0

    for angle in angles:

        r = math.radians(angle)

        sin_sum += math.sin(r)

        cos_sum += math.cos(r)

    flen = float(len(angles))

    s = sin_sum / flen

    c = cos_sum / flen

    arc = math.degrees(math.atan(s / c))

    average = 0.0

    if s > 0 and c > 0:

        average = arc

    elif c < 0:

        average = arc + 180

    elif s < 0 and c > 0:

        average = arc + 360

    return 0.0 if average == 360 else average

A line like this at the beginning of your file will import the math library, allowing you to use the package.

import math

Now, similar to how you tested for wind gusts before, you should edit your program to include a function called get value() that provides the overall average for a specified period. This will facilitate calling this function from anywhere in the code for your weather station.

Rainfall

The standard unit of measurement for precipitation captured by most rain gauges is the number of millimeters of height over a particular area of one square meter.

An essential mechanical instrument is the rain gauge sensor suggested for use with the Pi 4 Weather Station equipment.

How does it work?

Remove the bucket to inspect the inner workings of the rain gauge. To remove the lid, gently squeeze the clamps on either side.

Put this rain gauge functions as a self-tipping bucket. All the rain runs off and into the bucket. When the bucket is complete, it will topple over, allowing the gathered rainwater to drain out the bottom, and the other bucket to rise into its place.

The total rainfall can be determined by multiplying this by the total number of tips. To find out how much water is needed if you're using a rain gauge of a different kind, you can either look it up in the manual or try it out for yourself.

These gauges typically have an RJ11 socket, despite only having a single red and green wire. You should be able to locate a small cylindrical magnet inside the ridge between the two buckets, with the magnet's axis pointing toward the back wall. There's a reed switch hidden inside that wall in the back.

If you want to peek inside, the back wall may be removed by pulling on the flat end. A removable circuit board allows you to inspect the inside components. You'll find the reed switch smack dab in the center. Make sure to swap out the circuit board and the cover for the back wall before proceeding.

When a bucket is knocked over, the magnet will move beyond the reed switch and temporarily close it. Hence, like the anemometer, the rain gauge can be connected to gpio pins on the Pi 4 and used as a button, with the number of "presses" being used as a proxy for the amount of precipitation.

Connecting your rain sensor

The rain gauge can be tested by removing the RJ11 connector, stripping the wires, or using an RJ11 breakout board.

To avoid inconsistencies, it's recommended that you connect your device to the same GPIO pin 6 (BCM) that the Oracle Weather Station uses for its rain gauge.

Create a program named /home/pi/weather-station/rainfall.py to determine when the rain gauge bucket has tipped using the same logic you implemented for the anemometer. It should provide a running total of times the bucket has been tipped.

Once you've mastered counting raindrops in a bucket, you'll need to figure out how many feet of water this translates to. Change your program so that when the bucket is tipped, the amount of rain in inches is displayed.

Last, implement the function reset rainfall to reset the number of tipped buckets to 0. After this step, your weather station will only be fully functional with this feature.

Fully functional weather station

After ensuring that each sensor works independently, you may move on to configuring the software for your data-gathering system.

Thus far, your GPIO connections have been consistent with what is required by the original Oracle pi 4 Weather Station software, which is executed using a Unix daemon. Hence, with a few tweaks, you can use that code to execute your custom build. In reality, the DS18B20 digital thermometer you're using was initially programmed for the Oracle Weather Station.

You may use the code you've built for testing to add the finishing touches to your weather station by regularly measuring and recording data.

Wind speed, gusts, and direction

The core of your weather station app will be the code you created to measure wind speed and gusts. You should create a new script off of wind.py and name it weather station BYO.py.

Besides the applications you've previously built, you'll also have to incorporate various libraries and the code from Oracle's Weather Station. These import statements should be placed at the very beginning of your script:

from gpiozero import Button

import time

import math

import bme280_sensor

import wind_direction_byo

import statistics

import ds18b20_therm

As written, your code will keep a running tally of wind speeds every five seconds, highlighting the highest reading (gusts) and averaging them to determine an average. You can modify it to measure the wind's direction in real-time.

Rather than waiting for five seconds between iterations, change your code to measure the wind's direction for five seconds continuously. Do a code check by turning the wind vane and the anemometer to see how they respond to your program. Do logical results emerge from the code?

As fresh data comes in, your application automatically adjusts the averages and maximum wind speed. After every five seconds, your device should begin taking new readings. Insert two lines of code to clear the wind speed and direction arrays after each loop iteration.

Try rerunning the tests. Throughout the next five seconds, you'll want to keep track of the wind vane's angular position by counting the anemometer's rotations. Your program then determines the average wind speed and vane position throughout that time frame. By clearing the list of velocities after each five-second interval, you should also have noticed that the reading for wind gusts is now identical to the mean (the last one).

If you want to save new readings, a sampling interval of five seconds is too short. If you want to keep track of things indefinitely, a 5-minute measurement interval is ideal. In order to capture the highest value (gust), it is possible to take readings for five minutes and then average them. That is far more practical.

Change the program to take readings once every five seconds instead of once every minute. Then, utilize those values to determine the average wind speed and direction and log the most unexpected gust once every five minutes.

Do some tests on your code. Now every five minutes, it should report its status. By turning the vane and anemometer, you may create a wind tunnel and ensure your readings are consistent with expectations. The other sensors can be incorporated into the five-minute cycle now.

Rainfall

The rain measurement code you wrote in rainfall.py should be incorporated into weather station BYO.py to record the total for five minutes and then reset. After the import statements, add the constant definition for the bucket size.

BUCKET_SIZE = 0.2794

Add these lines before the while True: loop.

def bucket_tipped():

    global rain_count

    rain_count = rain_count + 1

    #print (rain_count * BUCKET_SIZE)


def reset_rainfall():

    global rain_count

    rain_count = 0


rain_sensor = Button(6)

rain_sensor.when_pressed = bucket_tipped

Then, insert the following code after the ones that determine wind speed and gusts:

rainfall = rain_count * BUCKET_SIZE

reset_rainfall()

Temperature, pressure, and humidity

You implemented a read-all function in the BME280 sensor's code to return all three readings—pressure, temperature, and humidity. Because you have imported the bme280 sensor into weather station BYO.py, you may now use this feature whenever needed.

Adjust your program so that the BME280 sensor's data is saved at regular five-minute intervals.

Please make sure your code works. Make sure the BME280's readings change as you exhale into it.

Ground temperature

After that, repeat the process using the ground temp probe. Make changes to your code to gather data at 5-minute intervals.

Complete code

from gpiozero import Button

import time

import math

import bme280_sensor

import wind_direction_byo

import statistics

import ds18b20_therm

import database


wind_count = 0       # Counts how many half-rotations

radius_cm = 9.0 # Radius of your anemometer

wind_interval = 5 # How often (secs) to sample speed

interval =  5 # measurements recorded every 5 minutes

CM_IN_A_KM = 100000.0

SECS_IN_AN_HOUR = 3600

ADJUSTMENT = 1.18

BUCKET_SIZE = 0.2794

rain_count = 0

gust = 0

store_speeds = []

store_directions = []



# Every half-rotation, add 1 to count

def spin():

global wind_count

wind_count = wind_count + 1

#print( wind_count )


def calculate_speed(time_sec):

        global wind_count

        global gust

        circumference_cm = (2 * math.pi) * radius_cm

        rotations = wind_count / 2.0


        # Calculate distance travelled by a cup in km

        dist_km = (circumference_cm * rotations) / CM_IN_A_KM


        # Speed = distance / time

        km_per_sec = dist_km / time_sec

        km_per_hour = km_per_sec * SECS_IN_AN_HOUR


        # Calculate speed

        final_speed = km_per_hour * ADJUSTMENT


        return final_speed


def bucket_tipped():

    global rain_count

    rain_count = rain_count + 1

    #print (rain_count * BUCKET_SIZE)


def reset_rainfall():

    global rain_count

    rain_count = 0


def reset_wind():

    global wind_count

    wind_count = 0


def reset_gust():

    global gust

    gust = 0


wind_speed_sensor = Button(5)

wind_speed_sensor.when_activated = spin

temp_probe = ds18b20_therm.DS18B20()


while True:

    start_time = time.time()

    while time.time() - start_time <= interval:

        wind_start_time = time.time()

        reset_wind()

        #time.sleep(wind_interval)

        while time.time() - wind_start_time <= wind_interval:

                store_directions.append(wind_direction_byo.get_value())


        final_speed = calculate_speed(wind_interval)# Add this speed to the list

        store_speeds.append(final_speed)

    wind_average = wind_direction_byo.get_average(store_directions)

    wind_gust = max(store_speeds)

    wind_speed = statistics.mean(store_speeds)

    rainfall = rain_count * BUCKET_SIZE

    reset_rainfall()

    store_speeds = []

    #print(store_directions)

    store_directions = []

    ground_temp = temp_probe.read_temp()

    humidity, pressure, ambient_temp = bme280_sensor.read_all()


    print(wind_average, wind_speed, wind_gust, rainfall,  humidity, pressure, ambient_temp, ground_temp)

Keeping your weather station dry

I can't stress the significance of this enough. The Pi and the other electronics will break down or corrode if they get wet. A small weatherproof shell protects the external environment sensors in the Oracle Pi 4 Weather Station. The central concept is to let fresh air flow past the sensors while keeping moisture away.

Weatherproof boxes

Track down two watertight containers, one big enough to house the Pi and breadboard/HAT and another smaller one for the BME280 detector. The larger container needs a few cutouts to accommodate the RJ11 cables that link the weather stations to the BME280 and the longer cables that collect data from the rain and wind sensors.

Commercial enclosures typically feature cable routing holes and watertight grommets. Alternatively, make your own holes and secure the cables using grommets and sealing glands.

You may use this 3-dimension printable mount to safely store your Raspberry Pi within one of the recommended enclosures mentioned at the beginning of the article. The BME280 mounting bracket ought to snap in place.

You can fasten the mounts to the larger box by driving short self-tapping screws through the holes and/or grooves in its back.

Air circulation surrounding the BME280 sensor is required for accurate environmental temperature and humidity readings. Take out one side's worth of hole covers from the smaller box. The sensor's wires can then be threaded vertically via a single opening. If you mount this outside, make sure the holes drain away from the box.

If you want to keep water out of the enclosure, which could damage your cables, use watertight nylon cable glands. In the event that the glands do not entirely enclose the cables, you may use grommets that you have 3D printed or electrical tape to provide a more secure fit.

The larger enclosure is suggested, containing rubber plugs in each of the four openings. Make sure your cables have somewhere to go by drilling three holes in the base of the box. Put an M16 cable gland in the outside holes, then thread the cables for the rain gauge and wind sensors through them.

The Ethernet cable can connect your weather station to a wired network, but you may need to drill a more prominent gland or an additional hole in the enclosure to accommodate the cable.

Finally, run the cord for the power supply, the DS18B20 probe, and the BME280 sensor's wires through the more prominent M20 gland you've positioned above the center hole.

Given the size of the M20's hole, it's vital to use cable pads to guarantee a snug connection.

When the larger box is housed indoors, it is protected from the elements, and it is also much simpler to plug into an electrical outlet and set up a network. A larger opening in an exterior wall may be necessary to accommodate the cables needed to connect the external sensors. When everything is mounted externally, only the weather station requires electricity.

Prepare the weather station for its outdoor installation. You may install your station anywhere, from a wall or roof to a fence or underground pipe. The sensors can be installed anywhere there is access to the outdoors. In particular, remember the following:

  • Rain must fall into the rain gauge for it to work.

  • Both the anemometer and the wind vane must be exposed to wind.

  • Keep the smaller BME280 box out of the sun, as it requires ventilation.

  • Both power and internet access are required for the weather station to function.

Since the manner of mounting your station will vary depending on your location and environment, we cannot provide detailed instructions. But here are some pointers for getting started with a handful of the process's aspects:

Conclusion

In conclusion, if you want to learn more about the Internet of Things and weather monitoring technologies, assembling your own IoT-based weather station using a Raspberry Pi 4 is a fantastic way. This task is manageable and can be modified to meet your requirements.

You'll need a Raspberry Pi 4 and sensors to detect things like temperature, humidity, and barometric pressure, as well as a way to get the data from the sensors and into the cloud for analysis. A dependable and accurate weather station may be set up with the help of the project instruction and the programming language python.

After setting up your IoT-based weather station, you can access accurate, up-to-the-minute forecasts from any location. Agricultural, transportation, and emergency response applications are just some of this data's possible uses.

Building an Internet of Things (IoT) weather station with a Raspberry Pi 4 is an exciting and instructive way to gain practical expertise in weather monitoring. You can construct and deploy a reliable weather station that serves your needs by following the recommended procedures and using the recommended resources. The following tutorial will teach how to Interface the weight sensor HX711 with raspberry pi 4.

Vector addition by Rectangular Components

Hi friends, I hope you are all well and doing good in your fields. Today we can discuss the vector quantities and how we can add the vector by rectangular components. Generally, there are two quantities one is scalar quantities and the other is vector quantity. Scalar quantities are those quantities that have only magnitude but vector quantities are those that can describe both magnitude and direction. So in physics or for complex quantities vectors are used because they can describe both magnitudes with direction.

Vectors can play a very fundamental role in the different fields of physics and mathematics because they can provide accurate and precise measurements. In rectangular components, we can add two or more vectors by breaking them according to their planes. The most efficient method for adding the vectors is adding vectors in rectangular components. Now in this article, we can start our detailed discussion about the vectors and their addition by the method of the rectangular component.

What are vectors? 

Vectors can be defined as quantities that can describe both magnitude and direction but they can't provide a description about the position of a quantity. Vectors can be used to describe complex physical quantities like velocity, displacement, and acceleration. Vectors can also used to express the mathematical form of laws and in geometry firstly vectors are used. Some more examples of the vector quantities are given there.

Vectors which may be two or more two can be added by rectangular component because they are the cartesian coordinate system. now the main point about what are rectangular components and their mathematical expression are given there.

What are rectangular components?

In the graph or two-dimensional cartesian coordinate plane, there are axsis which are usually x and y these axsis are known as rectangular components for vectors. But if the cartesian coordinate plane is three-dimensional then the three planes and components are x, y, and z.

For example, if we have the vector A then their components on the two-dimensional cartesian plane are Ax and Ay. But if we have the vector B on the three-dimensional plane then their rectangular components are Bx, By and Bz

Notation:

  • A: represent vector A

  • Ax : represent the component of a vector A along with the x-axis

  • Ay : represent the component of a vector A along with the y-axis

And if they are three-dimensional then,

  • Az: it can represent the vector A along with the z-axis in the three-dimensional cartesian plane. 

  • i, j and k : these are the unit vectors that can be used according to their rectangular components like i the unit vector of x- the x-axis rectangular component, j the unit vector of the y-axis of the rectangular component, and the unit vector k for the z-axis. 

Decomposition of the vector: 

Now we know about the rectangular components but if we want to add the vectors by using the rectangular component first we can decompose the vectors according to their component.

Two-dimensional decomposition: 

In a dimensional cartesian plane, there are two components x and y so that is why the vector A has the magnitude A and also has the angle 𝚹 on the x-axis. Their decomposition equation is given there: 

A = Axi + Ayj 

Where,

Axi: A cos𝚹

Ayj : A sin𝚹

Three-dimensional decomposition: 

In three three-dimensional cartesian planes the x, y, and z are the components  for the vector A then there decomposition of rectangular components can be written as:

A = Axi + Ayj + Azk

Vector addition by rectangular component: 

Vector addition by rectangular component is also known as the Analytic method of vector addition. This method can add the vectors efficiently and the chances of error are very low as compared to other methods like the head-to-tail rule or other graphical methods. Now we can start the vector addition by rectangular components.

Let's imagine we have two vectors one vector A or the other is a vector B now we can add them to the rectangular cartesian coordinate system and suppose their resultant is R and these vectors make an angle θ on the x-axis. By using the head-to-tail rule the resultant of two vectors which is A or B are R = A + B now we can resolve the vectors A, B and the resultant vector R into their rectangular components.

Now in this figure, the vector addition is shown and the rectangular components of the vector A, B and the resultant vector R are also shown now we can start our derivation to resolve the all vectors in the figure. 

 Firstly we can find the x component of the resultant and the y component of the resultant. 

Resultant of the x components:

As shown in the figure,

  • OQ is the magnitude of the vector A on the x component. 

And, 

  • MS is the magnitude of the vector B on the x component.

then, 

  • OR is the magnitude of the resultant vector R on the x component all are shown in the given figure. 

Then according to the given figure, we can write these magnitudes of the vector as:

OR = OQ + QR 

Since the QR is also equal to the MS. we can write it as,

OR = OQ + MS 

And according to the vectors it can be written as:

Rx = Ax + Bx ……………. (i) equation 

The sum of the magnitude of the vector A and the vector B on the x component is equal to the magnitude of the resultant vector R on the x component which can be shown in the (i)equation. 

Resultant of the y components: 

As shown in the figure, 

  • QM is the magnitude of the vector A on the y component.

and, 

  • SP is the magnitude of the vector B on the y component.

then,

RP is the magnitude of the resultant vector R on the y component which is shown in the figure. 

Then according to the given figure, we can write these magnitudes of the vector as:

RP = RS + SP

According to the given figure the RS is also equal to the QM so we can also write the equation as;

RP = QM + SP

Now this equation can be written according to the vectors as:

Ry = Ay + By ………… (ii) equation

The sum of the magnitude of the vector A and the vector B on the y component is equal to the magnitude of the resultant vector R on the y component which can be shown in the (ii)equation. 

Unit vector: 

Now we can write the resultant vector on the x component or y component with their unit vectors. 

The resultant vector of the x component with its unit vector is written as Rx i.

The resultant vector of the y component with its unit vector is written as Ryj.

Then the resultant vector with its unit vector in the equation can be written as: 

R =  Rxi + Ryj

Addition of the x component and y component resultant:

Now we can put the values of Rxi or Ryj in the resultant vector R. 

R =  Rxi + Ryj

Putting the values from the equation (i) and equation (ii) and written as 

R = ( Ax + Bx) i + ( Ay + By ) j

This equation is used to add the vectors on the rectangular components.

The magnitudes of the resultant vector R:

After adding the vectors on the rectangular component we can also find their magnitude by using some formula. The formula which we can use to find the magnitude of the resultant 

R is given there:

R = Rx2 + Ry2 

And if we want to find the magnitude of the vector A and vector B we can put the values of the resultant vector Rx and the resultant vector Ry in the given formula and we can write this formula as: 

R = (Ax+Bx )2+ (Ay+By)2

This formula can be used to find the magnitude of the vectors that can be added to the rectangular component. 

But if we can find the magnitude of the resultant R which has the vectors A and vector B then we can also use this formula which is given there : 

R = A2 + B2 + 2ABcosӨ

Special cases: 

There are some special cases in which the value of θ can be different so we can change some formulas. Some special cases are given there:

If the value of θ = 90° then,

R = A2 + B2

But if the value of θ= 0° then, 

Rmax = A + B

And if the value of θ=180° then, 

Rmax = A – B

Resultant vector R direction: 

Vectors can describe the magnitude but they can also describe the direction so after finding the magnitude we can also find their direction by using the formula. To find the direction of the resultant vector R we can use the formula which is given below: 

tanθ = RyRx

Also, it can be written as:

θ = tan-1 RyRx   

But if we want to find the direction of the vectors A and B we can put the values of Rx and Ry. and it can be written as: 

θ = tan-1 AY+ByAx+Bx

These all formulas can be used for two-dimensional vectors but if we want to find the three-dimensional vector or many other vectors we can use the other formulas that are given there.

Two vectors in three dimensions of rectangular component:

The two vectors A and the vector B can lie in the three dimensions in the rectangular cartesian coordinate system. 

Components of resultant vectors in three dimensions: 

The components of the resultant vectors in three dimensions are given there: 

  • Rx components on the x-axis: Ax, Bx

  • Ry components on the y-axis: Ay, By

  • Rz components on the z-axis: Az, Bz

Components of vectors in three dimensions: 

The components of vectors A and B in the three dimensions are given there:

A = Axi + Ayj + Azk

B= Bxi + Byj + Bzk

The sum of these vectors in three dimensions:

A sum of these two vectors in the three dimensions is given there: 

R = Rxi + Ryj + Rzk

Then put the values and get the equation which is given there:

R = (Ax+Bx) i + (Ay+ By) j + (Az+ Bz) k 

This formula is used for the two vectors on the three dimensions.

Multiple vectors in two dimensions:

We can also add the multiple vectors in the two dimensions. Then the resultant components on the x, y, and z axes with their vector components are given there: 

For the vectors A1, A2 and the vector An.

then,

  • R = i=1n Ai

  • Rx = i=1nAix

  • Ry= i=1nAiy

Magnitude formula for the three dimension resultant vector:

The formula that can be used for resultant vectors in these three dimensions is given there: 

R = Rx2 + Ry2 + Rz2

Magnitude for the coplanar vectors:

To find the magnitude of the coplanar vectors A, B, C, D and ........ we can use the formula which is given there:

R = (Ax+Bx+Cx +...........)2+ (Ay+By+Cy+..........)2

The direction of the coplanar vector: 

To find the direction of the  coplanar vector we can use this formula which is given there:

θ = tan-1Ay+By+Cy..........Ay+BY+Cy+...........

Determination of the angle θ of the resultant vector R in its rectangular components:

Determination of θ:

By using the given formula we can first determine and find the θ.

θ= tan-1RyRx

After the determination of the angle check the signs of Rx and the Ry in the rectangular cartesian coordinate system and determine their resultant quadrant according to their signs.

Determination of the resultant quadrants:

Determine the resultant quadrant through the signs of Rx and the Ry. The rules which can be followed to determine their quadrants are given there:

1st quadrant:

The resultant vector R lies in the first quadrant if the sign is positive for both of them Rxand the Ry vectors. Their direction is 

θ = Φ

2nd quadrant:

The resultant vector R lies in the second quadrant if the Rx is negative and the other vector Ry is positive. And their direction is,

θ = 180° – Φ

3rd quadrant:

The resultant vector R lies in the third quadrant if the Rx and the Ry both are negative no one from them is positive. Their direct is,

θ = 180° + Φ

4th quadrant:

The resultant vector R lies in the fourth quadrant if the Rx is positive and the other resultant vector Ry is negative. Their direction is,

θ = 360° – Φ

Summary:

For adding the vectors in the rectangular components in a very efficient way we can use some rules. These rules are as given below:

  • Vectors: First we can determine the x and y components for all vectors in two dimensions and if they are three-dimensional addition then also find the z components of all vectors.

  • Resultant vector Rx: then to find the resultant vector Rx  which is the x component, add all the vector components on the x axes.

  • Resultant vector Ry: then to find the resultant vector Ry  which is the y component, add all the vector components on the y axes.

  • Magnitude: After this, we can find the magnitude of resultant vectors by using the given formula:

R = Rx2 + Ry2 

  • Direction: then we can also find the direction of the vector along with the magnitude by using the given formula:

                             θ= tan-1RyRx

Examples: 

Some examples of adding the vector in a 2D or 3D rectangular system are given there:

Adding the vectors in 2D:

The given vectors are A and vector B.

The values of these vectors are:

A= 6i + 4j

B = -4i + 3j

Then add by using the resultant formula R = A + B 

Then find Rxand Ry and add them,

Rx= 6 + (- 4) = 2

Ry = 4 + 3 = 7

Then, 

R = 2i + 7j

Magnitude: 

R= Rx2+ Ry2 

By putting values, 

R = 22+ 72

R= 4+ 49

R= 53

R≈ 7.280

Direction:

After finding the magnitude we can find direction by using the given formula:

θ = tan-1RyRx

By putting the values we get,

θ = tan-172

θ ≈  16.35

Now add the three vectors in 3D:

The given vectors are A vector B and the vector C.

The values of these vectors are given there;

A= 6i + 4j + 1k

B = -4i + 3j + 5k

C = -1i + 3j + 2k

Then add by using the resultant formula R = A + B + C

Then find Rxand Ry and Rz and then add them,

Rx=6+ (- 4) +(-1) = 1

Ry=4 + 3 + 3 = 10

Rz= 1 + 5 +2 =8

Then, 

R = 1i + 10j +8k

 Magnitude:

R= Rx2+ Ry2+Rz2

By putting values we get,

R = 12+ 102 + 82

R= 1 + 100+ 64

R= 165

R ≈ 12.85

Practical applications:

The addition of the vectors in the rectangular components can be used in different fields of physics because it is an analytic method and provides precise and accurate calculations so scientists in physics or mathematics use this method for the calculation of complex physical quantities. Now we can discuss some applications of adding vectors by rectangular components in some different fields. 

Robotics: 

To determine for find the orientation and position of the robot's arms or legs in an efficient way we can use the vector addition or analytic method because it can provide accurate information without any possible errors.to achieve coordination and control of the robots we can also use the vector addition method by decomposing their component according to the axis.

Physics and engineering: 

For the analysis of the vector quantities like velocity, displacement, acceleration, and force in the accurate or precise method we can use the analytic or the vector addition by rectangular component method. In navigation, if we want to calculate the resultant velocity we can use this analytic method by adding the vectors which are the velocity of the wind and the velocity of the aircraft from which they can fly. This, there are many examples in which this method can be used for calculating the quantities. For example, many external forces can act on the body then we can all add them by using this analytic method and get the sum of all external forces which can act on them.

Computer graphics:

In the field of computer graphics, we can transform the objects their position, and movements, and we can calculate all of these movements through vector addition or analytic methods. The complex motion of the objects their movement, position, and all control on them was handled efficiently through breaking down their components according to their rectangular components axes.

Applications of vector addition in the advanced topics:

With time or in the modern era of science and technology vector addition can be used in many new different fields some are given there:

Spherical coordinates:

The vector A in the spherical coordinates their magnitude can be represented through the A and the angle between them is represented through θ and also represented through the azimuthal angle Φ. In spherical coordinates the vector addition or analytic method can also be used to decompose the components, adding them or also convert them into their original form.

Vector addition in different coordinate systems:

Vectors can be added basically or generally into the rectangular or cartesian coordinate system but vectors can also be added in many different coordinate systems like polar, polygram, cylindrical, or in many different spherical coordinate planes. But in different spherical coordinate systems, we can follow many other different rules which may be addition or different from the addition of vectors in the rectangular coordinate system. 

Polar coordinates:

The vector A in the polar coordinate system, their magnitude can be represented through A  and the angle can be expressed through θ. But the addition in the polar coordinate system is difficult so that's why if we want to add the vector in the polar coordinate system we can convert them, decompose them, and then add them into the rectangular component and if the need arises we can convert them and then added them.

Common mistakes and the challenges in the vector addition by its rectangular components: 

In vector addition in its rectangular components, some mistakes can occur when the vectors are complex and the calculation becomes challenging. Some common mistakes and challenges are given there: 

Neglecting units:

In the vector addition or during the calculations units can play an essential role but if we can neglect them and can't track them properly then the inaccurate calculation or result from chances increases if we can track the units properly then there is no chance for error and the result are accurate and efficient. Mixing up of units can also provide inaccurate or false results.

Misalignment of coordinate axes:

When we add these vectors to the cartesian or any coordinate system it is essential to check their coordinates and components properly because if any vector lies on the wrong coordinate plane the result is incorrect. Coordinate planes can play a very essential role in a vector addition misleading coordinate axes always provide inaccurate calculations and results.

Incorrect component calculations:

When we can perform the trigonometric functions the chances of error are possible but if we can check the calculations again and again then there is no chance of error. If the signs and values of vectors according to their components are not correct then their calculation results are also inaccurate. Because they can cause different significant errors so that's why double double-checking the units and the components in the coordinate plane is essential for precise and efficient results.

Conclusions:

In different fields of physics or mathematics or many others like engineering, robotics, and computer graphics vector addition can play a very essential and powerful role also vector addition can be handled and provide control on different types of robots. Vector addition can also play an essential role in understanding complex vector quantities and also help to understand the theory of trigonometrics and resolve complex trigonometric problems in a very efficient way.

Factors Affecting the Prices of PCB Manufacturing & Assembly

A printed circuit board(PCB) is the most important part of an electronic device. A high-quality PCB is necessary to make a safe and durable device. PCB manufacturers should strive to maintain high quality at a low price. To achieve this goal, some matters should be taken into account.

Some key factors affect the prices of PCB manufacturing and assembly. PCB price depends on size, number of layers, quantity, etc. The material that we choose for PCB also affects the cost. The PCB printing process also matters in this regard. For example, some PCB manufacturers print PCBs manually while some control the whole process with CNC machines. Manual PCB printing is cheaper than CNC machine-printed PCBs. PCB manufacturing is a complicated task that needs experience and technology. A trusted PCB partner is essential for the electronics business.

Where to order cost-effective PCBs?

PCBX is an industry-leading PCB prototype manufacturer. Here you will get a One-Stop PCB Solution from Design to Mass Production.

PCBX specializes in providing 24-hour quick-turn PCB. We offer consistently low prices but high quality. We have 19 Years of Experience with proven expertise in prototype & production. Our Strict QC and advanced inspection ensure high reliability and stability. We have Advanced Automated Inspection (SPI, AOI, AXI) Services designed to ensure the utmost quality and consistency throughout the PCB production.

We integrate innovative technology including AI with efficient processes to deliver high-quality PCBs and complete product assemblies at competitive prices. This combination Minimizes rework and waste, saving on costs.

If you are looking for high quality at a low price, PCBX Fabrication House is the perfect place for you.

Following is a screenshot of the PCBx website’s home page.

We have a special offer of $1 for 10 PCB prototyping, and $15 for 10 PCB Assembly, without compromising on quality. We also give free PCB assembly coupons. You can see the offer on our website as shown in the following picture.

In this article, we will discuss the Factors Affecting the Prices of PCB Manufacturing & Assembly. We will also try to find a balance between cost and quality.

Delivery time

How does shorter delivery time increase manufacturing costs?

Delivery time plays an important role in the manufacturing cost of PCBs. Urgent or express delivery adds more to the cost. When the customer demands urgent delivery, the manufacturer needs to employ extra labour. Workers may need to do overtime. Additional machineries are put into operation. These will increase the overall manufacturing cost.

Due to shorter delivery time requirements, manufacturers often need to adjust production schedules and processes to ensure timely order completion. They may need to rearrange production lines, prioritise urgent orders and accelerate production speed. As a result, costs associated with production adjustments are increased.

After manufacturing the PCB, then comes the question of delivery. Urgent delivery needs special arrangements. Air freights and express delivery services add more to the cost.

PCBX offers a flexible assembly time frame. It can range from as little as 24 hours to a few weeks. You can select the time option that best suits your schedule and budget. We want to ensure transparency. This is why our turn-time policy begins once all the necessary components are ready and all the required PCB files are complete for our assembly work. These files include Gerber files or other PCB file formats, Centroi(PNP file), BOM, and any other essential data, documents, images, or photos. This approach accounts for the complexity involved in determining the turnaround time for PCBA services.

Complexity of design

The design plays an important role in the manufacturing cost of a PCB. The more complex the design is, the costlier it becomes. Complex design usually means the components are densely placed and a lot of traces and vias are very close to each other. This type of complex PCB needs extra care during manufacturing. Complex circuit boards may require larger board areas. The number of layers may also increase. All of these factors will eventually increase the production cost of the PCB. So, it is wise to keep the design as minimalistic as possible. If the whole circuit can be accommodated in a single-layer board, there is no point in making it double-layered. Traces should be placed cunningly to save more place. 

We want to make your PCB designing task easier. We have the PCBX designer to help you with the design. It is an online PCB designing platform. It is quite easy to learn. It takes not more than 5 minutes to learn this tool. No matter what device you use, you can always run this tool. You can import circuit files from other PCB Designer software into PCBX for viewing, editing, and modifications. Following is what the PCBX designer looks like.

PCB Size

Bigger PCBs usually need more substrate materials. They also need more copper foil. All of these materials increase the cost. For high-density boards, the increase in material costs can be significant.

Larger PCBs may need a series of complex manufacturing processes. They depend on larger production equipment, such as larger cutting machines, and larger copper plating holes or slots. This increases manufacturing complexity and costs. The following picture shows a PCB which is bigger than usual.

PCB shapes

PCBs are usually rectangular. But often they are of other shapes. Such as round PCB, Christmas tree-shaped PCB etc. To cut circuit boards in unusual shapes, additional processing steps or customized processes may be required, further adding to manufacturing costs. The following picture shows a PCB having an exotic shape.

Larger PCBs may lead to higher shipping costs. Due to their larger size, they need larger packaging boxes or additional protective measures to ensure the safe transportation of the products. Transportation of big-size PCBs may pose some challenges. As a result, PCB suppliers may need to pay additional charges, such as oversize cargo fees or higher shipping costs.

Number of layers

An increase in the number of layers means the consumption of substrate materials, copper foil, insulation materials, etc., also increases. Thus the number of increased layers raises material costs. The following picture shows the standard composition of a multilayer PCB.

Multi-layer PCBs need a more complex manufacturing process. In multi-layer PCBs, additional processing steps may be required. These steps include lamination of copper foil layers, drilling, and alignment of inner layer circuitry. These processes add to the complexity and difficulty of manufacturing, consequently increasing manufacturing costs.

PCBs must ensure stable signal transmission. This is why multi-layer PCBs require precise alignment and connection between each layer. Multi-layer PCBs have vias between layers to interconnect the components of each different layer. Electroplated vias are very common in these PCBs. To accommodate all these features, multi-layer PCBs demand higher levels of manufacturing technology and equipment. This also contributes to higher manufacturing costs.

With the help of modern technology and expertise, PCBX is capable of manufacturing multi-layer PCBs consisting of up to 8 layers. 

Substrate Material

Different types of substrate materials have different prices. The substrate material you choose directly manipulates the price of your PCB.

For example, commonly used FR-4 fibreglass composite materials are typically cheaper than high-frequency materials like PTFE. The following figure depicts the placement of substrate material in PCBs.

There are certain special applications of PCBs. Many PCBs need to operate in high-frequency, high-speed, or high-temperature environments. For this purpose, special substrate materials may be required to meet performance requirements. Generally, these special substrate materials are more expensive.

The price of PCB directly depends on the thickness of substrate materials. There are some commonly used high-frequency substrate materials with relatively high prices. RO4350, RO5880, etc. are mentionable among those.

Trace Width and Spacing

Finer manufacturing methods and higher-end production equipment are needed for smaller trace widths and spacings. Reduced trace widths and spacings may require the employment of more sophisticated lithography methods and drilling tools, which raises the cost of production. Smaller trace widths and spacings could also result in more complicated production processes and longer processing times, which would raise manufacturing prices even more.

Reduced Yield Loss 

During the manufacturing process, smaller trace widths and spacings may result in a greater yield loss. There might be more scrap or faults during production as a result of the reduced trace widths and spacings, which would raise production costs and reduce yield. Smaller trace widths and spacings may also raise the failure rate during manufacturing, necessitating the need for additional steps to lower scrap rates, such as stepping up inspections or changing production procedures, which raises the cost of manufacturing.

The following picture shows trace width and trace spacing.

Drill holes

Increased Processing Costs

Another thing that heavily influences the price of your PCB is the number and size of drill holes. Smaller drill holes need smaller-sized drill bits. It increases the processing cost of PCBs. There may be some specialized PCB requirements, such as blind vias, buried vias, or controlled-depth holes. Special drilling processes are often required to meet these demands. These special drilling processes typically require higher-level processing equipment and more complex operational steps, thus giving rise to processing costs.

The following picture shows a PCB with different sizes of drill holes.

Increased Material Loss

Drilling processes sometimes lead to material loss. Increased material loss rates result from more material being removed and sliced away when there are more drill holes. Furthermore, additional drill holes might be needed for some specific PCBs, such as high-density boards, in order to achieve complicated circuit layouts, which would further increase material loss rates. To meet specific PCB criteria, including blind vias, buried vias, or controlled-depth holes, unique drilling techniques could be required. Processing expenses are increased because these unique processes usually call for more sophisticated operational procedures and sophisticated processing equipment.

Higher Loss of Materials

Material loss can occur during drilling operations. Increased material loss rates result from more material being removed and sliced away when there are more drill holes. 

Surface Treatment

copper is oxidized and deteriorates in the presence of air. Oxidization seriously affects the electrical properties and solderability of PCBs. The implementation of PCB surface treatment is important for the improvement of the reliability and shelf life of PCBs. The quality of metal-to-metal joints depends on surface treatment These treatments also contribute to the higher manufacturing cost of PCBs.

There are 8 kinds of PCB surface treatment methods. These are-

  1. HASL, hot air solder levelling

  2. OSP, Organic coating.

  3. ENIG.Chemical gold.

  4. IAG. Immersion Silver.

  5. ISN. Immersion tin.

  6. Electroplated Nickel Gold.

  7. Electroless Palladium.

  8. ENEPIG, Electroless Nickel Electroless Palladium Immersion Gold.

The following picture shows different PCB surface finishes.

The costs of all these surface treatment techniques are not the same. For example, organic coating is cheap. On the other hand, palladium is a valuable metal. So, the Electroless Palladium process is expensive. Expiration dates of various surface treatments are different. You have to select the surface treatment according to your application.

How can you decrease PCB manufacturing costs?

Here are some tips to follow if you want to cut down on the manufacturing cost of PCBs

Right placement of components

Component placement of PCB should be done in such a way, that you can connect them to each other by the shortest possible path. When you convert a schematic to a PCB layout, please pay attention to the components that are connected to each other. Place the connectable components close to each other. Try to keep the traces as short as possible.

Aim for the lowest number of layers possible

PCB cost increases proportionally with the number of layers. So, try to accommodate all the traces, vias and components in the lowest number of layers possible.

Remove unnecessary trace spacing

It is essential to maintain an optimum distance between the traces to avoid DRC errors. However, traces should not be placed so far from each other that the total board area becomes cumbersome. Try to place the traces as close as possible to each other without violating DRC rules.

Follow DFM guidelines

DFM stands for design for manufacturability. DFM guideline is a set of rules for cost-effective and efficient manufacturing. By following this guideline, you can optimize the sizes, materials and tolerances of PCBs to reduce costs.

Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir