1.74k likes | 1.99k Views
Electronics Computer Club “the geek club”. Where you will learn and have fun building interesting electronic gadgets ( automation – controllers – robots ) . Dr. Hwang. Goal. You will learn enough of the basics to be able to explore and create your own fascinating electronic gadgets
E N D
Electronics Computer Club“the geek club” Where you will learn and have fun building interesting electronic gadgets (automation – controllers – robots). Dr. Hwang
Goal You will learn enough of the basics to be able to explore and create your own fascinating electronic gadgets to control your world... and may be even the worlds of others...
Simple Projects for Starters We’ll start off with the basics: Power supply Turning LED lights on and off Simple switches
Fun Projects for Intermediates Building on the basics: Las Vegas lights Light sensors 7-segment LED displays Controlling motors Playing music
Advanced Projects Whatever you like to control… Ultrasonic distance sensor Temperature sensor Liquid Crystal Displays (LCD) Servo motors Stepper motors Real-time clock (RTC) Bluetooth
Don’t Be Afraid! Of making a wrong connection. Most of the time we’ll be working with low voltages, i.e. less than 12V DC. So... You are not going to hurt yourself You are not going to blow up your house The worse that can happen is you destroy some components
Danger – 120V AC - Danger The only thing that can kill you is if you are not careful when you play with 120V AC i.e. electricity from a wall plug. • If you connect a piece of wire between the two holes in the wall plug, you will be dead before you finish reading this sentence. So don’t do it!
Don’t Do It! I don’t mean that you cannot play with 120VAC - you can, but be very VERY careful What I mean is don’t connect a piece of wire between the two holes in a wall plug
Why do this? Why are we doing this? We are not getting paid for doing this It is just our hobby and passion
Smile Picture Time
Arduino Details Model: Arduino Uno CPU: ATmega328 Operating/Input Voltage: 5V/7-12V CPU Speed: 16 MHz Analog In/Out: 6/0 Digital IO/PWM: 14/6 EEPROM: 1KB SRAM: 2KB Flash: 32KB UART: 1
Kit Parts List 1 Arduino Uno R3 controller board 1 USB cable 1 breadboard 5 LEDs (red, yellow, green, blue, white) 1 7-segment LED display 9 resistors (1505, 330, 1K, 4.7K, 22K) 1 push button 1 transistor (3904 NPN) 1 diode (1N4184) 1 potentiometer (10K) 1 DPDT relay 1 photocell 1 speaker 1 quad 2-input NAND gate (74HC00) 11 wires assorted colors
Tools Breadboard and Wires
Tools Multimeter Analog Digital
Components Resistors Capacitors Potentiometer Transistors Diode
Components Light Emitting Diodes (LEDs) 7-segment display
Components Push Buttons and Switches
Components Relays
Components Integrated Circuits (ICs) “Chips”
Electrical Power All electronic circuits require electrical power to operate Digital circuits typically require a 5V DC power source Like a battery, a DC power source will always have a positive (+) end and a negative (–) end Symbol or
Power Supply Power adapters have different voltages and current ratings Need one with 9V DC and at least 0.5A (500mA) 9V batteries can also be used for small circuits requiring low power
Power Supply • The plug Symbol • – is usually referred to as “ground” or GND • Make sure you connect the + and – correctly • This is one main cause of destroying your circuit.
Voltage Regulator • Use a voltage regulator to convert from 9V DC down to 5V DC • Part number: 7805
Electrical Power To turn on any electronic device, you need to connect to both the + and the – ends of the power source Use wires to connect between the power source and your device One main cause of destroying your circuit is reversing the + and the – ends
Breadboard Allows you to easily connect components together
Breadboard • Horizontal holes in Section 1 are connected together. Usually used for +5V • Horizontal holes in Section 4 are connected together. Usually used for GND
Breadboard Vertical holes in Section 3 are connected together Vertical holes in Section 2 are connected together
Connection Example Correct Wrong
Power FROM the Arduino The Arduino board has a built-in 5V voltage regulator • The pin labeled 5V is + • The pins labeled GND are –
Power FROM the Arduino • The convention is to use red for positive and • black for negative • Connect a red wire from the 5V pin to the top row on the breadboard • Connect a black wire from the GND pin to the bottom row on the breadboard
Let there be Light! In this experiment, you will learn how to turn on a LED Parts needed: Arduino board Breadboard A LED (any color you like) A 330 (orange-orange-brown-gold) resistor USB cable Wires
Light-Emitting Diode (LED) Symbol Long leg is positive Short leg is negative
How To Blow Up a LED To turn on a LED you need to have power connected to it: The + from the power to the + of the LED The – from the power to the – of the LED Don’t do it!
How NOT To Blow Up a LED If too much current (power) goes through a LED, you will blow up the LED right away So if you don’t want to blow up your LED, you’ll need to reduce the current by using a resistor
Resistors Resistors are used to reduce the amount of current that flows through a circuit Picture Symbol
Let there be Light! Picture Schematic Make sure you have the LED polarity connected correctly the long leg is + (orange-orange-brown)
Power TO the Arduino You can either plug in a 9V adapter or a USB cable from a computer to the Arduino to provide power to the Arduino USB 9V adapter
And there is no Light (: If your LED did not light up then you probably reversed the two legs of the LED Reversing the LED legs will not destroy the LED. It just won’t light up. If your LED lights up, reverse the legs to see that it won’t light up Try it now
Resistor Experiment Replace the 330 (orange-orange-brown) resistor with another resistor. What happens to the LED? Try different resistor values and notice the intensity of the LED. Always use at least a 150resistor, otherwise your LED will be destroyed!
Let there be Light! You can put the resistor at the + side of the circuit and get the same result So it’s OK as long as you have a resistor in series with the LED
Question What’s the resulting difference between these two circuits?
Question What happens if you connected this circuit?
Question What’s the resulting difference between these two circuits? * K = 1000
Question What happens if you connected this circuit?
Question What happens if you connected this circuit? This is a short circuit – never do this!
Potentiometer A potentiometer is simply a variable resistor, i.e., a resistor whose value can be changed by turning a knob Picture Symbol