PCB Grounding Techniques: To Do and What Not To Do

Get Started with Altium Upverter, Sign Up Now

Upverter Expert - PCB Grounding Techniques_ To Do and What Not To Do

One of the most common questions we see from many designers is how to properly ground their PCBs. This includes ground plane design, placement of grounded vias, and other important techniques to reduce noise in a PCB. The fact is, grounding is the foundation on which we build our systems, and a thorough understanding of PCB grounding techniques is essential.

shutterstock_40722217

Ground loop formed by two trace connections

We normally talk about signal integrity in terms of high speed and high frequency signals, but any PCB needs to have a stable ground to ensure signals are clean and noise-free. Proper grounding comprises routing return signals to a ground point, and properly designing ground planes. Let’s take a look at some PCB grounding techniques and ways to ensure proper grounding throughout a board.

What is a Ground?

This might sound like a simple question, but the distinction between different types of grounds is fundamental. An electrical ground is a conducting body that acts as a common return path for the current from various devices. Usually it is referred as the zero-potential node and all the other voltages in the system are referred with respect to this node. Following are the different types of nodes that are referred to as grounds-

  • Floating grounds: A floating ground is simply a large reference conductor in an isolated system. A floating ground is not physically connected to earth.
  • Earth ground:This is literally a physical connection to the earth. This acts as a safe return point to deplete surplus current.
  • Chassis ground: The electronics in a PCB cannot connect directly to an earth ground (this normally happens through the power supply), but the metal chassis can act as a good ground. This is usually used to ground the body of an enclosure as a safety measure.
  • AC ground: These are low impedance ground paths that block DC return current. This is normally created by connecting to a ground plane through a capacitor.
  • Virtual ground: These grounds can be found in negative feedback circuits at the inverting end of operational amplifiers. Connecting 0 V to the non-inverting input will pull the inverting input 0 V, and this value is usually held constant through feedback. This is an unstable node and cannot be used as a return path for other circuits.

PCB Grounding Techniques and Your Layout

Ground Plane

Any large piece of copper on the PCB connected to the ground is called ground plane. In a two-layer board, this is usually spread across the bottom layer, while traces and components are arranged on the top layer. In a multilayer PCB, one of the interior copper planes is normally dedicated to a ground plane.

If the ground plane doesn’t entirely cover a complete layer, then you should always make sure you do not create any closed rings in your ground plane as this makes your ground plane susceptible to electromagnetic interference (EMI). Note that EMI can be induced in the ground plane from other components on the board or from external sources. The conductive rings act as an inductor, and any external magnetic field can induce a voltage/current in the ground loop.

Similarly, placing unnecessary traces between the ground pins of two components creates a ground loop. This is an especially potent source of noise between digital circuits that mimics the behavior of ground bounce. It also creates an effective inductor that increases susceptibility to EMI. Each component must be connected to a solid ground plane individually to avoid ground loops.

ground_loopGround loop formed by two traces connecting to a ground plane

When using a chassis ground, you can avoid ground loops by placing a void in the ground section that connects to the chassis, as shown below. The use of a capacitor provides an AC ground point. This is an ideal situation for electrical equipment that will run off of wall power and needs to have a return directly back to earth.

Chassis-ground-connectionElimination of ground loop antenna

Ground Vias

In a multilayer board, ground planes on different layers are connected through vias. These connections help you access the ground plane anywhere throughout the PCB. Vias also help reduce the ground loops in the system. They provide a shorter return path for the current through a low impedance ground point.

Sometimes, pieces of copper may resonate at 1/4 the frequency of the current flowing through it. This is one reason that you should try to route the shortest possible connections between components using controlled impedance techniques. Placing grounded stitching vias at appropriate distances can help eliminate these oscillations as they provide a capacitive path back to ground. As a rule of thumb, these ground vias must be placed at 1/8th of a wavelength or less from the relevant conductor.

Ground Planes in Your Stackup

In a multilayer PCB, the arrangement of power, signal, and ground layers in the stack has major effects on signal integrity and will influence your routing strategy. It is important to keep a ground plane near signal planes in order to minimize the current’s return path. In a 4-layer board, the power and ground planes are normally kept on the inner layers, while signal traces and components are placed on the outer two layers.

Analog and Digital Component Arrangement

Components should be arranged on the signal layer close to the ground so that the return paths are short and traces coupled to ground. If the PCB contains analog and digital components, then the ground connections must be placed very carefully. The analog and digital sections of the board should be physically separated, but they still need to connect to the power supply return path.

mixed_signalMixed-signal ground connections

Some might suggest completely splitting the digital and analog ground and then connecting them using a ferrite bead, but this can create more EMI and noise problems than it solves, especially if you are working at very high frequencies. A good way to connect these sections is to place the power supply return path between the two planes so that return currents from either section will not enter the other plane. It is important to note that no traces should not be routed over a gap between two ground planes as this creates long current return path that is highly susceptible to EMI. The space between the ground planes can be used to place mixed-signal components like ADCs.

Designing a high-performance PCB requires attention to detail, and grounding is just one of many design aspects that require your attention. One rule of thumb to follow here is “grounding before routing,” meaning you should consider the location of ground connections in your PCB before routing signal traces. It is important that you do not leave any floating planes on your PCB and connect them to ground instead. Layout editors have design rule check (DRC) features that will inform you of any floating net.

No matter which PCB grounding techniques you need to implement in your PCB, Upverter® provides a high quality PCB editor with excellent routing tools to design boards from start to finish in a browser-based interface. You’ll also have access to real-time DRC tools to help avoid any rework in your layout. Upverter’s browser-based platform gives you access to your work from anywhere.

You can sign up for free and get access to the best browser-based PCB editor, schematic editor, and component database. Visit Upverter today to learn more.

Which Types of PCBs are Best for Different Designs?

Get Started with Altium Upverter, Sign Up Now

Upverter Expert - Which Types of PCBs are Best for Different Designs

As part of our best practices and information for new designers and hardware startups, we want to give new designers the information they need to choose the right PCB for their next project. Any PCB is intended to provide a physical support for an electronic system and its components. The complexity of different types of PCBs varies widely, depending on the function of different circuits. If you’re designing a PCB for the first time, we’ll show you the different types of PCBs that will hopefully provide inspiration for your next project.

Rigid PCBs

As the name states, these boards have a rigid substrate which prevents bending or warping. These are usually made of solid, rigid material like fiberglass weaves, but more demanding industrial or automotive applications may require ceramic or metal core substrates. With the number of layers ranging from one to more than ten, they are the most common type of PCBs on the market.

Single-sided PCB

Just like its name suggests, a single-sided PCB consists of a single layer of conductors and components. There is usually a solder mask over the copper layer, and silk-screen can be used to mark the positions of different components. Despite the low-cost, the utility of these boards is limited because of the design complexity limitation. Due to only one surface available for connections the area of the board can grow very fast to accommodate all the components and connections.

Layers in a single-sided PCBSingle-sided PCB

Double-sided PCB

Double-sided PCBs are similar to single-sided except the conducting layer is on both sides of the substrate. Now the connections can run on both sides of the PCB, hence it occupies a smaller area or can have more complex circuits. The connection between top and bottom layer is made using plated holes called “vias”. These boards are used for moderately complex circuits. It is generally not a good idea to try and design high-speed or high-frequency PCBs on double-sided boards as grounding and power distribution can be a real challenge, especially as the number of components increases.

double_sidedLayers in a double-sided PCB

Multilayer PCB

Multilayer PCBs have several layers of copper separated by insulating laminate materials. Connections between layers are also made using vias. Typical multilayer boards start with four layers, and the layer count grows for more complex (and costly) boards. The extra planes can be used for routing, power distribution, and grounding planes, which helps to reduce crosstalk and electromagnetic interference (EMI). A four-layer board is usually a good place to start for a moderately complex board that will run at high speed (faster than TTL logic) and/or high frequency (usually hundreds of MHz or higher).

Layer stack in a multi-layer PCBLayer stack in a multi-layer PCB

Flexible PCBs

Rigid-Flex PCB

Rigid-Flex PCBs are a middle ground between one of the previous types of PCBs and a flex PCB (see below). These boards are best used in applications where a board requires precise molding to its enclosure or when different sections of a board need to move with the enclosure. These boards are also useful in small spaces where a standard connector will not fit in the enclosure. These boards can be found in pacemakers, digital cameras, and cell phones.

Layer stack in a multi-layer PCBRigid-Flex PCB from RayPCB

Flex PCB

These boards are not really boards; they are fully flexible PCBs that can be molded into nearly any shape without affecting circuits present on different layers. The substrate is usually made from polyimide with copper or other malleable metal used for conductors. These boards are more expensive than the other types of PCBs due to the additional fabrication complexity.

Rigid-Flex PCBFlexible PCB

Which Type of PCB is Best for Your Design?

The answer to this question really depends on the application in which your board will be used, your production budget, and the level of complexity of your circuits. One rule of thumb that will aid in your decision is this: if your new design works properly on a breadboard, you can expect your circuits to work as designed no matter how you layout your PCB.

For designs that run at high speeds and or frequencies, single-layer or double-sided boards are typically unsuitable, and you’ll want to start with a four-layer PCB. Here are some other points to consider for different types of PCBs in certain applications:

  • PCB for medical devices have severe area constraints therefore require dense routing with compact footprint. Multilayer PCBs are therefore quite common in medical and other advanced applications.
  • Industrial applications usually have high current requirements than in other applications. PCBs used in these cases have a thicker copper layers compared to normal PCBs.
  • Automotive and aerospace PCBs must withstand strong mechanical vibrations, hence flexible PCBs can be used for such cases.

No matter which types of PCBs you want to design, Upverter® provides the schematic design and PCB layout tools you need to design boards from start to finish in a browser-based interface. If you are preparing a complex PCB with multiple layers, Upverter gives an easy EDA teamwork platform for a live multi-user collaboration and real-time design rule check (DRC) features.

You can sign up for free and get access to the best browser-based PCB editor, schematic editor, and component database. Visit Upverter today to learn more.

Top PCB Design Guidelines for New Designers

Get Started with Altium Upverter, Sign Up Now

