You are on page 1of 9

OLIMEX 2012 PIC-IO User's Manual

PIC-IO development board


User's Manual
Rev.C, October 2012

Copyright(c) 2012, OLIMEX Ltd, All rights reserved


All boards produced by Olimex are ROHS compliant
OLIMEX 2012 PIC-IO User's Manual

INTRODUCTION:

PIC-IO board was designed as simple platform which to allow control of appliances and
devices with PIC, the idea was to build something like tiny PLC controller which is possible
to program in C or assembler instead of the weird PLC relay language.

Lets see what we have on board:

Four High voltage/ High Current relays with NO-NC-COM contacts available on terminal
block. The relay switching current is rated: 15A/125VAC, 10A/250VAC, 15A/24VDC. Note
that these relays are good for switching resistive loads, but if you have to commutate
inductive loads the relays will wear off quickly due to the sparking when disconnect the
inductive loads (like motors).
Each relay have status LED associated with it so you can easy see which relay is in ON and
which in OFF state.
O1 is connected to RA3 CMP1 and PIC CCP module can be used to generate ON/OFF pulses.
O2-O3-O4 are connected to RA2-RA1-RA0.

Four opto-isolated inputs will allow to detect voltages in range +5-24VDC. Opto-couplers are
fast and switch On/Off for 10 uS, so quick signals could be detected.
!NOTE for owners of MOD-IO prior to revision C1: the above information is correct
only for the opto-isolated couplers the board is capable to handle up to 22VDC for
them. You need to swap R1, R2, R3, R4 - 330R resistors with 470R ones be able to use
24VDC! This has been fixed in the latest revision as seen in the schematics.

I1 is connected to RA4 and is good for counting as this pin is connected to PIC T0CKI.
I2 is connected to RB0 which is INT and generates interrupts.
I3 is connected to CCP1 and is good for pulse width measurement.
I4 is connected to RB4.
The inputs have status LEDs so easy could be seen which input have voltage. Note that the
optocouplers inverse the levels i.e. when on the input have +5V the PIC pin will read 0 and
vice versa.

Status LED is connected to RB5.

PIC-IO have RS232 connector, but the driver is made by tricky level shifter which uses the
other side RS232 negative levels to generate the PIC-IO levels, so on the other side you must
OLIMEX 2012 PIC-IO User's Manual

have real RS232 driver (like PC) if you try to connect two PIC-IO boards by RS232 the
connection will fail as no one of the boards will generate the negative levels.

The on-board ICSP connector allow you to program the PIC on the board without pulling it of
the socket, by ICSP programmer like PIC-MCP, PIC-MCP-USB, PIC-PG1, PIC-PG2, PIC-
PG3, PIC-PG4 or to program and debug it with PIC-ICD2, PIC-ICD2-POCKET or PIC-
ICD2-TINY. IMPORTANT: all programmers provide power supply through ICSP connector
during the programming PIC-IO should not be powered via the external power jack!

The power supply circuit have protection diode for reverse connection. The positive point is
the internal pin of the power jack. The input voltage could be in range 1214V DC.

The oscillator circuit is made with 20 Mhz crystal oscillator, so you can run your PIC at
maximum performance.

The RESET is connected with 10K to +5V and allow safe use of PIC-ICD2 or PIC-MCP
programming.
OLIMEX 2012 PIC-IO User's Manual

FEATURES:

ICSP/ICD connector for programming and debugging


