ARDBOX
ARDBOX
ARDBOX ANALOG
Version:
15-07-15_Ardbox_Analog
Ardbox User Guide:
1 Contents
2 ARDBOX FAMILY GUIDE .............................................................................................. 3
3 Precautions.................................................................................................................. 4
1.1. Arduino Board ..................................................................................................... 4
1.2. Intended Audience .............................................................................................. 4
1.3. General Precautions ............................................................................................ 4
4 Technical Specifications .............................................................................................. 5
4.1 General Specifications: ........................................................................................ 5
4.2 Performance Specification: ................................................................................. 5
5 Software interface ....................................................................................................... 6
6 How to connect PLC arduino to PC ............................................................................. 6
7 How to connect PLC to power supply ......................................................................... 7
8 Ardbox Analog I/O Pinout: ......................................................................................... 9
8.1 Zone Connections ................................................................................................ 9
9 I/O Pinout (summary pinout/Arduino PIN) ............................................................... 10
10 Switch configuration ............................................................................................. 11
11 I/0 technical details ............................................................................................... 12
12 Connector details .................................................................................................. 13
13 Connection type .................................................................................................... 14
13.1 Analog (0-10Vdc) / Digital Inputs “configurable” .............................................. 14
14 How does it work: ................................................................................................. 16
14.1 Digital Inputs ..................................................................................................... 16
15 Communications pinout ........................................................................................ 17
15.1 LEFT Zone .......................................................................................................... 17
15.2 TOP Zone ........................................................................................................... 17
16 ARDBOX Family Dimensions: ................................................................................. 19
17 DIN rail mounting: ................................................................................................. 19
18 Software Interface:................................................................................................ 20
2
Page
COMPACT PLC.
Type of signals
* An/Dig Input 10bit 8
(0-10Vdc / 0-24Vdc)
* Digital Input (24Vdc) 1
* Interrupt Input HS
1 (the Digital Input can work as Interrupt)
(24Vdc)
* By using this type of signal you can no longer use Digital signal (24Vdc)
You must read product Datasheet.
(1) With previous request. IMPORTANT
3
Page
1
10k pull-up resistance required (IS.ACI2C-4.7K)
3 Precautions
1.1. Arduino Board
All Ardbox family products use Arduino LEAONARDO Board.
Before using the product under conditions, which are not described in the manual or applying
the product to nuclear control systems, railroad systems, aviation systems, vehicles,
combustion systems, medical equipment, amusement machines, safety equipment and other
systems, machines, and equipment that may have a serious influence on lives and property if
used improperly, consult your INDUSTRIAL SHIELDS representative.
Make sure that the rating and performance characteristics of the product are sufficient for the
systems, machines, and equipment, and be sure to provide the systems, machines, and
equipment with double safety mechanisms.
This manual provides information for programming and operating the Unit. Be sure to read
this manual before attempting to use the Unit keep this manual close at hand for reference
during operation.
Warnings:
Unused pins should not be connected. Ignoring the directive may damage the
controller.
Improper use of this product may severely damage the controller.
Refer to the controller’s User Guide regarding wiring considerations.
Before using this product, it is the responsibility of the user to read the product’s User
Guide and all accompanying documentation.
4
Page
4 Technical Specifications
4.1 General Specifications:
Power supply
DC power supply 24Vdc
voltage
Operating
DC power supply 20.4 to 25.4Vdc
voltage range
Power
DC power supply 30VAC max.
consumption
340g max.
Weight
I/O control method Combination of the cyclic scan and immediate refresh processing methods.
Arduino IDE. Based on wiring (Wiring is an Open Source electronics platform
Programming language composed of a programming language. “similar to the C”.
http://arduino.cc/en/Tutorial/HomePage
Microcontroller ATmega32u4
EEPROM 1kb
NOTE:
Ardbox Family use micro USB cable.
IMPORTANT:
Verify the USB port is detected:
- Ardbox Family PLCs are 24Vdc supplied. IMPORTANT: The polarity IS NOT REVERSAL!
- Make sure that the live and GND connector of the power supply match the PLC.
- Make sure that the power supply mains output is not higher than 24Vdc.
7
Page
- Suggested power suppliers
RIGHT Zone
TOP ZONE
Switch config*
(see section 10 for Outputs
Base
configuration) (common unit)
RIGHT Zone
Arduino Pin
Connector
Communications pinout
Function
Ardbox
Outputs pinout
DE 7 RS485/
SPI SS
RE 4 RS485/
SPI SS
3
Power supply connectors Q0.9 0 Digital Output
Q0.83 1 Digital Output
(24Vdc – Gnd) Q0.73 7 Digial Output
Q0.63 3 Analog/PWM
Q0.5 5 Analog/PWM/
digital Output
Q0.4 6 Analog/PWM/
digital Output
Q0.3 9 Analog/PWM/
Base digital Output
(common unit) Q0.2 10 Analog/PWM/
digital Output
LEFT Zone Q0.1 11 Analog/PWM/
digital Output
Arduino Pin
Connector
Q0.0 13 Analog/PWM/
Function
Ardbox
digital Output
GND - Gnd
GND - Gnd
MISO - SPI 24Vdc -
MOSI - SPI
SCK - SPI
RESET - SPI
5V - SPI
GND - SPI
B - RS485 LEFT Zone
A - RS485
TX - RS232
RX - RS232 Switch config*
SDA-PIN2 2 I2C/ SPI (SS) (see section 14 for Communications configuration.
SCL-PIN3 3 I2C/ SPI (SS)
I0.9 A0 Analog/Digital
Enabling Communications disables some I/Os)
Input
I0.8 A1 Analog/Digital
Input
I0.7 A2 Analog/Digital
Communications pinout
Input
I0.6 A3 Analog/Digital
Input
2
I0.5 A4/ Analog/Digital
A5 Input
2
I0.4 A4/ Analog/Digital
A5 Input
I0.33 4 Analog/Digital Inputs pinout
Input
I0.2 8 Analog/Digital
Input
I0.1 12 Analog/Digital
Input
GND - Gnd
(-)I0.0 -
I0.03 2 Digital Input/
Interrupt
9
Page
2
I0.5 and I0.4 are the same inputs, they are physically binded.
3
See section 10 to enable these connections.
TOP ZONE
Config switch *
(see section 14 for
communications configuration)
Arduino Pin
Connector
Connector
SIGNAL
Ardbox
LED
Function
Function
Ardbox
Ardbox
4
I0.5 and I0.4 are the same inputs, they are physically binded.
10 Switch configuration
LEFT Zone
SWITCH CONFIG TOP Zone
Arduino
OFF* ON ENABLED
Pin ON OFF
7 DE Q0.7 CONNECTION
4 RE I0.3 Q0.1 Q0.1 RO
1 TX Q0.8 RO RO Q0.1
Q0.2 Q0.2 DI
0 RX Q0.9 DI DI Q0.2
2 SDA I0.0
3 SCL Q0.6
*IMPORTANT:
LEFT ZONE. To enable communication connections the switchs must be set to “OFF”. Set to “ON”
position to enable I/Os PLC connection. Communications and I/Os on the chart can not work
simultaneously. For exemple if DE is enabled (OFF), Q0.7 will not work. OFF position provides direct
connection to Arduino Pin (NOT for TX and RX), so they can be programmed according to Arduino pin
features.
TOP ZONE. Communications and outputs can not work simultaneously. If Q0.1 is enabled RO must be
disabled and conversely.
LEFT SIDE
SWITCH CONFIG
Input ON OFF
Q0.6
Q0.5
Q0.4
10 24
Q0.3
Vdc Vdc
Q0.2
Q0.1
Q0.0
SWITCH CONFIG
Q0.6
Q0.5
Q0.4
Q0.3 Analog Digital
Q0.2
Q0.1
Q0.0
Some Outputs can be configured as Analg/Digital and 10Vdc/24Vdc, the chart above summarizes the
positions for each type of configurable I/O.
11
Page
11 I/0 technical details
Maxim current
Signal Vdc
consumption
Analog 0-10Vdc
60mA
5
You can select 24Vdc or 10Vdc (with correctly switch configuration). Digital output will be 12Vdc If you
connect PLC to 12Vdc power supply
12 Connector details
The connector inside the PLCs that mounts on the PCB is MC 0,5/10-G-2,5 THT – 1963502
from Phoenix contact. MC0,5/10-G-2,5THT
For I/O and power supply there is a FK-MC 0,5/10-ST-2,5 - 1881406 connector from Phoenix
contact. FK-MC 0,5/10-ST-2,5
Connection details:
Height 8,1mm
Pitch 2,5mm
Dimension 22,5mm
Switch configuration
(Select Analog position)
int I01 = A05; // select the Analog (0-10Vdc) / Digital (24Vdc)IN //**warning"" (if Analog selection connect 10Vdc MAX).
int I02 = A04; // select the Analog (0-10Vdc) / Digital (24Vdc)IN //**warning"" (if Analog selection connect 10Vdc MAX).
void setup() {
pinMode(I01, INPUT);
}
Void loop(){
value = analogRead(A5);
/* Lo que se quiera */ = digitalRead(I01);
}
14
Page
13.1.2 Digital configuration mode:
Switch configuration
(Select digital position)
int I01 = A05; // select the Analog (0-10Vdc) / Digital (24Vdc)IN //**warning"" (if Analog slection connect 10Vdc MAX).
int I02 = A04; // select the Analog (0-10Vdc) / Digital (24Vdc)IN //**warning"" (if Analog slection connect 10Vdc MAX).
void setup() {
pinMode(I01, INPUT);
}
Void loop(){
value = analogRead(A5);
/* Lo que se quiera */ = digitalRead(I01);
}
15
Page
14 How does it work:
NOTE:
In LEFT Zone and TOP Zone Arduino communication PINS can be enabled:
*IMPORTANT:
LEFT ZONE. To enable communication connections the switchs must be set to “OFF”. Set to “ON”
position to enable I/Os PLC connection. Communications and I/Os on the chart can not work
simultaneously. For exemple if DE is enabled (OFF), Q0.7 will not work. OFF position provides direct
connection to Arduino Pin (NOT for TX and RX), so they can be programmed according to Arduino pin
features.
TOP ZONE. Communications and outputs can not work simultaneously. If Q0.1 is enabled RO must be
disabled and conversely.
17
Page
For RS485 communication protocol the defined Arduino Mega pins are showed in the chart
below.
RS485 pinout
Function Arduino Pin
DI 10
RO 11
RE 4
DE 7
For I2C communication, Ardbox family products are directly connected to Arduino Mega
Board. In order to implement this communication a 10kΩ pull-up resistor is required.
http://www.industrialshields.com/accesories
18
Page
16 ARDBOX Family Dimensions: 17 DIN rail mounting:
45mm width
19
Page
18 Software Interface:
Arduino IDE is compatible to program these PLCs. You must download a start code in
www.industrialshields.com at product page in “document files” section and then open it with
Arduino IDE.
All Ardbox PLCs use an Arduino Leonardo and you need to choose these option in Arduino IDE.