ECE 477 Digital Systems Senior Design Project Rev 8/09

Homework 6: Printed Circuit Board Layout Design Narrative

Team Code Name: ______HOARD Robotics______Group No. __02__

Team Member Completing This Homework: _____Jamis Martin______

E-mail Address of Team Member: __jfmartin___ @ purdue.edu

Evaluation:

SCORE

/

DESCRIPTION

10 /

Excellent – among the best papers submitted for this assignment. Very few corrections needed for version submitted in Final Report.

9 /

Very good – all requirements aptly met. Minor additions/corrections needed for version submitted in Final Report.

8 /

Good – all requirements considered and addressed. Several noteworthy additions/corrections needed for version submitted in Final Report.

7 /

Average – all requirements basically met, but some revisions in content should be made for the version submitted in the Final Report.

6 /

Marginal – all requirements met at a nominal level. Significant revisions in content should be made for the version submitted in the Final Report.

* /

Below the passing threshold – major revisions required to meet report requirements at a nominal level. Revise and resubmit.

* Resubmissions are due within one week of the date of return, and will be awarded a score of “6” provided all report requirements have been met at a nominal level.

Comments:

Comments from the grader will be inserted here.

1.0  Introduction

HOARD (Horde of Autonomous Robotic Devices) is a collection of small robots that navigate autonomously and have the ability to communicate with each other over an ad hoc RF network. Each individual robot is equipped with a belt of IR LEDs and sensors for object avoidance and directional proximity to the other agents. One of the functions that they will demonstrate will be seeking out a “chemical spill”, which will be simulated by a bright light, detectable by two ambient light sensors fitted to each robot.

Although it may seem like there are not many components to each robot, the congestion created by having extremely small packaging (about the size of a palm) makes even the normally trivial PCB layout considerations laborious. A schematic of the robots can be seen in Appendix A: Figure 1. The three notable areas of concern for the robots are component placement, the microcontroller, and the power supply. The importance of component placement in the small packaging and special routing considerations for the RF module and analog sensors is discussed in Section 2.0.

Can any robot perform without a “brain”? No, this is why special considerations must be taken when dealing with the microcontroller. Every component of the robots interfaces with the microcontroller so if there is any interference it is possible for the robot to malfunction. This could include not being able to avoid objects if the analog signals from the IR sensors are in a noisy environment. This and many other PCB layout design considerations relating to the microcontroller are addressed in section 3.0 below.

Finally, nothing would run without a power supply. Yet, power and ground terminals can cause some of the greatest complications within a circuit. Ground loops or careless routing can cause very adverse effects to signals. Also, improper trace sizes can cause failure to a line when overloaded. All of these issues are reviewed in Section 4.0.

2.0  PCB Layout Design Considerations - Overall

The most difficult part of keeping the robots at a small size is determining the placement of components on the PCB. Typically a PCB can be separated into different sections such as high-current components, analog circuitry, and digital parts. The robots have analog IR sensors surrounding the perimeter of the board with IR LEDs right underneath each of them, which means that there are analog signals going to every corner of the (hexagonal) board. These analog signals need to be protected from high-current and digital lines. This will be achieved by routing these signals around the outside of the board instead of taking the shortest path to the microcontroller, which will avoid possibly routing through a noisy environment. Any noise introduced to the analog IR sensors could inhibit the robots from adequately avoiding obstacles. Also, if noise is introduced to the analog ambient light sensors, a false reading of light intensity could be obtained, which may lead the robots away from the actual location of the brightest light.

Another major component that requires special consideration is the RF module each robot has (see Appendix A: Figure 2 for schematic). The MRF24J40MA requires an area 1.2” clear around the antenna for best performance [2]. Additionally, a PCB ground plane 0.4” around the base acts as a counterpoise to the antenna to substantially enhance the performance of the module. The module simply cannot be placed directly on the main board because it would have to be placed between two IR sensors and have all traces routed around the ground plane. This would take up more space than is available and create even more difficulty routing, so the RF module is placed on a daughter board that is mounted perpendicular to the main board (see Appendix B: Figure 4). This arrangement not only allocates the necessary space for a ground plane, but also eliminates any obstacles around the antenna.

Despite the packed board, some general PCB guidelines must remain followed for proper safety and operation. 45 degree turns will be used instead of 90 degree turns in order to decrease transmission reflections. The minimum trace/space is 10/12 mil for regular traces and 56 mil for power traces. Vias are constructed with a 20 mil drill size and a 40 mil outer diameter to ensure that there are no unreliable connections. If these constraints are violated, it is possible to overload a trace and have it fail. Space will instead be saved by using predominantly surface mount components. Also, decoupling capacitors will be placed on each IC in order to reduce coupling.

3.0  PCB Layout Design Considerations - Microcontroller

The MICROCHIP PIC18F26J13 microcontroller is the brain of the entire robot, so every precaution is taken when it is placed on the PCB [1]. Fortunately, the microcontroller uses an internal oscillator so there is no layout for that. Every component on the PCB interfaces with the microcontroller including analog sensors, an LED driver, and an H-Bridge motor controller [4][6]. As previously stated in Section 1.0, the sensors surround the entire perimeter of the board and space is tight for everything else. For these reasons it is essential to place components around the microcontroller so that they are as close as possible to the pins that connect them. This ensures short trace lengths and a low number of crossing signals.

According to the PIC18 datasheet, the Motorola App Note AN1259, and previous PCB layout experience, the decoupling capacitors need to be placed as close to the power and ground terminals as possible. The easiest way to do this is to place them underneath the microcontroller where they are out of the way of any other traces and can reside half way between the pins. If not placed close to the pins, the trace will just act like an inductor and prohibit the decoupling capacitor from compensating for sudden flows of transient current.

The microcontroller will also need to be programmed and debugged while on the PCB board. To achieve this, a 5 pin header will be placed on the board that will give a connection to the ICSP programmer. In order for ICSP to function properly, the pins that are used to program must be disconnected from the rest of the circuit. Thus, jumpers will be placed on the board as a means of disconnecting these lines. They can also serve as additional testing pins while debugging[5].

4.0  PCB Layout Design Considerations - Power Supply

The robots have components that run off two different voltages. An 8.4V NiMH rechargeable battery pack supplies power to the H-Bridge, motors, and LED drivers. A 3.3V voltage regulator supplies power to the microcontroller, sensors, and RF module. The regulator is rated for up to 250mA, but it will never exceed 60mA [3]. This means that there is barely any heat dissipation, but the regulator will not be placed directly next to any components just to be safe. The high current lines will be routed away from sensitive lines, such as the RF module, as to not create any unnecessary interference.

Proper trace sizes will be used for power lines. As stated in Section 2.0, this will be 56 mil. The 3.3V lines will be routed away from the 8.4V lines, which will be easier since components with different voltages are separated on the PCB. With such a tight layout, it is almost impossible to keep power lines away from other signal traces though. To reduce interference, power traces will cross others at 90 degrees whenever possible as well as be routed away from sensitive areas.

Ground layout, on the other hand, can cause problem for the circuit if not designed properly. Since ground is needed basically everywhere around the PCB and there is no way to route individual lines for analog, digital, and high current devices, a ground plane is the optimal choice for this application (see Appendix B: Figure 3). This provides an easily accessible low impedance pathway for all return signals around the entire board. Decoupling capacitors, as previously discussed, will also be placed at each IC to reduce EMI coupling. In addition, a bulk capacitor will be placed near the battery terminal to provide the necessary power to recharge the decoupling capacitors after current glitches.

5.0  Summary

This report has addressed the different PCB layout design considerations for the HOARD Robotics project. The confined area that all the components are placed in inherently makes routing difficult. So, the layout of the components is especially important in order to keep trace lengths short, keep the number of crossed signals low, and keep analog/digital/high-current lines segregated. This helps to reduce noise on the analog IR sensors surrounding the perimeter of the robots so that they can accurately avoid obstacles. It also alleviates any interference with the RF module, which allows the robots to communicate with one another.

The PIC18 microcontroller is the brain of the robots. Every component on the board interfaces with it. Thus, special care must be made so that it operates properly. This includes placing bypass capacitors as close to the power and ground terminals as possible to compensate for the transient current caused by switching. A 5 pin header must also be placed on the PCB to facilitate ICSP (In Circuit Serial Programming). Jumpers are also placed on the ICSP pins to disconnect them from the rest of the circuit while programming and they can also serve as debugging ports.

The two different voltages that power components on the robots provides a need to segregate different components and give them separate supply rails. Since ground is needed abundantly throughout the PCB and there isn’t room to send single-point rails, a ground plane is the ideal choice. Decoupling capacitors are used on all the ICs to protect them from EMI and a bulk capacitor is placed near the battery terminals to recharge the decoupling capacitors when needed.

Even though space is limited on the robots’ PCB, proper design techniques are not violated in order to save space. Appropriately sized traces are used so that traces do not fail when overloaded and proper via sizes are used so that there are no unreliable connections. Space will be saved by using predominantly surface mount components and designing an efficient layout. All of these PCB layout considerations will make HOARD robots function as intended.


List of References

[1]  Microchip Technology. “PIC18F47J13 Family Data Sheet”, [Online], Available: http://ww1.microchip.com/downloads/en/DeviceDoc/39974A.pdf . [Accessed February 24, 2011]

[2]  Microchip Technology. “MRF24J40MA Data Sheet”, [Online], Available: http://ww1.microchip.com/downloads/en/DeviceDoc/39776C.pdf . [Accessed February 24, 2011]

[3]  Microchip Technology. “MCP1702 Regulator Data Sheet”, [Online], Available: http://ww1.microchip.com/downloads/en/DeviceDoc/22008E.pdf . [Accessed February 24, 2011]

[4]  Microchip Technology. “TC4468 Quad Driver”, [Online], Available: http://ww1.microchip.com/downloads/en/DeviceDoc/21425b.pdf . [Accessed February 24, 2011]

[5]  Motorola. “Application Note AN1259”, [Online], Available: https://engineering.purdue.edu/ece477/Homework/CommonRefs/AN1259.pdf . [Accessed February 24, 2011]

[6]  On Semiconductor. “NCV7702B H-Bridge Driver”, [Online], Available: http://www.onsemi.com/pub_link/Collateral/NCV7702B-D.PDF . [Accessed February 24, 2011]

Appendix A: Circuit Schematics

Figure 1: Main Board

Figure 2: RF Daughter Board

Appendix B: Initial PCB Layout

Figure 3: Main Board

Figure 4: RF Daughter Board

-1-