keyestudio
www.keyestudio.cc
152
// the loop function runs over and over again forever
void loop() {
digitalWrite(3, HIGH);
// turn the LED on (HIGH is the voltage level)
delay(2000);
// wait for a second
digitalWrite(3, LOW);
// turn the LED off by making the voltage LOW
delay(3000);
// wait for a second
}
//////////////////////////////////////////////////////////
Result
Motor rotates for 2 seconds, and stops for 3 seconds, then cycles on.
Experiment Principle:
The characteristics of NMOS is that when Vgs is greater than a certain value, it will be conducted.
It is suitable for use in situation when source electrode is connected to ground (low-end driving),
as long as the grid voltage reaches 4V to 10V. When G electrode is connected to digital port 3, s
electrode to GND and digital port 3 output is HIGH, Vgs is 5V, meeting the requirement, DS is
conducted, motor rotates. When digital port output is LOW, Vgs is 0 v, not meeting the
requirements, DS is disconnected, motor stops running.
In this experiment, by controlling the output of digital port 3 to control Vgs voltage and then
controling the conduction and disconnection of DS electrode to control the rotation of the motor.
*******************************************************************************
Project 33: 4N35
Introduction
4N35 is a general photoelectric coupler, containing a gallium arsenide infrared LED, and use the
LED to drive silicon photoelectric transistor diode. The package of 4N35 is 6-pin dual-in-line
Package.
Hardware required
4n35 *1
1KΩ resistor *1
220Ω resistor *2
Red M5 LED *1
Breadboard *1
Breadboard jumper wires *several
Summary of Contents for ARDUINO maker learning kit
Page 1: ...keyestudio www keyestudio cc ARDUINO maker learning kit...
Page 23: ...keyestudio www keyestudio cc 21 Connection for 2560 R3...
Page 30: ...keyestudio www keyestudio cc 28 Connection for 2560 R3...
Page 39: ...keyestudio www keyestudio cc 37 Connection for 2560 R3...
Page 43: ...keyestudio www keyestudio cc 41 Connection for 2560 R3...
Page 46: ...keyestudio www keyestudio cc 44 Connection for 2560 R3...
Page 50: ...keyestudio www keyestudio cc 48 Connection for 2560 R3...
Page 58: ...keyestudio www keyestudio cc 56 Connection for 2560 R3...
Page 62: ...keyestudio www keyestudio cc 60 Connection for 2560 R3...
Page 65: ...keyestudio www keyestudio cc 63 Circuit connection Connection for R3...
Page 66: ...keyestudio www keyestudio cc 64 Connection for 2560 R3...
Page 69: ...keyestudio www keyestudio cc 67 Pic 2 Project 15 LM35 temperature sensor...
Page 71: ...keyestudio www keyestudio cc 69 Connection for 2560 R3 Sample program...
Page 74: ...keyestudio www keyestudio cc 72 Schematic diagram...
Page 77: ...keyestudio www keyestudio cc 75 Circuit connection Connection for R3...
Page 78: ...keyestudio www keyestudio cc 76 Connection for 2560 R3...
Page 80: ...keyestudio www keyestudio cc 78 Result...
Page 82: ...keyestudio www keyestudio cc 80 Connection for 2560 R3...
Page 85: ...keyestudio www keyestudio cc 83 Schematic diagram Circuit connection Connection for R3...
Page 91: ...keyestudio www keyestudio cc 89 Circuit connection Connection for R3...
Page 92: ...keyestudio www keyestudio cc 90 Connection for 2560 R3...
Page 95: ...keyestudio www keyestudio cc 93...
Page 96: ...keyestudio www keyestudio cc 94...
Page 104: ...keyestudio www keyestudio cc 102 Connection for 2560 R3...
Page 111: ...keyestudio www keyestudio cc 109 Connection for R3 Connection for 2560 R3...
Page 120: ...keyestudio www keyestudio cc 118 Connection for 2560 R3...
Page 124: ...keyestudio www keyestudio cc 122 Connection for R3 Connection for 2560 R3...
Page 135: ...keyestudio www keyestudio cc 133 Connection for R3 Connection for 2560 R3...
Page 139: ...keyestudio www keyestudio cc 137 Circuit connection Connection for uno R3...
Page 140: ...keyestudio www keyestudio cc 138 Connection for 2560 R3...
Page 144: ...keyestudio www keyestudio cc 142 Circuit connection Connection for R3...
Page 145: ...keyestudio www keyestudio cc 143 Connection for 2560 R3...
Page 148: ...keyestudio www keyestudio cc 146 Connection for 2560 R3 Sample program...
Page 155: ...keyestudio www keyestudio cc 153 Circuit connection Connection for R3...
Page 156: ...keyestudio www keyestudio cc 154 Connection for 2560 R3...
Page 160: ...keyestudio www keyestudio cc 158 Connection for 2560 R3...