background image

emPC-A/RPI3

 (

Hardware and

 Software Manual)  

  Operating System and Drivers 

5 - 21 

 
Rev. 1.3 

© 

Janz Tec AG

 

 

 

5.2.4.4  rtc-ds1307 : RTC 

 
MCP7940N  RTC  is  compatible  with  the  rtc-ds1307  Linux  driver  (supported  from  kernel  3.19).  The 
emPC-A/RPI3 installation installs the RTC service, so that the RTC automatically sets the system time 
on every boot. 
 
Reading the RTC time: 

pi@raspberry ~$ 

sudo hwclock -r 

 
Writing the system time to the RTC 

pi@raspberry ~$ 

sudo hwclock --systohc -D --noadjfile --utc 

 
 
 
After replacing the RTC battery, call the following command lines to set the RTC oscillator trim register 
to value 0 persistently. (Otherwise the RTC will be less precise than it could be) 

pi@raspberry ~$ 

sudo bash

 

pi@raspberry ~$ 

modprobe i2c-dev 

pi@raspberry ~$ 

mknod /dev/i2c-1 c 89 1 2>/dev/null

 

pi@raspberry ~$ 

i2cset -f -y 1 0x6f 8 0x00 b

 

 

Summary of Contents for emPC-A/RPI3

Page 1: ...or by any means for commercial use without the prior written permission of Janz Tec AG Germany All instructions information and specification contained in this manual are for reference only and remain subject to change without announcement emPC A RPI3 embedded PC Hardware and Software Manual Version 1 3 refers to product revision no 1 1 ...

Page 2: ... doc Pattern ntserv5 janzgrp as entwicklung formulare entwicklung ew ew_manual dot Created Stefan Althöfer 06 03 2015 Last Update Stefan Althöfer 21 09 2018 Janz Tec AG 2015 Im Dörener Feld 8 D 33100 Paderborn Germany Tel 49 5251 1550 0 FAX 49 5251 1550 190 email support janztec com Internet www janztec com ...

Page 3: ...stem and Drivers 18 5 1 Standard Raspbian Operating System 18 5 1 1 Installation 18 5 2 emPC A RPI3 Driver Installation Script 18 5 2 1 Installation Instructions 19 5 2 2 CPU Frequency 19 5 2 3 Bluetooth 19 5 2 4 Driver Details 19 5 2 4 1 spi bcm2835 SPI driver optimized for emPC A RPI3 20 5 2 4 2 mcp2515 CAN driver optimized for emPC A RPI3 20 5 2 4 3 sc16is7xx RS232 RS485 driver optimized for em...

Page 4: ...and Software Manual Contents Janz Tec AG Rev 1 3 7 Appendices 27 7 1 Technical Data 27 7 2 References 30 7 3 Dimensions 31 7 4 Raspberry GPIO Header 32 7 5 EMC Cable Installation 33 7 6 Product History 34 7 7 Manual History 34 ...

Page 5: ...tailed schematic 13 figure 6 emPC A RPI3 case bottom part removal 15 figure 7 emPC A RPI3 micro SDcard location 15 figure 8 Removing and replacing coin cell battery 16 figure 9 housing dimensions 31 figure 10 EMC Shielding 33 List of Tables table 1 Power Supply connector pins 10 table 2 Ethernet connector 11 table 3 USB host connector 11 table 4 Console RS232 connector 12 table 5 Serial Port conne...

Page 6: ...Indicates that death or severe personal injury may result if proper precautions are not taken CAUTION Indicates that minor personal injury can result if proper precautions are not taken NOTICE Indicates that damage to equipment can result if proper precautions are not taken Indicates information that we think you should have read to save your time by avoiding common problems Important suggestions ...

Page 7: ...cs output o 10 100 Mbit s Ethernet o 4 x USB 2 0 o Micro SDcard socket o WLAN o Bluetooth CAN ISO DIN 11898 2 isolated from logic jumper switchable 120 Ohm termination resistor Console 9 pin DSUB Serial port RS232 4 wire or RS485 jumper selectable jumper switchable 120 Ohm termination resistor for RS485 RTC with battery backup 4 x digital OUT 0 5 A max 10 32V externally powered isolated from logic...

Page 8: ... 2 0 IIC EE PROM Temp Sensor Battery Power RTC Only USB 2 0 HDMI Raspberry PI RTC RS232 Converter main DC DC 5V 2A 2 5A VIN 9 32 VDC Isolator Trans ceiver DC DC RS485 RS232 Transceiver Isolator UART CAN Isolator SPI Console GPIO GPIO 26pin IO header VIO 10 32VDC 3A High side switches 4 x0 5A Isolation barri e r Isolation barri e r GND IO 4 4 micro SD eFuse TPS2592AA UVL 9 1V 10 2 V rising 7 1 V 7 ...

Page 9: ...wer supply Do not connect this product to an improper power supply No AC power no more than 32 V DC DC or no non SELV circuit DANGER Electrical Shock Danger to life The IO interfaces connectors of the product are only suited to be connected to SELV circuits Use interfaces connectors for their intended use only CAUTION Explosive Risk The installed computer board is equipped with a Lithium battery D...

