Sferalabs Strato Pi CAN User Manual

"
Strato Pi CAN User Guide
July 2018
Revision 006
SPBC11X Strato Pi CAN board
SPMC11X Strato Pi CAN server with Raspberry Pi 3 Model B
SPMC11XP Strato Pi CAN server with Raspberry Pi 3 Model B+
Safety information 4
Qualified personnel 4
Hazard levels 4
Safety instructions 5
General safety instructions 5
Battery 5
Introduction 7
Features 8
Usage and connections 9
Hardware Installation 9
Strato Pi CAN board 9
Strato Pi CAN server 10
Replacing the RTC backup battery 10
Terminal block 11
Power supply 12
Relay output 14
Dedicated GPIO pins 14
Software installation and configuration 15
Strato Pi CAN utility 15
Real Time Clock software 15
Testing the Real Time Clock 16
CAN Bus 17
Disabling Bluetooth, WiFi and the serial console 17
Using Strato Pi CAN 19
Real Time Clock 19
RS-485 port 19
CAN port 20
Buzzer 22
Relay 22
Hardware watchdog 22
Power cycle 23
Block diagram 24
Technical specifications 25
Dimensions 27
Disposal 28
Installation and use restrictions 28
1
Strato Pi CAN User Guide
Standards and regulations 28
Safety instructions 28
Set-up 28
Conformity Information 29
EU 29
USA 29
CANADA 29
AUSTRALIA / NEW ZEALAND 30
Compliance information for Raspberry Pi 3 Model B 30
EU 30
USA 30
CANADA 30
Compliance information for Raspberry Pi 3 Model B+ 30
EU 31
USA 31
CANADA 31
2
Strato Pi CAN User Guide
Be sure to always remove the power supply before connecting or
disconnecting the Strato Pi CAN board to Raspberry Pi.
Follow all applicable electrical safety standards, guidelines,
specifications and regulations for installation, wiring and operations of
Strato Pi CAN.
Carefully and fully read this Strato Pi CAN user guide before
installation.
Strato Pi CAN is not authorised for use in safety-critical applications where a failure of the
product would reasonably be expected to cause personal injury or death. Safety-critical
applications include, without limitation, life support devices and systems, equipment or
systems for the operation of nuclear facilities and weapons systems. Strato is neither
designed nor intended for use in critical military or aerospace applications or
environments. Customer acknowledges and agrees that any such use of Strato Pi CAN is
solely at Customer's risk, and that Customer is solely responsible for compliance with all
legal and regulatory requirements in connection with such use.
Sfera Labs S.r.l. may make changes to specifications and product descriptions at any time,
without notice. The product information on the web site or materials is subject to change
without notice.
Please download and read the Sfera Labs Terms and Conditions document available at:
http://www.sferalabs.cc
Strato and Sfera Labs are trademarks of Sfera Labs S.r.l. Other brands and names may be
claimed as the property of others.
#
Copyright © 2015-2017 Sfera Labs S.r.l. All rights reserved.
3
Strato Pi CAN User Guide
Safety information
Carefully and fully read this user guide before installation and retain it for future reference.
Qualified personnel
The product described in this manual must be operated only by personnel qualified for the specific task and installation environment, in accordance with all relevant documentation and safety instructions. A qualified person should be capable of fully identifying all installation and operation risks and avoid potential hazards when working with this product.
Hazard levels
This manual contains information you must observe to ensure your personal safety and prevent damage to property. Safety information in this manual are highlighted by the safety symbols below, graded according to the degree of danger.
Indicates a hazardous situation which, if not avoided, will result in death or serious personal injury.
Indicates a hazardous situation which, if not avoided, may result in death or serious personal injury.
Indicates a hazardous situation which, if not avoided, can result in minor or moderate personal injury.
Indicates a situation which, if not avoided, can result in damage of property.
DANGER
WARNING
CAUTION
NOTICE
4
Strato Pi CAN User Guide
Safety instructions
General safety instructions
Protect the unit against moisture, dirt and any kind of damage during transport, storage and operation. Do not operate the unit outside the specified technical data.
Never open the housing. If not otherwise specified, install in closed housing (e.g. distribution cabinet). Earth the unit at the terminals provided, if existing, for this purpose. Do not obstruct cooling of the unit. Keep out of the reach of children.
Life threatening voltages are present within and around an open control cabinet.
When installing this product in a control cabinet or any other areas where dangerous voltages are present, always switch off the power supply to the cabinet or equipment.
Risk of fire if not installed and operated properly.
Follow all applicable electrical safety standards, guidelines, specifications and regulations for installation, wiring and operations of this product.
The Raspberry Pi board could generate a substantial amount of heat when the software forces the CPU and/or GPU to operate at high load levels. Ensure that the product is properly installed and ventilated to prevent overheat.
The connection of expansion devices to this product may damage the product and other connected systems, and may violate safety rules and regulations regarding radio interference and electromagnetic compatibility.
Use only appropriate tools when installing this product. Using excessive force with tools may damage the product, alter its characteristics or degrade its safety.
Battery
This product uses a small lithium non-rechargeable battery to power its internal real time clock (RTC).
WARNING
WARNING
NOTICE
5
Strato Pi CAN User Guide
Improper handling of lithium batteries can result in an explosion of the batteries and/or release of harmful substances.
Worn-out or defective batteries can compromise the function of this product.
Replace the RTC lithium battery before it is completely discharged. The lithium battery must be replaced only with an identical battery. See the "Replacing the RTC backup battery" section for instructions.
Do not throw lithium batteries into fire, do not solder on the cell body, do not recharge, do not open, do not short-circuit, do not reverse polarity, do not heat above 100°C and protect from direct sunlight, moisture and condensation.
Dispose of used batteries according to local regulations and the battery manufacturer's
instructions.
WARNING
6
Strato Pi CAN User Guide
Introduction
Strato Pi CAN enhances the Raspberry Pi Model B version 2 and 3 computers with several hardware features to make it suitable for use in professional applications where reliability and service continuity are key requirements.
It is available as a bare board or fully assembled unit including a Raspberry Pi 3 Model B or B+ in a standard DIN-rail case.
The information contained in this manual covers all versions, except where explicitly stated otherwise. The bare board is called “Strato Pi CAN board”, while the assembled unit is “Strato Pi CAN server”.
7
Strato Pi CAN User Guide
Features
Strato Pi CAN board:
9-65Vdc power supply, with surge and reverse polarity protection, and 1.3A resettable fuse
Controller Area Network (CAN) V2.0B interface, support speeds up to 1 Mb/s, with opto-isolator and electrostatic discharge protection
standard RS-485 interface to the Raspberry Pi serial line, with opto-isolator and
1
electrostatic discharge protection
up to 2.5A max current to the 5V Raspberry Pi power supply input pins (at 24Vdc)
real time clock with on-board lithium back-up battery
one relay with change-over (CO), Single Pole Double Throw (SPDT) terminals
on-board buzzer, connected to an I/O pin of the Raspberry Pi board, for acoustic feedback
hardware watchdog implemented in the Strato Pi board, fully independent from the Raspberry Pi, controlled via the I/O pins of the Raspberry Pi board
on-board LEDs for power supply, RS-485 and CAN bus activity
power supply and serial connections on a screw terminal block
Strato Pi CAN server only:
pre-assembled and tested Raspberry Pi 3 Model B or B+ with Strato Pi CAN board in a standard 4 modules DIN rail case
side access to HDMI and 3.5mm jack for audio and composite video
access to all USB ports and Ethernet port (opposite to the power and serial terminal block).
The RS-485 and CAN interfaces are independently opto-isolated, but are powered by a single
1
galvanically isolated DC-DC converter. This means that the RS-485 lines are not galvanically isolated from the CAN lines.
8
Strato Pi CAN User Guide
Usage and connections
STRATO PI CAN CONNECTION DIAGRAM
Hardware Installation
Strato Pi CAN board
The Strato Pi CAN board is supplied with all connectors pre-installed. No soldering is required. You should connect Strato Pi to Raspberry Pi aligning the GPIO connector. Use appropriate turrets/spacers to firmly bolt the two boards together, ensuring that no conductive part of one board touches any part of the other board.
Be particularly careful to ensure there is enough clearance between the Ethernet and USB connectors and the bottom of Strato Pi CAN circuit board.
The GPIO connector of the Strato Pi CAN board must be perfectly aligned to the Raspberry Pi's GPIO pins. Turning on the Raspberry Pi and/or the Strato Pi CAN board with the GPIO not correctly connected will damage both the Raspberry Pi and Strato Pi CAN board.
NOTICE
9
Strato Pi CAN User Guide
Strato Pi CAN server
The Strato Pi CAN server comes pre-assembled with a Raspberry Pi 3 Model B or B+ board, in a plastic standard DIN-rail case.
There is no need to open the case, unless a change in the CAN or RS-485 termination resistors is required (see below).
The Micro SD card (not provided) can be inserted through a small opening on the side of the case. Use a small pen or paper clip to gently push the card in its slot.
Replacing the RTC backup battery
Strato Pi CAN has a hardware real time clock with a dedicated long-life non-rechargeable back-up battery.
Strato Pi CAN is shipped with a CR1220VCN Lithium / Manganese Dioxide (Li/MnO2) battery soldered to the circuit board.
The battery is only used to power the RTC chip when the main power is not available (when the Raspberry Pi is off). Depending on operating conditions it should last up to three years if the Strato Pi board is not powered, more if the Strato Pi CAN receives external power.
Improper handling of lithium batteries can result in an explosion of the batteries and/or release of harmful substances.
Worn-out or defective batteries can compromise the function of this product.
KEEP OUT OF REACH OF CHILDREN. Swallowing may lead to serious injury or death in as little as 2 hours due to chemical burns and potential perforation of the esophagus. Immediately see doctor.
Replace the RTC lithium battery before it is completely discharged. Replace the battery every 5 years even if the battery is still working properly. The lithium battery must be replaced only with an identical CR1220VCN Lithium / Manganese Dioxide (Li/MnO2) battery.
Do not throw lithium batteries into fire, do not solder on the cell body, do not recharge, do not open, do not short-circuit, do not reverse polarity, do not heat above 100°C and protect from direct sunlight, moisture and condensation.
Dispose of used batteries according to local regulations and the battery manufacturer's instructions.
The RTC backup battery is soldered to the circuit board next to the GPIO connector. In the Strato Pi CAN server, the battery is not accessible from the outside. You should first remove the case top body to gain access to the Strato Pi CAN circuit board.
WARNING
10
Strato Pi CAN User Guide
Before opening the Strato Pi CAN case, disconnect all power sources and any connection to external devices, including USB cables.
Reversing the battery polarity may damage the product.
The real time clock will reset its time immediately when the RTC backup battery is disconnected.
Follow these steps, in the exact order, to open the case and replace the battery:
1. Remove the microSD card (the card will be damaged if you open the case with the card still inserted)
2. Remove the black plastic DIN rail hook
3. With a small flat screwdriver gently separate the bottom case and boards assembly from the top cover
4. Cut the battery terrminals to separate the battery from the circuit board. Pay attention not to short-circuit the positive and negative terminals
5. Unsolder the terminals tips and clean the circuit board holes to prepare for the installation of the new battery
6. Insert the new battery in the circuit board holes. Respect the battery polarity
7. Check that there are no short-circuits and resolder the battery terminals
8. After soldering, use a voltmeter to re-check that there are no short-circuits and that a
3.0V voltage is present across the battery terminals
9. Replace the case bottom applying a gentle pressure on the corners
10. Replace the black plastic DIN rail hook
11. Insert the microSD card.
Terminal block
Strato Pi CAN has an 11 positions terminal block, used for power, CAN, RS-485 and relay connections.
The maximum conductor cross section is 1.5 mm2 (16 AWG), or 0.5 mm2 when using ferrules (highly recommended). Recommended stripping length is 5 mm. Screw thread is M2. Never exceed 0.25 Nm torque when tightening the screws.
NOTICE
11
Strato Pi CAN User Guide
THE STRATO PI CAN CIRCUIT BOARD
Power supply
Strato Pi can be powered with DC voltage only:
DC: nominal voltage range 9.0V to 65.0V.
Respect the correct polarity shown in the schematic diagram (+ -). The power supply circuit implements reverse polarity protection using auto resetting fuses and surge protection up to ±500V/2ohms 1.2/50μs.
A blue on-board LED, also visible through the front panel of the DIN-rail case, is lit when power supply is available.
When a Strato Pi CAN board is used, never connect the Raspberry Pi micro-USB power plug.
The Strato Pi CAN power supply stage is optimised to deliver up to 2.5A at 5V to the Raspberry Pi. Because Strato Pi CAN has two parallel 650mA resettable fuses (polyfuse) on the power supply line, the maximum current that its regulator can deliver is also limited by these fuses, and depends on the input voltage. The following table lists the typical measured output current of the power supply stage at different input voltages, and the corresponding input current. At high input voltage levels, the voltage regulator’s thermal protection becomes the limiting factor.
12
Strato Pi CAN User Guide
STRATO PI CAN POWER SUPPLY STAGE TYPICAL IN/OUT VOLTAGE AND CURRENT
13
Strato Pi CAN User Guide
Relay output
Strato Pi CAN has one relay with change-over (CO), Single Pole Double Throw (SPDT) terminals.
The relay itself is rated for a 6A maximum current but, due to the terminal block size and isolation requirements, the output contacts are rated for 0.6A maximum current at 65V (DC).
The relay is controlled by a GPIO pin of the Raspberry Pi.
Dedicated GPIO pins
Strato Pi CAN uses some of the Raspberry Pi’s GPIO pins. These pins should not be used for other functions.
GPIO pin
Direction
Description
GPIO2/SDA
I2C SDA line for the real time clock
GPIO3/SCL
I2C SCL line for the real time clock
GPIO14/TXD
out
RS-485 TX line
GPIO15/RXD
in
RS-485 RX line
GPIO8/SPI_CE0
out
SPI chip select line to the CAN Controller
GPIO9/SPI_MISO
in
SPI data in line from the CAN Controller
GPIO10/SPI_MOSI
out
SPI data out line to the CAN Controller
GPIO11/SPI_CLK
out
SPI clock line to the CAN Controller
GPIO24
out
CAN Controller reset line
GPIO25inCAN Controller interrupt line
GPIO5
out
cycle high/low for watchdog heartbeat
GPIO6
out
set to high to enable the watchdog
GPIO12
in
high on watchdog timeout
GPIO16
out
set to high to enable the shutdown cycle
GPIO20
out
set to high to sound the buzzer
GPIO26
out
set to high to energise the relay’s coil
14
Strato Pi CAN User Guide
Software installation and configuration
All features of Strato Pi CAN, except the real time clock and the CAN controller, are controlled via dedicated GPIO pins and can be used with any operating system and programming language that supports the GPIO pins control on Raspberry Pi. The real time clock is interfaced via the I2C serial bus, while the CAN controller uses the SPI lines.
The following software installation notes are based on the Raspbian Jessie operating system.
Strato Pi CAN utility
The Strato Pi CAN utility is a simple command-line script to control the buzzer, relay and watchdog functions.
Run the following commands to download and install the Strato Pi CAN utility:
$ cd /usr/local/bin $ sudo wget http://sferalabs.cc/files/stratopican/strato $ sudo chmod 755 strato
You can run the Strato Pi utility without arguments to print its options:
$ strato Usage: strato beep on|off|length_millis|length_millis pause_millis repeats strato watchdog enable|disable|heartbeat|timeout strato shutdown strato relay on|off
All commands should be run as superuser, so always use sudo to run strato.
Real Time Clock software
The RTC is based on the Microchip MCP79410 module and is connected to the Raspberry Pi via its I2C serial bus.
Before downloading the installation utility, you should enable I2C and install the “i2c-tools” package.
To e n ab l e I2C, run the “raspi-config” configuration utility:
$ sudo raspi-config
Then go to “Advanced Options”, “I2C” and select “yes” to enable the I2C interface, then reboot your Raspberry Pi.
To install the “i2c-tools” package:
$ sudo apt-get update $ sudo apt-get install i2c-tools
With these prerequisite installs completed, you should download and run Strato Pi’s installation script:
$ cd $ wget http://sferalabs.cc/files/strato/rtc-install
15
Strato Pi CAN User Guide
$ chmod 755 rtc-install $ sudo ./rtc-install
If the script completes with no errors, delete the installation script and reboot:
$ rm rtc-install $ sudo reboot
Testing the Real Time Clock
Assuming you are connected to the Internet and your Pi was able to reach a public NTP (Network Time Protocol) server, you should see the current date and time using the “date” command:
$ date Thu Dec 10 18:02:32 CET 2015
Also check the date and time stored in the hardware clock:
$ sudo hwclock -r Thu 10 Dec 2015 06:03:01 PM CET -0.546570 seconds
If the returned date and time is not correct, or “hwclock” returns an error, use the “-w” option to set the hardware clock to the current time:
$ sudo hwclock -w
Then recheck the time stored in the hardware clock to ensure it matches. Linux may have failed to automatically update the hardware clock after the last reboot if its internal registers contained invalid values.
If the RTC still doesn’t work, you should check if the Pi sees the RTC chip on the I2C bus. Run these two commands:
$ sudo modprobe -r rtc_ds1307 $ sudo i2cdetect 1 WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-1. I will probe address range 0x03-0x77. Continue? [Y/n] 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 6f 70: -- -- -- -- -- -- -- —
You should see “6f” in the address list. This is the address of the RTC.
If the RTC address is detected, double check your software installation for issues at the Linux modules level.
Run the “lsmod” command to list the loaded modules and check that “i2c_dev” and “i2c_bcm2708” are both listed.
If the RTC address is not detected, the cause could be a hardware problem, on the Strato board or the Raspberry Pi. If you have another Pi or Strato board, try swapping them to isolate the faulty board.
16
Strato Pi CAN User Guide
CAN Bus
The CAN interface is based on the Microchip MCP2515 stand-alone Controller Area Network (CAN) controller that implements the CAN specification version 2.0B. It is capable of transmitting and receiving both standard and extended data and remote frames.
The MCP2515 has two acceptance masks and six acceptance filters that are used to filter out unwanted messages, thereby reducing the host MCU’s overhead.
The MCP2515 interfaces with the Raspberry Pi via its Serial Peripheral Interface (SPI).
You should enable SPI and configure kernel support for the MCP2515.
To enable SPI, run the “raspi-config” configuration utility:
$ sudo raspi-config
Go to “Advanced Options”, “SPI” and select “yes” to enable the SPI interface, then edit
/boot/config.txt and add this line at the end of the file:
dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25 dtoverlay=spi-bcm2835-overlay
Save the file and reboot your Raspberry Pi.
Disabling Bluetooth, WiFi and the serial console
On Raspberry Pi 3, the main UART is used for Bluetooth, and the TX/RX pins on the GPIO connector are controlled by a limited function Mini UART.
To route the main UART to the RX/TX pins that are connected to the Strato Pi serial port you should disable Bluetooth. Edit /boot/config.txt and add these lines at the end of the file:
# Disable Bluetooth dtoverlay=pi3-disable-bt
You may also run the following command to disable the Bluetooth HCI UART driver:
sudo systemctl disable hciuart
If you need to disable the WiFi, one convenient solution on Raspbian distributions is to blacklist the WiFi driver. Edit /etc/modprobe.d/raspi-blacklist.conf and add these lines at the end of the file:
# Disable WiFi blacklist brcmfmac blacklist brcmutil
Note that Bluetooth must be disabled to ensure proper operation of Strato Pi’s serial port.
If you are using Strato Pi’s serial port for your applications, you also need to disable the Linux serial console, otherwise it will send console data to the serial port.
17
Strato Pi CAN User Guide
Disable the ttyAMA0 console service:
sudo systemctl disable serial-getty@ttyAMA0.service
Edit the /boot/cmdline.txt file and delete the serial console configuration:
console=serial0,115200
18
Strato Pi CAN User Guide
Using Strato Pi CAN
Real Time Clock
Strato Pi CAN has a hardware real time clock with a dedicated long-life non-rechargeable back-up battery.
Once the RTC modules and configuration files are properly installed, you will simply use the date and time commands to control the hardware clock.
RS-485 port
Strato Pi CAN uses the Raspberry Pi standard UART TX/RX pins on the GPIO connector to implement a standard RS-485 serial port.
Simply connect the RS-485 A, B and GND to the RS-485 posts of the terminal block.
The RS-485 lines are isolated from the Raspberry Pi’s serial lines using dedicated opto­couplers, and from the main power supply with a high-efficiency DC-DC converter. This configuration should prevent ground loops between devices connected via the RS-485 lines.
The RS-485 TX/RX switching is implemented automatically in the Strato Pi CAN micro­controller, based on speed and number of bits detection, and is completely transparent to the software controlling the UART on Raspberry Pi.
The RS-485 line has 620 Ohm pull-up and pull-down resistors on lines A and B. The biasing resistors ensure that, during idle periods the data lines are kept at a stable voltage level and prevent false triggering of receiver input. These resistors can be disabled by removing jumpers JP1 and JP4 respectively.
A 100 Ohm termination resistor between A and B can be enabled installing jumper JP2.
RS-485 JUMPERS SCHEMATIC
19
Strato Pi CAN User Guide
RS-485 JUMPERS POSITION
CAN port
The CAN interface is based on the Microchip MCP2515 stand-alone Controller Area Network controller and the Microchip MCP2561 high-speed CAN transceiver. They implement the CAN specification version 2.0B, and support up to 1 Mbps speed.
The CANH and CANL lines are available on the terminal block.
The CAN transceiver’s TX and RX lines are isolated from the CAN controller with dedicated opto-couplers. The CAN transceiver is also galvanically isolated from the CAN controller and the Raspberry Pi in general with the same high-efficiency DC-DC converter used to power the RS-485 line drivers.
A 120 Ohm termination resistor between CANH and CANL can be enabled installing jumper JP3.
CAN TERMINATION JUMPER SCHEMATIC
20
Strato Pi CAN User Guide
CAN TERMINATION JUMPER POSITION
The MCP2515 is fully supported by the SocketCAN framework on Raspbian and other Raspberry Pi Linux distributions.
You can install the “can-utils” package to test CAN:
$ sudo apt-get update $ sudo apt-get install can-utils
Then setup the CAN interface at the appropriate speed, for example at 500 kbps:
$ sudo ip link set can0 up type can bitrate 500000
You can now check that the CAN interface is up, and send or receive data:
$ sudo ifconfig can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 UP RUNNING NOARP MTU:16 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:10 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
$ cansend can0 456#43414e2054452364 $ candump can0
21
Strato Pi CAN User Guide
Buzzer
Strato Pi CAN has an on-board buzzer that can be controlled using GPIO20. Simply set GPIO20 to high to emit a continuous sound, and back to low to stop. The buzzer is not intended to emit sound indefinitely and could be damaged doing so.
The Strato Pi utility has several commands to control the buzzer.
Buzzer on continuously:
$ sudo strato beep on
Buzzer off:
$ sudo strato beep off
Buzzer on for 500 milliseconds:
$ sudo strato beep 500
Buzzer on for 500 milliseconds, followed by 100 milliseconds pause, repeated three times:
$ sudo strato beep 500 100 3
Relay
Strato Pi CAN has an on-board relay that can be controlled using GPIO26. Simply set GPIO26 to high to close the NO contact, and to low to open it.
The Strato Pi CAN utility implements a command to control the relay.
Relay on:
$ sudo strato relay on
Relay off:
$ sudo strato relay off
Hardware watchdog
Strato Pi CAN implements a dedicated hardware watchdog circuit that can be used to perform a full power cycle of the Raspberry Pi.
Being controlled by Raspberry Pi’s GPIO pins, it is extremely easy to control watchdog operation using simple custom scripts in your application.
The watchdog is normally disabled. To enable it, set GPIO6 pin to high. While GPIO6 is high, the Strato Pi CAN micro-controller will watch for state changes of the GPIO5 heartbeat pin. You should ensure that GPIO5 flips its state between high and low faster than every 60 seconds.
If the Strato Pi CAN micro-controller doesn’t see GPIO5 changing state for more than 60 seconds, it will initiate a shutdown procedure, rising the GPIO12 timeout pin to high, to signal your code that a watchdog timeout has occurred.
22
Strato Pi CAN User Guide
If possible, you should immediately initiate a software shutdown on Raspberry Pi, and set the GPIO16 shutdown pin to high. When GPIO16 is set to high or 60 seconds after the timeout, Strato Pi CAN will wait 60 seconds more, then power cycle the Raspberry Pi.
Note that Strato Pi CAN will power cycle the Raspberry Pi even if GPIO16 is not set high. In this case the power cycles occurs 120 seconds after the heartbeat timeout.
The Strato Pi CAN utility can be used to control the watchdog from your custom scripts.
Enable the watchdog:
$ sudo strato watchdog enable
Disable the watchdog:
$ sudo strato watchdog disable
Send the heartbeat:
$ sudo strato watchdog heartbeat
Print “1” if the watchdog timeout is expired, “0” if not:
$ sudo strato watchdog timeout; echo $?
Power cycle
You can start a delayed power cycle by rising Raspberry Pi’s GPIO16 pin.
When GPIO16 is set to high, Strato Pi CAN will wait 60 seconds and then power off the Pi board for 5 seconds.
To initiate a delayed power off cycle:
$ sudo strato shutdown
23
Strato Pi CAN User Guide
Block diagram
STRATO PI CAN BLOCK DIAGRAM
24
Strato Pi CAN User Guide
Technical specifications
Power supply
9/65V⎓ (VDC) Reverse polarity protection with two parallel 0.65A
resettable fuses. Surge protection up to ±500V/ 2ohms 1.2/50μs
Current consumption at VS+ 24V including Raspberry Pi 3 current, with low CPU/GPU
load and no USB devices connected
80mA without Ethernet, CAN and RS-485 90mA with Ethernet, CAN and RS-485
Actual current consumption may vary based on working conditions
Current consumption at VS+ 64V including Raspberry Pi 3 current, with low CPU/GPU
load and no USB devices connected
40mA without Ethernet, CAN and RS-485 45mA with Ethernet, CAN and RS-485
Actual current consumption may vary based on working conditions
Raspberry platform compatibility
Pi 3 Model B+ Pi 3 Model B Pi 2 Model B
Serial communication ports
RS-485 Half-Duplex with automatic data direction management
Controller Area Network (CAN)
Maximum speed of RS-485 port
1152 00 bps
ESD-Protection Voltage on RS-485 A/B
±15kV human body model ±8kV contact discharge
Surge protection on RS-485 A/B
Surge protection up to ±500V/2ohms 1.2/50μs; 600W peak pulse power capability at 10/1000μs waveform
Fail safe feature on RS-485
Yes
Maximum speed of CAN interface
1 Mbps
ESD-Protection Voltage on CANH, CANL
±14kV human body model ±8kV contact discharge
Transient Voltage protection on CANH, CANL
-150V to +100V (wave forms of the applied
transients in accordance with ISO-7637, Part 1, test pulses 1, 2, 3a and 3b)
Maximum output relay contacts rating
Resistive load (DC1): 1A at 48Vdc / 0.6A at 65Vdc
25
Strato Pi CAN User Guide
Real time clock
Internal RTCC circuit with back-up Lithium battery. Only use CR1220VCN Lithium / Manganese Dioxide (Li/MnO2) batteries.#
Expected battery life without main power supply: ~3%years Expected battery life with main power supply: >10%years
Housing
standard 4M for DIN rail
Operating temperature
0…+50 °C
Storage temperature
-20…+70 °C
Protection degree
IP20
Weight
45 g (Strato Pi CAN board) 170 g (Strato Pi CAN server)
26
Strato Pi CAN User Guide
Dimensions
DIMENSIONS (mm)
27
Strato Pi CAN User Guide
Disposal
Waste Electrical & Electronic Equipment
(Applicable in the European Union and other European countries with separate collection systems). This marking on the product, accessories or literature indicates that the product should not be disposed of with other household waste at the end of their working life. To prevent possible harm to the environment or human health from uncontrolled waste disposal, separate these items from other types of waste and recycle them responsibly to
promote the sustainable reuse of material resources. Household users should contact either the retailer where they purchased this product, or their local government office, for details of where and how they can take these items for environmentally safe recycling. This product and its electronic accessories should not be mixed with other commercial wastes for disposal.
Strato Pi CAN contains a small non rechargeable manganese dioxide lithium battery.
In the Strato Pi CAN server, the battery is not accessible from the outside. You should first remove the case top body to gain access to the Strato Pi CAN circuit board. Always remove the battery before disposing of this product.
Installation and use restrictions
Standards and regulations
The design and the setting up of electrical systems must be performed according to the relevant standards, guidelines, specifications and regulations of the relevant country. The installation, configuration and programming of the devices must be carried out by trained personnel.
The installation and wiring of connected devices must be performed according to the recommendations of the manufacturers (reported on the specific data sheet of the product) and according to the applicable standards.
All the relevant safety regulations, e.g. accident prevention regulations, law on technical work equipment, must also be observed.
Safety instructions
Carefully read the safety information section at the beginning of this document.
Set-up
For the first installation of the device proceed according to the following procedure:
make sure all power supplies and the external battery are disconnected
install and wire the device according to the schematic diagrams on the specific product user guide
after completing the previous steps, switch on the power supply and other related circuits.
28
Strato Pi CAN User Guide
Conformity Information
EU
This device complies with the essential requirements of the following directives and harmonised standards:
2014/35/UE (Low Voltage)
2014/30/UE (EMC)
EN61000-6-2:2005 (EMC Immunity)
EN60664-1:2007 (Electrical safety)
EN61000-6-4:2007 (Emission for industrial environments)
2011/65/UE (RoHS)
The declaration of conformity is available on the internet at the following address: https:// www.sferalabs.cc/strato-pi/
USA
This equipment has been tested and found to comply with the limits for a# Class A digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference when the equipment is operated in a commercial environment. This equipment generates, uses, and can radiate radio frequency energy and, if not installed and used in accordance with the instruction manual, may cause harmful interference to radio communications. Operation of this equipment in a residential area is likely to cause harmful interference in which case the user will be required to correct the interference at his own expense. The end user of this product should be aware that any changes or modifications made to this equipment without the approval of the manufacturer could result in the product not meeting the Class A limits, in which case the FCC could void the user's authority to operate the equipment.
Shielded cables must be used with this equipment to maintain compliance with FCC regulations.
This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) this device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation.
CANADA
This Class A digital apparatus complies with Canadian ICES-003 (A).
Cet appareil numérique de la classe A est conforme à la norme NMB-003 (A) du Canada.
29
Strato Pi CAN User Guide
AUSTRALIA / NEW ZEALAND
WARNING: This equipment is compliant with Class A of CISPR 32:2015. In a residential environment, this equipment may cause radio interference.
Compliance information for Raspberry Pi 3 Model B
Strato Pi CAN server model SPMC11X contains a standard Raspberry Pi 3 Model B single board computer. This board has WiFi and Bluetooth radios. It is user accessible and replaceable.
EU
Raspberry Pi 3 Model B is in conformity with the essential requirements and other relevant requirements of the Radio Equipment Directive 2014/53/EU.
USA
Raspberry Pi 3 Model B FCC IDENTIFIER: 2ABCB-RPI32
The antenna(s) used for this transmitter must be installed to provide a separation distance of at least 20 cm from all persons and must not be colocated or operating in conjunction with any other antenna or transmitter, except in accordance with FCC multitransmitter product guidelines. This (WiFi DTS) device has 20 MHz bandwidth mode.
CANADA
Raspberry Pi 3 Model B IC CERTIFICATION No.: 20953-RPI32
This device complies with Industry Canada license-exempt RSS standard(s). Operation is subject to the following two conditions: (1) this device may not cause interference, and (2) this device must accept any interference, including interference that may cause undesired operation of the device.
Le présent appareil est conforme aux CNR d'Industrie Canada applicables aux appareils radio exempts de licence. L'exploitation est autorisée aux deux conditions suivantes: (1) l'appareil ne doit pas produire de brouillage, et (2) l'utilisateur de l'appareil doit accepter tout brouillage radioélectrique subi, même si le brouillage est susceptible d'en compromettre le fonctionnement.
Compliance information for Raspberry Pi 3 Model B+
Strato Pi CAN server model SPMC11XP contains a standard Raspberry Pi 3 Model B+ single board computer. This board has WiFi and Bluetooth radios. It is user accessible and replaceable.
30
Strato Pi CAN User Guide
EU
Raspberry Pi 3 Model B+ is in conformity with the essential requirements and other relevant requirements of the Radio Equipment Directive 2014/53/EU.
USA
Raspberry Pi 3 Model B+ FCC IDENTIFIER: 2ABCB-RPI3BP
The antenna(s) used for this transmitter must be installed to provide a separation distance of at least 20 cm from all persons and must not be colocated or operating in conjunction with any other antenna or transmitter, except in accordance with FCC multitransmitter product guidelines. This (WiFi DTS) device has 20 MHz bandwidth mode.
CANADA
Raspberry Pi 3 Model B+ IC CERTIFICATION No.: 20953-RPI3P
This device complies with Industry Canada license-exempt RSS standard(s). Operation is subject to the following two conditions: (1) this device may not cause interference, and (2) this device must accept any interference, including interference that may cause undesired operation of the device.
Le présent appareil est conforme aux CNR d'Industrie Canada applicables aux appareils radio exempts de licence. L'exploitation est autorisée aux deux conditions suivantes: (1) l'appareil ne doit pas produire de brouillage, et (2) l'utilisateur de l'appareil doit accepter tout brouillage radioélectrique subi, même si le brouillage est susceptible d'en compromettre le fonctionnement.
31
Strato Pi CAN User Guide
Mouser Electronics
Authorized Distributor
Click to View Pricing, Inventory, Delivery & Lifecycle Information:
Sfera Labs: SPBC11X SPMC11X SPMC11XP
Loading...