Upverter Expert - Top PCB Design Guidelines for New Designers

PCBs are sometimes seen as an over-glorified way to wire up electronic components. However, once you understand the complexity of advanced PCBs and the importance of enforcing some order to your components on a single board, you’ll realize the importance of creating a PCB for your new device. If you’re a new designer, it can be difficult to find a good set of guidelines for getting started designing your first PCB.

We want to give new designers some important PCB design guidelines to follow when building a new board. The guidelines below are not strict PCB design rules, but are suggestions that might help save you a lot of rework. You might not need to follow all of these guidelines for every design. At the end of the day, you are the master of your design, and with some practice, you will know what works best for your project.

Top PCB Design Guidelines for Beginners

Once you have validated your design idea with a breadboard, individual components, and what seems like a couple hundred wires, it is time to move start designing your own PCB. The most important considerations for a successful PCB design are that it should be manufacturable, functional, and reliable. The design tool you use can help ensure manufacturability by allowing you to checkyour layout against standard design rules and constraints.

Schematic Design

The first step is to start designing a schematic for your board in the tool of your choice. This process is rather easy as you are placing connections between the components. The design tool you use should include a schematic capture tool as this allows you to generate an initial layout from your schematic. It’s good to have a detailed schematic that gives you access to different component specifications, such as pin-out, names, and ratings. Once you finish your schematic, your schematic capture tool will create the initial layout, and you can then start making real connections on a PCB.

Placing Components

A PCB is like a piece of real estate; some areas carry higher value than others. Placement of each component depends on its individual importance. Precision; sensitive analog parts must not go to the edges and they should be kept away from any areas on the board with fast digital components (i.e., TTL components). Similar parts should also have similar orientation on the board as this aids routing between components. All surface-mounted components must be on the same side of the board, and all through-hole components must be on the top layer of the board.

Power, Signal, and Ground Routing

Once you have tentatively placed your components (this might change as layout is a dynamic process!) it’s time to start connecting them together with copper traces. If you have a multilayer PCB, make sure to keep power and ground planes symmetric and overlapping. This helps prevent any bending or stress development on the board. If you have only two layers, then you will need to have thick power and ground lines able to withstand the heat generated by the total current flowing through your board.

The two methods for connecting functional blocks of electronic components are star configuration and daisy chaining. It is highly recommended that you not daisy chain the power lines to different functional blocks in a PCB. Instead, use a star configuration to connect power rails to different portions of the board. This is a basic requirement for ensuring ICs receive consistent voltage during operation.

PCB design guidelines for power routingDaisy chaining should be avoided

Signals on the top and bottom layers of a two-layer PCB should run orthogonal to each other to avoid inductive coupling between them. For a multi-layer board, the same strategy should be followed for signal lines on adjacent layers. You should only break this guideline if there is a copper plane between the signal layers.

routingOrthogonal routing of traces on a two-layer PCB

Bypass Capacitors

Each PCB that contains digital components will have some areas with high switching activity and greater current consumption. Voltage and current spikes will occur when these digital components switch. These voltage and current spikes occur due to a large rush of current into a circuit during digital switching, sometimes called ground bounce. These voltage/current spikes can couple between different traces, known as crosstalk.

This problem can be solved using capacitors between the power and ground pins on a digital component. If you look at manufacturer’s guidelines for different components, they will often recommend a certain capacitor size which you can use to compensate for ground bounce.

Isolation

It is also important to prevent coupling between digital and analog traces during switching using isolation. With mixed signal PCBs, it is important to keep analog and digital grounds separate in order to keep digital signals from interfering with sensitive analog components. This does not literally mean using two different ground planes; this can mean placing digital and analog components over different areas of the same ground plane. The DC bias signals should also be shielded from any coupling with digital signals. A good way to do this is to run two ground lines run on both sides of a trace carrying an analog signal or DC voltage. This simple design choice is known as shielding.

shieldingSignal or bias shielding

Thermal Issues

While designing a PCB, you should also consider heat management. First, you should look through your component datasheets for thermal resistance and power consumption values to determine which components will likely be producing the most heat and reach the highest temperature. In addition to heatsinks or cooling fans on hot components, there are some simply layout choices that help keep temperature low.

If more than one component will produce a large amount of heat, then it is best not to place these components in one location, otherwise hot spots might form. Circuits that are very sensitive to temperature changes should be placed farther away from these blocks. There should be at least 2-4 vias for each layer transition near high current paths. This helps conduct heat away from the surface layer and helps reduce inductive and resistive losses.

Signal integrity

This is a huge area of PCB design, however there are some simple ways to ensure signals in your board do not get distorted during operation. Signals should be routed directly between components over the shortest possible path to reduce loop inductance. You should also avoid running parallel tracks over long distances as this increases capacitive coupling. If tracks need to cross, this must be done at a right angle to reduce coupling capacitance. These guidelines will help suppress crosstalk and reduce susceptibility to electromagnetic interference (EMI).

Verification

To ensure your PCB meets functionality and reliability criteria, it is important to check the design for any rule violations. Electrical rule checks (ERCs), and design rule checks (DRCs), are two very important tools that should be performed once you have laid out your board. The right design software can run these checks dynamically (i.e., as you place components and route traces). This helps you identify design errors that may not be obvious from a visual inspection. Once you have verified your schematic is correct and your layout complies with all design rules, you are ready to think about producing your board.

