Barth Mini-PLC STG-660 CAN User manual

BAR
H
Elektronik GmbH
®
1/7
9021-0011-A
21.04.2016
A
Page:
Document:
Date:
Revision:
Mini-PLC
STG-660 CAN
Art. No. 0850-0660
MANUAL
© 2014-2015 BARTH Elektronik GmbH | Im Depot 1-3 | D-49838 Lengerich | www.barth-elektronik.de
® BARTH is a registered trademark. All rights reserved. 9021-0011-A
TABLE OF CONTENT
Mini-PLC STG-660 CAN
Art. No. 0850-0660
MANUAL
1 SAFETY INSTRUCTIONS ......................................2
2 DESTINATED USE ..................................................2
3 DISCLAIMER ..........................................................2
4 PRODUCT DESCRIPTION .....................................2
4.1 Features ..................................................................2
4.2 Applications ...........................................................2
4.3 General description ..............................................2
4.4 Delivery content ....................................................3
5 INSTALLATION .......................................................3
5.1 Mounting ................................................................3
5.2 Wiring ......................................................................3
5.2.2 Connecting the power supply .................................3
5.2.3 Connecting the inputs .............................................3
5.2.4 Connecting the outputs ...........................................4
5.2.5 Connecting the CAN interface ................................4
6 OPERATION AND PROGRAMMING .....................4
6.1 Programming software .........................................4
6.2 Programming templates .......................................4
6.3 Virtual COM port driver installation ....................4
6.4 Connecting the Mini-PLC .....................................4
6.5 Programming .........................................................5
7 APPENDIX ..............................................................5
7.1 Specications ........................................................5
7.1.1 General ....................................................................5
7.1.2 Power supply ...........................................................5
7.1.3 Inputs .......................................................................5
7.1.4 Outputs ....................................................................6
7.1.5 CAN interface ..........................................................6
7.1.6 Security features ......................................................6
7.1.7 Program and data memory .....................................6
7.1.8 Timebase (oscillator) ................................................6
7.1.9 Electrical connection ...............................................6
7.1.10 Electromagnetic compatibility (EMC) ......................6
7.1.11 Environmental conditions ........................................6
7.1.12 Weight and dimensions ...........................................6
7.1.13 Ordering information ...............................................7
7.2 Documents, videos and software .......................7
7.3 Disposal ..................................................................7
7.4 Conformity declaration ........................................7

BAR
H
Elektronik GmbH
®
2/7
9021-0011-A
21.04.2016
A
Page:
Document:
Date:
Revision:
Mini-PLC
STG-660 CAN
Art. No. 0850-0660
MANUAL
© 2014-2015 BARTH Elektronik GmbH | Im Depot 1-3 | D-49838 Lengerich | www.barth-elektronik.de
® BARTH is a registered trademark. All rights reserved. 9021-0011-A
1 SAFETY INSTRUCTIONS
This manual contains notices which you should observe
to ensure your own personal safety, as well as to protect
the product and the connected equipment. These notices
are highlighted in the manual by a warning symbol and are
marked as follows according to the level of danger:
Only qualied personnel should be
allowed to install and work on this
equipment. Qualied persons are
dened as persons who are authorized
to commission, to ground and to tag
circuits, equipment and systems in
accordance with established safety
practices and standards.
Turn off the power supply before
performing any wiring operations!
Short circuits can be harmful, critical and
can cause explosions and serious burns!
Please read this manual carefully and
observe all safety instructions!
2 DESTINATED USE
The Mini-PLC is designed for universal measuring, con-
trolling and regulating applications.
It must not be used for life critical, medical or fail safe
applications.
3 DISCLAIMER
BARTH Elektronik GmbH assumes no liability for usage
and functionality of the Mini-PLC in case of disregar-
ding this manual. The strict accordance of this manual
is important since the installation methods, peripheral
connections, usage and maintenance can not be con-
trolled by BARTH Elektronik GmbH. Therefore BARTH
Elektronik GmbH assumes no liability for any claim.
4 PRODUCT DESCRIPTION
The picture below shows the BARTH®Mini-PLC STG-660
(Art. No. 0660-0660) including the spring terminal connec-
tor set.
This picture shows the MICROCHIP®PICkit 3 Programmer
(Art. No. 0017-0045) and the BARTH®Connection Cable
VK-6 (Art. No. 0091-0006).
4.1 Features
• Small and universal CAN Logic Controller
• Programmable with all PIC18®Compilers
• 6 analog Inputs 0..30 VDC, 12 bit ADC
• 4 digital Inputs up to 10 kHz
• 8 Power Outputs up to 1.5 A
• 1 Power PWM Output 2 A/1 to 32 kHz
• 1 CAN Interface
• Reliable Solid-State Outputs
• Fail Safe Oscillator
• Programmable Status LED
• TTL-232/USB Connection to PC
• Wide Operating Voltage Range 7..32 VDC
• Wide Operating Temp. Range -40..+60°C
• Ultraat Housing, Height 10 mm
• Vibration resistant and rugged Sealing
• Engineered and manufactured in Germany
4.2 Applications
• Technical Education
• Industrial Automation
• Test Systems
4.3 General description
The innovative STG-660 extends the established BARTH®
CAN Mini-PLC series with an outstanding Open Source
hardware concept. With similar dimensions in comparison
to the STG-600, the STG-660 provides hardware-oriented
programming at lowest current consumption and the well-
known small form factor. The CAN bus allows the user to

