MOD-IO development board user's manual All boards produced by Olimex are ROHS compliant Rev. C, March 013 Copyright(c) 011, OLIMEX Ltd, All rights reserved Page 1
INTRODUCTION BOARD FEATURES MOD-IO is a small but powerful development board who let you control optoisolated input and relay outputs - with this features is possible to turn on and off almost any electronic device at home. The board has UEXT_FEMALE connector which allows you to communicate with a PC and UEXT_MALE connector where you can connect other Olimex board with UEXT. The MOD-IO project is fully open software and open hardware. The customer has full access to the documentation of the board including schematics and board design. The main idea of MOD-IO chain connection is to extend: - isolated relay outputs - isolated digit inputs - non isolated analog inputs - non isolated digit inputs/outputs using UEXT male/female connector. So the MCU interfaces (IC, SPI, UART) from all chain boards are connected in parallel. Note that if you want to connect more than 1 MOD-IO board then on the interface bus (IC or UART or SPI) has to have only one Master device. The other devices have to be Slaves. For example: if UART interface is used - the master will send a string with Slave address and command. All Slaves will listen UART bus through RXD line while all Slave TXD lines are inputs. So when the address is recognized from the Slave device, the one will answer as it will force TXD pin like output but immediately after command answer is finished the Slave TXD pin must be initialized like input. The same principle can be used for other interfaces (SPI or IC). Microcontroller: Atmega16L AVRISP connector JTAG connector EXT connector UEXT_MALE UEXT_FEMALE Clock circuit User button Reset circuit and button Power Jack Power-on led Nine status leds Four optocoupler isolated inputs Page
Four Relays PCB: FR-, 1.5 mm (0,06"), solder mask, silkscreen component print Dimensions: 100x80 mm (3.9x3.15") Page 3
ELECTROSTATIC WARNING The MOD-IO board is shipped in protective anti-static packaging. The board must not be subject to high electrostatic potentials. General practice for working with static sensitive devices should be applied when working with this board. BOARD USE REQUIREMENTS Cables: Hardware: Software: The cable you will need depends on the programmer/debugger you use. If you use AVR-PG1, or AVR-JTAG, you will need RS3 cable, if you use AVR-PG, you will need LPT cable, if you use AVR-USB- JTAG, AVR-ISP500, AVR-ISP500-TINY, AVR-ISP500-ISO, AVR-ISP- MK you will need 1.8 meter A-B USB cable. One of Olimex programmers/debuggers AVR-PG1, AVR-PG, AVR-ISP500, AVR-ISP500-TINY, AVR-ISP500-ISO, AVR-JTAG, AVR- USB-JTAG, AVR-ISP-MK or other compatible programming/debugging tool. Make sure to check if the above programmer/debugger is supported by the IDE you are going to use. AVR C Compiler PROCESSOR FEATURES MOD-IO use 8-bit AVR Microcontroller with 16K Bytes In-System Programmable Flash, with these features: High-performance, Low-power AVR 8-bit Microcontroller Advanced RISC Architecture 131 Powerful Instructions Most Single-clock Cycle Execution 3 x 8 General Purpose Working Registers Fully Static Operation Up to 16 MIPS Throughput at 16 MHz On-chip -cycle Multiplier High Endurance Non-volatile Memory segments 16K Bytes of In-System Self-programmable Flash program memory 51 Bytes EEPROM 1K Byte Internal SRAM Write/Erase Cycles: 10,000 Flash/100,000 EEPROM Data retention: 0 years at 85 C/100 years at 5 C Optional Boot Code Section with Independent Lock Bits In-System Programming by On-chip Boot Program True Read-While-Write Operation Page
Programming Lock for Software Security JTAG (IEEE std. 119.1 Compliant) Interface Boundary-scan Capabilities According to the JTAG Standard Extensive On-chip Debug Support Programming of Flash, EEPROM, Fuses, and Lock Bits through the JTAG Interface Peripheral Features Two 8-bit Timer/Counters with Separate Prescalers and Compare Modes One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode Real Time Counter with Separate Oscillator Four PWM Channels 8-channel, 10-bit ADC 8 Single-ended Channels 7 Differential Channels in TQFP Package Only Differential Channels with Programmable Gain at 1x, 10x, or 00x Byte-oriented Two-wire Serial Interface Programmable Serial USART Master/Slave SPI Serial Interface Programmable Watchdog Timer with Separate On-chip Oscillator On-chip Analog Comparator Special Microcontroller Features Power-on Reset and Programmable Brown-out Detection Internal Calibrated RC Oscillator External and Internal Interrupt Sources Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby and Extended Standby I/O and Packages 3 Programmable I/O Lines Operating Voltages.7-5.5V Speed Grades 0-8 MHz Power Consumption @ 1 MHz, 3V, and 5 C Active: 1.1 ma Page 5
Idle Mode: 0.35 ma Power-down Mode: < 1 µa Page 6
BLOCK DIAGRAM Page 7
MEMORY MAP Page 8
Page 9
SCHEMATIC G1 DB10(SMD) PWR_J VR1(5V) 8 YDJ-113 8-30 VDC R1 3 150k C 1uF/50v 0uF/35V +5V EN 5 VIN LM1117IMPX-ADJ SW 1 INV N.C. GND 7 FB IN 100uH/SW68 RT 6 100n 110k REL D9 RAS-05-15 1N18/SMD OUT ADJ/GND C5 R C3 green O VR() L1 BD9001FSO-8 C1 n7 C PWR_LED red R7 R D1 1N5819(smd) R3 8.K REL R37 OUT-3 OUT- 1K C6 0R/1% C7 R6 100n 390R/1% 10n C9 C8 OUT-1 R8 0R AIN-1-1 100n O1 1K R35 T BC817 1K GND R36 R5 AIN-1- Fmax=50kHz R19 AN1 100R R0 C0 NA 33nF 10K K green O3 R9 100R RST AIN-1-3 TB/3.5mm R1 AN 100R R C1 NA 33nF 10K O[1..] R3 AVRISP AN3 100R C R 33nF NA 1 3 6 5 8 7 10 9 RST R11 AN 100R STAT yellow C3 R6 330R TB/3.5mm RST 1 3 6 5 8 7 10 (ADC7)PA7 31 (ADC6)PA6 AN3 3 (ADC5)PA5 AN O O3 O O1 33 (ADC)PA 3 (ADC3)PA3 35 (ADC)PA 36 (ADC1)PA1 37 (ADC0)PA0 Q REL3 RST RESET 7 XTAL 1 C1 33p C13 Q1 8MHz/0pF 8 XTAL1 33p (SCK)PB7 (MISO)PB6 1 (MOSI)PB5 (SS)PB 3 (AIN1)PB3 (AIN0/INT)PB 1 (T1)PB1 0 (T0)PB0 6 (TOSC)PC7 5 (TOSC1)PC6 PC5(TDI) 3 PC(TDO) PC3(TMS) 1 PC(TCK) 0 PC1(SDA) AREF AVCC AGND TCK TDO TMS TDI 9 O GND R38 TDI TDO TMS TCK 1K R39 NA 10K 9 100n green O 7 C15 8 REL RAS-05-15 1N18/SMD 100n SDA SCL VCC 19 PC0(SCL) 16 (OC)PD7 15 (ICP)PD6 3 1 (OC1A)PD5 13 (OC1B)PD 1 (INT1)PD3 11 (INT0)PD 10 (TXD)PD1 9 (RXD)PD0 REL D7 R3 OUT-3 OUT- 1K VCC VCC1 1 T3 BC817 C1 3 OUT3-1 VCC MCP130T C11 OUT3-1K RESET OUT3-3 R0 U 3768Hz/6pF JTAG 30 GND 33nF NA AIN--3 AN1 AN SCK MISO MOSI #SS LED I I3 I BH10S AIN-- D8 REL3 1N18/SMD RAS-05-15 T1107A(6x3.8x.5mm) R10 100n AN[1..] AIN--1 C10 5 OUT-1 17 O3 38 R1 T BC817 1K R 10K IN- + red LED U6 R7 3.9k I1 1 D5 1N18/SMD IN-1 I1 3 + H11A817SMD 3.9k D 1N18/SMD IN3-1 + 3.9k D3 1N18/SMD 3 I + IN1-1 - 3.9k 100n 100n 100n green O1 39 REL1 D6 RAS-05-15 1N18/SMD 1 H11A817SMD OUT1-3 OUT1- OUT1-1 O REL1 R6 7K I3 R 1K T1 BC817 R5 10K I3 R3 R1 7K 3.7K R13 I red LED1 U3 D 1N18/SMD 18 ATMEGA16L H11A817SMD R33 C18 R30 - IN1- C17 O[1..] 1 1 IN-1 GND C16 1K red LED U R31 GND1 I H11A817SMD - IN- 6 EXT WF6S red LED3 U5 R9 I1 BUT TXD RXD 5 7K - IN3- R8 GND 6 3 I R3 7K 100n NA R15 R16 R17 R18.7K NA.7K.7K BUT 100R C19 R1 BUT T1107A(6x3.8x.5mm) UEXT_MALE RXD1 SCL3 5 MISO SCK7 9 BH10S UEXT_FEMALE TXD SDA MOSI 10 #SS 6 8 1 RXD SCL3 5 MISO SCK7 9 TXD SDA MOSI 10 #SS 6 8 IDC10S/PCB This schematic is released under the Creative Commons Attribution-Share Alike 3.0 United States License. MOD-IO_rev_A1 https://www.olimex.com OLIMEX LTD, Plovdiv, Bulgaria, 013
BOARD LAYOUT POWER SUPPLY CIRCUIT MOD-IO is typically power supplied with 8-30V DC. Power consumption when all relays are working is about 310 ma. CLOCK CIRCUIT RESET CIRCUIT Crystal Quartz 8 MHz connected to Atmega16l pin 7 (XTAL) and pin 8 (XTAL1). Crystal Quartz 3.768kHz connected to Atmega16L pin 5 ((TOSC1)PC6) and pin 6 ((TOSC)PC7). MOD-IO reset circuit includes Reset scheme MCP130T (U), AVRISP connector pin 5, JTAG connector pin 6, Atmega16L pin (RESET), R9 (100Ohm), R10 (10k), C10 (100nF) and RST button. Page 11
CONNECTOR DESCRIPTIONS AVRISP Pin # Signal Name 1 MOSI 3 NC GND 5 RST 6 GND 7 SCK 8 GND 9 MISO 10 GND JTAG Pin # Signal Name 1 TCK GND 3 TDO 5 TMS 6 RST 7 8 NC 9 TDI 10 GND EXT Pin # Signal Name 1 PD7 PD6 3 PD5 PD 5 6 GND Page 1
UEXT_MALE More info available here: https://www.olimex.com/products/modules/uext/ Pin # Signal Name 1 NC GND 3 RXD TXD 5 SCL 6 SDA 7 MISO 8 MOSI 9 SCK 10 #SS UEXT_FEMALE Pin # Signal Name 1 NC GND 3 RXD TXD 5 SCL 6 SDA 7 MISO 8 MOSI 9 SCK 10 #SS Page 13
IN1, IN IN3, IN Please note that the opto-isolated inputs IN1, IN, IN3, IN in earlier revisions were able to receive signals in the 3V to 6V range. R7, R9, R31, R33 were 330R and R8, R30, R3, R3 were R.7k. We have now adjusted the values of the resistors in that part of the schematic in latest revisions to allow higher voltage input in the -.0V range. R7, R9, R31, R33 are now R3.9k and R8, R30, R3, R3 are now R7k Pin # Signal 1 - + IN1 connected to (T0)PB0 signal I IN connected to (T1)PB1 signal I3 IN connected to (AIN0/INT)PB signal I IN connected to (INT1)PD3 signal I1 OUT1, OUT, OUT3, OUT AIN-1 OUT1 connected to (ADC3)PA3 signal name O OUT connected to (ADC)PA signal name O3 OUT3 connected to (ADC1)PA1 signal name O OUT connected to (ADC0)PA0 signal name O1 Please note that the analog inputs by default are as big as the input levels but you might change this. Just calculate the needed resistors R19/R0 and R1/R. Pin # Signal Name Connected to 1 VCC AN1 (ADC7)PA7 3 AN (ADC6)PA6 Page 1
AIN- Please note that the analog inputs by default are as big as the input levels but you might change this. Just calculate (and mount/replace) the needed resistors R3/R and R5/R6. Pin # Signal Name Connected to 1 AN3 (ADC5)PA5 AN (ADC)PA 3 AGND Analog GND PWR_J Pin # Signal Name 1 Power Input GND Page 15
JUMPER DESCRIPTION INPUT/OUTPUT There are no jumpers on this board. User button with name BUT connected to Atmega16L pin 11 ((INT0)PD). Reset button with name RST connected to Atmega16L pin (RESET). Status LED (yellow) with name STAT connected via R11 (330 Ohm) to Atmega16l pin 3 ((AIN1)PB3). Status LED (red) with name LED1 visualize input (IN1) state. Status LED (red) with name LED visualize input (IN) state. Status LED (red) with name LED3 visualize input (IN3) state. Status LED (red) with name LED visualize input (IN) state. Status LED (green) with name O1 visualize relay (REL1) state. Status LED (green) with name O visualize relay (REL) state. Status LED (green) with name O3 visualize relay (REL3) state. Status LED (green) with name O visualize relay (REL) state. Power-on LED (red) with name PWR_LED shows that + voltage is applied to the board. Page 16
MECHANICAL DIMENSIONS Page 17
AVAILABLE DEMO SOFTWARE There are two firmware available for MOD-IO: one is for RS3 control and the other is for IC control. They might be found at the web page of MOD-IO. Direct download links: MOD-IO IC (newer) firmware C source and hex MOD-IO RS3 (older) firmware C source and hex Page 18
ORDER CODE MOD-IO assembled and tested. How to order? You can order directly from our web shop or from any of our distributors. The list of distributors might be found here: https://www.olimex.com/distributors. Check our web https://www.olimex.com for more info. Revision history: Board's revision: Rev. A - create November 009 Manual's revision: Rev. B edited September 011 added more detailed INTRODUCTION and MECHANICAL DIMENSIONS Rev. C edited March 013 added new schematic, more information about AIN and IN inputs; IN input voltage adjusted; updated disclaimer and product support Page 19
Disclaimer 013 Olimex Ltd. Olimex, logo and combinations thereof, are registered trademarks of Olimex Ltd. Other product names may be trademarks of others and the rights belong to their respective owners. The information in this document is provided in connection with Olimex products. No license, express or implied or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Olimex products. The Hardware project is released under the Creative Commons Attribution-Share Alike 3.0 United States License. You may reproduce it for both your own personal use, and for commercial use. You will have to provide a link to the original creator of the project https://www.olimex.com on any documentation or website. You may also modify the files, but you must then release them as well under the same terms. Credit can be attributed through a link to the creator website: https://www.olimex.com The software is released under GPL. It is possible that the pictures in this manual differ from the latest revision of the board. The product described in this document is subject to continuous development and improvements. All particulars of the product and its use contained in this document are given by OLIMEX in good faith. However all warranties implied or expressed including but not limited to implied warranties of merchantability or fitness for purpose are excluded. This document is intended only to assist the reader in the use of the product. OLIMEX Ltd. shall not be liable for any loss or damage arising from the use of any information in this document or any error or omission in such information or any incorrect use of the product. This evaluation board/kit is intended for use for engineering development, demonstration, or evaluation purposes only and is not considered by OLIMEX to be a finished end-product fit for general consumer use. Persons handling the product must have electronics training and observe good engineering practice standards. As such, the goods being provided are not intended to be complete in terms of required design-, marketing-, and/or manufacturing-related protective considerations, including product safety and environmental measures typically found in end products that incorporate such semiconductor components or circuit boards. Olimex currently deals with a variety of customers for products, and therefore our arrangement with the user is not exclusive. Olimex assumes no liability for applications assistance, customer product design, software performance, or infringement of patents or services described herein. THERE IS NO WARRANTY FOR THE DESIGN MATERIALS AND THE COMPONENTS USED TO CREATE MOD-IO. THEY ARE CONSIDERED SUITABLE ONLY FOR MOD-IO. Page 0
For product support, hardware information and error reports mail to: support@olimex.com. Note that we are primarily a hardware company and our software support is limited. Please consider reading the paragraph below about the warranty of Olimex products. Warranty and returns: Our boards have lifetime warranty against manufacturing defects and components. During development work it is not unlikely that you can burn your programmer or development board. This is normal, we also do development work and we have damaged A LOT of programmers and boards during our daily job so we know how it works. If our board/programmer has worked fine then stopped, please check if you didn't apply over voltage by mistake, or shorted something in your target board where the programmer was connected etc. Sometimes boards might get damaged by ESD shock voltage or if you spill coffee on them during your work when they are powered. Please note that warranty do not cover problems caused by unproper use, shorts, over-voltages, ESD shock etc. If the board has warranty label it should be not broken. Broken labels void the warranty, same applies for boards modified by the customer, for instance soldering additional components or removing components - such boards will be not be a subject of our warranty. If you are positive that the problem is due to manufacturing defect or component you can return the board back to us for inspection. When we receive the board we will check and if the problem is caused due to our fault and we will repair/replace the faulty hardware free of charge, otherwise we can quote price of the repair. Note that all shippings back and forth have to be covered by the customer. Before you ship anything back you need to ask for RMA. When you ship back please attach to it your shipping address, phone, e-mail, RMA# and brief description of the problem. All boards should be sent back in antistatic package and well packed to prevent damages during the transport. Page 1