Choosing the Right PCB Design Tools

There are many PCB design tools in the market. A good tool is the one that provides easy integration between schematic and layout, a vast library with reliable components, and provides easy platform for collaboration and sharing. You should also be able to generate documentation for a manufacturer. This includes Gerber files, assembly drawings, and a bill of materials for your components.

Upverter® provides schematic design and PCB layout capabilities for designing boards from start to finish. Its browser-based platform gives you access to your work from anywhere and makes it easy to collaborate. Upverter’s cloud-based platform verifies part designs, removing the risk of symbol and footprint errors so that you can manufacture your designs with confidence.

You can sign up for free and get access to the best browser-based PCB editor, schematic editor, and component database. Visit Upverter today to learn more.

Range/Obstacle Detection with Ultrasonic Sensor Projects

Get Started with Altium Upverter, Sign Up Now

Upverter Expert - Range_Obstacle Detection with Ultrasonic Sensor Projects

The choice of sensor is a challenging and crucial part of any project. The performance, cost, and size of your project depends greatly on the sensor you choose. Range, obstacle, and level detection are very common tasks in many applications, and many sensors are available on the market for range detection or obstacle detection. Compared to other sensors, ultrasonic sensors are cheap, easy to use, and robust. This makes them a favorite entry-level sensor for hobbyists and professionals.

HC-SR04 module for ultrasonic sensor projects

The HC-SR04 module for ultrasonic sensor projects

How Ultrasonic Sensors Work

Compared to an optical sensor, and ultrasonic sensor’s output and sensitivity is independent of ambient light, color, texture, and transparency of the target. Because these sensors operate beyond the range of human hearing and vocal spectrum, the sensitivity is also independent of most ambient noise sources.

All ultrasonic sensors determine the distance to an object by measuring the time required for ultrasonic waves to reflect from a target. This is similar to SONAR, but off-the-shelf ultrasonic sensors can be used in any environment. These sensors produce high frequency sound waves which reflect off an object or obstacle in their path. The ultrasound receiver captures the reflected waves, and you can then calculate the total distance to the obstacle based on the speed of sound in that medium. This requires specifying the speed of sound in your calculation (approximately 331 m/s at atmospheric pressure and ambient temperature).

shutterstock_205582693
Ultrasonic sensor measurement principle

First, the total travel time (T) between transmission and reception of the signal is measured with the system, and the distance (D) between the sensor and the target can be estimated using the following relation:

ultrasonic_eq

where Cs is the speed of ultrasonic waves in the medium. The factor of ½ is due to the fact that the wave travels double the distance between the transmitter and receiver.

Getting Started with Ultrasonic Sensor Projects

If you’re thinking of including range detection capabilities to your board, the prepackaged module shown above will interface directly with an Arduino board or other microcontroller board. As most transducers emits at 40 kHz and above, you only need to supply a low frequency analog signal or a stream of digital pulses to trigger the transducer. Given the low frequencies used in these systems, you can easily implement an ultrasonic sensor in your board without worrying about EMI or other signal integrity problems.

Advantages of Ultrasonic Sensors

Linearity is one of the important performance parameters for any sensor, and ultrasonic sensors have linear output response over a broad range of input power. Ultrasonic sensors can be reliably used for range detection indoors or outdoors. The performance doesn’t fluctuate with variations in the ambient lighting. They are also robust and can be moved quite often, hence they are suitable for mobile applications, such as collision avoidance for robots moving at low speed.

Mist, smoke, or dust also do not affect the performance of these sensors. The color and texture of the target doesn’t matter either as long as the target has a hard surface, which means ultrasonic sensors can even be used for mash structures. Soft structures will have reduce the intensity of the reflected wave, making them more difficult to detect at longer range. The response of the sensor has a small dependence on temperature, but these sensors are still more stable against temperature changes than infrared sensors.

Challenges in Using Ultrasound Sensors

The primary challenge involving the use of ultrasonic sensors for range detection occurs when the target surface is of low density. In such cases, sound waves get absorbed by the surface and reflections are too small to be reliably sensed by the receiver. Another concern with ultrasonic sensors is their minimum sensing distance.

After transmitting the signal, the sensor needs some time to recover before it is ready to receive the reflected wave. If the range is too small, the receiver will receive a reflected wave before the trigger signal ends, resulting in an erroneous measurement. The datasheets for your particular sensor will usually specify the minimum range that can be reliably detected.

Range Detection in Your Ultrasonic Sensor Projects

One common sensor used for range detection with a development board is the HC-SR04 (see above), which provides high accuracy and stable readings in a compact package. It has four pins: supply, ground, trigger, and echo. Transmission is initiated by sending a 10 μs pulse to the trigger pin. This causes the ultrasound sensor to send out 8 pulses of 40 kHz each and raise the echo pin to high value. The echo pin stays high until the reflected signal is received, at which point it turns low. The length of time the echo pin remains high is proportional to the distance travelled (see the above equation).

