1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Arduino basic connections

39 72 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 39
Dung lượng 4,5 MB

Nội dung

THE UNOFFICIAL Pushbutton to 12V Should you need to connect Arduino inputs to a DC voltage higher than 5V ARDUINO +12V basic connections Optocoupled inputs Pin Goes HIGH when button pressed Used when galavanic separation between external circuitry and Arduino circuit is required 5V 5V 10KΩ 1KΩ Pushbutton to GND MAX +12V 1KΩ A C IN 470Ω 10KΩ 100nF IN K E IN To reduce the interferences add a capacitor Vin LOW A B K C NC E When using this circuit for 24 volts input increase R to 2200Ω Pin Goes LOW when button pressed Using Internal Pullup 5V 4N25 Pin Goes HIGH when button pressed Pushbutton to 5V Trimmer or Potentiometer Photoresistor 5V 5V Pin Goes HIGH when button pressed IN IN Pin Goes LOW when button pressed IN 1KΩ IN 10KΩ 5V Analog Input IN Analog Input www.pighixxx.com BY ND 03 APR 2013 ver rev THE UNOFFICIAL Dual LEDs or bi-color LED LED clusters +12V 5V ARDUINO 470Ω 470Ω basic connections A K A #Leds Resistor Value A Connect a Led 1KΩ 820Ω 750Ω 680Ω 470Ω 390Ω HIGH K 5V 470Ω OUT A A LOW K A K K A K 470Ω Led goes ON when pin is set to LOW A K OUT Leds goes ON when pin is set to LOW K NPN Connect a Lamp (DC Low Voltage) Connect a Led 2.2KΩ OUT C A E E K B B 1N4007 K OUT C 2N2222 Led goes ON when pin is set to HIGH K A A Lamp goes ON when pin is set to LOW NPN E B BC337 2.2KΩ 470Ω C OUT A K www.pighixxx.com BY ND 03 APR 2013 ver rev THE UNOFFICIAL ARDUINO Connect an Audio Amplifier Connect a Relay +5V 12V basic connections Relè 100Ω A OUT K 1µF RCA A K 1KΩ 1N4007 Relay goes ON when pin is set to HIGH NPN C 2.2KΩ B OUT C E E B BC337 Connect a Buzzer Connect a Mosfet +48V 100Ω OUT Mosfet excited when pin is set to HIGH GDS IRL540 OUT MAX 2.5A G 100Ω 22KΩ OUT D Buzzer S Reccomended only for Switch or in Low frequency applications www.pighixxx.com BY ND 03 APR 2013 ver rev THE UNOFFICIAL Connect a Speaker ARDUINO basic connections 8Ω 100KΩ 1KΩ +5V NPN C 10µF 16V 100Ω 10µF 16V B OUT 100Ω 22KΩ E 100µF 16V C E E C B B 2N2222 A B K NC NC E Connect a Triac TLP3020 470Ω A 1KΩ 100Ω OUT 1/2 W A2 Yuou can use a PWM pin 100nf TRIAC K G A1 100nf 630V AC IN www.pighixxx.com BY ND 03 APR 2013 ver rev THE UNOFFICIAL Connect a RGB Led Strip +12V ARDUINO basic connections 100KΩ OUT You can also use a PWM pin D G 100Ω 100KΩ R B S D G 100Ω OUT 100KΩ A +12 G S OUT Connect a DC Motor D G 100Ω S K 1N4007 GDS IRL540 Connect an Encoder Clockwise K Fase 1(A) 1µF 10KΩ A IN A Fase 2(B) C 10KΩ IN B 100KΩ OUT D 100nF G 100Ω Set Pin to HIGH Motor ON Counterclockwise 100nF You can also use a PWM pin S B A C GDS IRL540 www.pighixxx.com BY ND 03 APR 2013 ver rev THE UNOFFICIAL ARDUINO Bi-Directional Voltage Level Converter 3.3V to 5V Bi-Directional Voltage Level Converter 3.3V to 5V with voltage divider basic connections 5V 10KΩ 4,7KΩ 5V IN/OUT 10KΩ IN/OUT 2N7000 10KΩ 10KΩ 3,3V IN/OUT IN/OUT 2N7000 S D G TTL / CMOS converter (6 inputs/outputs) S TTL / CMOS converter +12V G CMOS voltage 10KΩ +5V D IN VCC VDD Aout Fout Ain Bout Bin Cout MC14504B OUT TTL 0-5V OUT NPN 2,2KΩ IN Fin MODE Eout Ein Cin Dout GND Din C E E C B B www.pighixxx.com BY ND 03 APR 2013 2N2222 ver rev THE UNOFFICIAL ARDUINO basic connections Connect a Microphone Connect a Servo OUT 5V 22KΩ 100KΩ +2,5V Digital Output IN NPN 1KΩ Analog Input 3,3KΩ MIC C E E 4,5 - 6V Connect to an external power supply! 10µF C B B 2N2222 www.pighixxx.com BY ND 03 APR 2013 ver rev THE UNOFFICIAL Out1 Out2 Out3 ARDUINO basic connections OUT Charlieplexing 270Ω OUT1 H=High, L=Low, i=Input Segments Display 270Ω OUT2 5V common 270Ω 270Ω OUT3 OUT OUT 10 OUT OUT OUT OUT A K 10 270Ω OUT OUT 270Ω OUT 270Ω OUT 270Ω OUT www.pighixxx.com BY ND 03 APR 2013 ver rev THE UNOFFICIAL ARDUINO basic connections LED Array OUT Segments Display (Common Anode) with Multiplexing 5V common OUT 1KΩ OUT 1KΩ OUT OUT 1KΩ C OUT E B OUT OUT 11 OUT 16 270Ω 270Ω OUT OUT 14 OUT 13 OUT 270Ω x OUT OUT 270Ω 270Ω OUT 270Ω BC337 1KΩ 15 OUT A K 270Ω LTC-2623 OUT 270Ω 16 15 14 13 12 11 10 OUT 270Ω OUT www.pighixxx.com BY ND 03 APR 2013 ver rev 10 THE UNOFFICIAL ARDUINO basic connections Segments Display (Common Anode) with MAX7221 14 11 13 16 15 LTC-2623 16 15 14 13 12 11 10 DOUT DIG0 SEGD DIG4 SEGDP GND SEGE DIG6 SEGC 11 DIG2 DIG3 DIG7 14 SS MAX7221 1 DIN GND SEGB DIG5 SEGF 16 DIG1 SEGA 13 LOAD CS CLK DIG4 SEGDP GND SEGE DIG6 SEGC DIG2 DIG7 Iset RX SEGD DIG3 V+ SEGG DIG0 5V MOSI DOUT 24 15 Current 1.5v RX 2.0v 40ma 30ma 20ma 10ma 12KΩ 12KΩ 11KΩ 10KΩ 10KΩ 18KΩ 17KΩ 16KΩ 15KΩ 14KΩ 30KΩ 28KΩ 26KΩ 24KΩ 22KΩ 68KΩ 64KΩ 60KΩ 56KΩ 51KΩ 2.5v 3.0v 3.5v 12 MAX7221 DIN V+ Iset SEGG GND SEGB DIG5 SEGF DIG1 SEGA LOAD CS CLK 13 SCK 0,1µF 10µF www.pighixxx.com BY ND 03 APR 2013 ver rev 25 THE UNOFFICIAL ARDUINO basic connections Connect a EEPROM via I2C Write operations Enabled xx24x01x 1Kb xx24x32x 32Kb xx24x02x 2Kb xx24x64x 64Kb xx24x04x 4Kb xx24x128x 128Kb xx24x08x 8Kb xx24x256x 256Kb xx24x16x 16Kb xx24x512x 512Kb Write operations Disabled A0 Vss SCL SDA 24XXXX +5V 100nF A0 A1 A2 Vss Vcc WP SCL SDA 2.2KΩ A2 WP 24XXXX Address 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 24XXXX A1 Vcc SCL SDA www.pighixxx.com BY ND 07 APR 2013 ver rev 26 THE UNOFFICIAL ARDUINO basic connections A Simple programmer ® Connect a PS2 Dualshock controller K 10KΩ Rear A 1N4148 10KΩ 3.3V 33KΩ GND Attention Clock Vib.Motor MOSI NC ICSP ACK 100nF 4.7KΩ K A 5.1 C Zener 5.1V E B BC547 13 MISO 5V SCK MOSI RESET GND 10 +3.3V 11 MISO 4.7KΩ www.pighixxx.com BY ND 08 APR 2013 ver rev 27 THE UNOFFICIAL ARDUINO Port Expander (PCF8574xx) basic connections A0 VDD PCF8574xx informs the microprocessor that there is incoming data or a change of data on its ports without having to communicate via the I2C communication bus A typical Application +5V A1 P2 2.2KΩ INT P7 A0 VDD A1 SDA A2 SCL Absolute max per pin 25mA Absolute max 150mA for entire package P6 P0 P1 P3 P2 P5 SCL INT P7 330Ω P6 330Ω P4 VSS SDA P3 P5 VSS P4 SCL A SDA In applications requiring additional drive, two port pins may be connected together to sink up to 50-mA current K 2.2KΩ P1 100nF SCL PCF8574 P0 PCF8574xx A2 Address PCF8574 PCF8574A 0x38 0x20 0x39 0x21 0x3A 0x22 0x3B 0x23 0x3C 0x24 0x3D 0x25 0x3E 0x26 0x3F 0x27 SDA K How to connect multipe devices A 1N4148 B Buzzer NPN +5V E VDD A0 VDD A1 SDA A1 SDA A1 SDA A2 SCL A2 SCL A2 SCL INT P0 INT P0 P7 P1 P7 P1 P0 P1 P2 P3 VSS 20 P6 P2 P5 P3 P4 VSS 21 P6 P2 P5 P3 P4 VSS PCF8574 A0 PCF8574 VDD PCF8574 A0 C INT C E P7 B P6 BC337 P5 22 P4 www.pighixxx.com BY ND 10 APR 2013 ver rev 28 THE UNOFFICIAL ARDUINO Shift Register (74HC595) basic connections A typical Application QG QH SRCLR GND QH’ 330Ω QF A (RCLK) Needs to be pulled HIGH to set the output to the new shift register values This must be pulled high directly after SRCLK has gone LOW again (SRLCK) When this pin is pulled high it will shift the register RCLK SRCLK (Serial Clear) Clear) (Serial Shift Register Register Shift Must be be pulled pulled Must K +5V Will empty empty the the whole whole Will if pulled pulled LOW LOW if HIGH to to enable enable HIGH (Output Enable) This pin enables the output when tied to GND & disabled when HIGH OE 10 QE 74HC595 The pin (QH’) contains the overflow that is shifted out the other end VCC SER QA QD QB (Ser) Input for the next pin that gets shifted in QC QA QD QC QE QF VCC QG QB QH GND Absolute max per pin 20mA 74HC595 OE SER RCLK SRCLK QH’ SRCLR How to connect multipe devices +5V 100nF QC QA QD SER OE QE RCLK QF QE QF QG VCC QB QC QA QC QA QD SER QD SER OE QE RCLK QF VCC 74HC595 QB 74HC595 VCC 74HC595 10 QB OE RCLK SRCLK QG SRCLK QG QH SRCLR QH SRCLR QH SRCLR GND QH’ GND QH’ GND QH’ SRCLK www.pighixxx.com BY ND 10 APR 2013 ver rev ARDUINO Connect a Digital Potentiometer (MCP4161) basic connections 5V Connect a Distance Sensor (Sharp GP2Y0A21) CS 100KΩ SCK 100nF SDI 10 SCK 13 SCK MOSI 11 SDI VSS Vin Vout MCP4161 VSS CS MCP4161 29 THE UNOFFICIAL VDD P0B P0W P0A VDD B W A P0B P0W P0A MICROCHIP MCP1541 GND Connect a DAC (MCP4921) 5V VIN VOUT VDD MCP1541 CS Analog Input SCK MCP1541 5V 100nF 10µF 16V 100Ω 10Ω SDI MCP4921 IN VSS VOUT VSS VREF LDAC CS SCK MOSI 11 SDI VOUT VSS VREF 10KΩ VDD MCP4921 10 SCK 13 + 100nF 10µF 16V + 100KΩ SHARP VOut LDAC www.pighixxx.com BY ND 13 APR 2013 ver rev 30 THE UNOFFICIAL ARDUINO basic connections RS485 Node 5V RX/TX RE DE RX D First J1 VCC 56Ω B Middle Node Node Last Node Node A GND 4.7KΩ 100KΩ J2 R J3 RE A DE D SN75176 R Node termination jumpers config B 120Ω TX SN75176 4.7KΩ 100nF VCC J1 on J2 on J3 on B J1 off J2 off J3 off J1 off J2 off J3 on A GND 5V DMX Controller (Basic) 100nF R Opt Opt RE Ref INV - DE OUT D SN75176 100Ω VCC B A GND + www.pighixxx.com BY ND 14 APR 2013 ver rev THE UNOFFICIAL TOLERANCE ARDUINO ±5% basic connections ±10% BLACK 0 x1Ω BROWN 1 x10Ω RED 2 x100Ω ORANGE 3 x1,000Ω YELLOW 4 x10,000Ω GREEN 5 x100,000Ω BLUE 6 x1,000,000Ω VIOLET 7 GRAY 8 WHITE 9 I KΩ =x1,000Ω MΩ =x1,000,000Ω MULTIPLIER www.pighixxx.com BY ND 03 APR 2013 ver rev THE UNOFFICIAL ARDUINO basic connections Ceramic Capacitor Code 102K = 1,000pF - ±10% 1p0 1pF 10 10pF 101 n10 100pF 1.2 1p2 1.2pF 12 12pF 121 n12 120pF 1.5 1p5 1.5pF 15 15pF 151 n15 150pF 1.8 1p8 1.8pF 18 18pF 181 n18 180pF 2.2 2p2 2.2pF 22 22pF 221 n21 220pF 2.7 2p7 2.7pF 27 27pF 271 n27 270pF 3.3 3p3 3.3pF 33 33pF 331 n33 330pF 3.9 3p9 3.9pF 39 39pF 391 n39 390pF 4.7 4p7 4.7pF 47 47pF 471 n47 470pF 5.6 5p6 5.6pF 56 56pF 561 n56 560pF 6.8 6p8 6.8pF 68 68pF 681 n68 680pF 8.2 8p2 8.2pF 82 82pF 821 n82 820pF II Significant Digit 1st 2nd Multiplier none 10 100 1,000 10,000 100,000 1,000,000 C J K M D Z ±0.25pF ±5% ±10% ±20% ±0.5pF +80% -20% 1,000 0.001 pF nF µF www.pighixxx.com BY ND 11 APR 2013 ver rev III THE UNOFFICIAL ARDUINO basic connections Polyester Film-Mylar Capacitor Code Working Voltage 334K = 0.33µF ±20% 100V 100V 102 1n 001 1,000pF 103 10n 01 10,000pF 104 100n 100,000pF 122 1n2 0012 1,200pF 123 12n 012 12,000pF 124 120n 12 120,000pF 152 1n5 0015 1,500pF 153 15n 015 15,000pF 154 150n 15 150,000pF 182 1n8 0018 1,800pF 183 18n 018 18,000pF 184 180n 18 180,000pF 222 2n2 0022 2,200pF 223 22n 022 22,000pF 224 220n 22 220,000pF 272 2n7 0027 2,700pF 273 27n 027 27,000pF 274 270n 27 270,000pF 332 3n3 0033 3,300pF 333 33n 033 33,000pF 334 330n 33 330,000pF 392 3n9 0039 3,900pF 393 39n 039 39,000pF 394 390n 39 390,000pF 472 4n7 0047 4,700pF 473 47n 047 47,000pF 474 470n 47 470,000pF 562 5n6 0056 5,600pF 563 56n 056 56,000pF 564 560n 56 560,000pF 682 6n8 0068 6,800pF 683 68n 068 68,000pF 684 680n 68 680,000pF 822 8n2 0082 8,200pF 823 82n 082 82,000pF 824 820n 82 820,000pF Significant Digit 1st 2nd Multiplier none 10 100 1,000 10,000 100,000 F G J K M 1~2% 2% 5% 10% 20% 1,000 0.001 pF nF µF www.pighixxx.com BY ND 11 APR 2013 ver rev 31 THE UNOFFICIAL ARDUINO Drive a Motor (L298) basic connections A K A 1N4007 L298N K 1N4007 A B 100nF 100nF + VIN 100µF 50V + 100µF 50V 5V OUT CURRENT SENSING B OUTPUT OUTPUT INPUT ENABLE B INPUT LOGIC SUPPLY VOLTAGE V SS GND INPUT ENABLE A INPUT SUPPLY VOLTAGE VS OUTPUT OUTPUT CURRENT SENSING A OUT OUT OUT www.pighixxx.com BY ND 15 APR 2013 ver rev 32 THE UNOFFICIAL 5V ARDUINO Debouncing a Pushbutton basic connections 4.7KΩ Simple Debouncer IN 5V 10KΩ VCC 1Y 6A 2Y 3A K A 1N4148 6Y 5A ports available 5Y 3Y 4A GND 4Y 100nF 10KΩ 2A SN7414 100nF 1A IN 470Ω 100nF 1A VCC 1Y 6A 2A 6Y 2Y 5A 5V GND 4Y SN7414 1A VCC CLR VCC 1Y 6A D CLR 6Y CK 5A PR 2A 3KΩ A D CLR Q 4A Q Q GND 4Y GND Q PR D PR 5Y 3Y 3A VCC CK CK CLR D 2Y SN7474 4A SN7414 3Y 220Ω 5Y IN Step IN Dir 100nF 220Ω 3A Debouncing a Rotary Encoder CLR CK Q 100nF D Q C 3KΩ PR CK Q + PR PR 1µF CLR + D CK B Q Q Q Q B A C GND Q SN7474 www.pighixxx.com BY ND 15 APR 2013 ver rev 33 THE UNOFFICIAL ARDUINO Drive a Stepper (L293) basic connections VIN 5V OUT4 GND OUT2 J1 GND GND 1/2en VCC1 IN1 IN4 OUT1 OUT4 GND OUT3 IN2 IN3 VCC2 3/4en GND + 100µF 50V L293D GND L293D OUT1 OUT IN4 OUT IN1 OUT OUT VCC1 OUT OUT 1/2en GND 100µF 50V 100nF + J2 GND OUT2 OUT3 IN2 IN3 VCC2 3/4en 100nF www.pighixxx.com BY ND 16 APR 2013 ver rev 34 THE UNOFFICIAL ARDUINO basic connections LAB edition Current Sense IN Arduino Logic Analyzer 220Ω D2 220Ω D3 Analog Input 220Ω D4 5V 220Ω 5.6KΩ 1OUT 220Ω 1IN- D6 1IN+ K 2OUT 100nF 2IN2IN+ GND 1KΩ D7 1Ω 220Ω VCC LM358 D5 A 5.1 Zener 5.1V See instructions at la.pighixxx.com 1OUT VCC 1IN- 2OUT 1IN+ 2IN- GND 2IN+ LM358 www.pighixxx.com BY ND 16 APR 2013 ver rev 35 THE UNOFFICIAL ARDUINO basic connections LAB edition Arduino Component Tester (basic) A0 A1 470KΩ 680Ω 470KΩ 680Ω 470KΩ 680Ω A2 To get full accuracy use 1% tolerance resistors D9 D8 Allways be shure to discharge capacitors before connecting them to the Tester! D11 D10 Download sketch at at.pighixxx.com D13 D12 www.pighixxx.com Original Project by Markus Frejek AVR-Transistortester, Embedded Projects Journal, 11 Ausgabe, 2011 Arduino version by PighiXXX BY ND 25 APR 2013 ver rev THE UNOFFICIAL IV Simple Transistor Comparison Table ARDUINO BC337 basic connections 45V - 800mA 100@100mA cbe 2N2222 40V - 600mA 35@.1mA TRANSISTOR Name cbe MAX working Voltage xxV - xxxmA xxx@xxxmA 1A BC547 BCxxx 45V - 100mA 420@2mA BC546 MAX Collector Current 45V - 100mA 420@2mA hFE Amplification BC556 cbe cbe 10 BC558 25V - 800mA 100@100mA 30V - 100mA 420@2mA cbe cbe 50 cbe cbe BC328 80 45V - 100mA 420@2mA 0m 0m 0m A A A BC557 BC327 BC640 45V - 100mA 180@2mA 45V - 800mA 100@100mA 80V - 1A 63@150mA cbe cbe ecb Pinout BC559 BC549 30V - 100mA 200@2mA 30V - 100mA 200@2mA BC548 cbe 30V - 100mA 200@2mA cbe cbe BC338 45V - 800mA 100@100mA cbe NPN PNP BC639 80V - 1A 40@150mA www.pighixxx.com ecb BY ND 25 APR 2013 ver rev ... VDD basic connections A0 12 THE UNOFFICIAL PCF8574x 10KΩ 5V ND BY Used for 4bit mode www.pighixxx.com 03 APR 2013 ver rev 13 THE UNOFFICIAL ARDUINO basic connections Connect a NOKIA LCD (Basic) ... 1.8KΩ = www.pighixxx.com GND BY ND 03 APR 2013 ver rev 14 THE UNOFFICIAL ARDUINO Drive a Unipolar Stepper (Basic 1) basic connections D8 D9 D11 OUT1 IN2 OUT2 IN3 OUT3 IN4 IN5 IN6 IN1 OUT1 IN2 OUT2... 1/4W K 12 External Motor Supply A Not Arduino Supply! www.pighixxx.com BY ND 03 APR 2013 ver rev 15 THE UNOFFICIAL ARDUINO Connect a graphical LCD via I2C basic connections 5V GPA7 GPB1 GPA6 GPB2

Ngày đăng: 16/12/2019, 15:39

w