BAR
H
Elektronik GmbH
®
3/7
9021-0011-A
21.04.2016
A
Page:
Document:
Date:
Revision:
Mini-PLC
STG-660 CAN
Art. No. 0850-0660
MANUAL
© 2014-2015 BARTH Elektronik GmbH | Im Depot 1-3 | D-49838 Lengerich | www.barth-elektronik.de
® BARTH is a registered trademark. All rights reserved. 9021-0011-A
connect a variety of CAN or RS-485 network components
to the Mini-PLC, for example: displays, stepper motors or
CAN sensors.
The STG-660 does not need any peripheral components to
operate. Both inputs and outputs features highly integrated
and rugged protection circuits to operate the Mini-PLC in
really harsh environment.
These outstanding features open up a variety of application
elds in industrial, automotive and 12/24V battery-powered
applications. The STG-660 is also available as customer-
tailored OEM version.
4.4 Delivery content
• BARTH®Mini-PLC STG-660 CAN
• Spring terminal connectors (for supply, CAN, I/O)
5 INSTALLATION
5.1 Mounting
The Mini-PLC must be installed and wired
by a trained technician who knows and
complies with both the universally appli-
cable engineering rules and the regulati-
ons and standards that apply in specic
cases.
Fastening the STG-660 follows using either the integrated
mounting holes for screws or the holes for cable ties. The
cable tie installation method is recommended for fastening
the STG-660 on wiring harness, tubes or other mechanical
parts.
Take care to meet the environmental conditions of the
Mini-PLC.
5.2 Wiring
5.2.1 Overview
The graphic below shows the connection layout of the
BARTH®Mini-PLC STG-660 CAN.
X1 connector: supply and CAN pins
X2 connector: PLC inputs
X3 connector: PLC outputs
X4 connector: TTL-232/USB interface (VK-16)
X5 connector: MICROCHIP®ICSP® (VK-6)
5.2.2 Connecting the power supply
The STG-660 features an outstanding wide supply voltage
range from 7 to 32 VDC at lowest current consumption.
So the Mini-PLC can be integrated within battery supplied
12V or 24V DC systems (cars, trucks, battery powered cars,
forklifts and digger, for example).
Turn off the power supply before perfor-
ming any wiring operations!
False electrical connection, voltage
reversal or disregarding the electrical
specications may cause irreversible
damage of the Mini-PLC!
Connect the supply voltage of 7 to 32 VDC to the 4-pole
terminal X1 of the STG-660. Wire the positive supply to the
‚+VDD‘ marked connection. The negative (ground) will be
wired to the ‚GND‘ connection. All terminals are carried out
as plugable spring terminal connectors for a wire gauge of
0.25 to 1.5mm².
Ensure correct power supply voltage
range and polarisation! External fusing of
8A max. is mandatory! Disregarding may
cause irreversible damage of the PLC!
5.2.3 Connecting the inputs
You can connect sensors, switches or buttons to the inputs.
The sensors may be temperature, ow, pressure, photo-
electric sensors or proximity switches, for example.
The STG-660 is well suitable for any sensor featuring a vol-
tage output, 0 to 10 VDC, for example.
Common features of the inputs
• IN1 to IN6 are selectable analog/digital inputs
• IN7 and IN10 are pure digital inputs (up to 10kHz)
• Wide input voltage range 0 to 32VDC
• IN1 to IN6 are 0 to 10 V compatible
• Comprehensive integrated protection circuits
• Outstanding electromagnetic compatibility (EMC)
• Electrostatic discharge protection (ESD)
Due to the pull-down resistors integrated in the STG-660
any switch (NO/NC) can simply be connected between the
positive supply (VDD) of the STG-660 and the desired input.
The voltage at any input must not exceed
32VDC referred to ground (GND).
Higher voltages or reverse voltage lower
than -32VDC may cause irreversible
damage of the Mini-PLC!
The 10-pole connector named X2 contains the inputs of the
Mini-PLC. While IN7 to IN10 are pure digital inputs, IN1 to
IN6 provide both digital or analog functionality. The voltage
range for all inputs may not exceed 32 VDC. All inputs refer
to GND. Please refer to the appendix for detailed electrical
specication of the inputs.

