Upcoming SlideShare
×

Introduction to Microcontrollers

11,784 views

Published on

An introduction to microcontrollers centered around Arduino.

24 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Creative post . BTW , others are requiring a DA 31 , my company saw a blank version here https://goo.gl/w84yY4.

Are you sure you want to  Yes  No
• hello Mike, I am teaching a class on microcontrollers this spring semester. Is it possible to use your slides for this class at the university? thanks

Are you sure you want to  Yes  No
• this site is very useful for students, thanks

Are you sure you want to  Yes  No

Are you sure you want to  Yes  No
• Great ! seems a right fit for beginners !

Ram

Are you sure you want to  Yes  No
Views
Total views
11,784
On SlideShare
0
From Embeds
0
Number of Embeds
2,180
Actions
Shares
0
1,753
7
Likes
24
Embeds 0
No embeds

No notes for slide

• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant
• Capacitor: DC block, consume reactive power, bring p.f. to unity, filter, spike remover, tank/spring/small battery.

Inductor: Transformer, Spark coil/ignition, Solenoid, remove EMI from long wires, choke AC, flywheel

Resistor: Dissipate energy as heat, limit current, drop voltage, bleeder resistor

Reactance: X=XL-XC. XL = 2*pi*f*L, XC = 1 / (2*pi*f*C)
Resonance: Xc = XL
fo = 1 / (2*pi*sqrt(LC))
Wo = 2*pi*fo
Q = XL/R, Xc/R
Time Constant = RC = L/R, TimeFinal = 5*TimeConstant

• bipolar power supply: neg terminal sucks up current, pos terminal sources current
• bipolar power supply: neg terminal sucks up current, pos terminal sources current
• bipolar power supply: neg terminal sucks up current, pos terminal sources current
• bipolar power supply: neg terminal sucks up current, pos terminal sources current
• bipolar power supply: neg terminal sucks up current, pos terminal sources current
• bipolar power supply: neg terminal sucks up current, pos terminal sources current

• Introduction to Microcontrollers

1. 1. Introduction to microcontrollers. presented by Michael Parks, PE last revision: 24 April 2010
2. 2. what is a microcontroller? A tiny computer that is programmable to run one program, typically in a continuous manner. Serves as a bridge between the physical world and the computer world. Interacts with the “real world” through transducers such as sensors, actuators, motors, lights, etc. 4 Functions: Input, Process, Output, Communicate Abbreviated MCU, uC, μC 2
3. 3. what can it do? In a nutshell, anything you want it do. a. Two-way interaction with the real-world b. Hardware and software needed for your design Some examples I have done: a. RFID controlled lighting b. Motion controlled lighting c. Range detector d. Laser light game Input from Output to Process data via Real-World via Real-Word software running Transducers via Transducers (Actuators, on MCU hardware (Sensors) Indicators) 3
4. 4. choosing the right microcontroller. Development environment usability Analog input Number of digital I/O pins Speed of execution Price Amount of memory Power Complexity level based on knowledge and project goals a. High-Level: Teleo System, I-Cubed, Lego Mindstorms b. Medium-level: Parallax BASIC Stamp, Arduino c. Low-level: PIC chips, SX chips, Atmel (AVR) chips 4
5. 5. the Arduino. Open Source Hardware running the open source programming language Wiring. Can interact with a PC through many languages, most popular is Processing. 5
6. 6. anatomy of a microcontroller. UART DIGITAL I/O INTERRUPT CPU CONTROLLER INTERNAL PULSE WIDTH TIMERS MODULATION DATA MEMORY A/D PROGRAM CONVERTER MEMORY 6
7. 7. anatomy of a microcontroller. UART DIGITAL I/O INTERRUPT CPU CONTROLLER INTERNAL PULSE WIDTH TIMERS MODULATION DATA MEMORY A/D PROGRAM CONVERTER MEMORY 6
8. 8. anatomy of a microcontroller. UART DIGITAL I/O INTERRUPT CPU CONTROLLER INTERNAL PULSE WIDTH TIMERS MODULATION DATA MEMORY A/D PROGRAM CONVERTER MEMORY 6
9. 9. anatomy of a microcontroller. UART DIGITAL I/O INTERRUPT CPU CONTROLLER INTERNAL PULSE WIDTH TIMERS MODULATION DATA MEMORY A/D PROGRAM CONVERTER MEMORY 6
10. 10. anatomy of a microcontroller. UART DIGITAL I/O INTERRUPT CPU CONTROLLER INTERNAL PULSE WIDTH TIMERS MODULATION DATA MEMORY A/D PROGRAM CONVERTER MEMORY 6
11. 11. microcontroller guts. 7
12. 12. microcontroller guts. Central Processing Unit (CPU): CPU does all the arithmetic and logic operations. It controls the ﬂow of execution of instructions. 7
13. 13. microcontroller guts. RANDOM ACCESS MEMORY (RAM): RAM holds the set of instructions (program), i.e. being executed by the CPU. It holds important data required by the program. It holds some important data structures like ʻstackʼ. It is volatile. 7
14. 14. microcontroller guts. FLASH MEMORY: Flash memory is basically EEPROM. It holds the program written by the user. The program can be erased or written here many times. WATCHDOG: Circuitry to prevent behaviors that would have negative impacts to microcontroller. 7
15. 15. microcontroller guts. I/O PORTS: Each port is made up of n-pins ( mostly 8 pins). Each pin can be conﬁgured as either input pin or output. If a pin is input pin, it accepts data from the device it is connected to. If a pin is output pin, it sends the data to the device it is connected to. 7
16. 16. microcontroller guts. ANALOG-TO-DIGITAL CONVERTER (DAC): Most of the real world signals are analog in nature. But a microcontroller is a digital device, thus it cannot process analog signals. ADC digitizes an analog signal and gives it to the microcontroller for further processing. 7
17. 17. microcontroller guts. TIMERS: In many applications, time keeping is a must. Microcontrollers have timers to measure time. SERIAL PORT: Microcontrollers can speak to computers or other digital equipment via a serial port. 7
18. 18. Arduino “Duemilanove” specs. Built around the ATmega168 microcontroller 14 digital I/O pins (6 provide PWM output) 6 analog inputs (ADC provides quantization) 5 V DC, 40 mA per I/O pin 16 KB of ﬂash memory 1 KB of SRAM 512 bytes of EEPROM 16 MHz clock speed 2 interrupt pins Supports SPI, I2C, UART 5V TTL serial 8
19. 19. A look at the software side. 9
20. 20. computer science 101. DATA TYPES a. Variables (local and global) i. Numbers: integer, long, float , double ii. Digital: bit, byte, word iii. Logic: Boolean iv. Array v. Text: char, string b. Signed versus unsigned c. Static variables and Constants d. Keywords or reserved words e. Converting between data types f. Structures (C user defined data type) CONTROL STRUCTURES a. Operators: arithmetic, comparison, boolean, bitwise, compound b. if...then...else (conditional statements) c. Loops i. main or event loop (infinite loop) ii. while iii. do..while iv. for v. continue, break, return d. Recursion e. Switch case f. Functions (math and trig) / procedures / subroutine / commands 10
21. 21. computer science 201. OTHER CONCEPTS a. Comments b. Libraries (#include) c. Flags d. Pointers e. Interrupts f. Random number generator PROGRAMMING PARADIGMS a. Syntax (proper combination of words) versus semantics (meaning of those words) b. Object-oriented programming versus sequential - class, objects, inheritance, polymorphism, virtual functions c. Psuedocode before you code d. Rapid Development and SCRUM e. Types of Testing: Black Box, White Box, Unit, Integration, Regression, System, Usability, Acceptance, Alpha, Beta, Security, Stress, Compatibility. MICROCONTROLLER SPECIFIC FUNCTIONS a. Digital I/O b. Analog I/O c. Advanced I/O: tone, pulses d. Time e. Serial Communications 11
22. 22. debugging tips. writing software is an iterative process. a. code, verify, debug, compile, upload, reset, and run. b. Results of a run used to inform next coding cycle. c. 1/10th of time is coding, 9/10th of time is debugging keep the program small. a. add new functionality in small increments. b. key functions ﬁrst, nice-to-haves last save different versions know every line of code (LOC or SLOC) look at all variables use debug statements and a debugger tool 12
23. 23. “Wiring” programming overview. Arduino programs are known as “sketches” Every program has at least two routines a. setup( ) b. loop( ) digital and analog input / output serial communications 13
24. 24. Arduino sketch. // set pin numbers: Declare global const int buttonPin = 2; const int ledPin = 13; // the number of the pushbutton pin // the number of the LED pin variables and int buttonState = 0; // variable for reading the pushbutton status constants void setup() { // initialize the LED pin as an output: pinMode(ledPin, OUTPUT); // initialize the pushbutton pin as an input: } pinMode(buttonPin, INPUT); Setup pins and baud rate void loop(){ // read the state of the pushbutton value: buttonState = digitalRead(buttonPin); // check if the pushbutton is pressed. // if it is, the buttonState is HIGH: if (buttonState == HIGH) { // turn LED on: digitalWrite(ledPin, HIGH); Loop } else { continuously // turn LED off: digitalWrite(ledPin, LOW); } } 14
25. 25. Arduino sketch commands pinMode( ) serial.Begin( ) serial.Read( ) digitalRead( ) digitalWrite( ) analogRead( ) analogWrite( ) delay( ) millis( ) randomSeed( ) random( ) pulseIn( ) ShiftOut( ) 15
26. 26. “Processing” programming language. Combination of programming language and development environment that runs on personal computer (Windows, Linux, or Mac). Can listen for packets from MCU and process using the power of the PC. Can use more powerful software such as Flash, Visual Basic, C#, Java to manipulate/display/ interact with the data from the MCU. Export to applets for the Web or desktop app. 16
27. 27. more on “Processing” Every piece of software written in Processing has: a. setup( ) b. draw( ) Import libraries a. import processing.serial.*; b. Serial myPort; Draw and Redraw Easy to interface with graphics, video, sound, mouse, keyboard, web, text ﬁles 17
28. 28. “Processing” sketch. void setup() { size(400, 400); Declare stroke(255); variables and } screen void draw() { characteristics background(192, 64, 0); line(150, 25, mouseX, mouseY); } draw is the main loop that runs continuously 18
29. 29. understanding data packets. Create packet of data, based on sensor inputs and computed values to be transmitted on a repetitive or as needed basis. System Header Sensor1 Sensor2 Status Trailer (8 bits) (32 bits) (32 bits) Flags (8 bits) (8 bits) 88 BIT DATA PACKET 19
30. 30. understanding data packets. Create packet of data, based on sensor inputs and computed values to be transmitted on a repetitive or as needed basis. System Header Sensor1 Sensor2 Status Trailer (8 bits) (32 bits) (32 bits) Flags (8 bits) (8 bits) 88 BIT DATA PACKET Alarm Status Operating Mode Comm Mode Failure (2 bits) (3 bits) (2 bits) (1 bit) 19
31. 31. understanding data packets. Bitwise logic operations Bitmasking Checksum Parity Bits Start Bit / Stop Bit Binary Coded Decimal (BCD) ASCII versus Raw Byte (Raw limited 0 -> 255) Message Handling a. Punctuation using delimiting character b. Call and Response (Handshaking) 20
32. 32. other software skills. Get to know Hypertext Markup Language (HTML), mySQL (Standard Query Language), and Hypertext Preprocessor (PHP). Will be useful for writing apps that interact over the Internet. Get some web space that supports PHP and mySQL. Use a good Serial Communication app such as PuTTY. Also try Gobetwtino (Windows only). Always check to see if someone has written a library before writing your own code. No need to reinvent the wheel. Give credit though! 21
33. 33. A look at the hardware side. 22
34. 34. electrical engineering 101. Voltage (volts): electrical potential - 5V = ‘1’, true, on. 0V = ‘0’, false, off (Digital) Current (amps): rate of electron ﬂow Resistance (ohms, Ω): opposition of ﬂow of current Ground: 0V potential, where current wants to ﬂow to Power (Watt): The rate at which energy is consumed Capacitance (farads): Ability to store electrical charge. Digital versus Analog: Discrete versus Continuous Conventional current ﬂows high potential to low potential. in reality, electrons are repelled from negative and attracted to the positive. Components: resistor, capacitor, 555 timer, op-amps, LED, photocell, thermistor, inductor, diode, transistor, H-bridge, battery, speaker, transformer, mic, piezo buzzer 23
35. 35. electrical engineering 101. Voltage (volts): electrical potential - 5V = ‘1’, true, on. 0V = ‘0’, false, off (Digital) RESISTOR Current (amps): rate of electron ﬂow Resistance (ohms, Ω): opposition of ﬂow of current Ground: 0V potential, where current wants to ﬂow to Power (Watt): The rate at which energy is consumed Capacitance (farads): Ability to store electrical charge. Digital versus Analog: Discrete versus Continuous Conventional current ﬂows high potential to low potential. in reality, electrons are repelled from negative and attracted to the positive. Components: resistor, capacitor, 555 timer, op-amps, LED, photocell, thermistor, inductor, diode, transistor, H-bridge, battery, speaker, transformer, mic, piezo buzzer 23
36. 36. electrical engineering 101. Voltage (volts): electrical potential - 5V = ‘1’, true, on. 0V = ‘0’, false, off (Digital) CAPACITOR Current (amps): rate of electron ﬂow Resistance (ohms, Ω): opposition of ﬂow of current Ground: 0V potential, where current wants to ﬂow to Power (Watt): The rate at which energy is consumed Capacitance (farads): Ability to store electrical charge. Digital versus Analog: Discrete versus Continuous Conventional current ﬂows high potential to low potential. in reality, electrons are repelled from negative and attracted to the positive. Components: resistor, capacitor, 555 timer, op-amps, LED, photocell, thermistor, inductor, diode, transistor, H-bridge, battery, speaker, transformer, mic, piezo buzzer 23
37. 37. electrical engineering 101. Voltage (volts): electrical potential - 5V = ‘1’, true, on. 0V = ‘0’, false, off (Digital)LIGHT EMITTING DIODE Current (amps): rate of electron ﬂow Resistance (ohms, Ω): opposition of ﬂow of current Ground: 0V potential, where current wants to ﬂow to Power (Watt): The rate at which energy is consumed Capacitance (farads): Ability to store electrical charge. Digital versus Analog: Discrete versus Continuous Conventional current ﬂows high potential to low potential. in reality, electrons are repelled from negative and attracted to the positive. Components: resistor, capacitor, 555 timer, op-amps, LED, photocell, thermistor, inductor, diode, transistor, H-bridge, battery, speaker, transformer, mic, piezo buzzer 23
38. 38. electrical engineering 101. Voltage (volts): electrical potential - 5V = ‘1’, true, on. 0V = ‘0’, false, off (Digital) DIODE Current (amps): rate of electron ﬂow Resistance (ohms, Ω): opposition of ﬂow of current Ground: 0V potential, where current wants to ﬂow to Power (Watt): The rate at which energy is consumed Capacitance (farads): Ability to store electrical charge. Digital versus Analog: Discrete versus Continuous Conventional current ﬂows high potential to low potential. in reality, electrons are repelled from negative and attracted to the positive. Components: resistor, capacitor, 555 timer, op-amps, LED, photocell, thermistor, inductor, diode, transistor, H-bridge, battery, speaker, transformer, mic, piezo buzzer 23
39. 39. electrical engineering 101. Voltage (volts): electrical potential - 5V = ‘1’, true, on. 0V = ‘0’, false, off (Digital) INDUCTOR Current (amps): rate of electron ﬂow Resistance (ohms, Ω): opposition of ﬂow of current Ground: 0V potential, where current wants to ﬂow to Power (Watt): The rate at which energy is consumed Capacitance (farads): Ability to store electrical charge. Digital versus Analog: Discrete versus Continuous Conventional current ﬂows high potential to low potential. in reality, electrons are repelled from negative and attracted to the positive. Components: resistor, capacitor, 555 timer, op-amps, LED, photocell, thermistor, inductor, diode, transistor, H-bridge, battery, speaker, transformer, mic, piezo buzzer 23
40. 40. electrical engineering 101. Voltage (volts): electrical potential - 5V = ‘1’, true, on. 0V = ‘0’, false, off (Digital) INTEGRATED CIRCUIT Current (amps): rate of electron ﬂow Resistance (ohms, Ω): opposition of ﬂow of current Ground: 0V potential, where current wants to ﬂow to Power (Watt): The rate at which energy is consumed Capacitance (farads): Ability to store electrical charge. Digital versus Analog: Discrete versus Continuous Conventional current ﬂows high potential to low potential. in reality, electrons are repelled from negative and attracted to the positive. Components: resistor, capacitor, 555 timer, op-amps, LED, photocell, thermistor, inductor, diode, transistor, H-bridge, battery, speaker, transformer, mic, piezo buzzer 23
41. 41. electrical engineering 101. Voltage (volts): electrical potential - 5V = ‘1’, true, on. 0V = ‘0’, false, off (Digital) PHOTOCELL Current (amps): rate of electron ﬂow Resistance (ohms, Ω): opposition of ﬂow of current Ground: 0V potential, where current wants to ﬂow to Power (Watt): The rate at which energy is consumed Capacitance (farads): Ability to store electrical charge. Digital versus Analog: Discrete versus Continuous Conventional current ﬂows high potential to low potential. in reality, electrons are repelled from negative and attracted to the positive. Components: resistor, capacitor, 555 timer, op-amps, LED, photocell, thermistor, inductor, diode, transistor, H-bridge, battery, speaker, transformer, mic, piezo buzzer 23
42. 42. electrical engineering 101. Voltage (volts): electrical potential - 5V = ‘1’, true, on. 0V = ‘0’, false, off (Digital) TRANSISTOR Current (amps): rate of electron ﬂow Resistance (ohms, Ω): opposition of ﬂow of current Ground: 0V potential, where current wants to ﬂow to Power (Watt): The rate at which energy is consumed Capacitance (farads): Ability to store electrical charge. Digital versus Analog: Discrete versus Continuous Conventional current ﬂows high potential to low potential. in reality, electrons are repelled from negative and attracted to the positive. Components: resistor, capacitor, 555 timer, op-amps, LED, photocell, thermistor, inductor, diode, transistor, H-bridge, battery, speaker, transformer, mic, piezo buzzer 23
43. 43. electrical engineering 101. Voltage (volts): electrical potential - 5V = ‘1’, true, on. 0V = ‘0’, false, off (Digital) Current (amps): rate of electron ﬂow Resistance (ohms, Ω): opposition of ﬂow of current Ground: 0V potential, where current wants to ﬂow to Power (Watt): The rate at which energy is consumed Capacitance (farads): Ability to store electrical charge. Digital versus Analog: Discrete versus Continuous Conventional current ﬂows high potential to low potential. in reality, electrons are repelled from negative and attracted to the positive. Components: resistor, capacitor, 555 timer, op-amps, LED, photocell, thermistor, inductor, diode, transistor, H-bridge, battery, speaker, transformer, mic, piezo buzzer 23
44. 44. nodes and loops. Circuit must be a continuous loop. Sum of all voltage drops and gains around a loop is 0V. Current into a node equals current out of a node. 24
45. 45. limiting current. Ohm’s Law: V=I*R 5V = 3V + (Imax * R) 5V = 3V + 7mA * R 0.007A * R = 2V Imax 3V R = 286Ω 5V P = I2R P = (.007A)2 * 286Ω P = 0.014W = 14mW 300Ω, 1/8W resistor will sufﬁce. To be safe, pick components that have slightly larger values then calculated requirements. 25
46. 46. signals theory. An electrical signal has 3 key attributes that vary with time: a. Frequency b. Amplitude c. Phase Communications Baud rate: bits per second, two devices must “talk” at same baud rate Simplex, Half-Duplex, Full- Duplex comm channels Overall comms speed based on Bandwidth (bits per second) and Latency (milliseconds) 26
47. 47. digital logic gates. Floating gate: A digital device gets confused if it doesn’t see ground or 5V. Causes of confusion: RF noise, static electricity. Typically a problem with switches. Need a pull-up or pull-down resistor to eliminate high problems resulting from ﬂoating gates. Other issue: Switch bounce. “Debounce” can be done in hardware or software 27
48. 48. digital logic gates. Floating gate: A digital device gets confused if it doesn’t see ground or 5V. Causes of confusion: RF noise, static electricity. Typically a problem with switches. Need a pull-up or pull-down resistor to eliminate high problems resulting from ﬂoating gates. Other issue: Switch bounce. “Debounce” can be done in hardware or software 27
49. 49. digital logic gates. Floating gate: A digital device gets confused if it doesn’t see ground or 5V. Causes of confusion: RF noise, static electricity. Typically a problem with switches. Need a pull-up or pull-down resistor to eliminate high problems resulting from ﬂoating gates. Other issue: Switch bounce. “Debounce” can be done in hardware or software 27
50. 50. digital logic gates. Floating gate: A digital device gets confused if it doesn’t see ground or 5V. Causes of confusion: RF noise, static electricity. Typically a problem with switches. Need a pull-up or pull-down resistor to eliminate high problems resulting from ﬂoating gates. Other issue: Switch bounce. “Debounce” can be done in hardware or software 27
51. 51. feedback loops. The output of the system is fed back to the system as an additional input. Adds complexity. Timing becomes crucial when multiple objects are linked. 28
52. 52. analog to digital. MCU can “deal” with analog only after analog-to-digital converter (ADC) digitizes or quantizes the analog signal. Resolution is based on number of bits and sensitivity of ADC. Example: ADC with 10V reference voltage and 12-bit resolution. 2^12 = 4096. Number of steps: 2#bits - 1 10V/4096 means MCU can read between at at 2.44 mV Resolution: resolution. Voltage Range / 2#bits 29
53. 53. voltage dividers. Voltage Divider Used to drop voltage to required level. Input to microcontroller if you replace R1 with a sensor that is based on variable resistance. Vout = Vin * [R2 / (R1+R2) ] - R1 -> 0, then Vout = Vin - R1 -> Inﬁninity, Vout = 0 What happens if variable resistor is on bottom? 30
54. 54. transistors and gates. Sourcing versus Sinking a. Source current to device b. Sink current from device to ground. Common Anode / Common Cathode Gate Fan-In / Fan-Out Serial versus Parallel CMOS-TTL interfacing Bipolar Power Supply 31
55. 55. transistors and gates. Sourcing versus Sinking a. Source current to device b. Sink current from device to ground. Common Anode / Common Cathode Gate Fan-In / Fan-Out Serial versus Parallel CMOS-TTL interfacing Bipolar Power Supply 31
56. 56. transistors and gates. Sourcing versus Sinking a. Source current to device b. Sink current from device to ground. Common Anode / Common Cathode Gate Fan-In / Fan-Out Serial versus Parallel CMOS-TTL interfacing Bipolar Power Supply 31
57. 57. transistors and gates. Sourcing versus Sinking a. Source current to device b. Sink current from device to ground. Common Anode / Common Cathode Gate Fan-In / Fan-Out Serial versus Parallel CMOS-TTL interfacing Bipolar Power Supply 31
58. 58. transistors and gates. Sourcing versus Sinking a. Source current to device b. Sink current from device to ground. Common Anode / Common Cathode Gate Fan-In / Fan-Out Serial versus Parallel CMOS-TTL interfacing Bipolar Power Supply 31
59. 59. transistors and gates. Sourcing versus Sinking a. Source current to device b. Sink current from device to ground. Common Anode / Common Cathode Gate Fan-In / Fan-Out Serial versus Parallel CMOS-TTL interfacing Bipolar Power Supply 31
60. 60. transistors and gates. Sourcing versus Sinking a. Source current to device b. Sink current from device to ground. Common Anode / Common Cathode Gate Fan-In / Fan-Out Serial versus Parallel CMOS-TTL interfacing Bipolar Power Supply 31
61. 61. ampliﬁers and ﬁlters. Ampliﬁer Circuits built using Operational Ampliﬁers (Op-Amps): a. Inverting (Av = -Rf / Rin) b. Non-Inverting (Av = 1+Rf/Rin) c. Differentiating d. Integrating e. Summing f. Subtractor Filters a. High-pass b. Low-pass c. Bandpass d. Bandstop (Notch) 32
62. 62. ampliﬁers and ﬁlters. Ampliﬁer Circuits built using Operational Ampliﬁers (Op-Amps): a. Inverting (Av = -Rf / Rin) b. Non-Inverting (Av = 1+Rf/Rin) c. Differentiating d. Integrating e. Summing f. Subtractor Filters a. High-pass b. Low-pass c. Bandpass d. Bandstop (Notch) 32
63. 63. ampliﬁers and ﬁlters. Ampliﬁer Circuits built using Operational Ampliﬁers (Op-Amps): a. Inverting (Av = -Rf / Rin) b. Non-Inverting (Av = 1+Rf/Rin) c. Differentiating d. Integrating e. Summing f. Subtractor Filters a. High-pass b. Low-pass c. Bandpass d. Bandstop (Notch) 32
64. 64. ampliﬁers and ﬁlters. Ampliﬁer Circuits built using Operational Ampliﬁers (Op-Amps): a. Inverting (Av = -Rf / Rin) b. Non-Inverting (Av = 1+Rf/Rin) c. Differentiating d. Integrating e. Summing f. Subtractor Filters a. High-pass b. Low-pass c. Bandpass d. Bandstop (Notch) 32
65. 65. ampliﬁers and ﬁlters. Ampliﬁer Circuits built using Operational Ampliﬁers (Op-Amps): a. Inverting (Av = -Rf / Rin) b. Non-Inverting (Av = 1+Rf/Rin) c. Differentiating d. Integrating e. Summing f. Subtractor Filters a. High-pass b. Low-pass c. Bandpass d. Bandstop (Notch) 32
66. 66. ampliﬁers and ﬁlters. Ampliﬁer Circuits built using Operational Ampliﬁers (Op-Amps): a. Inverting (Av = -Rf / Rin) b. Non-Inverting (Av = 1+Rf/Rin) c. Differentiating d. Integrating e. Summing f. Subtractor Filters a. High-pass b. Low-pass c. Bandpass d. Bandstop (Notch) 32
67. 67. inductive loads and decoupling capacitors. Inductive vs. Resistive Loads Blowback Voltage a. When transistor turns off, motion of magnets in motor decelerating will induce back voltage across coils. b. Flywheel or Snubber diode allows voltage to dissipate safely. Always put diode in parallel to inductive load. Can also be in parallel to Collector- Emitter of transistor. Need decoupling capacitors across Vdd and GND of all ICs and Voltage Regulators when you have inductive loads. 33
68. 68. inductive loads and decoupling capacitors. Inductive vs. Resistive Loads Blowback Voltage a. When transistor turns off, motion of magnets in motor decelerating will induce back voltage across coils. b. Flywheel or Snubber diode allows voltage to dissipate safely. Always put diode in parallel to inductive load. Can also be in parallel to Collector- Emitter of transistor. Need decoupling capacitors across Vdd and GND of all ICs and Voltage Regulators when you have inductive loads. 33
69. 69. inductive loads and decoupling capacitors. Inductive vs. Resistive Loads Blowback Voltage a. When transistor turns off, motion of magnets in motor decelerating will induce back voltage across coils. b. Flywheel or Snubber diode allows voltage to dissipate safely. Always put diode in parallel to inductive load. Can also be in parallel to Collector- Emitter of transistor. Need decoupling capacitors across Vdd and GND of all ICs and Voltage Regulators when you have inductive loads. 33
70. 70. pulse width modulation. Pulse Width Modulation, abbreviated PWM. “Faking” an analog output signal by adjusting the on / off cycle (aka duty cycle) of a digital signal. Equivalent power to 20% YIELDS 2.4V continuous voltage. 50% YIELDS 6V 80% YIELDS 9.6V Vout = (Ton/Toff) * Vdigital 100% YIELDS 12V (ALWAYS ON) 34
71. 71. hysteresis Systems where inputs ﬂuctuate rapidly near a threshold value result in noisy output. Hysteresis can be used to ﬁlter signals so that the output reacts slowly by taking recent history into account. For example, a thermostat controlling a heater may turn the heater on when the temperature drops below A degrees, but not turn it off until the temperature rises above B degrees. This prevents rapid switching on and off as the temperature drifts around the set point. Resulting in less voltage spikes and wear-and-tear on equipment. A Schmitt trigger is a simple electronic circuit that also exhibits this property. Often, some amount of hysteresis is intentionally added to an electronic circuit (or digital algorithm) to prevent unwanted rapid switching. This and similar techniques are used to compensate for contact bounce in switches, or noise in an electrical signal. 35
72. 72. scaling functions. Sometimes the range of your inputs doesn’t match the values of your outputs. Need a scaling function to adjust for variances in the two. OUTPUT DEVICE INPUT SENSOR 2000 500 Output Pulsewidth = (sensorValue - min. sensorValue) x Output pulseRange _______________________________________________ + min. Output Input sensorRange pulseWidth sensor Value Pulsewidth Output Input Range: Range: 1000 470 1000 30 36
73. 73. other electrical concepts. Smoothing, Sampling, Averaging Sometimes noise is added by the environment, sensor imperfections, or supporting circuit. Need to reduce that noise for performance. a. Smoothing: If sensor output, at rests, continuously bounces by 3, then divide output by 3 before using in computations. Cost of smoothed sensor reading is loss of resolution. Useful if output has small, ﬁnite states. b. Averaging: Take mean of last X sensor readings. Or keep array and sort each new reading, then take median. c. Sampling: Read sensors at twice the highest frequency component of observed phenomenon to reduce ambiguity. See Nyquist Criterion. Threshold, Edge, Peak a. Threshold: Detect is signal goes above/drops below certain value. May need to build in hysteresis for signals the hover around the threshold to eliminate constant ﬂuctuations. b. Edge Detection: Detect a rising or falling edge of a signal. Use hysteresis to detect when signal hits the 10% and 90% mark of the ﬁnal value. c. Peak detection: Ensure signal is above/below threshold value. Constantly measure signal input and compare to previous value. When new reading is less than previous reading, then peak has been reached. d. Signal Skew: Output signal slow to respond to change in input signal. Measure at 50%. e. Signal Slew: Slow rise or fall time of signal. Measure between 10% and 90%. 37
74. 74. more about electronics. Tools you will need: a. Variable temperature soldering iron, solder (60/40 .32”), ﬂux, solder braid, solder sucker b. Digital multimeter c. USB oscilloscope d. Wire strippers, needle nose pliers e. Magnifying class f. Anti-static pad and wrist strap g. Alligator clips h. Breadboards (various sizes) i. Long reach tweezers j. Precision screwdriver set k. IC chip extractor / inserter l. “Third hand” tool m.Calipers 38
75. 75. types of sensors and actuators. Sensors (input transducers, from the real-world to the computer) Beware of sensor drift, use redundant and independent sensors. a. infrared b. pressure c. temperature d. magnetic e. microphone f. RFID reader g. photodiode h. strain gauge i. accelerometers Output transducers or indicators (from the computer to real-world) a. radios / antenna b. light bulb / LED c. speaker / buzzer d. screens / monitors Actuators (creating motion) a. dc motor b. servo c. piezoelectric motor 39
76. 76. using a multimeter. Analog versus digital Auto-ranging Polarity check Continuity check Measure current, voltage, resistance, capacitance Diode and transistor check 40
77. 77. using an oscilloscope. Measure voltage over time. Watch electrical signal over time as waveform. Can be digital, analog, or PC- based (USB). Measure in both time and frequency domains (via a Fast Fourier Transform or FFT) Other useful equipment: Function generator DC power supply Logic analyzer 41
78. 78. soldering techniques. Use soldering iron with adjustable temperature, let soldering iron get hot. Heat the joint, not the solder. Clean component leads and PCB before. Usually used .32” 60/40 solder. Smaller joints are better joints. Keep tip clean, tin your tip smoothly. Side of tip gets hotter than the very tip of the soldering iron (larger surface area). Keep moist sponge. Use ﬂux, desoldering vacuum, solder wick, helping hands tool, tweezers, heat sinks. Ensure room is well ventilated as solder contains lead. Turn soldering iron off when done. 42
79. 79. other hardware skills. RF and IR wireless links. Want to do home automation? Try X10 hardware. There is an Wiring library to interface with X10. XBee radios do the “dirty” work of controlling RF communications between microcontrollers. 43
80. 80. thermal management with heat sinks High current and high frequency devices can generate a lot of heat which can damage components, especially ICs. Dissipate heat through the device (radiation), heat sinks (conduction), and fans (convection). Thermal Resistance (θja) is the measure of how efﬁciently heat is transferred across the boundary between two different mediums. Measured in °C/W θja: Overall thermal resistance θcs: Thermal resistance of thermal paste θjc: Thermal resistance of the package θsa: Thermal resistance of heat sink TJ: Temperature of device/package junction TA: Temperature of ambient air TS: Temperature of heat sink TC: Temperature of device case P: Power (Watts, P = IV) θja (with heat sink) = θcs + θjc + θsa = (TJ - TA) / P θja (without heat sink) = θjc + θca = (TJ - TA) / P Lower thermal resistance means better heat sink. Heat sinks with large surface area and good air circulation gives best heat dissipation. Don’t forget the thermal paste! 44
81. 81. sizing the heat sink Given: Find heatsink with θsa <= 6.8°C/W θja = 8°C/W θjc = 0.2°C/W θcs = 0.5°C/W TJmax = 85°C Ex. Part# 240-12.7B has θsa = 6°C/W and TAmax = 70°C Vmax = 3.3V Imax = .6A meets dimensional requirements. P = IV = .6A x 3.3V = 1.98W to dissipate Verify it will work. P <= (TJ - TA) / θja = (85°C - 70°C) / 8°C/W TJ = [ (θcs + θjc + θsa) x P ] + TA TJ = 78.7°C P <= 1.85W TJmax = 85°C 1.98W is NOT less than 1.85W, therefore 78.7°C < 85°C, therefore good to use. heat sink is required. Use 10%-15% safety factor in actual application. NOTE: If 15% safety margin was used... θja = (TJ - TA) / P = (85°C - 70°C) / 1.98W 78.7°C x 1.15 = 90.5°C θja = 7.5°C/W 90.5°C is NOT less than 85°C, therefore heat sink 240-12.7B is not a good choice. θja = θcs + θjc + θsa 7.5°C/W = 0.2°C/W + θsa + 0.5°C/W θsa <= 6.8°C/W 45
82. 82. Putting hardware and software together. It is an irrelevant argument as to whether software or hardware is “better”. Both are necessary, and you will be the master when you know when to use each. 46
83. 83. a complete design from concept to product. Concept: A system that reads an RFID tag, validates identity, and adjust lights to user’s preferences. First outline and diagram what needs to be designed. Simulate hardware design. Write code, stub in hardware interaction Validate user Read RFID tag Control lights Recall preferences 47
84. 84. a complete design from concept to product. Determine what components are required. a. Which microcontroller, sensor, actuator, etc? b.What will be done in hardware and what will be done in software? Validate user Read RFID tag Control lights Recall preferences RFID MICROCONTROLLER X10 TAG 48 CONTROL READER UNIT
85. 85. a complete design from concept to product. Determine what components are required. a. Which microcontroller, sensor, actuator, etc? b.What will be done in hardware and what will be done in software? FUNCTIONAL Validate user Read RFID tag Control lights Recall preferences RFID MICROCONTROLLER X10 TAG 48 CONTROL READER UNIT
86. 86. a complete design from concept to product. Determine what components are required. a. Which microcontroller, sensor, actuator, etc? b.What will be done in hardware and what will be done in software? PHYSICAL Validate user Read RFID tag Control lights Recall preferences RFID MICROCONTROLLER X10 TAG 48 CONTROL READER UNIT
87. 87. when to use hardware versus software. When to “do it” in hardware a. Speed is a concern. b. PCB real estate is not a concern. c. Recurring per unit costs. d. If it is easier to do in hardware than software, such as CRC circuit. When to “do it” in software a. Adaptable, quick/easy changes. b. Data that varies from user to user. c. Once implemented/tested, no more per unit costs. d. If there are fast, simple, powerful libraries available to perform certain functions. Both have advantages/disadvantages! 49
88. 88. when to use hardware versus software. ICs IR LED When to “do it” in hardware Transistor a. Speed is a concern. Capacitor b. PCB real estate is not a concern. c. Recurring per unit costs. d. If it is easier to do in hardware than software, such as CRC circuit. When to “do it” in software a. Adaptable, quick/easy changes. b. Data that varies from user to user. c. Once implemented/tested, no more per unit costs. d. If there are fast, simple, powerful libraries available to perform certain functions. Both have advantages/disadvantages! 49
89. 89. when to use hardware versus software. ICs IR LED When to “do it” in hardware Transistor a. Speed is a concern. Capacitor b. PCB real estate is not a concern. c. Recurring per unit costs. d. If it is easier to do in hardware than software, such as CRC circuit. When to “do it” in software a. Adaptable, quick/easy changes. main( ) b. Data that varies from user to user. function1( ) c. Once implemented/tested, no more per int x unit costs. ﬂoat y d. If there are fast, simple, powerful libraries available to perform certain functions. Both have advantages/disadvantages! 49
90. 90. a complete design from concept to product. Design architecture Identify what to do in HW and SW, deﬁne interfaces. Design and build HW and SW components, test and debug separately. Integrate hardware and software. Test, debug, test, debug, ... Document, document, document THROUGHOUT. 50
91. 91. common mistakes. Remember Occam’s Razor and be methodical in troubleshooting the following: a. Not hooking up ground or power. b. Reversing ground and power. c. Connecting power/ground to wrong IC pin. d. Connecting to different pin then what is written in the software. e. Not supplying sufﬁcient power. f. No pull-up/pull down resistor on I/O pin. g. “Dirty” power supply. h. Switch bounce. i. Wrong resolution. j. Mixing up the TX and RX pins. k. Wrong serial port. l. Another application is controlling the serial port. m. Incompatible baud rates. n. Bad components (not the microcontroller or software’s fault) o. Bent IC pin or chip in backwards. p. ASCII versus raw byte. q. Poor soldering job, shorted traces or pins. r. Something was miscoded in software -- remember code, debug, code, ... 51
92. 92. hardware you’ll come to know. Switches Battery (Cells) Antenna Normally Open vs. Normally Closed Momentary vs. Toggle Motors Make-then-break, Break-then-make DC Analog-to-Digital Converter Poles and Throws (SPST, SPDT) Stepper RC Network and RCTime Function Foot RC Servo if ADC unavailable on uC Tape Silicon Controlled Rectiﬁer (SCR) Digital-to-Analog Converter Roller DIAC / TRIAC Operational Ampliﬁer Whisker Transistors Audio Ampliﬁer Micro BJT (Higher current capability) Schmitt Trigger (Hysteresis) Tilt NPN (N.O.) Liquid Crystal Display (LCD) Reed (magnetic) PNP (N.C.) Piezoelectric Devices Wire (AWG number) Darlington Pair H-Bridge Solid FET (Faster, low power) Bridge Rectiﬁer Braided JFET Power Inverter Coaxial MOSFET Opto-Isolator Twister Pair Enhancement Ground / Earth / Chassis Resistors Depletion Digital and Analog (Linear) Integrated Circuits (ICs Fixed vs. Variables Incandescent Bulbs 555 timer Potentiometer (pot) Oscillator F/V and V/F converter Rheostat Microphone Vibrating motor Thermistor Speaker PTC fuse Photoresistor Voltage Regulator RFID reader Flex Digital Logic Gates Rectiﬁer Force Sensitive AND Header, socket, jacks Capacitors OR IR transmitter / receiver varactor NAND Vibratab polarized NOR PIR sensor non-polarized XOR Ultrasonic ranging sensor Inductors XNOR Line sensor chokes NOT (Inverter) Hall sensor transformers Buffer (Tri-State Buffer) RF transmitter/receiver pair solenoids (linear motion) Flip-Flop Accelerometer Mechanical relays Latch Pressure sensor Solid State Relays Shift Register Temperature sensor Ferrite beads Encoder / Decoder GPS Boards Multiplexer / Demultiplexer Bluetooth / WiFi / Ethernet module Breadboard Transmission gate Wheatstone bridge Perforated Board Diodes (anode + / cathode -) Heat sinks Copper Etch Zener Printed Circuit Board (PCB) Light-Emitting (LED) Varistors 7-Segment Display Varactor Schottky Sidactor Tunnel Fuses Photodiode 52
93. 93. staying focused. you can do it! Keep an engineering journal and track every idea. Stay high level. Don’t over plan, experiment a lot. a. However, don’t just start coding or hooking up components. Spend the time doing paper design, ﬂowcharts, and prototype individual subsystems. b. Try some circuit simulators such as TINA and EDISON. Collaborate with others. Spend time learning mechanical motions and materials too. a. Levers, Gears, Pulleys, Ratchets, Cam, Joint, Pistons, Linkages. (Keep your LEGOs!) b. Metals, Plastics, Adhesives, Conductive cloth and thread. Conductor versus Insulators. 53
94. 94. where to shop. www.adafruit.com www.sparkfun.com www.parallax.xom www.goldmine-elec.com www.digikey.com www.jameco.com www.makershed.com Also, many vendor will offer free samples. Fairchild, National Semiconductor, and Microchip for example. Check out www.ladyada.net Spec Sheets Important to learn how to read schematics and understand circuit symbols. www.symbols.net/electrical www.octopart.com 54
95. 95. where to ﬁnd out more. www.michaelbparks.com blog: Geek Cowboy (blog.geekcowboy.net) email: mike@michaelbparks.com www.arduino.cc www.processing.org www.makezine.com www.ladyada.net Guide to Programmable Logic Controllers PC / Arduino Proxy Interface Igoe, Tom. Making Things Talk and Physical Computing Platt, Charles. Make: Electronics Banzi, Massimo. Getting Started with Arduino Mims, Forrest. Engineering Notebooks. 55
96. 96. Questions?
97. 97. Backup Slides 57
98. 98. typical problems and solutions. Problems a. Ground loops b. Cross talk c. Noise d. Jitter e. Skew f. EMI g. Ringing h. Spikes / Droop Solutions a. Bypass b. Decouple c. Shielding d. Layout e. Ground plane f. Hierarchy / abstraction in design g. Regularity h. Modularity i. Locality 58
99. 99. power. Real Power: Watts. P = V*I*cos(phase angle) - DC power, phase angle = 0, cos(0) = 1, therefore P=VI Reactive Power: VARs. Q = V*I*sin(phase angle) Complex or Apparent Power: Volt-Ampere, VAs. S = V*I S = P + jQ, S2 = P2 + Q2 Power Factor = Real Power / Apparent Power. - Ideal PF is 1. Power is the rate at which energy is consumed, measured in joules per second. Energy is measured in joules or more common;y Kilowatt-Hour (kWHr) 59
100. 100. more power. Batteries: Rated in mA-Hr. A 1000 mA-Hr batter can source 1000 mA for 1 hour. Supply correct voltage, but can over supply current. A 12V, 3A source can power 3 12V, 1A devices. Increase voltage, can spin a wheel faster. Increase current, can spin a larger wheel. Power DC jacks. DC power jack: power center, ground shield or vice-versa. Audio Impedance Matching: Source resistance, Speaker resistance. Square root of source resistance over speaker resistance. Noise margins Transformer relations: Np/Ns = Vp/Vs = Is/Ip Root-Mean-Square (RMS) Voltage: DC equivalent of an AC voltage. High Impedance (Z) CIVIL, ELI the ICE man. 60
101. 101. decibels. Ap (ratio) = Pout / Pin Ap (bel) = log(Pout/Pin) Ap (dB) = 10 log10(Pout/Pin) Vp (dB) = 20 log10(Vout/Vin) Unity Gain = 0 dB Multiply ratios, Sum bels. Gain is to increase, attenuate is to drop 1 bel = 50% RF (dBm). 1 mW of power transmitted. dBm = 10 log10 (power received) - 1mW received: 10 log10 (1 mW) = 0 dBm (ideal) - .5mW received: 10 log10 (.5 mW) = -3.01 dBm Bode plot (phase margin) 61
102. 102. ﬂags. Carry Zero Sign Parity Overﬂow 62
103. 103. other topics. Karnauph Maps Sequential versus Combinational logic. Mealy versus Moore machines. Direct versus Capacitive Coupling a. Direct: No frequency dependance, attenuates signal, high input impedance possible b. Capacitive: Less gain at low freq, less impedance at high freq, no attenuation, block unwanted DC components. Design Abstraction: Behavioral (RTL, VHDL); Structural (circuit, logic gate, ERC); Physical (layout, DRC) 63
104. 104. IC package types. Dual Inline Pins (DIP), socket mount Small Outline IC (SOIC), surface mount Plastic Lead Chip Carrier (PLCC) 64
105. 105. constraints. Design always a competition between: a. Size b. Power c. Speed d. Cost 65
106. 106. calibration graphs. Components of the same type will have a wide range of outputs given the exact same input. This is why spec sheets tend to give ranges of values. Seen in such components as ultrasonic range ﬁnders or thermistors. Need to put completed circuit through set of tests of varying inputs and measure the outputs, then graph the results. Will help later in reading sensor results and interpreting their meaning and/ or troubleshooting. 5 Output Voltage 5 3.75 4.25 2.5 3 1.25 1 0 1m 2m 3m 4m Distance (meters) 66