timing_sensorTiming diagram for the HC-SR04 ultrasonic sensor

The typical usable range for this particular sensor is 2 to 400 cm, although working at more than 10 cm ranges gives better results with 3 mm accuracy. These modules typically require a 5 V power supply, and the operating current can reach 15 mA (3 mA standby current). The sensor assembly can be easily plugged into a breadboard for testing purposes.

For a simple range testing, you can plug the HC-SR04 sensor into an Arduino board, as shown in this tutorial. Ultrasonic sensors are excellent devices to use for liquid level measurements with a microcontroller board. This can be used for something as simple as creating an automated plant watering system, flashing an alarm LED, or for triggering a relay to turn a valve in a large water tank.

Another interesting project is to use an ultrasonic sensor in robotics for obstacle avoidance. This is simple enough to implement on an Arduino board, although you might consider going with Raspberry Pi or an equivalent if you need much more processing power. For the clean freaks, you can find a touchless automatic motion-sense trash can in this tutorial. The applications for the ultrasonic sensors are limitless and quite affordable.

More Advanced Ultrasonic Sensor Projects

You can also use an ultrasonic sensor for more complicated speed measurements. If the relative speed between the sensor and the object is rather large, a Doppler shift will occur once the wave is reflected from the target, and the shifted frequency can be detected with an ultrasonic sensor. The magnitude of the Doppler shift can be used to calculate speed, but not heading; at least two sensors with defined angle between them must be used to measure heading as well as speed.

If you want to implement this feature, you need a separate analog ultrasonic transducer. You then need to mix the detected signal with the reference signal, producing an AM analog signal. The frequency of the AM signal can then be extracted using an envelope circuit and then measured. You can then determine the relative speed between the sensor and the target using the standard Doppler shift equation. Note that the actual speed and any heading measurement will depend on the resolution of the ADCs in your system.

Small module for ultrasonic sensor projectsSmall module for ultrasonic sensor projects

Once you have decided on the type of system that you want to build and collected all the required components it’s time to test the system. The easiest way to implement a test system would be using Arduino, Raspberry Pi, or similar platform.

You can sign up for free and get access to the best browser-based PCB editor, schematic editor, and component database. Visit Upverter today to learn more.

A Guide to Arduino Shield Design

Get Started with Altium Upverter, Sign Up Now

Upverter Expert - A Guide to Arduino Shield Design

You probably have a great idea that you tested using your Arduino, breadboard, and what looks like a bird’s nest of connectors, and it works great. Congratulations! If only a couple of ICs and additional circuitry could be added to your Arduino to make it look like a finished product. We have two choices here. First, you could make a custom board that might be more organized, but will require some time to design. You’ll also have to replicate Arduino’s functionality in your custom board, or you’ll have to clone an Arduino board.

Arduino shield design by stacking multiple boards

Arduino shield design with expandable memory and an LCD display 

The other option is to take all the additional components and make an Arduino shield. If you are lucky, you might be able to find an existing shield that will hold your additional components. If you’re more adventurous, you can create your own shield board that plugs directly into an Arduino module. Here’s what you need to consider in Arduino shield design and how to create a custom shield for your new product.

What is Arduino Shield Design?

Arduino shields are small circuit boards that sit on top of existing Arduino boards and contain additional components to boost the capabilities of the system. There are a number of capabilities you can add to an existing Arduino, such as Wi-Fi, Bluetooth, motor control, a camera, or other features. Arduino shields provide some important advantages:

  • Stackable. The layout of a shield board will be compatible with a basic Arduino board, which means they can be plugged in straight away. Signals are sent from the GPIO pins or other MCU interface, and multiple shields can be stacked together to form a complex system.
  • Inexpensive. Shields are relatively inexpensive to buy or design. For a small manufacturing batch, you’ll find that they are cheaper compared to custom PCB.
  • Extensible. If you use a through-hole shield, you can add more components to the board or rework it as needed. Note that this is not generally the case with a custom shield, which is normally fabricated for a specific set of functions.

Arduino shields have the same form factor as that of a standard Arduino board. Power and ground pins are located on one eight pin header, the analog pins are placed on a six-pin header, and the digital pins are placed on the opposite side with an eight-pin and ten-pin header. An example footprint for an Arduino Uno shield is shown below.

Arduino shield design for an Arduino Uno
Typical shield form factor for an Arduino Uno

Some Arduino shields are designed to use every pin, while some shields leave open pins. Shields generally communicate using SPI, I2C, or serial communication, and some use interrupts or analog inputs. If you’re buying a premade shield, you’ll find that not all of these modules are extensible. Some shields include an array of plated holes for soldering through-hole components, while others are designed for a very particular application and are not expandable. Take a look at Adafruit for some good examples.

Types of Arduino shields

There are hundreds of Arduino shields on the market these days, and going through each will turn this article into a lecture. Here are a couple interesting shields that might inspire your next design.

Connecting to the world

Arduino WiFi or Ethernet shield. As the name says, this allows your Arduino to connect to the internet through Ethernet or via WiFi. Arduino has retired the WiFi shield, but similar shields can be found from other suppliers or from tutorial websites. You can also build your own shield that provides both capabilities.