BAR
H
Elektronik GmbH
®
4/7
9021-0011-A
21.04.2016
A
Page:
Document:
Date:
Revision:
Mini-PLC
STG-660 CAN
Art. No. 0850-0660
MANUAL
© 2014-2015 BARTH Elektronik GmbH | Im Depot 1-3 | D-49838 Lengerich | www.barth-elektronik.de
® BARTH is a registered trademark. All rights reserved. 9021-0011-A
6 OPERATION AND PROGRAMMING
6.1 Programming software
BARTH®supplies several third party compilers to program
their range of Open Source Mini-PLC´s.
Please refer to
www.barth-elektronik.de
www.microchip.com
www.rs-online.de
to receive further information about suitable software pro-
ducts. Any compiler which supports the PIC18F46K80-I/ML
can be used to program the STG-660.
6.2 Programming templates
For free programming templates and datasheets please
download the following software package:
www.barth-elektronik.de/download/9045-0012-A.zip
This package includes:
• Virtual Windows®COM port driver for USB connection
• Programming templates for BARTH® Mini-PLC
• Datasheets
6.3 Virtual COM port driver installation
Before you establish USB connection (X4) to a Windows®
PC you have to install the USB-/COM-port driver (folder
‚USBdriver‘) from the software download package. Please
follow the instructions of the SETUP routine.
6.4 Connecting the Mini-PLC
In order to program or operate the STG-660, you have to
establish proper power supply connection to the X1 con-
nector rst.
Programming ensures using the X5 ISP connector with the
following connection (Pin 1 marked with a black dot):
Pin Function
1 VDD +5V
2 GND
3 VPP/MCLR
4 PGC
5 PGD
5.2.4 Connecting the outputs
Depending on load type and current the STG-660 is able
to drive electric loads directly without any additional driver
or protection circuit. The Mini-PLC provides 8 digital solid-
state highside outputs and 1 solid-state lowside switch with
PWM functionality.
Common features of outputs OUT1 to OUT8
• Rugged solid-state higside switch up to 1.5A
• Paralleling permissible up to 6A
• Short circuit protection and current limitation
• Fast demagnetization of inductive loads
• Stable behaviour at undervoltage
• Comprehensive integrated protection circuits
• Outstanding electromagnetic compatibility (EMC)
• Electrostatic discharge protection (ESD)
Features of output OUT5
• Solid state lowside switch with PWM capability
• Sinks up to 2A
• Rugged solid-state design
• Fast demagnetization of inductive loads
• Outstanding electromagnetic compatibility (EMC)
• Electrostatic discharge protection (ESD)
The 9-pole connector X3 contains the digital outputs of
the Mini-PLC. While OUT1 to OUT8 are overload-protected
highside switches, OUT9 is carried out as lowside switch
with PWM capability without short circuit protection. A logi-
cal HIGH will switch the Mini-PLS´s supply voltage at OUT1
to OUT8, while OUT9 switches lowside (GND). Aviod a sink
current exceeding 2A at OUT9 because this outputs is not
protected against short-circuiting or overload current !
The total current sourced by OUT1 to
OUT8 must not exceed 6A!
Avoid reverse voltage at any output higher
than the Mini-PLC´s supply voltage!
OUT9 provides NO short circuit protection.
Take care the sink current not exceeds 2A!
Negligence may cause irreversible
damage of the Mini-PLC!
Please refer to the appendix for detailed electrical speci-
cation of the outputs.
5.2.5 Connecting the CAN interface
The X1 connector of the STG-660 contains the CAN specic
‚CANH‘ and ‚CANL‘ pins.
The voltage at CANH or CANL must not
exceed -27 or +40 VDC referred to ground
(GND). Higher voltages may cause irrever-
sible damage of the Mini-PLC!
Please refer to the appendix for detailed electrical speci-
cation of the CAN interface. There is no termination resistor
integrated in the STG-660.

