IFC-AI08 Interface Free Controller Analog Input Card User`s Manual

IFC-AI08 Interface Free Controller Analog Input Card User`s Manual
IFC-AI08
Interface Free Controller
Analog Input Card
User’s Manual
V1.0
Sept 2008
Information contained in this publication regarding device applications and the like is intended through suggestion only and may
be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. No
representation or warranty is given and no liability is assumed by Cytron Technologies Incorporated with respect to the accuracy
or use of such information, or infringement of patents or other intellectual property rights arising from such use or otherwise. Use
of Cytron Technologies’s products as critical components in life support systems is not authorized except with express written
approval by Cytron Technologies. No licenses are conveyed, implicitly or otherwise, under any intellectual property rights.
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
Index
1. Introduction and Overview
1
1.1 Introduction of Interface Free Controller
1
1.2 System Overview
2
2. Packaging List
3
3. Product Specification
4
3.1 Communication Address
4
3.2 Programmer
4
3.3 Input and Output device
4
3.4 Operating Voltage
4
4
Board or Product Layout
5
5
Installation (hardware)
7
6
Installation (software)
14
7
Getting Started
15
7.1 Basic Setup with Control Panel (IFC-PC00 + IFC-MB00 + IFC-AI08
16
+ IFC-CP04)
8. Warranty
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
22
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
1. INTRODUCTION AND OVERVIEW
1.1 Introduction of Interface Free Controller
IFC (Interface Free Controller) offer a new concept of developing microcontroller embedded
system and also robotics system. With IFC, no more frustration in determine hardware
interface and configuring peripheral in software. Checking few hundreds pages of data sheet
can be waved. With the concept of interfacing card, user may stack as many as 64 cards in a
system to get infinite combination of peripherals. The design aim is to offer 3 simple steps in
microcontroller system development – Configure card’s address, Stack IFC cards, Write
Program and Run!
Furthermore, with functions based software library, user save valuable time during software
development by concentrating on algorithm development. No more flipping or scrolling PIC
data sheet looking for ADCON0, T1CON or even TRISA. With just a programming hand
book, user may simply copy the header file, call comprehensive functions and it’s ready to
rock.
IFC come with a brain card (main controller) where the main program is loaded. There are
several cards available for robotics development such as control panel, 15A brush motor
driver, brushless motor controller, counter and digital input, output card, power card, analog
input card and PS2 Controller card. This document will focus on Analog Input card, IFCAI08. This card has been designed with capabilities and features of:
•
•
•
•
•
•
•
•
•
•
•
•
•
Industrial grade PCB.
Every component is soldered properly and tested before board is shipped.
Circuit power and busy indicator LED.
12V operation.
6 set of 1x3 headers to select communication address.
8 analog input ports.
5V or 3.3V selectable power source to various kind of sensor.
Selectable sampling rate and average rate for every analog channel independently.
Software configurable 10bit or 8bit analog resolution.
Maximum of 64 analog cards can be stacked.
Selectable Vref for IFC-AI08 (3.3V, 5V or adjustable Vref).
Dimension 11.1cm x 6.9cm
Come with sample code and template to start.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
1
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
1.2 System Overview
With serial communication perception, IFC offer million of possibilities to develop
embedded system creatively and easily. In IFC, several cards are stacked to get a complete
embedded system. The minimum card requires is Power card and Main Board.
More cards
More devices
Control Panel Card
PS 2 Controller Card
PS Controller
Analog Input Card
Analog sensor
Digital Input Card
Encoder, digital sensor
Output Card
Relays, etc
Brushless Motor Card
Brushless motors
Brushless Motor Card
Brushless motors
Brush Motor Card
Brush motor
Main Brain
Power card
Power and
communication
This document explains the method to use IFC-AI08.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
2
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
2. PACKAGING LIST
Please check the parts and components according to the packing list. If there are any parts
missing, please contact us at [email protected] immediately.
1. 1 x IFC Analog Input Card, IFC-AI08 with:
• Industrial grade PCB with every component soldered properly.
• 15 x mini jumper
• 8 x Female connector (2510-03) for analog port.
• 24 x Iron Pin (2511)
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
3
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
3. PRODUCT SPECIFICATION
3.1 Communication Address
There are 64 (26) communication address of IFC-AI08 that can be selected. The 6 bits
communication address is determine by selector A5 through A0 (6 set of 1x3 headers on IFCAI08). User can set the card address by using the mini jumper. However, user need to make
sure the communication address chosen on board is compatible with program written in Main
Board.
3.2 Programmer
User does no need to prepare programmer for IFC-AI08. IFC-AI08 is one of the slave cards
of IFC system. The slave program is preloaded before shipped to customer. User will only
need the Main Board of IFC system, IFC-MB00 to control this slave card.
3.3 Input and Output device
The output devices on AI08 are as below:
• 2 status indicator LED: Power and busy LED:
- Power LED (PWR) will turn ON when power supplied to IFC-AI08 card.
- Busy LED (Busy) will turn ON or blinking when IFC-AI08 is
communicating with master card, IFC-MB00.
The input devices on AI08 are as below:
• 8 analog input ports ready with selectable power source:
- Selectable power source for each analog input port (3.3V or 5V). User can
select the input devices power source by using the mini jumper.
- Analog input devices that can be connected to the analog port are:
ƒ Sharp Infrared Distance Sensor
ƒ Maxbotix Ultrasonic Sensor
ƒ Accelerometer
ƒ Gyro
ƒ IMU
ƒ More….
3.4 Operating Voltage
The operation voltage of IFC-AI08 is 12V. User needs to stack a Power Card, IFC-PC00, and
connect a 12V battery on Power Card to supply 12V to Analog Input Card. Please refer
hardware setup in chapter 5.0 Installation (hardware) for connecting power to Analog Input
Card.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
4
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
4. BOARD OR PRODUCT LAYOUT
A
B
L
K
C
D
D
E
J
Label
A
B
C
D
E
F
Function
Analog Input port
Orientation marking
Manufacturing Test Points
Side connector
Vref selector
PIC Microcontroller
I
H
Label
G
H
I
J
K
L
G
F
Function
Vref test point
Adjustable resistor for Vref
Communication address selectors
Status indicator LED
Input device voltage selector
Arrow marking
A – 8 analog input ports ready with selectable power source.
B – The orientation marking on IFC-AI08. Every IFC card has this orientation marking, this
is to help user in ensure the cards are stack correctly.
C – Reserved for Manufacturing Test Point. Please DO NOT short or connect wire to any of
these pins.
D – Side connector for stack card and communication between cards.
E – Vref selector. User can use mini jumper to select Vref for IFC-AI08 either 3.3V, 5V or
adjustable Vref.
F – 28 pin PIC microcontroller which used as controller for this slave card.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
5
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
G – Vref test point for IFC-AI08. User can simply use this test point to check voltage of Vref.
H – Adjustable resistor. User can simply adjust this resistor to get Vref needed.
I – 6 set of 1x3 headers use as communication address selector on IFC-AI08. User can set the
card address by using the mini jumper.
J – 2 status indicator LED to indicate status for power ON (PWR) and busy in communicate
with Main Board card (Busy) PWR LED will turn ON when power supplied to the board.
Busy LED will turn ON when the card is busy in communicate with master card, IFC-MB00.
K – 8 input voltage selectors on IFC-AI08. User can use mini jumper to select either 3.3V or
5V for input voltage of each input port.
L – An arrow mark to help user in ensuring the cards are stack correctly. Every IFC card will
have this arrow mark; user needs to ensure that the arrow points to the same direction when
IFC cards are stack together.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
6
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
5. INSTALLATION (HARDWARE)
For hardware installation of IFC-AI08, user will first need the Main Board card (IFC-MB00)
and Power Card (IFC-PC00) of IFC system. IFC-MB00 is the main controller of IFC system
while IFC-PC00 is the main power supply. For installation of IFC-MB00 and IFC-PC00
please refer to the user’s manual of IFC-MB00.
After user obtain the IFC-AI08, user can stack it on IFC system as shown in Figure.
Ensure the arrow
points to the same
direction.
Ensure the
orientation
marking at the
same side.
Cautions: Please ensure that every card is being stacked properly in correct orientation.
Whole IFC system will be damaged if one of the cards is being stacked wrongly when it
is powered up.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
7
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
Besides stack every card in correct orientation, user must also require to ensure all card pins
are not shifted when stacking. Figures show the example of stacking cards in proper location
and example of stacking cards with shifted pins.
Ensure that all card
pins are not shifted
when stacking.
Examples of
stacking cards with
shifted pins. Please
AVOID this!
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
8
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
Ensure that all card
pins are not shifted
when stacking.
Examples of
stacking cards with
shifted pins. Please
AVOID this!
Cautions: Please ensure that all card pins are not shifted when stacking. IFC system will
NOT function if the pins are shifted.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
9
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
User can use the mini jumper provided on IFC-AI08 to select the communication address of
IFC-AI08. For example, figure below shows the communication address, 000011 selected.
Please make sure the address selected is compatible with the program. Please refer chapter 7
for details of writing program for IFC-AI08. Each slave card must have unique address.
User also needs to select the suitable voltage (3.3V or 5V) to supply to the input device
connected to AI08 depending on the device’s specification. Every analog port has its own
voltage selector. Please refer User’s Manual for IFC-MB00 for the connection of battery to
Power Card. Figure below shows that 5V was selected for AN1, AN2, AN3, AN4 and 3.3V
was selected for AN5, AN6, AN7, and AN8.
5V was selected
for AN1, AN2,
AN3 and AN4
3.3V was
selected for
AN5, AN6,
AN7 and AN8
Caution: Please ensure that only ONE input voltage range (3.3V or 5V) selected for each
selector.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
10
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
Next, user needs to select Vref for IFC-AI08 card. There are 3 selection of voltage to supply
as Vref which are fix 3.3V, fix 5V and adjustable Vref. By using mini jumper, user is required
to select only one Vref preferred (3.3V, 5V or adjustable Vref). If the adjustable Vref is
selected, the adjustable resistor (ADJ RES) is used to adjust the Vref voltage to desired level
from 0 to 5V. Figure below show that 5V is selected Vref.
5V is
selected as
Vref
Figure below shows adjustable Vref is selected. User can adjust the adjustable resistor to set
the Vref voltage. The voltage for Vref can be checked using multimeter through the Vref test
point as shown in figure below.
Test point to
check voltage
of Vref.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
11
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
Figure below shows how to connect the analog devices to analog input port. Be sure that the
voltage selector is selecting the right voltage which is supply to the input device. Before
connecting the input device to input port, user needs to ensure the sequence of pin for input
device is compatible with the sequence of pin offered from analog input card which is clearly
marked on the board (right[+,-,signal]left).
Do ensure that the pins
connected to input device is
correct. (+) for VCC, (-) for
GND and (s) for signal.
Next, turn ON the power through Power Card, the PWR LED of IFC-AI08 will turn ON as
shown in Figure. Initially, if there are no functions related to IFC-AI08 being called in Main
Board’s program, the busy LED will not turn ON or blink.
PWR LED on
IFC – AI08
PWR LED on
IFC - MB00
12V LED on
IFC - PC00
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
12
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
To open the cards, user can use the IFC card’s opener to open the stacked cards. Figure
shows the method to open cards with the opener.
1
2
3
Caution: Please use the opener to open IFC cards to avoid damage of the pins or cards.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
13
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
6. INSTALLATION (SOFTWARE)
User only needs to write program in IFC-MB00 in order to send data and communicate with
IFC-AI08. A program editor, C compiler and UIC00A software are required to be installed
for user to write program, compile it and further load program to IFC main board. User is
recommended to use MPLAB IDE as source code editor and MPLAB C18 as C compiler.
Both this software is from Microchip and it is provided freely to download. Please refer
user’s manual of IFC-MB00 for the installation of MPLAB IDE and MPLAB C18 compiler.
As for the installation of UIC00A software, please refer to UIC00A User’s Manual.
Please refer to MB00 User’s Manual, Chapter 6 for details step to install MPLAB IDE and
C18 compiler.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
14
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
7. GETTING STARTED
IFC is being design with the aim of 3 simple steps to use it. Configure card address, Stack it,
Load program and run. There must be at least power card (IFC-PC00) and main board (IFCMB00) for this system to function. This section will show the example to operate it with
Analog Input Card, IFC-AI08.
1st step: Address
- Configure Card’s address
2nd step: Stacking
- Stack the card/s
- Connect the necessary battery
- Connect necessary sensor or motor
- Turn it ON
3rd step: Program
- Include the necessary header and
object file/s
- Write program using template
given
- Call necessary function referring to
Program Reference Notes
- Compile and Load Program
through UIC00A
There is a basic setup in this chapter for IFC-AI08; the example includes 4 cards, IFC-PC00,
IFC-MB00, IFC-AI08 and one extra card, which is IFC-CP04. Please refer to the following
section of this chapter for setup details.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
15
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
7.1 Basic Setup with Control Panel (IFC-PC00 + IFC-MB00 + IFC-AI08 + IFC-CP04)
Adding a control panel which comes with a 2 x16 character LCD and 4 programmable push
buttons will offer more interesting demonstration. Following steps show the installation of
this system and method to operate it.
a. 1st step, configure the address of cards, IFC-AI08 and IFC-CP04. Analog Input Card
has 6 mini jumpers to configure communication address (A5-A0). It should be set to
000011 if sample source code is being used. As for Control Panel, it should be set to
“CP1” (Upper side).
b. 2nd step is to stack all 4 cards together. The ideal stacking sequence is Power card
(IFC-PC00) at the bottom, Main board (IFC-MB00) at 2nd layer, Analog input Card
(IFC-AI08) at 3rd layer and Control Panel at the top layer as shown in following
figure.
Ensure the arrow
points to the
same direction
Ensure the
orientation
marking is at the
same side
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
16
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
c. Besides stacking every card in correct orientation, user also needs to ensure that all
the pins when stacking are not shifted and inserted to correct location.
Ensure that all the
pins when stacking
are not shifted and
inserted to correct
location.
d. Connect analog input device such as analog distance sensor to input ports. Please refer
hardware setup for connecting input devices to Analog Input Card.
.
e. Connect the battery to Power card as shown; please ensure the polarity is correct.
Connect 1 x 12V
battery to supply
operating voltage to
IFC. Ensure the
polarity is correct.
If 24V is needed in
the system, connect
2 x 12V batteries to
PC00. Ensure the
polarity is correct.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
17
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
f. Turn ON the IFC power by pushing the toggle switch to “ON”. There should be at
least 4 LED (12V LED on Power Card, PWR LED on Main Brain, PWR LED on
Analog Input Card and PWR LED on Control Panel) light up as show.
PWR LED on
IFC – CP04
PWR LED on
IFC – AI08
PWR LED on
IFC - MB00
12V LED on
IFC - PC00
g. 3rd step is to write program and load it. IFC comes with comprehensive function to
save program development time. Functions library will come with the interfacing card
in the form of header file (*.h) and object file (*.o). In order to call these functions,
particular header file and object file must be included under a project.
h. Open MPLAB IDE (please ensure MPLAB C18 compiler is being installed). User can
follow the step in chapter 6.2 of user’s manual on how to open a project named
“IFC_AI08” in MPLAB IDE. Before start writing program, please note that the
header file (iic.h, iic_ai.h and iic_cp.h) and object file (iic.o, iic_ai.o and iic_cp.o) for
IFC-MB00, IFC-AI08 and IFC-CP04 have to be included in the project in order to use
the functions of these cards. A sample source code named “Sample1_AI.c” will be
provided for user to load in the main board card (MB00) in order to test the analog
input card using control panel card (CP04). Even though user do not use the provided
sample source code “Sample1_AI.c”, the related header and object file must also be
included in the project before start a new programming. Figure shows the example to
include the header file, object file and sample code file.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
18
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
i. For those who want to understand the program, please refer to c file named
“Sample1_AI.c” which is provided with this card.
j. Compile this project to generate hex file. Connect UIC00A IDC connector to IFCMB00 as show. The hex file generated is named “IFC_AI08.hex”.
Connector from
UIC00A programmer
k. Load the hex file generated to UIC00A using PICkit2 window (refer to UIC00A
User’s Manual for details). Power up IFC system if it is OFF.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
19
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
l. This sample project will display message at LCD on Control panel. When user power
up IFC system, LCD will display random value if there is no device plug in the analog
port. The figure show as below:
CP04 control panel
display random value
if no devices plug in
the analog port.
m. There are 2 modes for user to select in program “Sample1_AI”. These modes will
display on CP04 control panel when IFC system is power up. User no needs to press
any SW on CP04 to switch between modes. Mode 1 and mode 2 will function
simultaneously. While analog port read the conversion stalling register, it also will
compare the highest value from the port. The modes are:
Mode
Function
1
Read the value (conversion stalling register) from analog input
port (port 1-5) and display the value at CP04 control panel. If there
is no device plug in the analog port, the value returned are random
(not zero).
2
Compare 4 analog port (port 1-4) and figure out the highest value.
CP04 control panel will display the byte returned.
n. Please refer the comment in source code for the details of mode.
o. To remove a card from IFC system, the power should be switched OFF.
p. Please use proper tool to remove the card. User may refer last section in chapter 5.0
Installation (hardware) for the method to open card with provided IFC card opener.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
20
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
Note1: User may refer to IFC-AI08 Card Technical Info for the program function list. It
will help user in writing program for IFC-AI08.
Note2: Each time open a new project for IFC, user need to add ALL header files and
object files for all related IFC cards used. User also needs to include ALL cards’ header
file at the beginning of the program. Please refer sample source code for the example to
include card h file.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
21
ROBOT . HEAD to TOE
Product User’s Manual – IFC-AI08
8. WARRANTY
¾
¾
¾
¾
Product warranty is valid for 6 months.
Warranty only applies to manufacturing defect.
Damage caused by miss-use is not covered under warranty.
Warranty does not cover freight cost for both ways.
Prepared by
Cytron Technologies Sdn. Bhd.
19, Jalan Kebudayaan 1A,
Taman Universiti,
81300 Skudai,
Johor, Malaysia.
Tel:
Fax:
+607-521 3178
+607-521 1861
URL: www.cytron.com.my
Email: [email protected]
[email protected]
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
22
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement