07. Electronics design

This week, a continuation of week 5 where we learned how to manufacture PCB’s, was about designing these PCB’s before manufacturing and then programming them to do a task.

Understanding Basics

The first important step to start this learning process was re-learning about the basics of electronic circuits and how they work that we all learned at a young age in school. The below link is a brief explaination of that

Circuits 101!

sym

Next was undertsanding in detail about the parts and components of the PCB, their functions and what is to be connected where and the Do’s and the Dont’s, for which our Instructor , Kishan Chavda, gave us a tutorial session.

Schematic Symbols for components

Resistors

Resistors on a schematic are usually represented by a few zig-zag lines, with two terminals extending outward. Schematics using international symbols may instead use a featureless rectangle, instead of the squiggles.

sym

Potentiometers and Variable Resistors

Variable resistors and potentiometers each augment the standard resistor symbol with an arrow. The variable resistor remains a two-terminal device, so the arrow is just laid diagonally across the middle. A potentiometer is a three-terminal device, so the arrow becomes the third terminal.

sym

Capacitors

There are two commonly used capacitor symbols. One symbol represents a polarized (usually electrolytic or tantalum) capacitor, and the other is for non-polarized caps. In each case there are two terminals, running perpendicularly into plates.

sym

The symbol with one curved plate indicates that the capacitor is polarized. The curved plate represents the cathode of the capacitor, which should be at a lower voltage than the positive, anode pin. A plus sign might also be added to the positive pin of the polarized capacitor symbol.

Inductors

Inductors are usually represented by either a series of curved bumps, or loopy coils. International symbols may just define an inductor as a filled-in rectangle.

sym

Switches

Switches exist in many different forms. The most basic switch, a single-pole/single-throw (SPST), is two terminals with a half-connected line representing the actuator (the part that connects the terminals together).

sym

Switches with more than one throw, like the SPDT and SP3T below, add more landing spots for the the actuator.

sym

Power Sources

Just as there are many options out there for powering your project, there are a wide variety of power source circuit symbols to help specify the power source.

DC or AC Voltage Sources

Most of the time when working with electronics, you’ll be using constant voltage sources. We can use either of these two symbols to define whether the source is supplying direct current (DC) or alternating current (AC).

sym

Batteries

Batteries, whether they’re those cylindrical, alkaline AA’s or rechargeable lithium-polymers, usually look like a pair of disproportionate, parallel lines.

sym

More pairs of lines usually indicates more series cells in the battery. Also, the longer line is usually used to represent the positive terminal, while the shorter line connects to the negative terminal.

Voltage Nodes

Sometimes – on really busy schematics especially – you can assign special symbols to node voltages. You can connect devices to these one-terminal symbols, and it’ll be tied directly to 5V, 3.3V, VCC, or GND (ground). Positive voltage nodes are usually indicated by an arrow pointing up, while ground nodes usually involve one to three flat lines (or sometimes a down-pointing arrow or triangle).

sym

Diodes

Basic diodes are usually represented with a triangle pressed up against a line. Diodes are also polarized, so each of the two terminals require distinguishing identifiers. The positive, anode is the terminal running into the flat edge of the triangle. The negative, cathode extends out of the line in the symbol (think of it as a - sign).

sym

There are a all sorts of different types of diodes, each of which has a special riff on the standard diode symbol. Light-emitting diodes (LEDs) augment the diode symbol with a couple lines pointing away. Photodiodes, which generate energy from light (basically, tiny solar cells), flip the arrows around and point them toward the diode.

sym

Other special types of diodes, like Schottky’s or zeners, have their own symbols, with slight variations on the bar part of the symbol.

sym

Transistors

Transistors, whether they’re BJTs or MOSFETs, can exist in two configurations: positively doped, or negatively doped. So for each of these types of transistor, there are at least two ways to draw it.

Bipolar Junction Transistors (BJTs)

BJTs are three-terminal devices; they have a collector (C), emitter (E), and a base (B). There are two types of BJTs – NPNs and PNPs – and each has its own unique symbol.

sym

The collector (C) and emitter (E) pins are both in-line with each other, but the emitter should always have an arrow on it. If the arrow is pointing inward, it’s a PNP, and, if the arrow is pointing outward, it’s an NPN. A mnemonic for remembering which is which is “NPN: not pointing in.”

Metal Oxide Field-Effect Transistors (MOSFETs)

Like BJTs, MOSFETs have three terminals, but this time they’re named source (S), drain (D), and gate (G). And again, there are two different versions of the symbol, depending on whether you’ve got an n-channel or p-channel MOSFET. There are a number of commonly used symbols for each of the MOSFET types.

sym

The arrow in the middle of the symbol (called the bulk) defines whether the MOSFET is n-channel or p-channel. If the arrow is pointing in means it’s a n-channel MOSFET, and if it’s pointing out it’s a p-channel. Remember: “n is in” (kind of the opposite of the NPN mnemonic).

Digital Logic Gates

Our standard logic functions – AND, OR, NOT, and XOR – all have unique schematic symbols.

sym

Adding a bubble to the output negates the function, creating NANDs, NORs, and XNORs.

sym

They may have more than two inputs, but the shapes should remain the same (well, maybe a bit bigger), and there should still only be one output.

