Home
User Guide - Pimodules
Contents
1. www modmypi com
2. Pi the is not cable power connected to it as also LiPO battery connected to the UPS Pico Module UPS Pico Jumpers For the Basic operation UPS Plco Module uses only the 5 VDC and GND pins and interacts with the Raspberry Pi through GPIO_GEN22 and GPIO_GEN27 Some specialized features require in addition RS232 and C In addition if the 1 wire device and IR Receiver are used there are directly routed to GPIO_GEN0O4 and GPIO_GEN18 pins respectively However these pins if not used with above features the 1 wire not connected and IR Receiver not soldered can be freely used as a standard GPIO pins The RS232 GPIO_GEN22 GPIO_GEN27 and HAT EEPROM are going to the UPS Plco Module trough Jumpers set Therefore if user not needs some of them can remove the jumpers and free that pins for other applications Jumper Descrition Usage Connection RXDO RS232 Receive RX for RS232 command for the UPS Plco GPIO_GEN15 TXDO RS232 Transmit TX for RS232 command for the UPS Plco GPIO_GEN14 FSSDR FSSD Raspberry Pi File Safe Shutdown Pin for the Raspberry Pi GPIO_GEN22 FSSDU FSSD UPS Plco RUN Pin for the UPS Plco GPIO_GEN27 HATWP HAT EEPROM WP HAT EEPROM Write Protection EEPROM WP Figure 3 UPS Pico Jumpers Usage Table UPS Pico Buttons The UPS Pico Module is equipped with 5 buttons that can be used in various ways Two of them are dedicated for user applications and can be handled by user through the PICo I C int
3. Setting up the 12C interface and RTC sssssssssssssessssssosssssssseseossessosseseoseeseossessssseseoessss 13 The PICo I C Interface Peripherals 1 C Control Interface s sccsssssssssssssssssessssssesessesees 15 0x69 gt UPS Plco RTC Registers Direct Access Specification ccccccccccsssssssssseceeseeseesssaees 16 Accessing 0x69 Varibales cccccccccscssssssssecececeseesesssaeeeeecessesesaeseeeeecessesesaeseceessessessaaeeeeess 16 Ox6A gt UPS Pico Module Status Registers Specification cccccsccccecessssesseceeeeeceseeseaees 17 Accessing OX6A Varibales cccccccccccsssssssseceeccecsesecneseceeecesseseaaeseceeecessesaaaeseeeeeseesesaaeeeeess 18 Ox6B gt UPS Plco Module CommandS si eeeeceeeeeeeseeeeeseeceeeeecaeeeeaaeceeaeeceeeeeaeeneaaeseeeeeeeas 18 Accessing OX6B Varibales cccccccccecssssssnsececececsesesneaecececesseseeaeseeeeecussesuaeseceeesessessaaeeeeess 24 Setting Up the RaspberryPi Serial Port for other applications ccssssccccsssseeceeeeees 24 UPS Pico Terminal Commands Control commands RS232 interface sseseccsesrsseees 27 Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 Table of Figures Figure 1 UPS Plco Jumpers Usage Table ccccssssssccccecsesssssseseceeeceeseeuaeeeceesseesesaaeee
4. This is timer that force the UPS Plco when battery powered to check if cable power returns Default it is 5 seconds So when UPS Plco RPi are powered Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 from battery every 5 seconds the UPS Plco checks if powering cable has been entered the RED RPi LED flashes then and if yes then switch off the battery and after 2 seonds start up the battery charger if not continoue battery powering Read Anytime Return actual btto value Write Oxff Not allowed Write 0x01 Not allowed Write 0x02 Oxfe time in seconds 12 or Ox0C led_blue Byte Common R W_ LED BLUE PLCC2 size ON Write 0x01 LED BLUE PLCC2 size OFF Write 0x00 13 or OxOD led_red Byte Common R W_ LED RED PLCC2 size ON Write 0x01 LED RED PLCC2 size OFF Write 0x00 14 or OxOE bmode Byte Common R W Integrated Buzzer Mode Read Anytime Return actual bmode value Write 0x00 Unconditional Disable the buzzer Write 0x01 Unconditional Enable the buzzer Write 0x02 Enable Automatic buzzer functionality beep only when is defined in the firmware UPS Pico restarts alwayes with automatic Buzzer Mode 15 or OxOF fmode Byte Common R W Integrated Fan Running Mode Read Anytime Return a
5. back with 0x00 User need to write 0x00 alwayes after reading it Non pressed KEYB is 0x00 pressed KEYB is 0x01 11 or OxOB KEYF Byte Mirror R W_ Contain 0x01 if KEYF is pressed and remain until will write back with 0x00 User need to write 0x00 alwayes after reading it Non pressed KEYF is 0x00 pressed KEYF is 0x01 12 or OxOC tmpcels Byte Mirror R W_ Temperature in Celcius degree of the SOT 23 sensor placed on the top of PCB Values in BCD format 13 or OxOD tmpcelt Byte Mirror R W Temperature in Celcius degree of the TO 92 sensor placed on the bottom of PCB It is valid only if this sensor is soldered It is available in the Plco Fan Kit Values in BCD format Figure 9 0x69 gt UPS Pico Module Status Registers Specification Access to those variables offers information about UPS Plco Modules status and their peripherals All of them are mirror so are available for reading However the KEYA KEYB and KEYF need to be reseted by writting 0x00 after reading in order to prepare them for the next key pressed status Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 Accessing 0x69 Varibales In order to access the 0x69 variavbles the following commands need to be executed from the OS command line sudo i2cget y 1 0x69 0 The result
6. installed soldered UPS PIco Terminal Commands Control commands RS232 interface The UPS Pico Module uses the 5 VDC and GND pins for powering and interacts with the Raspberry Pi through GPIO_GEN22 and GPIO_GEN27 Simple Python script must be running on the Raspberry Pi that interacts with the UPS Pico Module After installing of that Python script there is no need for any additional tasks to use the UPS Plico Modules However there is a group of users that have more advanced needs The Terminal Commands Control was specifically addressed for them and is an alternative way for advanced controll of the UPS Pico Module other than PICo I C Interface There are plenty of commands for full system control Thanks to the implemented bootloader the set of commands can be constantly enhanced with new ones as we release more of them We are open to customer suggestions about new commands to implement Customers can propose new commands by e mail or on our forum if we find them generally useful then we will implement them for free and distribute them via our bootloader system Customized versions of the firmware featuring customer specific commands are also possible Command Meaning Explanation Usage Action factory Factory Defaults factory or FACTORY Return UPS Plco to Factory Default Values Should be used always after upload of a new firmware Executing of this command does not reset the Rasp
7. wil be the powering mode sudo i2cget y 1 0x69 5 w The result wil be the AD1 value in 10 of milivolts sudo i2cget y 1 0x69 9 The result wil be the status of the KEYA and if presed with be 0x01 if not 0x00 IN case that the result is 0x01 key pressed this variable need tobe reseted by writting 0x00 sudo i2cset y 1 0x69 9 0x00 0x6B gt UPS PIco Module Commands Address Name Size Type R W Explanation 0 or 0x00 version Byte Common R W Version Factory Reset FSSD Bootloader I2C Read Check the actual firmware Version Write OxaO Set the 12C Addesses Registeres to I2C_NORMAL where the following adresses are used 68 69 6a 6b defined for all functions of UPS Pico 6c 6d 6e 6f defined for functions related to Event Driven Time Based ON OFF Scheduler of UPS Pico and will be defined in next version of firmware sudo i2cset y 1 Ox6b 0 OxaO Write Oxa1 Set the 12C Addesses Registeres to I2C_MINIMAL where the following adresses are used 68 69 6a 6b defined for all functions of UPS Plco sudo i2cset y 1 Ox6b 0 Oxa1 Write Oxa2 Set the I12C Addesses Registeres to 12C_NORTC where the following adresses are used 6A 6b defined for all functions of UPS Plco Releases the 0x68 and Ox6A of the internal RTC and give it for other additional RTC devices sudo i2cset y 1 Ox6b 0 Oxa2 Each change of the I2C configuration cause UPS Pico Restart Defaul
8. 7C interface as also for the peripheral itself Therefore any change of them by either party Raspberry Pi and the peripheral causes immediate update and action Two types of variables are available e Common where data are stored in the same place and any change on it will cause action on the UPS Pico Module e Mirror where are copy of data stored on internal variables of the UPS Pico Module they are protected so changes on it will not implies the UPS Pico Module functionality and will be overwritten immediately when UPS Pico Module recognized changes on them There have been implemented 3 PICo addresses assigned to the following entities Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 0x6A gt UPS Pico RTC Registers Direct Access Specification Address Name Size Type R W Explanation 0 or 0x00 Seconds Byte Mirror Read Seconds in BCD 1 or 0x01 Minutes Byte Mirror Read Minutes in BCD 2 or Ox02 Hours Byte Mirror Read Hours in BCD 3 or 0x03 DOW Byte Mirror Read DOW in BCD 4 or 0x04 Days Byte Mirror Read Days in BCD 5 or 0x05 Month Byte Mirror Read Month in BCD 6 or 0x06 Year Byte Mirror Read Year in BCD 7 or 0x07 RTCCF Byte Common R W Real Time Clock Correction Factor in HEX Change the RTC timer for multiples of 1 tick per se
9. N Kit TO092 and shows the higher one the HOT LED lights The temperature is measured on both sensors the SMD placed on the top as also on the TO 92 is Plco FAN Kit is used The higher temperature on one of them activates the HOT LED and remains until both sensors have lower temperature than the threshold The default value is 42 Degs Celsius LED RED PLCC2 size Provided for UPS Pico Module User Application Available for user application Handled by the PICo and commands interface During Boot Functionalities support interaction with various lightings LED BLUE PLCC2 size Provided for UPS Pico Module User Application Available for user application Handled by the PICo and commands interface During Boot Functionalities support interaction with various lightings Figure 5 UPS Pico LEDs Usage Table Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 UPS Pico I Os The UPS Pico Module is equipped with 4 I Os there are e 1 wire interface e 10 bits A D converter 1 0 5 2V e 10 bits A D converter 2 0 5 2V e IR Receiver The 1 wire interface is supported with supply of 3 3V which is independent from the Raspberry Pi powering and GND on the same connector It simplifies the connection making when the 1 wire is used In addition the 1 wire int
10. Raspberry Pi RUN pin for 250 ms is followed If Gold Plated Reset Pin is not installed the hardware reset will be not executed however the battery powering will be cutted for 250 ms That means the Raspberry Pi will reset if hangs up So System will restart again After execution of the STA Restart the sta_counter is set again to OxFF disabled 9 or 0x09 fssd_batime Byte Common R W Battery Running Time when cable power loses After that time a File Safe Shut Down Procedure will be executed and System will be shutdowned without restart Battery power will be diconected System is in sleep mode LPR aqnd RTC is runing If Raspberry Pi cable power returns again system will be start automaticly If during the sleep mode LPR the FSSD button will be presed for longer time than 2 seconds with Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 battery or cable powering Raspberry Pi will re start again Value of Oxff 255 disable this timer and system wil be running on battery powering until battery discharge to 3 5 V Factry default value is 120 seconds Value higher than 15 seconds are only accepted Writting of smaller value than 15 seconds to this register wil be overwritten with 30 seconds 0x14 Read Anytime Return actual fssd
11. Uninterruptible Power Supply with Peripherals and C control Interface Firmware Code 0x25 Print Date 20 05 2015 UPS Pico Uninterruptible Power Supply with Peripherals and 1 C control Interface for use with Raspberry Pi Pi2 B A B and A HAT Compliant Raspberry Pi isa trademark of the Raspberry Pi Foundation Short User Guide Preliminary Version 1 4 PiModules amp ModMypPi Intelligent Modules for your Raspberry Pi Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 Document Revisions Version Date Modified Modified Sections Comments Pages 1 0 28 01 2015 none none First Public Document Release 1 1 28 02 2015 21 17 Figure 8 Figure 7 Updated new variables 1 2 24 03 2015 21 Figure 3 Figure 8 Updated BAT LED flashing time according to 22 firmware changes Updated FAN commands 1 3 14 04 2015 21 Figure 3 Figure 8 Commands updated 22 1 4 20 05 2015 16 Figure 1 Ox6A Change 12C address 1 4 20 05 2015 17 Figure 7 0x69 Change 12C address 1 4 20 05 2015 18 Figure 2 0x6B Added more commands to the version Variable related to 12C setup Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Pri
12. _timeout value Write 0x14 UPIS will cut the power after FSSD default value 30 seconds Must be bigger than 15 seconds 0x0F if smaller is set then automatically will be selected the default value Any change on this register will cause immediate writting of the new value to the Plco EEPROM 10 or Ox0A lprsta Byte Common R W Low Power Restart Time in seconds in HEX format from 0x01 Oxff This is the timer which counts how often the power will be checked in Low Powering Mode in order to restart the system Default value is 5 seconds More often checking means faster response to power come back however consumes more power from the battery Less often means slower response to power come back however consumes less power from battery Default value is 5 seconds This means that when cable power return it will be recognized within maximum 5 seconds and switch ON the UPS Plco The same timer is used also for the button presses restart RPi The RPi UPS Plco system will go to the Low Powering Mode LPR after the Iprsta timer value This is valid in all cable powering modes except of the RPi mode 0x00 is not allowed and will be ignored by the system Write 0x01 Oxff set the time in seconds Read Anytime Return actual Iprsta value Value of the Iprsta will be stored in the UPS Plco EEPROM 11 or Ox0B btto Byte Common R W Battery Powering Testing Timeout
13. ace Firmware Code 0x25 Print Date 20 05 2015 System Overview Introduction The UPS Pico is an advanced uninterruptible power supply for the Raspberry Pi that adds a wealth of innovative power back up functionality and development features to the innovative microcomputer The standard UPS Plco is equipped with a 300mAh LiPO battery specially designed to enable safe shutdown during a power cut Additionally this can be easily upgraded to the extended 3000mAh version which enables prolonged use of a Raspberry Pi for up to 8 hours without a power supply connected The UPS Pico features an embedded measurement system that continuously checks the powering voltage of the Raspberry Pi When the cable power on the Raspberry Pi is absent insufficient or the device detects a power failure the UPS Plco automatically switches to the unit s battery source The module then continues to check the voltage on the Pi and switches automatically back to the regular cable supply when power becomes once again available The UPS Pico is powered and the battery pack intelligently charged via the GPIO pins on the Raspberry Pi so no additional cabling or power supply is required The UPS Pico is designed to be 100 compliant with HAT standards for the Raspberry Pi B and A and is mechanically compatible with the original Raspberry Pi models A and B when an extension header is used In addition to this because the UPS Pico requires no external pow
14. aller than 32 seconds Default value is 0x20 seconds 32 seconds Read Anytime Return actual FSSD_tout value Write Ox2d Oxff Set the FSSD_tout Write 0x00 0x2d not allowed will be overwritten with default value Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 Figure 10 Ox6B gt UPS Pico Module Commands Accessing 0x6B Varibales In order to access the 0x6B variavbles the following commands need to be executed from the OS command line sudo i2cset y 1 Ox6B 12 1 The result will be lighting the LED BLUE PLCC2 size ON sudo i2cset y 1 0x6B 12 0 The result will be lighting the LED BLUE PLCC2 size OFF sudo i2cset y 1 Ox6B 13 1 The result will be lighting the LED RED PLCC2 size ON sudo i2cset y 1 0x6B 13 0 The result will be lighting the LED RED PLCC2 size OFF sudo i2cget y 1 0x6B 0 The result will be the current firmware version code i e OxOF Setting Up the RaspberryPi Serial Port for other applications By default Raspberry Pi s serial port is configured to be used for console input output While this is useful if you want to log in using the serial port it means that you can t use the Serial Port in your programs To be able to use the serial port to connect and talk to other devices the serial port console
15. berry Pi so can be used when powered from battery version Firmware and version or VERSION Return UPS Plco Hardware Hardware Release and Firmware Version Version status Status of the System status or STATUS Return UPS Plco system status ad1 Read First A D ad1 or AD1 Return the first A D converter converter value in mili volts ad2 Read Second A D ad2 or AD2 Return the second A D converter converter value in mili volts pm Powering Mode pm or PM Return the Powering Mode bat Value of the Battery bat or BAT Return the Battery Level Level value in mili volts rpi Value of the J8 5V rpi or RPI Return the 5V on J6 Level connector Level value in mili volts time Pico RTC Time time or TIME Return the time of the Pico RTC date Pico RTC Date date or DATE Return the date of the Plco RTC beep Beep beep or BEEP Make beep on integrated buzzer Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 redon RED LED ON red on or RED ON Make RED LED ON redoff RED LED OFF red off or RED OFF Make RED LED OFF blueon BLUE LED ON blue on or BLUE ON Make BLUE LED ON blueoff BLUE LED OFF blue off or BLUE OFF Make BLUE LED OFF Figure 13 TCC commands set Designed and Manufactured by PiModules and ModMyPi www pimodules com
16. cond Timers tick is 1 32768 Hz 0 000030517578125 sec Write 0x00 or 0x80 not change the RTC tick Write 0x01 0x79 change the RTC tick by subtract tick multiplication from the standard timer values therefore it will decrease the duration of each second by multiple value of timer ticks counted second will be shorter so RTC will be running faster Write 0x81 OxFF change the RTC tick by adding tick multiplication to the standard timer values therefore it will increase the duration of each second by multiple value of timer ticks counted second will be longer so RTC will be running slower Adding or subtract of one tick change the 24 hours RTC by 86400 0 000030517578125 sec 2 63671875 seconds Read Checks actual RTCCF Value Figure 8 Ox6A gt UPS Plco RTC Registers Direct Access Table Access to these variables can be done indepened if the RTC is used by the Raspberry Pi R system The last variable is Common changes of it trim the RTC accuracy according to specifications provided in above table Therefore writting to this register cause immediate action and trimming of the RTC Accessing 0x69 Varibales In order to access the 0x6A variavbles the following commands need to be executed form the OS command line sudo i2cget y 1 Ox6A 0 The result wil be the seconds register value of the implemented RTC There are a very good python script and C software that showing how to access them on our prod
17. ctual fmode value Write 0x00 Unconditional Disable the FAN with selected speed from the fspeed Write 0x01 Unconditional Enable the FAN FAN with selected speed from the fspeed When UPS Pico is gowing down to the LPR mode the FAN is automaticly disabled and enabled again when the UPS Pico returns to normal work 16 or 0x10 fspeed Byte Common R W Integrated Fan Speed Read Anytime Return actual fspeed value Write 0x00 Selected speed when ON is 0 not running Write 0x01 Selected speed when ON is 100 full speed running Write 0x02 Selected speed when ON is 25 Write 0x03 Selected speed when ON is 50 Write 0x04 Selected speed when ON is 75 23 or 0x17 XBMC Byte Common R W Activate XBMC Mode Added XBMC functionality running without python Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 script needs especially addressed for XBMC users System is running normally when cable power connected and when cable power removed system will stops cut the battery power without FSSD after specified time out 60 seconds During this time the Raspberry Pi will shut down by itself forced by the Pulse Eight CEC driver Reconnecting the power switch ON TV starts again the Raspberry Pi The XBMC f
18. de 1 or Ox01 error_code Byte Mirror Read UPS Pico System Error Code Read 0x00 No error If UPS Pico System Error happens then the BAT LED continously light until wrong conditions will be corrected Each Bit of this variable represent a specific error Bit O RPi Powering Voltage lower than 4 7V Bit 1 Battery Voltage lower than 3 3V Bit 2 Battery Temperature higer than 50 C Bit 3 UPS Plco System watch dog restart Bit 4 TBS Bit 5 TBS Bit 6 TBS Bit 7 ON when writting data to Plco EEPROM User action is required in order to cancel the System Error Code by writting the 0x00 to this register If System Error still exists will be overriten again with its code UPSR clear this register value No User action is required when when data are writting to the Plco EEPROM 2 or 0x02 rpi_serror Word Mirror Read Means value of Voltage supplying RPi on J8 5V Pin in 10 of mV in BCD format when UPS Pico System Error happen 4 or 0x04 bat_serror Word Mirror Read Means value of Battery Voltage in 10 of mV in BCD format when UPS Plco System Error happen 6 or 0x06 tmp_serror Word Mirror Read Meana value of Battery Sensor Temperature in BCD Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Pri
19. e The Terminal Commands Control TCC Interface based on the RS232 Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 Both of them are independent and can be used sepratelly In order to use both of them a some additional installion works is needed In order to use C and RTC that is communicating with OS via 1 C a simple I C set up is needed Setting up the I2C interface and RTC The I C Ports on the Raspberry Pi are not enabled by default Follow these steps to enable the I C ports and the RTC communicate with RaspberryPi trough I C First of all the config file must be edited that by default disables the I C port This setting is stored in etc modprobe d raspi blacklist conf sudo nano etc modprobe d raspi blacklist conf Once this file is open find the line blacklist i2c bcm2708 and comment it out by adding a hash character in front of it as shown here below then save and close the file blacklist i2c bcm2708 Now edit etc modules sudo nano etc modules and add the following lines then save and close the file i2c bcm2708 i2c dev rtc ds1307 Reboot the system sudo reboot Install IPC tools by running the following command assuming that you re connected to Internet sudo apt get install i2c tools Now look for ID 68 with i2cdetect Dep
20. ending on the model of your Raspberry Pi this must be done in two different ways e Ona256MB Raspberry Pi Model A sudo i2cdetect y 0 e Ona512MB Raspberry Pi Model B sudo i2cdetect y 1 Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 The result should look like the following lp pi raspberrypi A boo jpi i92 168 1 6 s password Linux raspberrypi 3 12 28 709 PREEMPT Mon Sep 8 15 28 00 BST 2014 armv6l The programs included with the Debian GNU Linux system are free software the exact distribution terms for each program are described in the individual files in usr share doc copyright Debian GNU Linux comes with ABSOLUTELY NO WARRANTY to the extent permitted by applicable law Last login Sat Jan 10 17 06 49 2015 from turbopc lan sudo i2cdetect 23 4 5 6 7 Figure 6 12C UPS Pico Interface and Simulated DS1307 Clock detection Then running as root do the following also depending on the model e Ona256MB Raspberry Pi Model A sudo bash echo ds1307 0x68 gt sys class i2c adapter i2c 0 new_device exit e Ona512MB Raspberry Pi Model B sudo bash echo ds1307 0x68 gt sys class i2c adapter i2c 1 new_device exit The result should look like sudo bash root raspberrypi home pi echo ds13 7 x68 gt sys class i2c adapter i2c 1 new_device
21. eration it is mandatory to have connected GPIO_GEN27 to the UPS Pico Module trough the FSSDU Jumper as also installed the picofssd py script The GPIO_GEN27 is generating pulse train that is interpreted by the UPS Pico Module and allows it to recognize different states of Raspberry Pi powering conditions Mounting UPS PIco on Raspberry Pi In order to set up the UPS Plco Module some simple hand work is needed Please follows the below steps before you start working with it If needed solder one or both of 3 pins connectors to the I O Check if all Breen jumpers are on their places 3 Remove and save the yelow jumper for future HAT EEPROM programming this procedure will be provided on www pimodules com 4 Put the UPS Pico Module on the top of the Raspberry Pi without connected LiPO battery and cable power to the Raspberry Pi Connect the LiPO battery to the UPS Pico Module Enter cable powering to the Raspberry Pi Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 7 Press the UPSR button in order to set the start up conditions If needed make factory defaults described later on the following chapters Wait until the Raspberry Pi boot up and then verify the Green UPS LED blinking every 500 ms It is important to be sure that when plugging the UPS Pico Module to the Raspberry
22. erface is ESD protected Is is directly routed to the GPIO_GENO4 If the 1 wire sensor is not used the GPIO can be used for any other application on the J8 pins It contains just the required 4K7 resistor connected to the 3 3V The UPS Pico Module supports also pre calibrated 2 x 10 bits A D converters Their readings can be easy accessed easy via PICo I C interface or commands RS232 Read values are in mV Those inputs are also ESD protected The IR Receiver if assembled soldered on the PCB is directly routed to the GPIO_GEN18 A very good tutorial how to use it can be found on below link https www modmypi com blog raspberry pis remotes ir receivers User does not need to add any other component in order to use the IR Receiver If the IR Receiver is not used not soldered to the PCB the GPIO_GEN18 can be used for any other application UPS Pico Advanced User Appications The UPS Pico Module uses the 5 VDC and GND pins for powering and interacts with the Raspberry Pi through GPIO_GEN22 and GPIO_GEN27 Simple Python script is mandatory to be running on the Raspberry Pi that interacts with the UPS Pico Module After installing of that Python script there is no real need for any additional tasks to use the UPS Plco Modules However there is a group of users that have more advanced needs In order to cover them 2 different interfaces have been implemented e The Peripherals IC Control PICo Interface based on the I C and
23. erface or commands RS232 all other are specific for various UPS Pico Module functionalities All of them can be used for some start up functionalities when UPS Pico Module is reset A detailed description of all buttons and their usage is provided on below table Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and C control Interface Firmware Code 0x25 Print Date 20 05 2015 Button Description Usage Additional Functionalities RPiR Raspberry Pi Hardware Reset Make Raspberry Pi Hardware Reset when pressed To be used need installed soldered the Gold Plated Reset Pin NOTE1 Resetting of the Raspberry Pi can NONE corrupt files on the SD card if used NOTE2 Resetting of the Raspberry Pi does not affect the UPS Plco including Plco RTC UPSR UPS Plco Hardware Reset Make UPS Pico Hardware Reset when pressed When pressed with combination with other buttons activate various start up NOTE1 Resetting of the UPS Pico does not functionalities The procedure is to press first reset the Raspberry Pi the UPSR button and then another one then release the UPSR button and then release the other button valid for FSSD NOTE2 Resetting of the UPS Plco does reset KEYA KEYB the simulated RTC to default values FSSD File Safe Shutdown When pressed initiate the File Safe Shutdown When used with UPSR button make factory P
24. ering and fits within the footprint of the Raspberry Pi it is compatible with most cases The UPS Plco can also be equipped with an optional Infra Red Receiver which is routed directly to GPIO18 via the PCB This opens the door for remote operation of the Raspberry Pi and UPS Pico Finally the UPS Plco features an implemented Automatic Temperature Control PWM fan controller and can be equipped with a micro fan kit which enables the use of the Raspberry Pi in extreme conditions including very high temperature environments Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 Applications UPS Plco is equipped with plenty of features which make it an extremely useful tool for Raspberry Pi project development It not only provides powering continuity but also offers extra user programmable LEDs sensors buttons and I O s The unit also features a dedicated 10 bit analogue to digital converter with two channels making it the perfect board for remote and unmanned sensor deployment These extra features result in the UPS Pico being a superior all in one device perfect for many innovative projects and embedded applications Features The list of features of the UPS Pico is as follows e Raspberry Pi B HAT Compliant e Plug and Play e Smart Uninterruptible Power Supply UPS e In
25. logins need to be disabled Needless to say if you do this then you need some other way to log in to the Raspberry Pi we suggest using an SSH connection over the network Disable Serial Port Login To disable logins on the serial port there are two files that need to be edited The first and main one is etc inittab You can edit it by issuing this command sudo nano etc inittab throughout this manual we will assume that text files are edited with nano and that the user knows how to save the file after editing However instead of nano the user is free to use any other text editor that he or she feels comfortable with Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 This file contains the command that enables the login prompt that needs to be disabled Move to the end of the file you will see a line similar to T0 23 respawn sbin getty L ttyAMAO 115200 vt100 Disable it by adding a character to the beginning as shown here below then save the file T0 23 respawn sbin getty L ttyAMAO 115200 vt100 Disable Boot up Info When the Raspberry Pi boots up all the boot log information is sent to the serial port Disabling this boot log information is optional and you may want to leave this enabled as it is sometimes useful to see what happens at boot and if you have a de
26. m www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 General Information The UPS Pico Module uses the 5 VDC and GND pins for powering and interacts with the Raspberry Pi through GPIO_GEN22 and GPIO_GEN27 Simple Python script must be running on the Raspberry Pi that interacts with the UPS Pilco Module The GPIO_GEN22 is used to force the File Safe Shutdown FFSD procedure when the UPS Pico Module make it low and read by the Raspberry Pi The GPIO_GEN27 is used by the same Python script and generate a pulse train that is recognized by the UPS Plco Module and interpreted if the Raspberry Pi is running or not This approach allows simplifying the design and cutting the needs to have current measure system on the UPS Pico Module If the Raspberry Pi is running so the pulse train is generated user can see that the UPS LED on the UPS Pico Module is flashing fast if cable powered and slow if battery powered If the UPS LED is not flashing it means that the Raspberry Pi is not running the Python script is not running Therefore it is mandatory for a proper use of the UPS Pico Module to have the Python script installed Due to this implemented feature the UPS LED flashing functionality user can by a single view have a knowledge if the Raspberry Pi is running or not Hang up or Shutdown It is important to notice that for the proper UPS Pico Module op
27. n below table LED Description Usage UPS LED Green Provide information about UPS Pico Module status Flashes Normally when system is cable powered and Raspberry Pi is running 100 ms ON 500ms OFF e Flashes Slow when system is battery powered and Raspberry Pi is running 100ms ON 2000ms OFF Flashes Fast when FSSD is executed 100ms ON 200ms OFF e Not light when UPS Pico Module is in Low Powering Mode LPR and the Raspberry Pi is not running BAT LED Orange Provide information about UPS Pico Module Battery Level when system is powered from it or continuously lit when Plco system error occurs See description Figure 8 0x6B gt UPS Pico Module Commands e Battery Level gt 3 7 V BAT LED not Flash e 3 7V lt Battery Level gt 3 5 V BAT LED Flashes 100ms ON 2000ms OFF e 3 4V lt Battery Level gt 3 5 V BAT LED Flashes 100ms ON 500ms OFF e 3 3V lt Battery Level gt 3 4 V BAT LED Flashes 100ms ON 200ms OFF FSSD is immediately initiated When Plco registers data written to the internal EEPROM LED Lights for 1 seond CHG LED Green Provide information about UPS Pico It is valid only when cable powering is present Module Battery Charger Status When battery is charged the CHG LED Lights HOT LED Orange Provide information about UPS Pico When system temperature is higher than threshold Module Temperature Read both sensors the embedded SOT23 and the Pico FA
28. nt Date 20 05 2015 format Celcius Degrees when UPS Plico System Error h appen 8 or 0x08 sta_counter Byte Common R W Still Alive Timeout Counter in seconds in HEX format Read Anytime Return actual sta_counter value Write Oxff Disable the counter default value Write 0x01 Oxfe Enable and start down counting of the Still Alive Time Counter in resolution of 1 second until reaches value of 0x00 which initiate the File Safe Shutdown Procedure Write 0x00 Initiate immediately File Safe Shutdown Procedure and system restart with similar conditions as described below In order to use it as Still Alive type of watchdog timer user needs to upload value from 0x01 to OxOfe earlier than defined time of seconds Not uploading of this value will cause System File Safe Shutdown after time out The maximum time out is 254 second 1 When Cable Powering is connected and Gold Plated Reset Pin is installed then first try is to execute FSSD and after that hardware reset by setting LOW on the Raspberry Pi RUN pin for 250 ms is followed If Gold Plated Reset Pin is not installed the hardware reset will be not executed That means the Raspberry Pi will not reset if hangs up So System will not restart again 2 When Cable Powering is disconnected system is powered via Plco battery and Gold Plated Reset Pin is installed then first will try is to execute FSSD and after that hardware reset by setting LOW on the
29. nt Date 20 05 2015 DOCUMENT REVISIONS ssccscscassonescsscesescansanescssececssaneanesesusesessandsnncasssosessansanensuescsessenaaonnesuics 2 CROCS ssi c scdisscascasensessasssccsseven sd sedssecccaovas E E A 5 System OVEIVIEW cciisicececssiassscccsseesscccsscessscssecdsstasesssscoeuedsscesassssdeaesdsstases sssseesssseasessssteoesss 6 PEFOCU e ieo A ices cece esende ete ns sateruaedeesnnys aunesve destaunactoctuntt E EE 6 APDIICAtIONS seacteeseczsacveicsetetensnc deca sidactenseeacesseseacheataeates cevebodendaeaceeeeet oabestacateeendte e 7 PO QUUIES wie ecsdiicceesenedervecbebke To sagdervesbeeevavsuncseapeeeeTevacdedveaneeeesavmedee veahitesdusnadedeeadbeinvawoendteanseevsexe 7 General Information iccscsisascansrscccssscssccnnssscsdscasandsnnseoeessscoansunnescoscessoasesnvensesscedessasnvsscessesse 8 Mounting UPS Plco on Raspberry Pi scscccscsssssssscscececescacsssseseeceseecanscssessecsseesansassessess 8 UPS PICO JUMPEIS iv sssicsecccsicteccsessssccsveccosssueseaccasdscecssudets cosvcceaceatescacssvccteccaveseacesuccescsoneseess 9 UPS PICO BUttONS sscscccsssssceccecsscecescsececeecsecessecsecessecsecessecsecessecseeesseceeeesseceeeessoeeeeesoes 9 UPS PICO LEDS i s sescswcsvasesnsnsustccsedusnsesesassscenusenacssnusvecsssesssvsesuswacssussvavessusessessvecsecesseseeness 11 UPS PICO OS A E T A O E E ETE A 12 UPS Pico Advanced User AppicationS sseesssssssesseessoosssssssesscosssssssesscosssssseesscessessssessoo 12
30. o other boards using the serial port are placed on the top of the UPS Plco Figure 11 UPS Pico Jumpers By pressing the UPSR the UPS Reset Button you should see on the minicom screen the UPS Pico welcome message after reset This will ensure you that the UPS Plco is cooperating properly with your Raspberry Pi EP pi raspberrypi 9 sessile hatin matali a y UPS PIco RESTART CAUSE MCLR FROM RUN www pimodules com UPS PIco Hardware Release V1 00 ll Firmware Release V1 0 Preliminary UPS PIco System Started Figure 12 Minicom screenshot while the UPS Pico restarts Be careful when pressing the UPSR the UPS Reset Button to avoid pressing also the RPIR the Raspberry Pi Reset Button because that other button would force a reset of the Raspberry Pi and cause the immediate cutting of communication between the UPS Plco and the Raspberry Pi NOTE1 Resetting of the UPS Plco does not reset the Raspberry Pi NOTE2 Resetting of the UPS Plco does reset the simulated RTC to default values NOTE3 Resetting of the Raspberry Pi does not reset the UPS Plco therefore the RTC keeps working and the time information is not lost Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 NOTE4 Resetting of the Raspberry Pi is possible only if the Reset Gold Plated Pin is
31. rocedure If used need to have FSSDR Jumper self test used during boards testing Not short If Raspberry Pi UPS Plico system battery useful for user as a special test board with powered after FSSD finished UPS Plco will cut the spring test pins need to be connected power Pressed again need to have installed the Gold Plated Reset Pin for the restart option start the Raspberry Pi UPS Pico system again KEYA User Key A Can be used for User Application Read the When used with UPSR button makes the status via PICo IC or RS232 interface factory default and reset the RTC to startup values KEYB User Key B Can be used for User Application Read the When used with UPSR button invokes the status via PICo C or RS232 interface bootloader light the Red User LED The bootloader can be invoked also from the PICo interface Figure 4 UPS Pico Buttons Usage Table Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface UPS Pico LEDs Firmware Code 0x25 Print Date 20 05 2015 The UPS Pico Module is equipped with 6 LEDs that offers information about the UPS Pico Module system status Two of them are dedicated for user applications and can be handled by the PICo I C interface or commands RS232 One of them is Red and the second one is Blue A detailed description of all LEDs and their usage is provided o
32. root raspberrypi home pi exit exit Figure 7 UPS Pico Simulated DS1307 Clock sudo bash commands execution Then check for time from the clock which will show Sat 01 Jan 2000 if it is the first time that it is used Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 sudo hwclock r Then write the current system time to the clock sudo hwclock w Finally edit the etc rc local file sudo nano etc rc local and just before the line that reads exit 0 add the following two lines then save and close the file e On a 256MB Raspberry Pi Model A echo ds1307 0x68 gt sys class i2c adapter i2c 0 new_device hwclock s e Ona512MB Raspberry Pi Model B echo ds1307 0x68 gt sys class i2c adapter i2c 1 new_device hwclock s The PICo I2C Interface Peripherals I C Control Interface The Peripherals I C Control The PICo Interface is an implementation of C interface adapted to easy control of the peripheral connected to the Raspberry Pi via command line By using human understandable simple commands control of peripherals is made extremely simple Control at programming language level is also possible and easy The core concept of the PICo interface is that all peripheral device control and data exchange between it and Raspberry Pi variables are common for the I
33. seesseeseeaeas 9 Figure 2 UPS Plco Buttons Usage Table cccccscssssccccecessesscsecesececesseseaeseeeeseessesesaeeeeeesensees 10 Figure 3 UPS Plco LEDs Usage Table c ccccccccsssssssssecececsssesseeeeeeecessesesaeseeeesesssesseaeeeeeeseesees 11 Figure 4 12C UPS Pico Interface and Simulated DS1307 Clock detection ccccsscceeeeeeeees 14 Figure 5 UPS Plco Simulated DS1307 Clock sudo bash commands execution ccccceeeeees 14 Figure 6 0x69 gt UPS Plco RTC Registers Direct Access Table cccscsscccceeeeessessneeeseeseesees 16 Figure 7 Ox6A gt UPS Plco Module Status Registers Specification cccccccccssssssssceeeeseeeees 17 Figure 8 Ox6B gt UPS Plco Module COMMAMNAS scsccccecsssessssececececesseseaeeeceeeessseseaeeeeeeseesees 24 Figure 9 UPS PICO JUMPEMS asii e dct cand hank cee te dates eee eet 26 Figure 10 Minicom screenshot while the UPS Plco restarts cccccccsssssssceeececessessseeeeeeseesees 26 Figure 11 TCC c mmandS Stee cc essesveceectezcadelestevesds Ge ate NEEE EEEE S EERE lesveccaetcdesdeleees 28 Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 Credits Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interf
34. t Value is OxA1 MINIMAL Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 Write Oxcc Unconditional File Safe Shutdown and and Power OFF when battery powered Write Oxdd then restore factory defaults Will stay in the values of Oxdd until factory defaults restored and then will be set to version of the firmware Write Oxee Reset the UPS Plco CPU it cause start up values i e RTC will be set to 01 01 2000 Write Oxff Call the UPS Plco Bootloader RED Led will be light Recover from this state can be done only by pressing the RST button or new firmware upload All interrupts are disabled during this procedure It should be used with RPi Uploading firmware script Use it very carefully and only when is needed when firmware uploading Do not play with it this is not a toy functionality Powering of the pair UPS Plco RPi must be done via RPi micro USB socket during boot loading process due to following UPS Pico Resets after firmware uploading or when returning from this mode The UPS functionality as also all others is not working when entering this mode Due to required protection for the RPi from the unconditional reset files corruption it is not possible to enter to this mode when system is powered in a different way than in RPI Powering Mo
35. tegrated LiPO Battery 8 10 Minutes of Power Back Up e Intelligent Automatic Charger e No Additional External Power Required e Optional 3000 mAh Battery for 8 Hours Run Time Not Included e 5V 2A Power Backup Peak Output 5V 3A e Integrated Software Simulated Real Time Clock RTC with Battery Back Up e File Safe Shutdown Functionality e Raspberry Pi B Activity Pin e PWM fan control Fan Not Included e 2 User Defined LEDs e 2 User Defined Buttons e Integrated Buzzer for UPS and User Applications e Status Monitoring Powering Voltage UPS Battery Voltage and Temperature e CPICo Interface for Control and Monitoring e RS232 Raspberry Pi Interface for Control and Monitoring e XTEA Based Cryptography User Software Protection e 2 Level Watch dog Functionality with FSSD and Hardware Reset e Raspberry Pi B Hardware Reset Button via Spring Test Pin Not Included e Jumpers for Raspberry Pi B Pin Functionality Selection e Stackable Header for Add On Boards e Boot Loader for Live Firmware Update e Compatible with Intelligent IR Remote Power ON OFF PowerMyPi e Integrated ESD Protected 2 Channel A D 10 Bit Converters 0 5 2V e Integrated ESD Protected 1 Wire Interface e Labeled J8 Raspberry Pi B GPIO Pins for Easy Plug amp Play e Infra Red Receiver Sensor Interface IR Not Included e Upgradable with Plco Add on Boards e Fits Inside Most Existing Cases Designed and Manufactured by PiModules and ModMyPi www pimodules co
36. ucts forum sudo i2cget y 1 Ox6A 1 Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 The result wil be the minutes counter of the implemented RTC sudo i2cset y 1 Ox6A 7 0x01 The result will set the RTCCF trimming RTC factor to 1 0x69 gt UPS PIco Module Status Registers Specification Address Name Size Type R W Explanation 0 or 0x00 mode Byte Mirror Read Powering Mode Read ONLY Writing has no effect on the system and will be overwritten by UPS Pico with the new value 0x01 RPI_MODE 0x02 BAT_MODE 1 or Ox01 batlevel Word Mirror Read Means value of Battery Voltage in 10 of mV in BCD format 3 or 0x03 rpilevel Word Mirror Read Means value of Voltage supplying RPi on J8 5V Pin in 10 of mV in BCD format 5 or 0x05 AD1Vlevel Word Mirror Read Means value of Voltage supplying USB on P1 5V Pin in 10 of mV in BCD format 7 or Ox07 AD2Vlevel Word Mirror Read Means value of Voltage supplying EPR on P1 5V Pin in 10 of mV in BCD format 9 or 0x09 KEYA Byte Mirror R W_ Contain 0x01 if KEYA is pressed and remain until will write back with 0x00 User need to write 0x00 alwayes after reading it Non pressed KEYA is 0x00 pressed KEYA is 0x01 10 or OxOA KEYB Byte Mirror R W Contain 0x01 if KEYB is pressed and remain until will write
37. unctionality is also useful for any other application when user would like to have a full control of system shutdown without assigning any GPIO for that On such applications non XBMC user will need to monitor the 12C Powering Mode Variable and when switch to battery shutdown within required time 60 seconds Not needed for XBMC During this mode all other triggers for the FSSD are not working There are e Still Alive Timer e FSSD when button e Low Battery FSSD e Timed FSSD UPS when in battery mode When power is cut from the Raspberry Pi the UPS Pico is entering the LPR mode and recover is done only when cable power is back The RTC is running during that LPR mode This functionality implements a perfect media player when the Raspberry Pi is powered from a USB from the TV Then when TV is OFF the Pulse Eight CEC driver safety shutdown the Raspberry Pi and after that the UPS Pico cut the power When TV is switched ON again the media player starts again Combining this mode with IR mounted give to the user a full remote controlled Media Player Default value is 0x00 OFF Read Anytime Return actual XBMC value Write 0x01 Activate XBMC Mode Write 0x00 deActivate XBMC Mode 24 or 0x18 FSSD_tout Byte Common R W Set the timeout needed for the FSSD procedure to be completed The FSSD timeout specify how long the FSSD procedure will takes long The FSSD timeout cannot be sm
38. vice connected i e Arduino at boot you might want it to receive this information over the serial port so it is up to you to decide whether to keep this boot logging enabled or disable it If you decide to disable it you can do it by editing the file boot cmdline txt sudo nano boot cmdline txt The content of the file looks like this dwc_otg lpm_enable 0 console ttyAMA0 115200 kgdboc ttyAMAO 115200 console tty1 root dev mmcblk0p2 rootfstype ext4 elevator deadline rootwait Remove all references to ttyAMAO which is the name of the serial port then save the file and close it The file will now look like this dwc_otg lpm_enable 0 console tty1 root dev mmcblkOp2 rootfstype ext4 elevator deadline rootwait Reboot In order to enable the changes you have made you will need to reboot the Raspberry Pi sudo shutdown r now Test the Serial Port A great way to test out the serial port is to use the minicom program If you don t have this one installed and you are connected to Internet then you can install it by running sudo apt get install minicom Run up minicom on the Raspberry Pi using Designed and Manufactured by PiModules and ModMyPi www pimodules com www modmypi com Uninterruptible Power Supply with Peripherals and 1 C control Interface Firmware Code 0x25 Print Date 20 05 2015 minicom b 38400 o D dev ttyAMAO Make sure that the jumpers required for serial connection RXDO and TXDO are installed and that n
Download Pdf Manuals
Related Search
Related Contents
Jacques Defranee. Samsung S23A350H User Manual 18242-01 INSTRUCTIVO Chargement de la notice en PDF Sony RDR-GXD455 DVD Recorder User Manual AVG 7.5 Anti-Malware Netzwerk Edition fx-570_991ES_PLUS - Support Service Manual for All Hub & Rotor Applications Copyright © All rights reserved.
Failed to retrieve file