GPS shield. You can easily add GPS capabilities to an Arduino with a simple chip antenna. You could even clone an open-source GPS module and easily adapt it as an Arduino shield.

Music and Sound

MP3 player shield. You can turn your Arduino into an MP3 player by adding some speakers, a microSD card, and a headphone jack.

Music instrument shield, You can turn your Arduino into different digital instruments. You can generate an analog signal with a DAC on the shield board, and you can use other components to modulate this signal. You can also use UART to control other devices via MIDI.

Display and Touchscreen

LCD display or touchscreen shield. You can easily add a 16×2 character LCD display with controllable backlighting to your project. You can use two I2C pins on the Arduino board, which leaves plenty of pins left over for interfacing with other devices. If you want to include a touchscreen, an Arduino board can provide sufficient power for place a small touch screen with decent resolution (240×320 is typical). You can also add a microSD card for storing images and videos.

Automation

Relay shield. A relay shield allows you to bring automation to our home appliances. This type of board can contain multiple relay switches that can be individually configured as normally open (NO) or normally closed (NC).

Motor shield. The Adafruit link shown above includes a great example for a motor shield. If you ever want to build a robot (who doesn’t!), you can use the digital output to power a DC motor. You can also use the PWM output from the MCU to control a stepper motor.

shutterstock_1312556210
Arduino shield design for a stepper motor control board.

Things to Consider in Arduino Shield Design

While there are plenty of shields you can create for a new product, there are some important points to consider when designing your own Arduino shield.

  • Pin-out. The pin-out on your shield should match the pin-out on the MCU board. Pay attention to the datasheet for your Arduino model when designing your shield.
  • Current rating. When powered with an external supply, the total current is limited from 500 mA to 1 A, depending on the exact model. Components connected on the shield board and wired to the power/ground pins will increase the total current used by the device.
  • Supply voltage. Some Arduino boards use 3.3 V while others use 5 V. The components you add to your shield should be compatible with the supply voltage used with the MCU board.
  • Through-hole vs. SMD components. Some shields come with an array of holes for through-hole components alongside some other functionality that is built into the board. You can certainly use these premade boards for your shield, but you will be limited to through-hole components. If you prefer SMD components, then you will be better off designing your own shield.

Design for Wireless Communication

If you add a Bluetooth, WiFi, GPS, or other wireless module to a custom shield as a chip antenna, you’ll likely need to include a ground plane in your shield board. Be sure to pay attention to your antenna manufacturer’s guidelines when working with your chip antenna. Unless your shield is much larger than your MCU board, your RF traces are unlikely to act like transmission lines, but you should still pay attention to impedance matching rules for your antenna.

Alternatively, you can use copper pour on your shield board to create your own antenna, such as an inverted-F antenna. This will provide a compact footprint compared to a larger rubber ducky antenna.

Arduino Shield Design in Upverter

Upverter® provides users with a simple yet powerful browser-based platform for designing boards from start to finish. You can easily pick from a vast range of existing open-source hardware projects to get started, or you can import Arduino shield templates from Eagle libraries available from Sparkfun or Adafruit. 

You can sign up for free and get access to the best browser-based PCB editor, schematic editor, and component database. Visit Upverter today to learn more.

 

What are the Top Development Boards for IoT Projects?

Get Started with Altium Upverter, Sign Up Now

 

Upverter Expert - What are the Top Development Boards for IoT Projects_

We like to talk a lot about development boards from Arduino or Raspberry Pi, but there are many different boards available on the market. We’re not talking about evaluation boards here, which are used for evaluating the performance of a specific component (e.g., FPGAs) in specific applications. Instead, let’s take a look at some different options for development boards you can use for prototyping or even full-scale development of a new device.

There are plenty of development boards for different IoT devices or embedded computing products that you can use for prototyping or for full-scale production. These boards are excellent tools for creating v1.0 of your new product. While we can’t present every evaluation board in a single article, we can show you some alternatives to Raspberry Pi and Arduino that offer comparable capabilities.

Top Development Boards for IoT

Any development board you want to use for an IoT project should include a few important features. These include:

  • Processing power. This can be in the form of a microcontroller, FPGA, CPU, or other CPLD. A microcontroller is your best bet for programming your device as many manufacturers will provide the IDE you need. You might also be able to find some open source code online for your new board.
  • Wireless capabilities. Your development board should provide wireless communication without including an external transceiver module. Some common protocols include Bluetooth, WiFi, Zigbee, and others. An Ethernet connection is also useful as a backup.
  • Scalability. Ask yourself this question: what can I add to this board? Does the board communicate via GPIO, SPI, UART, or some other protocol? This will determine how your board can interface with other devices.
    There is another aspect of scalability that should be considered: can you add a shield board? This is important for creating an integrated product with a compact footprint without redesigning and remanufacturing the entire board.
  • Memory. Does the board come with the memory your application requires? This is rather important as you can only store so much data in your built-in Flash memory. A decent board will allow you to connect a MiniSD or MicroSD card to seriously increase data storage in your board.

