490 likes | 743 Views
Basic Electronics. I. OHM'S LAW. R. V. V = I * R. volts = amps * ohms volts = mA * Kohms. resistor. I. 1/R. V. I = V/R = 9V/1K = 9mA = .009A. I. LED. anode. ~10 mA. I. cathode. + 1.5 V -. I = ??. ARDUINO CONTROL OF LED. ARDUINO. 5V. 0V. PIN 0. 20 mA max. GND.
E N D
I OHM'S LAW R V V = I * R volts = amps * ohms volts = mA * Kohms
resistor I 1/R V I = V/R = 9V/1K = 9mA = .009A I
LED anode ~10 mA I cathode + 1.5 V - I = ??
ARDUINO CONTROL OF LED ARDUINO 5V 0V PIN 0 20 mA max GND digitalWrite(0,HIGH); delay(1000); digitalWrite(0,LOW);
ARDUINO 5V, 20 mA DEVICE PIN 0 GND What if device needs more than 5V or more than 20 mA??
Computer controlled switch V big DEVICE I big STAMP PIN 0 GND
Transistor current-controlled amplifier, current-controlled switch BASE COLLECTOR I small I big = b*I small EMITTER Think: spray can!
COLLECTOR BASE EMITTER Ic = b*Ib Ib Ie = Ib + Ic ONE-WAY!
5V 0V ON ON I I OFF OFF V V Vce sat 0.1 – 2.0 V LOAD: MOTOR, SOLENOID, RELAY, LAMP, …
Things to look for on a data sheet • Max current, Ic max • Max volts, Vce max • Max power, P max • Vce sat • Gain, Hfe or b • Switching time
Motor interface FOR SMALL MOTOR, USE 2N3904
Pin 2 Pin 2 GND GND - - + +
Arduino pin limits 20 mA per PIN 40 mA TOTAL 10.6 mA 4.4 mA 1 A
+ V - P = V * I I P = ?? I = V/R = 9/10 = 0.9 A P = V*I = 9*.9 = 8.1 W
HEAT I, V t, w I P = 12 * I
WOW! WHAT A GREAT MOTOR I GOT AT AX-MAN! AND IT RUNS ON 12v!
12V Later… YOUCH!! IT'S HOT!
5 V Ic Ib Vce sat ~ 2.0 V Let Ic = 5 A PWR = V*I = 2.0*5 = 10 W !!! HOT wasted
RELAYS To control larger loads
Relays • Electromagnet-controlled switch • User for (1) larger loads, (2) bi-directional motor COIL CONTACTS COIL control side 12V, 120 ohm, 100 mA 5V, 500 ohm, 10 mA CONTACTS load side 240 VAC/28 VDC, 10 A 100 VDC, 1A 120 VAC/24 VDC, 0.5 A/1.0A
Types of relays GENERAL PURPOSE COIL: 12, 24 VDC; 120 VAC CONTACTS: 5-10 A REED COIL: 5, 12 VDC CONTACTS: .5-2 A SOLID STATE COIL: LOGIC INPUT CONTACTS: 2-25 A
COIL: 12 V, 400 OHM, I = V/R = 12/400 = 30 mA CONTACT: 24 VDC, 15 A
Transistor drive for a relay NOTE: RELAY COIL CAN SUCK CURRENT
SOLENOIDS For linear, short-range, on-off motion
x Force when energized F x ¼ in. MAX ON-TIME = ½ SEC
SPST SPDT Switches (NO, NC)
#define MOTOR 0 #define SWITCH 4 . . . digitalWrite(MOTOR,HIGH); delay(1000); // wait for motor to clear switch while (digitalRead(SWITCH) ; digitalWrite(MOTOR,HIGH);. . .
SMALL WIRE + HIGH CURRENT WIRE 1. CONNECT POINTS OF EQUAL VOLTAGE 2. CARRY CURRENT STRANDED SOLID Flexible Higher current Type Gauge Max I Notes Wrap wire 30 200 mA wrapping, signal level only Hookup 24/22 1-2 A general purpose Lamp cord 18 5 A House wire 14/12 15/20 A “CABLE” = multiconductor wire bundle e.g. modular phone cord: 28g solid, 4 conductor
Primary Zinc Alkaline (most common) Lithium (camera, watch) Secondary (rechargeable) Sealed lead acid (car) Gel NiCd NiMH Lithium Important specs Energy density Voltage Zinc/Alkaline: 1.5 V Lead Acid: 2.0 V cars: 6, 12 V NiCd: 1.2 V Power tools: 4.8, 6.0, 7.2, 9.6, 12, 18 V Maximum current “Cold-cranking amps” Capacity Amp-hours or mAHrs BATTERIES
12 V (10 cell) NiCd pack rated at 1300 mAH 1.3 Amps for 1 hour 520 mA for 2.5 hours…..in theory Top-notch cells for RC racing can provide 2300 mAH 9V alkaline 580 mAH @ 12 mA (can deliver 12 mA for 48 hrs) 100 Service life Hrs 1 10 100 mA Alkaline technology 9V Discharge curve t Capacity and discharge See www.duracell.com (or other sites) for more