RS232 interface
DIL18 socket
Quartz crystal 20Mhz
LED to RB5 through jumper
Four opto-isolated inputs with status LEDs
Four Relays 10A/250VAC with status LEDs
Power plug-in jack, accept AC and DC input
Four mounting holes 3,3 mm (0,13")
FR-4, 1.5 mm (0,062"), green soldermask, white silkscreen component print
Dimensions 100x80 mm (3,9x3,15")
OLIMEX 2012 PIC-IO User's Manual

HARDWARE:
+12V

REL1
H200 LED5
+12V VR +5V D6
78L05 1N4004
PWR+ D5 R15 OUT1-3
IN OUT 1.5K
-2
-1 1N4004 C1 GND C2 C3
REL1
+12VDC R5 T1
O1
220uF/25VDC 100n 100uF/16VDC 2N3904 OUT1-2
2K
+5V
OK1

R27
10K
R1 LED1 1 6 GND
IN1-1 5 I1 R23
470 OUT1-1
D1
1N4148 2 4 10K
IN1-2 R19 PICICSP +12V
470K RESET 1
4N37 +5V 2
3
OK2 4 REL2
R2 LED2 1 6 H200 LED6
R24 5
IN2-1 5 I2 +5V GND D7
470 6
D2 10K U1 1N4004
1N4148 2 4 R16 OUT2-3
IN2-2 R20 C7 14 13 ICSP 1.5K
VDD RB7/T1OSI
470K 100n 12
4N37 RB6/T1CKI 11 R14 REL2
16 RB5 10 I4 R6
OK3 C4 RA7/OSC1 O2 T2
R3 LED3 20p Q1
RB4/PGM 9 I3 330 2N3904 OUT2-2
1 6 RB3/CCP1 2K
IN3-1 5 I3 R25 C5 20MHz 15
RA6/OSC2
8 T XD
470 RB2/TX/CK 7
D3 20p R9
RXD LED9

R28
10K
10K RESET 4 RB1/RX/DT 6 I2
1N4148 2 4 R21 RA5/MCLR RB0/INT
IN3-2 10K
470K +5V 3 I1 OUT2-1
4N37 RA4/T0CKI/CMP2 2 O1 GND
RA3/AN3/CMP1 1 O2
+12V
OK4 RA2/AN2/VREF
R4 LED4 1 6
18 O3
5 RA1/AN1 17
IN4-1 5 I4 R26 VSS
O4
470 RA0/AN0
D4 REL3 LED7
10K PIC_18pin H200
1N4148 2 4 R22 D8
IN4-2 GND
470K 1N4004
4N37 R17 OUT3-3
+5V +5V 1.5K
REL3
R7 T3
T5 R10 O3
T XD 2N3904 OUT3-2
PNP2N3906 R13 2K
10K
10K

R29
10K
RS232 RXD
1 R11 OUT3-1
6 2 4,7K
7 3 D10 R12 T6 +12V
8 4 2N3904
1N4148 10K
9 5
C6 D11
REL4
+

10uF/25VDC 1N4148 LED8


GND H200
D9
GND GND 1N4004
R18 OUT4-3
1.5K
REL4
O4 R8 T4
2N3904 OUT4-2
PIC-IO_rev_C1 2K
R30
10K
Copyright (C) 2002, OLIMEX Ltd
http://www.olimex.com/dev OUT4-1
OLIMEX 2012 PIC-IO User's Manual

SOFTWARE:

DEMO1: PIC16F628-I/P CONTROL SOFTWARE

This is demo code, which allow control of the PIC-IO inputs/outputs via PC
with Hyper terminal.

Connect PIC-IO RS232 with cable to your PC and run Hyper terminal with
these settings: 9600,8,N,1,NONE. When you apply power this will be seen
on the Hyper terminal window:
***************************
* PIC-IO CONTROL *
* (C) 2007, OLIMEX Ltd*
***************************
>_

To read the inputs in binary format type r, PIC-IO will respond with
something like:
%0000 if all inputs are 0 or
%1111 if all inputs are 1 (i.e. +5V is applied)
the inputs are with right less significant bit i.e. the order is: I4 I3 I2 I1

To read the inputs in HEX format type R, PIC-IO will respond with
something like:
$0 if all inputs are 0 or
$F if all inputs are 1

To change the outputs type w0101, this will switch on relay 1 and relay 3
and will switch off relay 2 and relay 4.
If you want to use HEX value you can write W5 for instance which will
switch on relay 4 and relay 1 and will switch off relay 2 and relay 3.

Any other commands will not be recognized and PIC-IO will respond with
ERR
OLIMEX 2012 PIC-IO User's Manual

ORDER CODE:

PIC-PIO assembled and tested (no kit, no soldering required)

How to order?

You can order directly from us or from any of our distributors.


Check our web https://www.olimex.com for more info.

Revision history:
REV.A - created June 2007
REV.B - added info about the maximum voltage possible on the opto-couplers, 22VDC by default
REV.C - changed schematic with the latest one, revision C1 of the board has adjusted resistors on the
relay inputs (330R were replaced with 470R); added a note about differences in different
revisions; updated disclaimer; added support and warranty info
OLIMEX 2012 PIC-IO User's Manual

DISCLAIMER

2012 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 PIC-IO. THEY ARE CONSIDERED
SUITABLE ONLY FOR PIC-IO.
OLIMEX 2012 PIC-IO User's Manual

Product support

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.

You might also like