Note that not all Arduino boards, except the Arduino Uno WiFi (which is now retired), include wireless connectivity unless you include a shield with a WiFi transceiver or an external Bluetooth module. Although Arduino is massively popular and plenty of open-source code is available for various projects, there are other options that include the capabilities mentioned above in an integrated unit. With these points in mind, let’s take a look at some of the top development boards that can provide functionality for specific IoT projects.

MediaTek Linkit ONE

The Linkit ONE board runs on a 32-bit MT2502A MCU (Arm7 EJ-S chipset) with 260 MHz speed. The Linkit ONE has a comprehensive set of radios, including GPS, GSM, Bluetooth, GPRS, and WiFi. It also comes with plenty of integrated memory (16 MB Flash, 4 MB RAM). 

This board is rather large compared to Arduino boards and the other boards you’ll find in this article. The price is much higher than other development boards (around $60), but you will likely have less to add to the board to get it to work for your application. You can also easily build a shield board to connect to the GPIO pins, either from a simple through-hole protoboard or as your own custom board.

Linkit ONE development board for IoT devices
Linkit ONE development board. [Source:
Mouser]

Espressif ESP32

The ESP32 series of boards is an excellent alternative to Arduino with comparable footprint and cost (under $10). It also includes an integrated WiFi and Bluetooth v4.2 communication capabilities. Processing power is provided by 1 or 2 Xtensa® 32-bit LX6 microprocessor(s) at up to 240 MHz. It even includes integrated DACs, something that Arduino boards lack. Espressif provides an IDE for programming the board (uses C/C++).

While Espressif doesn’t provide a shield board for connecting to the module, you can easily build your own with minor additional expense; some possible addons include an SD card module to provide more memory. This gives you a compact system that can communicate with a variety of peripherals. There are a number of different variants of the ESP32 board (see Devkit V1 below).

ESP32 DevkitC board for IoT devices
ESP32 DevkitC. [Source:
Mouser]

Digi XBee Series

If you’re familiar with Zigbee, then you should be familiar with the XBee series of programmable MCU boards and modems. The XBee series of modems can actually be used to add wireless radio capabilities to Arduino boards. This series of development boards provides short-range peer-to-peer and point-to-multipoint communication between IoT devices at 2.4 GHz (standard Zigbee, IEEE 802.15.4, or WiFi) or 900 MHz (Digi-Mesh, based on Zigbee). Digi offers a series of boards that support communication over LTE-M/NB-IoT networks with multi-band support, allowing communication via many different cellular carriers.

You’ll have to get a cellular plan for LTE-M communication, but there are many prepaid plans from different carriers which allow the XBee cellular-capable modules to communicate over long range. You’ll also need to use an appropriate antenna for your board if it is not printed on the PCB. The XBee3 Pro module outputs at a whopping 79 mW, providing communication up to 2 miles at 2.4 GHz. It is also programmable with MicroPython on an 8-bit MC9S08QE32CFT MCU. Note that communication via Zigbee or IEEE 802.15.4 at 2.4 GHz can experience interference when close to WiFi routers, so these devices are best deployed in remote areas for use in less data-intensive edge computing and sensing applications.

STM32 Nucleo-144 development boardSTM32 Nucleo-144 development board. [Source: Digi]

STM32 Nucleo-144 Series

The STM Nucleo-144 development board boasts less processing power but greater expandability compared to the previous modules. It runs at 170 MHz on a 32-bit STM32F746ZG MCU. While it doesn’t include WiFi or Bluetooth integrated onto the board, expansion boards are available for each technology while keeping the total price per board under $50. However, it does include USB and Ethernet connectivity, allowing you to easily program the board with STM’s IDE.

STM32 Nucleo-144 development board
STM32 Nucleo-144 development board. [Source:
Element14]

Hopefully the boards we’ve presented here will give you some inspiration for designing shield/expansion boards, or help you pick out the right development board for your next IoT device. With the PCB design tools in Upverter, you can easily design your own expansion board for these modules and start producing integrated devices.

Upverter® provides a browser-based platform for designing boards from start to finish, including expansion/shield boards or clones of any of the above development boards. If you like, you can import the project files for one of these boards into Upverter’s schematic editor and PCB editor. This allows you to easily integrate new components into your new IoT product.

You can sign up for free and get access to the best browser-based PCB editor, schematic editor, and component database. Visit Upverter today to learn more.

Using PIR Sensors for Motion Detection

Get Started with Altium Upverter, Sign Up Now

Upverter Expert - Using PIR Motion Sensors in Your Next Project

Motion detection is used in a variety of applications and (lucky for us!) is relatively easy to implement in your next project using PIR motion sensors. Whether you are building on an Arduino board or you are designing your own PCB, PIR sensors are easy to incorporate. Some applications include power switches for electromechanical systems (think automatic sliding doors) or proximity sensors for alarm and lighting systems.

How Does a PIR Sensor Work?

shutterstock_1476976379

When a warm body moves in front of a PIR sensor, the sensor generates a differential voltage. Each PIR sensor unit consists of two individual infrared-sensitive halves. As the radiating body (a person in our case) moves in front of the sensor, one sensor will be crossed before the other. For this short duration, the first sensor will capture a larger amount of radiation than its counterpart, creating a positive differential voltage. Similarly, while leaving a PIR motion sensor’s field of view, one sensor will continue to receive more radiation, resulting in a negative differential voltage.