Page 10: ...ot operate the product in potentially explosive atmosphere NOTICE EMI This product is a class A device This product may cause radio interference In this case the user must take adequate measures NOTICE System overheating The cooling concept of the emPC A RPI3 is not sufficient to allow full loading of the Raspberry PI 3 Module processor without system overheating which leads to clock reduction Ref...

Page 11: ... burns hazard The product can be operated with DC power supply from 9 to 32 V 3 1 Mounting The emPC A RPI3 is intended for wall and 35mm DIN rail mount but can as well be used on the desk top Refer to figure 2 for the recommended mounting orientation Do not block heat transfer at this side Top 35mm DIN Rail Do not block heat transfer at this side Do not block heat transfer at this side Front Panel...

Page 12: ...0 mm If you use ferrules obey that standard ferrules for 0 75 mm have only 7 mm length 3 2 1 POWER IN The system power supply is located on the multi connector 1 23 2 24 21 22 21 PE 22 PE 23 GND 24 VIN 9 32 VDC table 1 Power Supply connector pins DANGER The product may only be operated with power supplies which can be considered SELV circuits Pins 21 and 22 should be connected to EMI protective ea...

Page 13: ... g ground the Ethernet cable shield where it enters the building or your cabinet If you just connect to a nearby switch such countermeasures are not required 3 2 4 USB host interfaces USB1 USB4 Two USB interfaces are available at the connector panel 1 5V IMAX 500 mA 1000 mA for all ports 2 USB 3 USB 4 GND table 3 USB host connector NOTICE Although each port can deliver supply current of 500 mA the...

Page 14: ...in RTS out and CTS in are provided In the RS485 mode the bidirectional differential signals D and D are provided When the transmitter is enabled and no data is send 1 MARK then D D refer to figure 4 Note that D corresponds to pin A of the transceiver chip However this is signal B according to the EIA 485 or Profibus standards The receiver has the fail safe input feature which ensures that no data ...

Page 15: ...DI4 8 DI3 9 DI2 10 DI1 table 7 Digital IO connector pins CAUTION The digital IO must be powered by a SELV power supply that complies with the requirements of a limited energy source LPS By using an appropriate supply or an external fuse The digital inputs and outputs are isolated from system power supply Refer to figure 4 for detailed schematic The digital input signals DI1 DI4 refer to GND IO and...

Page 16: ...evaluate that the demagnetization energy does not overheat the output driver Parameters to check are the switching frequency the load current the load inductance and VIO voltage Refer to the VN330SP datasheet for more information If in doubt add external clamping circuits 3 2 9 Audio Video The combined audio and analogue video connector is not accessible on the emPC A RPI3 ...

Page 17: ... of a small screwdriver in to the hole above the USB ports and unclip the two case parts Pull the lower case part away from the upper case Task Remarks Replace µSD card Remove DIN rail clip and or wall mount bracket Change jumper settings Remove case bottom part Replace Battery Complete disassembly NOTICE Remove the micro SDcard before you attempt to remove the Raspberry PI module from the housing...

Page 18: ...ery is used for backing up the system time when the power supply is removed 1 Turn off the computer properly through the operating system then turn off any external devices 2 Disconnect the power supply from the power inlet and disconnect any external devices 3 Disassemble the housing refer chapter 4 and locate the battery on the Janztec board 4 Remove the battery from the holder See figure 8 5 In...

Page 19: ...emPC A RPI3 Hardware and Software Manual Maintenance 4 17 Rev 1 3 Janz Tec AG ...

Page 20: ...Raspbian by default To use all of the emPC A RPI3 features refer to chapter 5 2 and 5 3 5 1 1 Installation For more information on how to prepare a µSD card to run the Raspbian operating system visit https www raspberrypi org documentation installation installing images README md Our Janz Tec image is based on the official RASPBIAN JESSIE image from 2018 06 27 with Kernel 4 14 SHA 256 8636ab9fdd8f...

Page 21: ...blob master README md 5 2 2 CPU Frequency CPU frequency is set to fixed 600MHz in file boot config txt See 7 1 Environmental Specifications for more information root raspberry nano boot config txt arm_freq 600 5 2 3 Bluetooth Bluetooth is not available after installing this driver package The reason is that the Raspberry PI 3B module has internally two serial ports Normally the Raspbian image has ...

Page 22: ...h overruns we have highly optimized the CAN and SPI drivers to receive incoming CAN frames significant faster than the default mcp2515 Linux driver As a result even with high bus utilization baudrates up to 500Kbit s can be used with almost no CAN frame drops Because of the limitations of the MCP2515 controller and the interrupt latency of Linux the 1Mbit s baudrate is not recommend when CAN frame...

Page 23: ...ets the system time on every boot Reading the RTC time pi raspberry sudo hwclock r Writing the system time to the RTC pi raspberry sudo hwclock systohc D noadjfile utc After replacing the RTC battery call the following command lines to set the RTC oscillator trim register to value 0 persistently Otherwise the RTC will be less precise than it could be pi raspberry sudo bash pi raspberry modprobe i2...