BAR
H
Elektronik GmbH
®
5/7
9021-0011-A
21.04.2016
A
Page:
Document:
Date:
Revision:
Mini-PLC
STG-660 CAN
Art. No. 0850-0660
MANUAL
© 2014-2015 BARTH Elektronik GmbH | Im Depot 1-3 | D-49838 Lengerich | www.barth-elektronik.de
® BARTH is a registered trademark. All rights reserved. 9021-0011-A
The X5 connector is ESD sensitive!
Electrical stress may cause irreversible
damage of the Mini-PLC!
Please use the BARTH®VK-6 connection cable (Art. No.
0091-0006) to connect the Mini-PLC to the PICkit 3 pro-
grammer (Art. No. 0017-0045).
For PC connection the USB connection cable VK-16 (Art.
No. 0091-0016) and a PC with installed Windows®opera-
ting system are mandatory. Take care that the tappet of the
3-way VK-16 connector shows to right direction of the STG-
660 (black square).
Reversal connection only causes
malfunction and no damage of the
Mini-PLC.
6.5 Programming
To program the STG-660 please refer to the BARTH® pro-
gramming templates and the related datasheets.
Microchip®provides a large knowledge base for the PIC18®
microcontroller series which is used in the STG-660. Seve-
ral templates and sample programs will help you to get in
touch with the native and hardware-oriented microcontrol-
ler programming using your favourite compiler tool.
BARTH®recommendes to integrate your compiler software
within the Microchip MPLABX®software which supports
both programming, simulating and debugging.
Get the latest MPLABX®software and several related soft-
ware tools for the STG-660 on:
www.microchip.com
7 APPENDIX
7.1 Specications
7.1.1 General
Hardware design BARTH®Mini-PLC
fully enclosed in proprietary PU
resin, tiny and rugged housing
with plugable spring terminal
connectors, ultra-lightweight
Programming Open Source PLC
programmable with any compiler
which supports the Microchip®
PIC18F46K80-I/ML
Interfaces X4:
TTL-232 (5V TTL level)
USB (VK-16 required)
X5:
Microchip® ICSP®programming
interface (VK-6 required)
X1:
CAN or RS-485
7.1. 2 Power supply
Operating voltage 7 to 32 VDC
Current consumption nominal 15 mA at 32 VDC
(depending on conguration)
Fusing 8 A max. (external)
mandatory for voltage reversal
protection
Voltage reversal protection yes
(combined with external fuse)
ESD/TVS protection yes
Heat dissipation air
(at full load)
normally < 2.5 W
7.1.3 Inputs
Number digital 4+6
Number analog 6
Digital input IN7 - IN10 UIN = 0..30 VDC
RIN > 30 kOhm
ULOW <= 2 VDC
UHIGH > =4VDC
fIN <= 1 kHz
tIN >= 1 ms
Analog input IN1 - IN6 UIN = 0..30 VDC
RIN > 11 kOhm
fIN <= 100Hz
tIN >= 10 ms
Accuracy ADC
IN1 - IN6
± 2% (0.25 VDC)
ADC resolution
(internal)
12 Bit
Potential isolation no (common GND)
ESD/TVS protection yes
Permissible cable lenght
(per input)
normally 40 m