Integrated Citcuits

Integrated circuits accomplish such unique tasks, and are so numerous, that they don’t really get a unique circuit symbol. Usually, an integrated circuit is represented by a rectangle, with pins extending out of the sides. Each pin should be labeled with both a number, and a function.

sym

Because ICs have such a generic circuit symbol, the names, values and labels become very important. Each IC should have a value precisely identifying the name of the chip.

Unique ICs: Op Amps, Voltage Regulators

Some of the more common integrated circuits do get a unique circuit symbol. You’ll usually see operation amplifiers laid out like below, with 5 total terminals: a non-inverting input (+), inverting input (-), output, and two power inputs.

sym

Simple voltage regulators are usually three-terminal components with input, output and ground (or adjust) pins. These usually take the shape of a rectangle with pins on the left (input), right (output) and bottom (ground/adjust).

sym

Crystals and Resonators

Crystals or resonators are usually a critical part of microcontroller circuits. They help provide a clock signal. Crystal symbols usually have two terminals, while resonators, which add two capacitors to the crystal, usually have three terminals.

sym

Headers and Connectors

Whether it’s for providing power, or sending out information, connectors are a requirement on most circuits. These symbols vary depending on what the connector looks like, here’s a sampling.

sym

Motors, Transformers, Speakers, and Relays

We’ll lump these together, since they (mostly) all make use of coils in some way. Transformers (not the more-than-meets-the-eye kind) usually involve two coils, butted up against each other, with a couple lines separating them.

sym

Relays

Relays usually pair a coil with a switch:

sym

Speakers and Buzzers

Speakers and buzzers usually take a form similar to their real-life counterparts.

sym

Motors

Motors generally involve an encircled “M”, sometimes with a bit more embellishment around the terminals.

sym

Fuses and PTCs

Fuses and PTCs – devices which are generally used to limit large inrushes of current – each have their own unique symbol.

sym

The PTC symbol is actually the generic symbol for a thermistor, a temperature-dependent resistor.

Reference Link : https://learn.sparkfun.com/tutorials/how-to-read-a-schematic/all

Connections of Components

Next is identifying how all of the symbols are connected together.

Nets, Nodes and Labels

Schematic nets tell you how components are wired together in a circuit. Nets are represented as lines between component terminals. Sometimes (but not always) they’re a unique color, like the green lines in this schematic.

sym

Junctions and Nodes

Wires can connect two terminals together, or they can connect dozens. When a wire splits into two directions, it creates a junction. We represent junctions on schematics with nodes, little dots placed at the intersection of the wires.

sym

Nodes give us a way to say that “wires crossing this junction are connected”. The absences of a node at a junction means two separate wires are just passing by, not forming any sort of connection. (When designing schematics, it’s usually good practice to avoid these non-connected overlaps wherever possible, but sometimes it’s unavoidable).

sym

Net Names

Sometimes, to make schematics more legible, we’ll give a net a name and label it, rather than routing a wire all over the schematic. Nets with the same name are assumed to be connected, even though there isn’t a visible wire connecting them. Names can either be written directly on top of the net, or they can be “tags”, hanging off the wire.

sym

Nets are usually given a name that specifically states the purpose of signals on that wire. For example, power nets might be labeled “VCC” or “5V”, while serial communication nets might be labeled “RX” or “TX”.

Reference Link : https://learn.sparkfun.com/tutorials/how-to-read-a-schematic/all

After understanding everything above, it’s time to start working with eagle

Working with Autodesk eagle

Autodesk EAGLE is an electronic design automation (EDA) software. Enabling printed circuit board (PCB) designers to seamlessly connect schematic diagrams, component placement, PCB routing, and comprehensive library content.

Autodesk Eagle can be dowloaded from here.

https://www.autodesk.com/products/eagle/free-download

After a tutorial from our instructor and watching a few online videos, I started working hands on on the software. The task was to redraw the Hello Echo board. Below is the schematic of the board

sym

Additional components:

Note: In the second attempt, I’ve added a power LED(and a 1kΩ resistor) which indicates when the board is getting Electric Power.

sym

sym

sym

sym

sym

sym

sym

sym

sym

sym

sym

sym

Note : This is a useful link I found which helped me understand this process better.

Designing the board

sym

sym

sym

sym

sym

sym

sym

sym

sym

A Helpful link : Board Layouting

Seperating the traces and Cut file

sym

sym

sym

sym

Making the board

Follow the steps in week 5 documentation to use the trace and cut file to mill the board.

The finished board, after soldering all the components, should look something like this.

sym

Programming

Being a first timer in programming, I referred to several tutorials before actually starting to program the board. The link below was really helpful.

Programming using arduino IDE

Programming using FabISP

(Note: Do not use the Windows app as it gives an error while programming)

datasheet

datasheet

and find the ATTinycore by Spence Konde and install the latest version.
datasheet

(Note : Make sure you have the schematic of the board you’re programming on hand)

datasheet

The connections made are:

Thi board diagram can be referred from below image:

datasheet

datasheet

datasheet

datasheet

datasheet

All the files for this week are attached here

Group Work

The Group Assignment was using the test equipment in your lab to observe the operation of a microcontroller circuit board. The group page can be found here