Difference in motion detection for single and dual modes of the PIR sensor
Principle behind the motion detection using PIR sensor. [Source:
Adafruit]

PIR motion sensors usually come in a three-pin package with VDD, GROUND, and SIGNAL pins. The supply voltage typically ranges from 3 to 5 V, although it can reach as high as 12 V in some sensors. Although the sensor itself is essentially a pair of photodiodes and a transistor, the dome-shaped packaging for an integrated sensor can be rather large. The dome on a PIR sensor acts as a Fresnel or plano-convex lens, which focuses infrared light on a back-to-back photodiode. This photodiode arrangement can then connect to the gate on a transistor, providing a digital output.

The digital output is active high and can drive a load up to 10 mA (always check the datasheet!). In most cases this pin can be connected to a microcontroller input, but you should cross-check your datasheets as this pin may be open-collector, which requires placing a pull-up resistor on this pin. There is a PIR sensor available at SparkFun that has a fourth pin which supplies the analog output from the PIR sensor. This provides additional flexibility for using and analyzing the PIR output.

Difference in motion detection for single and dual modes of the PIR sensor
PIR motion sensor for Arduino projects or similar projects

Designing a Custom PIR Motion Sensor

If you’re a serious electro-optical designer and you’re looking to build a custom PIR motion sensor, you’ll have plenty of fun building your own PCB for a custom PIR sensor. The layout for a PIR motion sensor on a custom board is not difficult as it only requires two detectors, a transistor, and some resistors. The signal conditioning, delay, and sensitivity are controlled with an integrated PIR controller. The real fun is in designing the optics, but you can reuse a dome from a different PIR motion sensor module.

PIR sensor modules usually have two trimming potentiometers on the backside that can be used to customize the behavior of the motion sensor. The sensitivity trimpot can be used to change the detection range of the PIR sensor. The second is an OSC trimpot which controls the length of time the digital output stays high (i.e., the delay time). The pulse width of the output can be anywhere between hundreds of milliseconds to a few seconds.

Using the Digital Output

Most PIR sensors are 3-pin designs that produce a digital output. This sensor produces a pulse when motion is detected, which is then captured with a PIR controller and processed. There are two possible trigger modes for the digital output. The first is single pulse mode detection, where you can detect an object that enters or leaves the PIR’s field of view, and the second is a dual pulse mode detection where you can distinguish objects entering and leaving the field of view. The modes can be easily selected in your PIR motion sensor controller. Figure below shows both the modes of a PIR sensor for the NCS36000DG PIR controller from ON Semiconductor.

Difference in motion detection for single and dual modes with PIR motion sensorsSingle and dual pulse modes for PIR motion sensors. [Source: ON Semiconductor]

Using the Analog Output

The analog output from a PIR can provide a huge amount of information. Theoretically, multiple sensors could be used to determine the dimensions, speed, distance, and direction of the object. The figure shown below is from Arduino serial plotter, where the correlation between the hand motion and the output can be easily seen.

Motion detection using the analog output from PIR motion sensors
Analog output from a PIR motion sensor showing various hand movements. [Source:
SparkFun]

The downside of using the analog output is the additional signal processing requirements. It is easy to view the signal on a serial plotter and process it in MATLAB or another program, but doing so on hardware adds significant complexity to your project.

Implementing a Prepackaged PIR Motion Sensor Module

One simply method to configure a prepackaged PIR sensor is to connect it to a battery and drive a simple LED with the sensor’s output pin, as shown here. This arrangement works well for testing the delay and sensitivity of your system. However, you normally want to use the digital or analog output to perform another set of tasks. In this case it makes more sense to use a PIR motion sensor with a microcontroller. Arduino or another development board, and some open-source code for your project, provide a good starting point for testing your prototype. It can also be used to drive and store the output signal from the PIR motion sensor.

Simple motion detector using Arduino and PIR sensorSet-up for a simple motion detector using Arduino UNO and a prepackaged PIR motion sensor. [Source]

You can find details of the implementation and the Arduino code here. One important thing to note at this point is that the PIR sensor takes up larger current when detecting the motion. The sensor from SparkFun (here) runs at approximately 3 mA while detecting motion and 80 uA during standby. If you have a more complex system with multiple sensors, this would be the time to start thinking about managing battery life.

A simple trick to reduce the current in a prepackaged PIR module is to remove the LED from the backside. The job of this LED is to simply tell you that sensor is ready, and this LED will blink every time motion is detected. You can pull out the LED once you have thoroughly tested and calibrated your PIR board.

Using Upverter to Design a PIR Motion Detection System

Whether you are designing a custom PIR motion sensor module, or you are purchasing one on the market, you’ll want to make a system that contains all the required sensors, microcontroller, power source, and some output module. The output module will be based on what you wish to do with motion detection. Some common examples can be triggering a relay to run a motor, sending data to the cloud (e.g., when counting the number of people crossing the sensor), or simply switch other devices on and off.

You can sign up for free and get access to the best browser-based PCB editor, schematic editor, and component database. Visit Upverter today to learn more.