BAR
H
Elektronik GmbH
®
6/7
9021-0011-A
21.04.2016
A
Page:
Document:
Date:
Revision:
Mini-PLC
STG-660 CAN
Art. No. 0850-0660
MANUAL
© 2014-2015 BARTH Elektronik GmbH | Im Depot 1-3 | D-49838 Lengerich | www.barth-elektronik.de
® BARTH is a registered trademark. All rights reserved. 9021-0011-A
7.1.4 Outputs
Number digital 8+1
Number PWM 1
Output OUT1 - OUT8 Output type: solid state (highside)
IOUT <= 1.5 A (resistive load)
@ fOUT = 0 to 200 Hz
UOUT >= UIN-0,45 V
ITOT<= 6 A (paralleling permissible)
Maximal allowable load
inductance for a single switch off
(one output):
VDD=12VDC, IL=1.5A, ZL<=70mH
VDD=12VDC, IL=1A, ZL<=200mH
On-state resistance VDD to OUT:
RON<=180 mOhm
Turn-on time: tON<=250 µs
Turn-off time: tOFF<=270 µs
PWM output OUT9 Output type: solid state (lowside)
IOUT <= 2 A (resistive load)
@ fOUT = 1 kHz to 32 kHz
IOUT <= 1 A (resistive load)
Potential isolation no
7.1.5 CAN interface
CAN Type: CAN / RS-485
(no termination resistor inside)
Meets or exceeds the requi-
rements of applications ISO
11898-2, loss of ground
protection from –27 V to 40 V,
thermal shutdown protection
7.1.6 Security features
Security Features Watchdog (WD)
Fail safe oscillator 16 MHz (FSO)
Brown out detection (BOD)
Power up timer (PUT)
(depending on conguartion)
7.1.7 Program and data memory
Flash program memory 64 k
cell endurance: 10.000 min
characteristic retention: 40 yrs
EEPROM data memory 1024 byte
byte endurance 100.000 min.
characteristic retention: 40 yrs
7.1.8 Timebase (oscillator)
Primary Oscillator Crystal quartz MEMS unit
(precise ‚micro-electro-mecha-
nical system‘)
Nominal Frequency 16.000 MHz
Frequency tolerance ±50 × 10-6
Frequency aging ±5 × 10-6 / year max.
Second Fail Safe Oscillator 16 MHz
7.1.9 Electrical connection
Electrical Connection plugable spring terminal
connectors 0.25 to 1.5 mm²
Manufacturer: Phoenix Contact
Series: COMBICON
Type: FMC1,5/x-ST-3,5
7.1.10 Electromagnetic compatibility (EMC)
Electrostatic discharge
(ESD) on IN1 to IN10
20 kV air discharge
30 kV contact discharge
(IEC/EN 61 000-4-2, level 3)
Electrostatic discharge
(ESD) on OUT1 to OUT9
8 kV (human body model)
(MIL-STD883D)
Electrostatic discharge
(ESD) on CAN pins
ESD Protection up to ±12 kV
(Human-Body Model)
Electromagnetic elds Field strength 10 V/m
(IEC/EN 61000-4-3)
7.1.11 Environmental conditions
Operation temperature -40..+60 °C
(IEC 60068-2-1/2)
Storage temperature -40..+70 °C
(IEC 60068-2-1/2)
Relative humidity 5 to 95% non-condensing
(IEC 60068-2-30)
Air pressure (in operation) 500 to 1500 hPa
Shock resistance min. 100 m/s²
(IEC 60068-2-27)
Vibration resistance min. 50 m/s² @ 10..150 Hz
(IEC 60068-2-6)
Degree of protection IP 20, limited by connectors
(EN 50178, IEC 60529)
Drop Drop height: 500mm
(IEC 60068-2-31)
Free fall (packaged) 1500 mm
(IEC 60068-2-32)
7.1.12 Weight and dimensions
Weight 80 g
(without connectors)
Dimensions 93 x 45 x 15 mm (LxWxH)
Height housing: 10 mm
Mounting via two M4 screws or 3.6mm
cable ties

