Till KTH:s startsida Till KTH:s startsida

Ändringar mellan två versioner

Här visas ändringar i "Lab1 wiki (en)" mellan 2015-08-29 10:55 av William Sandqvist och 2015-08-29 11:14 av William Sandqvist.

Visa < föregående | nästa > ändring.

Lab1 wiki (en)

english.gif

Chips and Breadboard dil16.png

At the labs, we use digital circuits from the so-called 74-series of capsules of the DIL type (Dual In Line) for hole PCB assembly. See the picture. This is today considered to be pure spare parts, and development has changed to completely different package types for surface mounting.

These old circuits, are however unbeatable for experiments with simple connections on the breadboard. Breadboard are now also used with very complex circuits - then mounted on Breakout Board (a breakout board has the same pin spacing DIL) circuits. Working with circuits on the breadboard is therefore the natural working method for project work and theses for school and hobby activities.fritzing.gif

Fritzing Is the name of a software for documenting breadboard connections, and generate circuit diagrams, and possibly manufacture printed circuit boards. (This program will be used in the course IE1206 but is not needed for this course). Anyone interested can download it now.

Data sheets for laboration circuits The digital components have capsules with 14 or 16 pins. For orienting the capsules they have an outlet on the short side, and there can also be a "dot" to mark the pin number 1. Two of the pins should be connected to the supply voltage and ground and the other pins are used as logic inputs and outputs, sometimes a pin can lack connection to the inside of the chip, it is then called NC (no Connection). The pin function is stated in the data sheets, and to some extent also in the symbols in the figures.

Some warnings. Two outputs may not be connected with each other. It will be a so-called short-circuit and the output value becomes uncertain 1/0 (?). Unconnected inputs picks up electrical interference and must therefore also be considered unsafe 1/0 (?). They should therefore always be connected to an appropriate fixed level 1/0 depending on the function.

wiki.gif 7400-series

pdf 7400.pdf pdf 7402.pdf pdf 7408.pdf pdf 7432.pdf 7400.png 7402.png 7408.png 7432.png pdf 7474.pdf pdf 7486.pdf pdf 74175.pdf pdf 74283.pdf 7474.png 7486.png 74175.png 74283.png Breadboard muxboard.png insideboard.png

Breadboard at the lab. Supply voltage and ground are already connected to circuitry on the labequipment. To the right is a picture of the coupling underside of the deck with the contact springs visible, and a picture of a contact spring for five holes.

Breadboard at the lab. The chips are inserted in the holes on the plastic isolated side. On the underside there are contact springs of metal that electrically connects to the pins and for further connection to four additional holes. Connector cables can then be entered in the holes to pass on the connection to other pins.

The contact springs are in groups of five holes vertically. This corresponds to a connection point (a node) in a wiring diagram. In the middle of the breadboard is an insulating "ditch" so that the pins on the chips both long sides are isolated from each other. Coupling on long sides of the board have extra long contact springs, so that all the holes are here connected to each other. The long side holes are used to connect the supply voltage and ground to the other circuits. Upper long side holes are all connected to + 5V and lower long side to ground (0V).

Many breadboard has double rows of holes on the long sides - each side of the board can then have both the supply voltage and ground. Then you can avoid having to draw cables over the chips, this facilitates in the case that one chip fails and must be replaced.

Long breadboards often has long side contact springs divided into two sections and two rows. The sections can then be used for several different supply voltages to the circuits - no standard for this does exist - for such a case, you simply carefully has to find out what applies!

Other componentssw3led.png To generate the logical input signals we use DIP switches and green LEDs. Note that we are using special LEDs with built-in current limiting resistors (they cost a penny more, but simplifies the circuit)! When the switch is open, the logic signal is 0 on the yellow line, because the LED is off and keeps the wire at 0V. When the switch is closed, it is supplying current to the green LED, the voltage is + 5V, and the LED lights, and the logic signal on the yellow wire is then 1. You operate the DIP-switch with a screwdriver tip.

redled.gif

To se the logic circuitry output levels, we use red LEDs.

inverterboard.png

From schematic to breadboard conection. In the diagram we have a NAND gate connected as inverter. In reality, on the breadboard we have to select one of the four NAND gates in the chip. A jumper (gray jumper wire) connects the two inputs together. Yellow wire IN leads to the input and the green line OUT to the gate output. Supply voltage (red line) and ground (black wire) is also connected to the chip.