Page 24: ...ft PLC created by the company 3S Smart Software Solutions GmbH and is available for Raspberry Pi based devices Using this IEC 61131 3 programming system in combination with our emPC A RPI3 system is ideal for testing and educational applications because the control can make use of the additional interfaces the emPC A RPI3 offers digital IO CAN RTC and RS232 RS485 To download a time limited evaluat...

Page 25: ... May require manual configuration in the CODESYS configuration files 5 5 1 1 Information If you are interested in CODESYS runtime systems with real time support more Ethernet ports or more fieldbus ports our embedded PC series emPC and panel PC series emVIEW offer the whole range of industrial PCs in many performance classes https www janztec com en embedded computing html 5 5 1 2 License Informat...

Page 26: ...t sys class gpio gpio12 direction root raspberry echo 1 sys class gpio gpio12 value root raspberry echo 0 sys class gpio gpio12 value NOTICE When the emPC A RPI3 driver package chapter 5 2 has been installed the green LED is configured to show the µSD card activity To control this LED by from the command line uncomment the entry dtparam act_led_gpio 5 from the configuration file boot config txt an...

Page 27: ...turn digital output on drive VIO to the output set the GPIO to high state All other states low high Z or weak pullup will turn the digital output off Digital input GPIOs must be configured as input A high level will be detected if sufficient voltage is detected on the digital input pin Programming the digital inputs and outputs is the same as on a standard Raspberry PI 2 B so you can get more info...

Page 28: ...ing Information Janz Tec AG Rev 1 3 6 8 Overclocking The thermal design of the emPC A RPI3 does not support CPU overclocking Changing the CPU parameters CPU MHz Voltage is not recommended as it will permanently set a fuse in your SoC and void your warranty ...

Page 29: ...r ISO DIS 11898 2 isolated from logic jumper switchable 120 Ohm termination resistor Serial Port Console RPI defined RS232 2 wire SC16IS740 controller RS232 4 wire RS485 Digital IO 4 x digital OUT 0 5 A max 10 32V 4 x digital IN Isolated from system ground Indicators and Switches User LEDs 2 programmable LEDs red green System Housing Plastics UL VO RTC MCP7940 Battery CR 2032 for real time clock P...

Page 30: ... therefore is it not possible to use all of the computation performance the BCM2837 provides The CPU power consumption ranges from 1 5 W average when idle to 6 7 W maximum under stress so to prevent CPU overheating and throtteling the maximum CPU power consumption should not be higher than about 4 W In most real world use cases of this embedded computer the average CPU power consumption will be lo...

Page 31: ...emPC A RPI3 Hardware and Software Manual Appendices 7 29 Rev 1 3 Janz Tec AG Protection Class IP20 Physical Dimensions Size WxHxD 99 8 x 30 0 x 96 7 mm Weight 200g ...

Page 32: ...s and specifications that you might need to know when you attempt to program the product Most of the documents can be downloaded from the Internet Look for the WWW servers of the component chip manufacturers 1 https www raspberrypi org downloads 2 https www raspberrypi org documentation WWW References Janz Tec AG www janztec com ...

Page 33: ... following mounting options DIN rail clip not assembled Wall mount bracket not assembled Self adhesive rubber bumpers not assembled Note that you will not normally use both the DIN rail clip and the wall mount bracket at the same time 91 70 mm 3 00 mm 11 00 mm 30 00 mm 99 80 mm 4 00 mm 2 60 mm 118 60 mm 138 60 mm DIN Rail Clip Wall mount bracket figure 9 housing dimensions ...

Page 34: ...11 GPIO17 INT_UART In 12 GPIO18 DO4 Out 13 GPIO27 DO3 Out 14 GND 15 GPIO22 DO2 Out 16 GPIO23 DO1 Out 17 3 3V NC 18 GPIO24 RS485_MODE_DETECT 0 RS232 1 RS485 In 19 GPIO10 SPI_MOSI Out 20 GND 21 GPIO9 SPI_MISO In 22 GPIO25 INT_CAN In 23 GPIO11 SPI_CLK Out 24 GPIO8 SPI_CE_CAN Out 25 GND 26 GPIO7 SPI_CE_UART Out 27 NC 28 NC 29 GPIO5 LED green Out 30 GND 31 GPIO6 DI1 In 32 GPIO12 LED red Out 33 GPIO13 D...

Page 35: ...tion that we utilized during EMC compatibility tests to pass industrial level immunity Connect PE from the multi connector to the EMC shield DIN rail Connect cable shields for signals running to the multi connector to the EMC shield DIN rail The terminals clamps utilized are just examples other models might work equally good figure 10 EMC Shielding ...

Page 36: ...2015 10 05 ama Initial release 1 1 2017 07 03 as Revised RS485 signal naming Removed confusing A B names and corrected wrong D D in the pinout table Previously the manual used the apparently wrong A B labeling as used in almost all transceiver chip datasheets Revised battery maintenance Revised environmental specifications 1 2 2017 07 17 ama Revised canbusload example 1 3 2018 08 31 As Corrected v...

Reviews: