


















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
its for cmp3006 and 3010 some of the university notes it will be help
Typology: Lecture notes
1 / 26
This page cannot be seen from the preview
Don't miss anything!
Atmega 328 Pinout
Driving with Transistor
AVR
VCC
LOAD
AVR
VCC
NPN
PNP
ULN
Relay
Relay is an electronic controlled switch.
It isolates two parts of a circuit from each
other.
A small amount of current and voltage causes
to switch a large amount of voltage and
current
Relay DPDT
Maximum output: 250V 8A ~AC
Input: 24
V DC
Relay
Coil
Contacts
Spring
AVR connection to relay
Micro
Darlington
Relay Lamp
1 16
8
ULN 2003 AVR
106462
2
6
14
8
PB 0
9
Optoisolator
Opto-isolator isolates two parts of a circuit
from each other.
There is an LED in the input, and a photo-
transistor in the output. When the LED lights
up, the photo-transistor, senses the light and
becomes conductor, and passes the current.
can be used in input or output circuits.
DC Motor
Unidirectional control
Bidirectional control
Reverse current
Opening the switch does not immediately stop current in the motor windings
Reverse current
Adding a diode in parallel with the motor provides a path for dissipation of stored energy
when the switch is opened
Replace the Switch with a
Transistor
A transistor allows on/off control to be automated and it allows switching of more current than
an Arduino digital pin can supply
Spin the DC Motor
int motorPin = 9 ; // Pin 3 has PWM, connected it to the DC
motor
void setup() {
pinMode(motorPin, OUTPUT); // Set motor pin to output mode
void loop() {
analogWrite(motorPin, 150); // Motor at 150/255 of full
speed
delay(1000);
analogWrite(motorPin, 250); // Motor at 250/255 of full
speed
delay(1000);
Stepper motor