Simulation of logic functions
* Can we check logic functions without having to connect circuits?
The original way to verify that the electronic costructions are functioning as intended was to hook them up and then make control measurements on the circuit. As electronics became more complex and integrated, this has become difficult - while computer programs have been developing so that it is now natural to rely on simulations.

1973 the simulation program SPICE (Simulation Program with Integrated Circuit Emphasis) was developed of the University of California, Berkeley, for use in the design of integrated electronic circuits. It is this program that is still used today by electronics designers - and we use a more modern version, LTSpice, in this course!

Spice is an analog simulator, it thus uses continuous values of voltages and currents. This is necessary for those who will design integrated circuits, but to show logic functions we could be content with a simpler simulator that only expects 1 and 0. The computational power of today's PCs are so high that we do not have to choose![IMAGE]

Visit: http://www.linear.com/ to download and install the program LTspice on your own computer. You do not need to register if you do not want to. The installation is then "straightforward" as described on the website. The program is available for most operating systems, but this tutorial describes the appearance under Windows.

Course simulation files The program is installed on school computers in lab Ka-305 and in computer room Ka-309. In school you have to unzip the course simulation files in your server folder as H:\IE1204 . (at home you can unzip the files in any folder place). You start LTSpice by doubleclick on any [IMAGE] *.asc - file. (You can also start the program scad.gif LTSpice from the start menu).

[IMAGE] If you click on the simulation icon in the program a simulaton will start with the settings we have choosen for you. Then you can simply proceed by changing values and other preferences to explore all the course circuits!


* zip IE1204.zip all course simulation files.

A first simulation with LTSpice We use LEDs with built-in resistors - what is it and why? We take the help from the simulator LTSpice to understand this! At the same time, we examine how to draw circuit diagrams, and simulate a circuit.

Make an electronic schematic Make an electronic schematic with a lightdiode!

redled.gif

scad.gif Start LTspice. File - New Schematic

create_new_schematic.gif

At school computers it is then important to save files in your server folder H:\

You get the components from the Edit - menu. Or if they already exists from the Shortcut menu.

menu_icon.gif

r_icon.gif Resistor c_icon.gif Capacitor l_icon.gif Inductor cmp_icon.gif Component wire_icon.gif Wire label_icon.gif Label net

Important! The Ground symbol gnd_symbol.gif place_gnd.gif¶

Choose component type, place, click, press <esc> when you no longer want to continue to place the same component.¶

To rotate the component press Ctrl-R.¶

gnd_icon.gif Every schematic must have a ground symbol GND. Place it at the first so it not will be forgotten. This is absolutely necessary - no simulations work otherwise!¶

Voltage source Then we need a voltage source (a battery). It is available in component librariescmp_icon.gif opens component window. In the text box, you can search for all components, the component name is voltage but it can be enough to write the first letters vo.. for it to be found.¶

vo.gif¶

Place thevoltage source with the mouse, click and then press <esc>. The voltage source has the label/name V1 and the value/model V.¶

change_v1.gif¶

hand_pointer.gif To change a component, now the voltage source, move the mouse over the symbol V1 so that it assumes the shape of a hand - right click and fill in the parameter DC value [V] to 5. Now we have a 5V battery.¶

v_source.gif¶

diode_icon.gif Diode cmp_icon.gif A diode is in the component libraries. In the text box search the component name diode (dio .. could be enough). Then place the diode in the schematic.¶

dio.gif¶

In the schematic the diode has the label/name D1 and the value/model D.¶

d_change.gif led.gif¶

We could not use any common diode - we need a LED (Light Emitting Diode), and such model is not the supplied by the program (?) (Ordinary diodes are made from silicon, the LEDs are made of gallium arsenide - the differences in data are big, not just that the LED emits visible light!).¶

Now, usually, most providers of electronics publish SPICE models for their components, so after a bit of searching, we have found the following model for a LED (we are not here concerned about what the different parameters mean):¶



.model LED D(Is=1e-19 N=1.6 Rs=2.5 Eg=2.1) ¶

First move the mouse pointer to the D1 model name D so that it assumes the shape of the letter I, right click and replace the model D against any other name - eg. LED. Next, we must describe the model LED for the simulator. It can easiest be done by entering the model as a SPICE directive directly somewhere on the schematic.¶

directive_icon.gif Choose SPICE directive on the Edit menu. Copy and paste the model text from the above. (Note that the initial “point” belongs to the directive!) Click OK, and then place the text on some empty place on the schematic.¶

led_text.gif¶

led_model.gif¶

(For long model texts or if you have many model descriptions it becomes unwieldy with the text directly in the schematic, then they could be placed in text files with extension *.lib.)¶

Wires wire_icon.gif Click on Wire. Draw lines by clicking at the start, at every bend and at the endpoint. Finish with <Esc>.¶

move_icon.gif Move. Maybe you need to move the components, or the texts?cut_icon.gif Cut. Maybe you have to delete some faults to start over?¶

sch1.gif¶

Simulation Spice simulation are of many different types. Transient (time sweep), AC Analyses (frequency sweep), DC sweep, Noice, DC Transfer, DC op pnt. For the laboration preparations you will need to use Transient and DC op pnt.¶

sim_profil_dc-sweep.gif¶

Under the Simulate menu, Edit Simulation Cmd, you can set what simulation to be done.¶

Under the tab DC sweep we specify that the source V1 will change linearly from 0V up to 5V in steps of 0,01V (increment). We will then be able to see how the current through the diode changes at different voltages – we will not, however, see if the LED lights (such a fun simulator is it not).¶

Click on OK, and place the simulation command on schematic. (An experienced user could write any simulation command directly without going through the menu Edit Simulation Cmd).¶

sim_cmd.gif¶

Simulate, Waveform viewer simulate_symbol.gif wave_symbol.gif¶

simulate_icon.gif Run. Simulate by clicking on the simulate icon.¶

wave_icon.gif Waveform Viewer is shown¶

probe_voltage.gif Move the mouse to any wire, then it takes the form of a voltage probe – left-click to select to display the voltage with the waveform viewer probe_current.gif Move the mouse to any component, then it takes the form of a current probe – left-click to select to display the current with the waveform viewer. simdone.gif¶

current_probe_icon.gif ¶

Now move the mouse to the diode symbol and left-click when it changes to a current probe. Now, the diode current will be displayed in the waveform viewer.¶

We can see that the relationship between voltage and current of the diode is non-linear (with a "knee" at 1.5V). When the diode is connected to a 5V power supply, the current is 1.3A, 1300 mA. Normal current for a small LED is 11.5 mA. The current is then 100 times too high when the LED is connected directly to 5V! The LED can not withstand this (100 times the current) – this it is nothing the simulator shows – but it is something that a trained engineer should still understand. (Sure it would have been fun with sound effects and animations, but remember that the simulator originates from the 1970s!).¶

Leave the simulation by closing the Waveform window¶


* LEDs must have series resistors to limit the current to the desired value. We use LEDs with integrated resistor - what value should this resistor have?
cut_icon.gif Cut away some wires to make way for a resistor. r_icon.gif place the resistor.¶

r_series.gif r_change_schematic.gif led_r-complete.gif¶

r_change.gif Move the mouse over R at R1 so that the pointer assumes the shape of the letter I – right click and fill in the window Enter new Value for R1 to eg. 1000 (1000 ohm, can also be written 1k).¶

Simulate menu, Edit Simulation Cmd, click on the tab DC op pnt. Click on OK and place the text in the schematic.¶

The previously simulation command has now received a semicolon in front of it (= commented out). Now the command is .op. This is the simplest simulation type, we will only get a text list of voltages and currents in the circuit.¶



--- Operating Point --- V(n002): 1.58402 voltage V(n001): 5 voltage I(D1): 0.00341598 device_current ¶

The current through the LED is apparently 3.4 mA – we want to 11.5 mA (according to information in the data sheet) – so we can reduce the value of R1. Do so and simulate your way to a reasonable value. Enter this value of the series resistor in the preparations for Lab1. We can now assume that there is a similar resistance that is built into our LEDs.¶

It is now so common with LEDs so that some websites have adopted a script to calculate the series resistor. You can try the Online series resistor calculator (use this value for forward voltage Vf = 2.1 V).¶


* If you have had major problems to draw this schematic, here we have it ready made as [IMAGE] ledx.asc among the course simulation files. Dubble click on that file and then simulate with simulate_icon.gif Run.
S