BAR
H
Elektronik GmbH
®
7/7
9021-0011-A
21.04.2016
A
Page:
Document:
Date:
Revision:
Mini-PLC
STG-660 CAN
Art. No. 0850-0660
MANUAL
© 2014-2015 BARTH Elektronik GmbH | Im Depot 1-3 | D-49838 Lengerich | www.barth-elektronik.de
® BARTH is a registered trademark. All rights reserved. 9021-0011-A
7.1.13 Ordering information
Ordering information
Mini-PLC
Mini-PLC STG-660
Art. No. 0850-0660
Ordering information
accessory
ISP connection cable VK-6
Art. No. 0091-0006
USB connection cable VK-16
Art. No. 0091-0016
PICkit 3 programmer
Art. No. 0017-0045
7.2 Documents, videos and software
Detailed information, additional documents, application
notes and videos relating to this product are downloadable
from www.barth-elektronik.de
7.3 Disposal
If you wish to nally dispose of the
product, ask your local recycling centre
or dealer for details about how to do
this in accordance with the applicable
disposal regulations.
7.4 Conformity declaration
For the following designated product it is hereby conrmed,
that the construction in that technical design brought by us
in trafc corresponds to the standards specied below. In
the event of any alternation which has not been approved
by us being made to any device as designated below, this
statement shall thereby be made invalid.
Description Mini-PLC
Type STG-660
Art. No. 0850-0660
Directive
2004/108/EG relating to-
electromagnetic
compatibility (EMC)
Applied norms:
EN55022:2006+A1:2007
EN55024:1998+A1:2001
+A2:2003
EN61000-3-2:2006
+A1:2009+A2:2009
EN61000-3-3:2008
EN61000-6-2:2005
RoHS Directive
2011/65EU
We herby declare that our
product is compilant to the RoHS
Directive on restriction of the use
of certain hazardous substances
in electrical and electronic appli-
ances.
BARTH®Elektronik GmbH
Lengerich, 17.09.2015
Dipl.-Ing. (FH) D. Barth
Managing Director
Table of contents
Other Barth Controllers manuals
Popular Controllers manuals by other brands

PS Automation
PS Automation PSQ103 operating instructions

Sorel
Sorel HCC 6 Installation and operating instructions

RIFT Actuators
RIFT Actuators 30 Installation, operation & maintenance instructions

Hitachi
Hitachi HIDIC EH-150 instruction manual

CBS
CBS ArcSafe RSA-161A Installation and operation

AUMA
AUMA SA 07.1 Operation instructions

KNF LAB
KNF LAB NC 800 operating instructions

Bray
Bray GAS Series operating instructions

Arris
Arris Ruckus SmartZone 300 Quick setup guide

AMX
AMX AXB-PT101530 POSITRACK CAMERA CONTROLLER instruction manual

SLV Elektronik
SLV Elektronik EASY LIM PRO RF 350mA operating manual

Savant
Savant SmartLighting SSL-P018 Quick reference guide