Connecting LEDs to the ADB I/O

Similar documents
LCD Prototype Circuit on Solderless Breadboard. 840 Pin Solderless Breadboard ( # ND)

Lab 2.2 Ohm s Law and Introduction to Arduinos

ENGR 210 Lab1. Ohm's Law

Button Code Kit. Assembly Instructions and User Guide. Single Button Code Entry System

Digital Pins and Constants

StenBOT Robot Kit. Stensat Group LLC, Copyright 2018

Electronic Coin Toss

Using solderless breadboards

This Presentation Will

Build Your Own Home Security System

LED Knight Rider. Yanbu College of Applied Technology. Project Description

Images Scientific OWI Robotic Arm Interface Kit (PC serial) Article

1/Build a Mintronics: MintDuino

AXE Stack 18. BASIC-Programmable Microcontroller Kit. An inexpensive introduction to microcontroller technology for all ability levels

Digital LED Flasher. Students will be assembling an LED Flasher assembled on a custom printed Circuit Board. Figure 1

Sample assessment task. Task details. Content description. Task preparation. Year level 9 Learning area Subject Title of task

Bill of Materials: Picaxe-based IR Control Module Pair PART NO

SRI-02 Speech Recognition Interface

XYLOPHONE KIT ESSENTIAL INFORMATION. Version 2.0 CREATE YOUR OWN ELECTRONIC MUSICAL INTRUMENT WITH THIS

Layad Circuits Arduino Basic Kit B. Content Summary

3 pyro output datalogger altimeter with an ATmega 328 microcontroller Kit assembly instructions

solutions for teaching and learning

Assembly Instructions (8/14/2014) Your kit should contain the following items. If you find a part missing, please contact NeoLoch for a replacement.

9 Output Devices: Buzzers

Laboratory of Sensors Engineering Sciences 9 CFU

Universal Keying Adapter 3+

Lab 0: Wire Wrapping Project: Counter Board

Digital Circuits. Page 1 of 5. I. Before coming to lab. II. Learning Objectives. III. Materials

HARDWARE OPERATIONS MANUAL

Chill Interface PCB Assembly Instructions

IR TRANSMITTER BLOK PCB ASSEMBLY INSTRUCTIONS. Copyright EduTek Ltd Rev. 2

Step 1 The tools & the Components The tools you need: A good quality soldering iron with a fine point (max 30) Watt or a soldering-station. A desolder

Micro-Controllers. Module 2: Outputs Control and Inputs Monitoring. IAT Curriculum Unit PREPARED BY. August 2008

Shack Clock kit PCB Revision: QCU Rev 1 or QCU Rev 3

Infrared Light Module SM-IR-16-2 V1.00

Infrared Add-On Module for Line Following Robot

Physics 120/220 Lab Equipment, Hints & Tips

Freeze the Dizz Jameco Part No

Advanced Strobe 1.0 Kit

TLC5947 and TLC59711 PWM LED Driver Breakouts

Objectives: - You need to be able to use the two equations above and the series and parallel circuit rules.

HW-101 QSK Modification T/R Relay Replacement

Arduino Robots Robot Kit Parts List

Bill of Materials: 8x8 LED Matrix Driver Game PART NO

PICAXE EXPERIMENTER BOARD (AXE090)

KDS Channel DMX Controlled Servo Kit

Gadget Freak Case #238: Controller Adjusts Garage Lights Build Instructions

Pacific Antenna Two Tone Generator

Arduino 05: Digital I/O. Jeffrey A. Meunier University of Connecticut

TuBbika SMR-4-PLUS voicecard

Thursday, September 15, electronic components

Appendix D: Equipment

PIC Dev 14 Through hole PCB Assembly and Test Lab 1

EAS MINI DAQ. INT of JP4 is for internal power from PC EXT of JP4 is for external power - needed for low power laptops

Manual Version March 2007

KDR00101 DMX Controlled Relay Kit

GSV-1A4 M12/2 M12/2. Highlights

solutions for teaching and learning

Necessary software and hardware:

QRPGuys Digital Dial/Frequency Counter

Lesson 8: Digital Input, If Else

IB080QM65VA3 Part Number

KDR00301 DMX Controlled Relay Kit

ECE 270 Lab Verification / Evaluation Form. Experiment 1

Building the RGBW LED Controller

BehringerMods.com. Instructions for modification of Behringer SRC analog inputs and outputs

Modular Backplane For RC2014 User Guide

BalloonSat Sensor Array

Lecture 12. Building an LED Display

Pacific Antenna Easy TR Switch Kit

High Power (15W + 15W) Stereo Amplifier

solutions for teaching and learning

revolution How does the ibutton work? Full kit including PCB, PICAXE-08M chip and ibutton key. Spare ibutton Key

Mioduino Guide. Breadboard Your Own Arduino Compatible. by Daniel M. Porrey Version 1.0.4

Rover 5. Explorer kit

Additional board ZIB2-PDx-N for Plug & Drive motors PDx-N

Light Dependent Resistor Circuit by VK4ION

CHAPTER 5. Voltage Regulator

Basic Electrical Measurements

Analog Input and Output Options for Syringe Pumps

PICAXE CONNECT (AXE210)

SPDM Level 2 Smart Electronics Unit, Level 2

What Exactly is an Arduino?

ROBOT LINE TRACKING MOUSE KIT C-9801

Week 9: Design a Night Light. The experimental procedure Is not in the lab manual

2010, 2013 Azatrax.com MRD2-S USB with Switch Control installation instructions pg. 1 of 6

Code Practice Oscillator (CPO)

QRPometer Assembly Manual Copyright 2012 David Cripe NM0S The 4 State QRP Group. Introduction

Step 1 - Modifying the power-supply from 12 to 16 Volts Increasing the power-supply voltage to 16V increases the headroom and reduces distortion. Also

Prototyping & Engineering Electronics Kits Basic Kit Guide

REQUIRED MATERIALS Epiphany-DAQ board Wire Jumpers Switch LED Resistors Breadboard Multimeter (if needed)

PedalSync. 9 Switches MV-62. Chip. Module. and

Supplemental guide on Camera Fabrication

MIDI CPU Hardware Rev K. User Manual

RECORD & PLAYBACK KIT

3-slot Backplane For RC2014 User Guide

Micro USB Lamp Kit ESSENTIAL INFORMATION. Version 2.0 DESIGN A STYLISH LAMP WITH THIS

Educato. Assembly Instructions

Introduction to MATLABs Data Acquisition Toolbox, the USB DAQ, and accelerometers

PicoTurbine Mark 8.3 Generator Field Controller Kit

Transcription:

Application Note AN-2 By Magnus Pettersson September 26 1996 Connecting LEDs to the I/O Introduction The following notes are for those of you who are a bit inexperienced with hardware components. This introduction will show how simple it is to connect a hardware component to interface with the I/O. The first one will explain how to hook up LEDs to the I/O. Output Capabilities The I/O port A has 4 relays that can be used to control external components like LED-lamps, higher power relays, and motors etc. The Port B is an analog input, digital input or digital output port. In the digital output mode this port can be used to control external components as well. The LED A LED is short for Light Emitting Diode. It is used extensively as indicator lights on all sorts of electronic devices. An LED always emits colored light, usually red, green, yellow or orange. Blue LEDs are very rare and expensive. LEDs can have all sorts of shapes but the most common ones are cylindrical with rounded fronts and are 3 to 5 mm in diameter.other types of LEDs emit very bright light. One example of this type of LED is the Infrared LED or IR-LED. These emit invisible infrared light and are widely used in remote controls. The LED has two terminals, the Anode is the positive terminal and the Cathode is the negative terminal. Figure 1 shows the schematic symbol of a LED. In photo 1 a red LED is shown. The longest one of the terminals is always the Anode. Anode + Anode Cathode - Cathode FIGURE 1. LED Schematic symbol PHOTO 1. LED I/O AN-2 page 1 of 7

The Resistor The resistor is the most common of all electronic components. The resistor limits the current in a circuit. Ohms law defines the relationship between Voltage U across a resistor R and the Current I flowing through the resistor. The Current through a circuit is directly proportional to the Voltage and reversed proportional to the Resistance of the circuit. This gives the following expressions. U = I*R R = U/I I = U/R Resistor symbol FIGURE 2. Resistor Schematic symbol A resistor can have values between 0 ohms and several million ohms. Most resistors look the same. Because of this it is quite easy to chose the wrong resistor value by mistake. But resistors have bands of color on them to indicate the value. To read the value first locate the tolerance band. This is a bit separated from the other bands. Turn the resistor so the tolerance band is to the right. Now look up the first and second digit in the table in figure 3. Then add the number of zeros. Form a number by putting the digits together with the number of zeros. The tolerance band tells you how accurate the resistance is. On low tolerance resistors a third digit band is inserted before the number of zeros band making a total of 5 bands. Example: a resistor has 4 bands: orange, orange, brown and gold. The value is 3 and 3 and 1 zero = 330 ohm, tolerance is ±5% Resistor color Coding 1 st digit 2 nd digit number of zeros tolerance Digit color ------------ 0 Black 1 Brown 2 Red 3 Orange 4 Yellow 5 Green 6 Blue 7 Violet 8 Grey 9 White Tolerance color --------------- 20% nothing 10% Silver 5% Gold 2% Red 1% Brown FIGURE 3. Resistor color codes. Standard resistor values When you are buying resistors you have to consider that all resistors are manufactured according to I/O AN-2 page 2 of 7

series of standardized resistance values. This means that the resistance value you have calculated might not be available. You have to choose the nearest available value and you have to decide whether to choose a higher or lower value. LED Operation When current is fed through the LED it starts to emit light. The current must flow from Anode to Cathode and the current has to be limited to about 20mA. High brightness LEDs may need higher current, other LEDs may use lower current. Also, the Voltage across the LED has to exceed the LED Forward Voltage which is usually 2 Volts. These parameters are stated in the specifications of a particular LED. To limit the current a resistor must be used in series with the LED. The value of the resistor used can be calculated according to figure 4. R = (Ub-Uf) / If Switch Ub Battery Resistor LED I + Ur + Uf The voltage of the battery is 9 Volts The forward Voltage drop of the LED is 2V The maximum forward current of the LED is 20mA (0,02 Ampere) Calculate the value of the resistor. According to Ohms Law U = RI This implies R = U/I The voltage over the resistor is calculated Ur = Ub-Uf = 9-2 = 7V The minimum resistance is thus Ur / I = 7 / 0.02 = 350ohm FIGURE 4. Calculating the value of the current limiting resistor for a LED. Interfacing LEDs to the I/O Driving LEDs from the I/O is very simple. Since the I/O has internal current limiting resistors on Port B and on the Vref terminal, current limiting resistors need not be used. To connect it to Port A do this. Connect a piece of wire between Vref and a terminal of Port A channel 4. Then connect the LED Anode pin (The long one) to the other Port A channel 4 terminal and the cathode pin to the ground terminal at Port B channel 1. I/O AN-2 page 3 of 7

I/O Port B Vref, Imax = 18mA Port A FIGURE 5. LED interfacing to Port A PHOTO 2. LED interfacing to Port A The channels on port B have sufficient drive capability to drive LEDs directly. Remember to configure the channels of Port B as digital outputs. The Pull-Up / Pull-Down Jumpers should be placed in the open circuit position for optimal performance. Since the I/O has internal series resistors on the channels of port B, the LEDs can be connected directly. I/O AN-2 page 4 of 7

U1 I/O D4 Port B D3 D2 D1 Vref, Imax = 18mA Port A FIGURE 6. LED interfacing to Port B More than one LED on Port A If more than one LED is connected to the channels of port A, the effect of the current limit on the Vref terminal common to all LEDs would be that the LEDs light will become weaker as more LEDs are lit. One solution to this problem would be to use an external voltage from a battery to power the LEDs. This would allow for a constant brightness. This will however require external current limiting resistors as well. Figure 5 describes such a setup. I/O AN-2 page 5 of 7

Wiring it together When the circuits become more complex, like the one in figure 7, there is no more room on the I/O terminals to wire it all together. Some alternatives would be to use either Wire Terminal Strips, a Solderless IC-Breadboard or solder the components together on a pre-drilled prototype circuit board. Wire Terminal Strips can be used for the circuit in figure 7 but hardly for anything more complex with Integrated Circuits and such components. A Solderless IC-Breadboard (photo 3) is perfect for experimentation but it is not suited for permanent installations. It has holes with contacts that components fit into. Using jumper wires the components are interconnected. A pre-drilled circuit board has several hundred solder-ringed holes in a 0.1 grid. The pins of a component are placed through the holes and the pins are soldered on the other side of the circuit board. Jumper wires are placed into the adjacent holes and soldered to the component pins to interconnect the components. I/O Port B Vref, Imax = 18mA Port A BAT1 9V R1 R2 R3 R4 D1 D2 D3 D4 FIGURE 7. Controlling several LEDs from Port A I/O AN-2 page 6 of 7

PHOTO 3. Solder less Breadboard Setup Where to buy components There are lots of electronic component distributors to buy components from. In RadioShack stores all around the US you can get most basic parts needed for I/O experimentation. RadioShack can also supply you with soldering tool sets as well as breadboards. More specialized components can be purchased by other electronics component retailers. Allied Electronics is one of them. RadioShack can be reached by phone at 1-800-THE-SHACK or on the Internet http://www.radioshack.com Allied Electronics can be reached by phone at 1-800-433-5700 or on the Internet http://www.allied.avnet.com I/O AN-2 page 7 of 7