Juice4halt

Product​ ​Rev.​ ​A

20.​ ​Oct​ ​2017​ ​ ​SUPERCAPACITOR​ ​BASED​ ​ENERGY​ ​STORAGE​ ​MODULE
FOR​ ​MICRO​ ​UPS​ ​APPLICATIONSWITH​ ​A​ ​ ​5V​ ​MICRO-USB​ ​INPUT

Features● designed​ ​for​ ​Raspberry​ ​Pi​ ​Models​ ​B+,​ ​2,​ ​3● >1​ ​minute​ ​backup​​ ​time​ ​including​ ​a​ s​ afe​ ​shutdown​1,3● >20​ ​seconds​ ​protection​2,3​​ ​against​ ​short-term​ ​power​ ​failure● high​ ​reliability​​ ​of​ ​operation​ ​with​ ​peripherals​ ​attached​ ​to​ ​the​ ​5V​ ​supply​ ​output● no​ ​battery​ ​maintenance● safety​ ​and​ ​reliability​​ ​–​ ​no​ ​danger​ ​of​ ​fire​ ​or​ ​explosion,​ ​no​ ​danger​ ​of​ ​overcharging,supercapacitors​ ​can​ ​be​ ​fully​ ​discharged​ ​for​ ​transport● environmentally​ ​friendly​​ ​–​ ​no​ ​hazardous​ ​materials​ ​for​ ​disposal,​ ​supercapacitors
contain​ ​non-toxic​ ​materials● wide​ ​operating​ ​temperature​ ​range​ ​(-40°C​ ​to​ ​+85°C)​4

Applications● the​ ​ideal​ ​choice​ ​for​ ​Last​ ​Gasp​​ ​applications​ ​in​ ​embedded​ ​systems● suitable​ ​for​ ​all​ ​5V​ ​Single​ ​Board​ ​Computers​​ ​(SBC)

1

Juice4halt

Block​ ​diagram2

Juice4halt

Order​ ​InformationPart​ ​Number

Description

J4H-5V-USB

Input​ ​voltage​ ​5V
Micro-USB​ ​connector

Comments

Note​ ​1: Once​ ​a​ ​shutdown​ ​has​ ​been​ ​initiated​ ​there​ ​is​ ​no​ ​way​ ​back:​ ​The​ ​procedure​ ​mustbe​ ​completed​ ​even​ ​if​ ​the​ ​power​ ​is​ ​restored​ ​while​ ​shutting​ ​down.​ ​This​ ​is​ ​animportant​ ​feature​ ​for​ ​protection​ ​against​ ​repeated​ ​power​ ​failures.
Note​ ​2: No​ ​shutdown​ ​will​ ​be​ ​initiated​ ​during​ ​this​ ​time.​ ​The​ ​RPi​ ​will​ ​not​ ​notice​ ​any
short-term​ ​power​ ​failure.​ ​After​ ​power​ ​is​ ​restored​ ​the​ ​RPi​ ​continues​ ​withnormal​ ​operation.
Note​ ​3: The​ ​time​ ​depends​ ​on​ ​the​ ​current​ ​consumption​ ​of​ ​the​ ​RPi​ ​(SBC)​ ​and​ ​on​ ​the​ ​typeof​ ​supercapacitors​ ​used.​ ​This​ ​is​ ​a​ ​typical​ ​value​ ​for​ ​standard​ ​configuration:
Raspberry​ ​Pi​ ​3,​ ​OS​ ​Raspbian,​ ​no​ ​peripheral​ ​devices​ ​attached,​ ​2x​ ​supercapacitors
22F/2.7V​,​ ​T​AMB​=25°C.
Note​ ​4: The​ ​PCB​ ​itself​ ​is​ ​designed​ ​for​ ​a​ ​wide​ ​operating​ ​temperature​ ​range​ ​-40°C​ ​to+85°C.​ ​However,​ ​using​ ​different​ ​supercapacitor​ ​types​ ​or​ ​connector​ ​types​ ​canreduce​ ​the​ ​temperature​ ​range.
Note​ ​5: Based​ ​on​ ​a​ ​30%​ ​capacitance​ ​decrease​ ​from​ ​initial​ ​value
Note​ ​6: For​ ​more​ ​details​ ​please​ ​refer​ ​to​ ​the​ ​Application​ ​Note​ ​171
Note​ ​7: The​ ​meaning​ ​of​ ​T​ST​​ ​and​ ​T​TB​​ ​is​ ​shown​ ​in​ ​Fig.​ ​7
Note​ ​8: For​ ​script​ ​file​ ​download​ ​visit​ ​www.juice4halt.com​​ ​.​ ​You​ ​can​ ​find​ ​the​ ​script​ ​filesin​ ​the​ ​Download​ ​area​ ​compressed​ ​with​ ​7-Zip

3

Juice4halt

Fig.1:​ ​Juice4halt​ ​–​ ​5V-USB​ ​Model​ ​on​ ​RPi3

Description
The Juice4halt module is a supercapacitor based energy storage. It contains abidirectional step-up/step-down converter working as the interface between the stable
5V supply rail and the supercapacitor energy storage. During charging the converter
works in step-down mode and transports energy from the external power supply to thesupercapacitor. In case of a power failure the load device (Raspberry Pi or another SBC)is​ ​supplied​ ​from​ ​the​ ​supercapacitor​ ​via​ ​DC/DC​ ​converter​ ​working​ ​in​ ​step-up​ ​mode.

4Juice4halt

The​ ​J4H-5V-USB​ ​Model
The​ ​5V-USB​ ​model​ ​requires​ ​a​ ​5,0V…5,25V​ ​power​ ​supply​ ​with​ ​a​ ​Micro-USB​ ​connector.​ ​We
recommend​ ​using​ ​the​ ​standard​ ​5,1V/2,5A​ ​power​ ​supply​ ​for​ ​Raspberry​ ​Pi​ ​3.​ B​ e​ ​sure​ ​toconnect​ ​the​ ​power​ ​supply​ ​cord​ ​to​ ​the​ ​Juice4halt​ ​module​ ​and​ ​not​ ​to​ ​the​ ​Raspberry
Pi.​ ​The​ ​power​ ​supply​ ​must​ ​be​ ​capable​ ​of​ ​supplying​ ​the​ ​Raspberry​ ​Pi​ ​and​ ​charging​ ​thesupercapacitors​ ​at​ ​the​ ​same​ ​time.​ ​The​ ​required​ ​current​ ​also​ ​depends​ ​on​ ​other​ ​peripheraldevices​ ​connected​ ​to​ ​the​ ​Raspberry​ ​Pi.
Be​ ​aware​ ​of​ ​using​ ​long​ ​or​ ​thin​ ​cables​​ ​between​ ​your​ ​power​ ​supply​ ​and​ ​the​ ​Juice4halt
module.​ ​The​ ​higher​ ​impedance​ ​of​ ​such​ ​cables​ ​or​ ​wires​ ​could​ ​lead​ ​to​ ​voltage​ ​drops​ ​at​ ​thecable​ ​influencing​ ​the​ ​proper​ ​function​ ​of​ ​the​ ​module​ ​and​ ​your​ ​Raspberry​ ​Pi.

Fig.2:​ ​Juice4halt​ ​–​ ​5V-USB​ ​Model​ ​on​ ​RPi3
5

Juice4halt

Technical​ ​Specification
GeneralParameter

Value

Conditions

Max.​ ​Total​ ​Backup​ ​time
T​TB​7

Min.​ ​57​ ​sec.​5
Typ.​ ​81​ ​sec.

operation​ ​until
supercapacitors​ ​notdischarged​ ​(ca.​ ​1.2V)

Backup​ ​time​ ​for​ ​Short-term Min.​ ​22​ ​sec.​5
power​ ​failure
Typ.​ 3
​ 1​ ​sec.
7
T​ST​

2x​ ​22F/2.7V​ ​supercapacitorsin​ ​series,​ ​RPi3,​ ​OS​ ​Raspbian,T​AMB​=25°C

Charge​ ​time​ ​(fast​ ​charge)=default​ ​configuration

Typ.​ ​25​ ​sec.

Charge​ ​time​ ​(slow​ ​charge​4​)

Typ.​ ​60​ ​sec.

Operating​ ​temperature
range​ ​(module)-40°C​ ​to​ ​+85°C

Assembled​ ​PCB

Operating​ ​temperature
range​ ​(supercapacitors)-40°C​ ​to​ ​+60°C

supercapacitor​ ​type:22F/2.7V/
DxL=16mm​ ​x​ ​26mm

Supported​ ​SBCs

Raspberry​ ​Pi​ ​3default​ ​SBC

Raspberry​ ​Pi​ ​2,​ ​B+

100%​ ​compatible

Odroid-C2

100%​ ​compatible,
smaller​ ​supercapacitors
recommended

6

Juice4halt

Fig.3:​ ​Juice4halt​ ​–​ ​5V-USB​ ​model​ ​on​ ​RPi3

7

Juice4halt

Input
Parameter

Value

Conditions

Input​ ​voltage​ ​range

5.0V​ ​DC​ ​...​ ​5.25V​ ​DCat​ ​Micro-USB​ ​connector

Average​ ​input​ ​current

1.8A​ ​(typ.)Charge​ ​mode+RPi3​ ​Booting

Current​ ​consumption

typ.​ ​15mA

Normal​ ​operation(no​ ​Charge​ ​mode,no​ ​Shutdown​ ​mode),
T​AMB​=25°C

Output● Backed​ ​up​ ​5V​ ​power​ ​output​ ​for​ ​the​ ​load​ ​device​ ​(Raspberry​ ​Pi​ ​or​ ​SBC)
Parameter

Value

Output​ ​voltage​ ​range

4.75V​ ​DC​ ​...​ ​5.25V​ ​DC

Output​ ​current​ ​range

0A​AVG​​ ​...​ ​1A​AVG

Typ.​ ​output​ ​ripple

10​ ​mVpp

Conditionsat​ ​Shutdown​ ​mode,
T​AMB​=25°C,​ ​ripple​ ​atf​SW​=1200kHz

8

Juice4halt

Supercapacitor​ ​Interface
Parameter

Value

Working​ ​voltage​ ​atsupercapacitor​ ​contacts

1.0V​ ​...​ ​5.25V

Peak​ ​current​ ​throughsupercapacitor

7A

Charging​ ​method

7.5W​ ​(fast​ ​charge,​ ​default)=1.5A​ ​at​ ​5V

Conditions

constant​ ​power​ ​charging

2.5W​ ​(slow​ ​charge​6​)=0.5A​ ​at​ ​5V
Balancing+/-300mA

Active​ ​balance​ ​circuitfor​ ​two​ ​supercapacitors​ ​inseriesRecommended​ ​electrical​ ​parameters​ ​for​ ​supercapacitors(two​ ​in​ ​series)● the​ ​parameters​ ​are​ ​for​ ​each​ ​of​ ​the​ ​two​ ​supercapacitors● the​ ​two​ ​supercapacitors​ ​are​ ​balanced​ ​by​ ​the​ ​on-board​ ​active​ ​balance​ ​circuit

Parameter

Value

Conditions

Default​ ​rated​ ​capacitance

22F

using​ ​5F​ ​or​ ​10F​ ​will​ ​shortenthe​ ​charge​ ​time​ ​and​ ​thebackup​ ​time

Min.​ ​rated​ ​voltage

2.7V

Max.​ ​ESR

100mOhm

Max.​ ​current

>10A

9

Juice4halt

Dimensions● only​ ​PCB​ ​without​ ​supercapacitors
Parameter

Value

Width

56.0mmLength41.3mmHeight19.0mmConditions

without​ ​stacking​ ​header​ ​andsupercapacitors

Mounting
2x13​ ​pins​ ​stacking​ ​header​ ​2.54mm

Header​ ​height​ ​8.5mm

2x​ ​mounting​ ​hole​ ​M2.75​ ​for​ ​2.5mm​ ​screws
When​ ​mounted​ ​inside​ ​of​ ​a​ ​PCB​ ​stack,​ ​note​ ​that​ ​the​ ​Juice4halt​ ​module​ ​reduces​ ​thenumber​ ​of​ ​pins​ ​to​ ​26​.​ ​From​ ​the​ ​40​ ​pins​ ​of​ ​the​ ​Raspberry​ ​Pi​ ​GPIO​ ​header​ ​at​ ​the​ ​bottomside​ ​only​ ​the​ ​first​ ​26​ ​will​ ​be​ ​lead​ ​through​ ​to​ ​the​ ​top​ ​side​ ​of​ ​the​ ​board.​ ​If​ ​your​ ​stack​ ​usesall​ ​40​ ​pins,​ ​mount​ ​the​ ​Juice4halt​ ​module​ ​on​ ​top​ ​of​ ​the​ ​stack​ ​or​ ​use​ ​a​ ​suitable​ ​short
40-wire​ ​flat​ ​ribbon​ ​cable​ ​with​ ​appropriate​ ​connectors.

Communication​ ​Interfaces
Interface

Signal​ ​type

Signal​ ​line

Boot/Shutdown
Communication​ ​with​ ​theRaspberry​ ​Pi​ ​(SBC)

Dedicated​ ​I/O​ ​signal​ ​forshutdown​ ​procedure​ ​andbooting,​ ​bidirectional

default​ ​GPIO25(optional​ ​GPIO23​6​)requires​ ​script​ ​file​ ​runningon​ ​RPi​8

Power​ ​failure​ ​signal
Dedicated​ ​signal,(Instant​ ​detection​ ​of​ ​power configured​ a​ s​ ​Open-Drain
failure​ ​at​ ​the​ ​power​ ​input) output​ ​with​ 1​ 00k​ ​pull-up

default​ ​GPIO22(optional​ ​GPIO17​6​)

10

Juice4halt

Indication​ ​LEDs

red

Supercapacitor’s​ ​charge​ ​isless​ ​than​ ​100%

yellow

Raspberry​ ​Pi​ ​or​ ​SBC
powered​ ​ongreen

Charging​ ​Enabled(usually​ ​when​ ​power​ ​input
connected​ ​to​ ​a​ ​powersource)Caution: When​ ​unplugging​ ​the​ ​module​ ​from​ ​the​ ​carrier​ ​PCB​ ​or​ ​from​ ​the​ ​Raspberry​ ​Pi,
wait​ ​until​ ​all​ ​LEDs​ ​are​ ​turned​ ​off​ ​or​ ​use​ ​the​ ​on-board​ ​discharge​ ​load​ ​fordischarging.

On-Board​ ​discharge​ ​load● the​ ​on-board​ ​discharge​ ​load​ ​should​ ​be​ ​used​ ​before​ ​unplugging​ ​the​ ​module​ ​fromthe​ ​carrier​ ​PCB.​ ​It​ ​helps​ ​to​ ​avoid​ ​sparking​ ​and​ ​excessive​ ​current​ ​flow​ ​whendischarging​ ​the​ ​supercapacitors
Parameter

Value

Conditions

Discharge​ ​load

2​ ​Ohm
Meander​ ​PCB​ ​trace​ ​used​ ​asshunt​ ​resistorat​ ​25°C

Typical​ ​Discharge​ ​Timeat​ ​default​ ​2x22F
supercapacitors

1​ ​Min.

short​ ​the​ ​pads​ ​R83​ ​with​ ​atweezers​ ​(Fig.4)

Caution: The​ ​discharged​ ​power​ ​will​ ​shortly​ ​heat​ ​up​ ​the​ ​PCB​ ​surface.​ ​Do​ ​not​ ​touch​ ​the
PCB​ ​during​ ​discharging!
Caution: The​ ​on-board​ ​discharge​ ​load​ ​is​ ​dimensioned​ ​only​ ​for​ ​max.​ ​2x25F​ ​capacity
operated​ ​at​ ​ambient​ ​temperature​ ​25°C.​ ​Don’t​ ​use​ ​the​ ​discharge​ ​load​ ​when
operating​ ​higher​ ​capacities.​ ​Too​ ​much​ ​heat​ ​could​ ​damage​ ​the​ ​PCB.

11

Juice4halt

Fig.4:​ ​Juice4halt​ ​-​ ​Discharge​ ​contacts

The​ ​GPIO​ ​interface
The​ ​Juice4halt​ ​module​ ​uses​ ​the​ ​GPIO​ ​header​ ​of​ ​the​ ​Raspberry​ ​Pi​ ​for​ ​communication​ ​andfor​ ​supplying​ ​the​ ​Raspberry​ ​Pi​ ​with​ ​power.
Several​ ​pins​ ​are​ ​used.​ ​For​ ​some​ ​signals​ ​it​ ​is​ ​possible​ ​to​ ​use​ ​an​ ​optional​ ​pin​ ​instead​ ​of​ ​thedefault​ ​pin​ ​when​ ​the​ ​default​ ​pin​ ​is​ ​already​ ​allocated​ ​by​ ​another​ ​task​ ​in​ ​your​ ​application.
The​ ​change​ ​is​ ​done​ ​by​ ​removing/assembling​ ​a​ ​0603-size​ ​jumper​ ​resistor​ ​on​ ​thedetermined​ ​positions​6​.
Pin1​ ​(3V3)is​ ​used​ ​for​ ​detecting​ ​if​ ​the​ ​Raspberry​ ​Pi​ ​is​ ​powered​ ​up.​ ​The​ ​GPIO25​ ​(optional​ ​GPIO23)​ ​isdisconnected​ ​when​ ​the​ ​voltage​ ​at​ ​this​ ​pin​ ​falls​ ​to​ ​0V.

12

Juice4halt

Pin2​ ​and​ ​Pin4​ ​(5V)
5V​ ​backup​ ​power​ ​for​ ​Raspberry​ ​Pi
Pin22​ ​(GPIO25)​ ​default
Pin16​ ​(GPIO23)​ ​optional​6
3.3V​ ​logic​ ​signal​ ​for​ ​bidirectional​ ​Boot/Shutdown​ ​communication​ ​between​ ​theRaspberry​ ​Pi​ ​and​ ​the​ ​Juice4halt.​ ​The​ ​Raspberry​ ​Pi​ ​reports​ ​the​ ​following​ ​states:● Boot​ ​process​ ​completed● Shut-down​ ​process​ ​completedIn​ ​the​ ​other​ ​direction,​ ​the​ ​Juice4halt​ ​forces​ ​the​ ​Raspberry​ ​Pi​ ​to​ ​ ​shutdown​ ​when​ ​thecharge​ ​state​ ​of​ ​the​ ​supercapacitors​ ​is​ ​too​ ​low
Pin15​ ​(GPIO22)​ ​default
Pin11​ ​(GPIO17)​ ​optional​6An​ ​open-drain​ ​power​ ​failure​ ​signal​ ​output​ ​with​ ​100k​ ​pull-up​ ​to​ ​3.3V​ ​for​ ​an​ ​instant​ ​power
failure​ ​detection​ ​at​ ​the​ ​power​ ​input.
Pin3​ ​(GPIO2/SDA)
Pin5​ ​(GPIO3/SCL)
Not​ ​used​ ​in​ ​this​ ​model.
Pin8​ ​(GPIO14/TXD)
Pin10​ ​(GPIO15/RXD)
Not​ ​used​ ​in​ ​this​ ​model.
Pins​ ​6,9,14,20,25​ ​(GND)
These​ ​pins​ ​are​ ​connected​ ​to​ ​ground.
All​ ​other​ ​pins​ ​are​ ​not​ ​occupied​ ​and​ ​can​ ​be​ ​used​ ​by​ ​other​ ​modules​ ​or​ ​HATs​ ​in​ ​the​ ​stack.

13

Juice4halt

The​ ​Boot/Shutdown​ ​Communication​ ​signal
The​ ​communication​ ​between​ ​the​ ​Raspberry​ ​Pi​ ​and​ ​the​ ​Juice4halt​ ​runs​ ​over​ ​a​ ​single
bidirectional​ ​signal​ ​line:
Pin22​ ​(GPIO25)​ ​default
Pin16​ ​(GPIO23)​ ​optional​6The​ ​signal​ ​uses​ ​a​ ​3.3V​ ​logic.​ ​A​ ​script​ ​file​8​​ ​executed​ ​on​ ​the​ ​Raspberry​ ​Pi​ ​is​ ​required.​ ​The
Raspberry​ ​Pi​ ​reports​ ​the​ ​following​ ​states:● Boot​ ​process​ ​completed● Shut-down​ ​process​ ​completedIn​ ​the​ ​other​ ​direction,​ ​the​ ​Juice4halt​ ​forces​ ​the​ ​Raspberry​ ​Pi​ ​to​ ​ ​shutdown​ ​when​ ​thecharge​ ​state​ ​of​ ​the​ ​supercapacitors​ ​is​ ​too​ ​low.

Fig.6:​ ​The​ ​Boot/Shutdown​ ​Communication​ ​signal

The​ ​Raspberry​ ​Pi​ ​will​ ​not​ ​be​ ​powered-on​ ​immediately​ ​after​ ​power​ ​recovery,​ ​but​ ​will​ ​wait
until​ ​reaching​ ​4.2V​ ​at​ ​the​ ​supercapacitors.​ ​After​ ​powering-on​ ​the​ ​Raspberry​ ​Pi​ ​starts
booting.​ ​At​ ​the​ ​end​ ​of​ ​the​ ​booting​ ​process​ ​the​ ​script​ ​file​ ​will​ ​be​ ​executed.​ ​A​ ​100ms
pulse​ ​will​ ​be​ ​sent​ ​to​ ​the​ ​GPIO25​ ​line​ ​signalling​ ​to​ ​the​ ​Juice4halt​ ​activation​ ​of​ ​theautomatic​ ​shutdown.​ ​The​ ​100ms​ ​pulse​ ​is​ ​also​ ​indicated​ ​by​ ​the​ ​green​ ​LED,​ ​by​ ​shortly
flickering​ ​when​ ​the​ ​script​ ​file​ ​will​ ​be​ ​executed​ ​and​ ​when​ ​the​ ​communication​ ​line​ ​is14

Juice4halt

working​ ​properly.​ ​From​ ​now​ ​on​ ​the​ ​Raspberry​ ​Pi​ ​listens​ ​to​ ​the​ ​GPIO25​ ​line.​ ​A​ ​700ms​ ​lowpulse​ ​sent​ ​by​ ​the​ ​Juice4halt​ ​presents​ ​a​ ​command​ ​to​ ​immediately​ ​start​ ​with​ ​shutdown,because​ ​the​ ​voltage​ ​at​ ​the​ ​supercaps​ ​is​ ​below​ ​3.8V​ ​due​ ​to​ ​a​ ​longer​ ​power​ ​failure.​ ​The
shutdown​ ​will​ ​not​ ​start​ ​immediately​ ​after​ ​a​ ​power​ ​failure.​ ​When​ ​the​ ​power​ ​recovers
before​ ​reaching​ ​the​ ​3.8V,​ ​the​ ​Raspberry​ ​Pi​ ​will​ ​keep​ ​operating​ ​without​ ​noticing​ ​anychange​ ​of​ ​the​ ​power​ ​supply.​ ​After​ ​receiving​ ​the​ ​700ms​ ​pulse,​ ​the​ ​Raspberry​ ​Pi​ ​must
stretch​ ​the​ ​pulse​ ​by​ ​pulling​ ​the​ ​line​ ​Low​ ​and​ ​start​ ​to​ ​shutdown​ ​the​ ​system.​ ​The
Juice4halt​ ​now​ ​listens​ ​to​ ​the​ ​GPIO25​ ​line.​ ​When​ ​the​ ​signal​ ​is​ ​released​ ​to​ ​High,​ ​theRaspberry​ ​Pi​ ​has​ ​halted​ ​it’s​ ​system​ ​and​ ​will​ ​be​ ​powered​ ​off.​ ​Alternatively​ ​when​ ​thesupercapacitor​ ​is​ ​discharged​ ​before​ ​completing​ ​the​ ​shutdown​ ​procedure,​ ​the​ ​voltage
collapses​ ​and​ ​the​ ​Raspberry​ ​Pi​ ​will​ ​be​ ​powered​ ​off,​ ​too.
Caution: The​ ​communication​ ​protocol​ ​is​ ​not​ ​compatible​ ​with​ ​the​ ​REBOOT​ ​command.
The​ ​Juice4halt​ ​has​ ​no​ ​feedback​ ​about​ ​a​ ​possible​ ​reboot.​ ​After​ ​rebooting​ ​thescript​ ​file​ ​will​ ​be​ ​started​ ​again​ ​and​ ​will​ ​send​ ​another​ ​100ms​ ​pulse​ ​to​ ​theGPIO25​ ​line​ ​causing​ ​a​ ​deactivation​ ​of​ ​the​ ​automatic​ ​shutdown.​ ​For​ ​rebooting
please​ ​use​ ​the​ ​rebootj4h​ ​script​ ​file​8​​ ​instead.​ ​This​ ​script​ ​file​ ​will​ ​deactivate​ ​theautomatic​ ​shutdown​ ​before​ ​rebooting.
Caution: Operating​ ​the​ ​Juice4halt​ ​and​ ​the​ ​Raspberry​ ​Pi​ ​without​ ​installed​ ​script​ ​file​ ​will
not​ ​enable​ ​the​ ​automatic​ ​shutdown​ ​after​ ​a​ ​power​ ​failure.
Operating​ ​the​ ​Raspberry​ ​Pi​ ​with​ ​installed​ ​script​ ​file​ ​but​ ​without​ ​theJuice4Halt​ ​module​ ​will​ ​cause​ ​an​ ​immediate​ ​shutdown​ ​after​ ​booting​ ​hascompleted.

15

Juice4halt

The​ ​Power​ ​Failure​ ​signal
The​ ​Raspberry​ ​Pi​ ​will​ ​not​ ​be​ ​instantly​ ​informed​ ​about​ ​a​ ​possible​ ​power​ ​failure.​ ​The​ ​oneand​ ​only​ ​information​ ​about​ ​the​ ​power​ ​failure​ ​is​ ​the​ ​shutdown​ ​command,​ ​usually​ ​coming31​ ​seconds​ ​after​ ​the​ ​power​ ​failure.
In​ ​some​ ​applications​ ​it​ ​is​ ​convenient,​ ​to​ ​know​ ​the​ ​instant​ ​state​ ​at​ ​the​ ​power​ ​input.​ ​By
knowing,​ ​that​ ​the​ ​system​ ​runs​ ​in​ ​backup​ ​mode​ ​the​ ​Raspberry​ ​Pi​ ​can​ ​immediately​ ​switchthe​ ​system​ ​into​ ​low​ ​power​ ​operation​ ​and​ ​so​ ​prolong​ ​the​ ​backup​ ​time,​ ​or​ ​it​ ​can​ ​triggerthe​ ​shutdown​ ​earlier​ ​before​ ​reaching​ ​the​ ​3.8V​ ​level​ ​at​ ​the​ ​supercapacitors.
For​ ​detecting​ ​an​ ​instant​ ​power​ ​failure​ ​at​ ​the​ ​power​ ​input​ ​the​ ​following​ ​pin​ ​is​ ​used:
Pin15​ ​(GPIO22)​ ​default
Pin11​ ​(GPIO17)​ ​optional​6The​ ​pin​ ​is​ ​an​ ​open-drain​ ​signal​ ​output​ ​with​ ​a​ ​100k​ ​pull-up​ ​to​ ​3.3V
The​ ​signal​ ​state​ ​is​ ​indicated​ ​by​ ​the​ ​green​ ​LED.
Caution: The​ ​signal​ ​contains​ ​also​ ​the​ ​short​ ​100ms​ ​Low-pulse​ ​when​ ​the​ ​script​ ​file
execution​ ​is​ ​started​ ​on​ ​the​ ​RPi.​ ​This​ ​is​ ​the​ ​only​ ​exemption,​ ​when​ ​the​ ​signal
shortly​ ​doesn’t​ ​copy​ ​the​ ​situation​ ​at​ ​the​ ​power​ ​input.

The​ ​script​ ​file​ ​download
For​ ​proper​ ​operation​ ​of​ ​the​ ​Juice4halt​ ​module​ ​it​ ​is​ ​necessary​ ​to​ ​install​ ​the​ ​basic​ ​script
file​ ​on​ ​the​ ​Raspberry​ ​Pi.​ ​For​ ​script​ ​file​ ​download​ ​visit​ ​www.juice4halt.com​​ ​.​ ​You​ ​can​ ​findthe​ ​script​ ​files​ ​in​ ​the​ ​Download​ ​area​ ​compressed​ ​with​ ​7-Zip.
script​ ​file

Function

Comment

shutdown_script

automatic​ ​shutdown

basic​ ​script​ ​file,​ ​enables
communication​ ​between​ ​theRPi​ ​and​ ​the​ ​Juice4halt

rebootj4h

software​ ​reboot​ ​commanduse​ ​this​ ​file​ ​instead​ ​of​ ​usingthe​ ​default​ ​REBOOT
command16

Juice4halt

Skipping​ ​the​ ​charge​ ​mode​ ​(Immediate​ ​start)
After​ ​attaching​ ​power​ ​to​ ​the​ ​Juice4halt​ ​module,​ ​the​ ​Raspberry​ ​Pi​ ​(SBC)​ ​will​ ​not​ ​startbooting​ ​immediately.​ ​The​ ​default​ ​setting​ ​is​ ​to​ ​wait​ ​until​ ​the​ ​supercapacitors​ ​haveenough​ ​charge​ ​(=reaching​ ​4.2V)​ ​and​ ​then​ ​power-on​ ​the​ ​Raspberry​ ​Pi.​ ​This​ ​is​ ​a​ ​protection
feature​ ​that​ ​helps​ ​to​ ​avoid​ ​system​ ​crashes​ ​due​ ​to​ ​power​ ​failures​ ​occurring​ ​during​ ​theboot​ ​process.
However,​ ​the​ ​control​ ​logic​ ​of​ ​the​ ​Juice4halt​ ​module​ ​can​ ​be​ ​changed​ ​to​ ​allow
powering-on​ ​the​ ​Raspberry​ ​Pi​ ​immediately​ ​after​ ​attaching​ ​power​ ​to​ ​the​ ​input​ ​contacts.
The​ ​Raspberry​ ​Pi​ ​will​ ​start​ ​booting​ ​even​ ​if​ ​the​ ​supercapacitors​ ​are​ ​not​ ​charged​ ​enoughto​ ​cover​ ​a​ ​power​ ​failure​ ​during​ ​the​ ​booting​ ​phase.​ ​For​ ​more​ ​information​ ​how​ ​to​ ​change
this​ ​setting,​ ​please​ ​read​ ​the​ ​Application​ ​Note​6​.
Caution: The​ ​immediate​ ​start​ ​is​ ​recommended​ ​only​ ​if​ ​the​ ​application​ ​can​ ​guarantee​ ​anuninterrupted​ ​power​ ​supply​ ​for​ ​the​ ​first​ ​moment,​ ​when​ ​the​ ​supercapacitorsare​ ​being​ ​charged.
Note:The​ ​immediate​ ​start​ ​functionality​ ​for​ ​the​ ​5V-USB​ ​model​ ​is​ ​planned​ ​to​ ​beimplemented​ ​in​ ​the​ ​Product​ ​Revision​ ​B​ ​of​ ​the​ ​board.​ ​This​ ​will​ ​be​ ​available​ ​inthe​ ​course​ ​of​ ​the​ ​year​ ​2018.

17

Juice4halt

Typical​ ​performance​ ​characteristics
Figure​ ​7​ ​shows​ ​a​ ​typical​ ​operation​ ​of​ ​the​ ​Juice4halt​ ​module​ ​with​ ​a​ ​RPi3​ ​load.
The​ ​Shutdown​ ​mode​ ​is​ ​very​ ​short,​ ​because​ ​the​ ​RPi3​ ​needs​ ​only​ ​a​ ​few​ ​seconds​ ​for​ ​ ​it’s
shutdown.

Fig.7:​ ​Juice4halt​ ​-​ ​Operation​ ​with​ ​RPi318

Juice4halt

Modes​ ​of​ ​operation
Charge​ ​mode● Charging​ ​the​ ​supercapacitors​ ​using​ ​the​ ​step-down​ ​DC/DC​ ​converter​ ​when​ ​theexternal​ ​power​ ​supply​ ​voltage​ ​is​ ​available​ ​at​ ​the​ ​input● The​ ​load​ ​device​ ​at​ ​the​ ​output​ ​(Raspberry​ ​Pi​ ​or​ ​SBC)​ ​stays​ ​disconnected​ ​from​ ​5V
power​ ​rail​ ​until​ ​the​ ​supercapacitor’s​ ​voltage​ ​rises​ ​above​ ​4.2V
Normal​ ​operation● The​ ​Raspberry​ ​Pi​ ​(SBC)​ ​is​ ​powered​ ​from​ ​the​ ​external​ ​power​ ​supply● The​ ​supercapacitors​ ​are​ ​either​ ​being​ ​charged​ ​or​ ​charging​ ​is​ ​completed.
Short-term​ ​power​ ​failure● Starts​ ​when​ ​input​ ​voltage​ ​falls​ ​below​ ​4.8V● External​ ​power​ ​supply​ ​will​ ​be​ ​disconnected● The​ ​Raspberry​ ​Pi​ ​(SBC)​ ​is​ ​supplied​ ​from​ ​the​ ​energy​ ​stored​ ​in​ ​the​ ​supercapacitors.
● The​ ​Raspberry​ ​Pi​ ​(SBC)​ ​receives​ ​the​ ​information​ ​about​ ​the​ ​power​ ​failure​ ​via
Power​ ​Failure​ ​signal,​ ​but​ ​it​ ​is​ ​not​ ​forced​ ​to​ ​shut​ ​down​ ​yet.
● In​ ​case​ ​of​ ​a​ ​power​ ​recovery​ ​the​ ​system​ ​continues​ ​with​ ​Normal​ ​operation,​ ​thesupercapacitors​ ​will​ ​be​ ​charged​ ​again.
● Ends​ ​when​ ​supercapacitor​ ​voltage​ ​falls​ ​below​ ​3.8V.​ ​ ​The​ ​Shutdown​ ​mode​ ​isstarted.

Shutdown​ ​mode● Starts​ ​when​ ​the​ ​supercapacitor​ ​voltage​ ​falls​ ​below​ ​3.8V​ ​during​ ​Short-term​ ​power
failure​ ​mode.
● The​ ​Raspberry​ ​Pi​ ​(SBC)​ ​remains​ ​supplied​ ​from​ ​the​ ​supercapacitors​ ​via​ ​step-up
DC/DC​ ​converter
19Juice4halt● The​ ​information​ ​about​ ​power​ ​failure​ ​is​ ​communicated​ ​to​ ​the​ ​Raspberry​ ​Pi​ ​(SBC).
The​ ​Raspberry​ ​Pi​ ​(SBC)​ ​must​ ​immediately​ ​start​ ​with​ ​shutdown​ ​procedure.
● A​ ​power​ ​recovery​ ​during​ ​this​ ​mode​ ​has​ ​no​ ​influence​ ​on​ ​the​ ​shutdown​ ​procedure.
The​ ​procedure​ ​will​ ​be​ ​completed​ ​and​ ​the​ ​the​ ​Raspberry​ ​Pi​ ​(SBC)​ ​will​ ​be​ ​poweredoff​ ​regardless​ ​of​ ​the​ ​external​ ​power.
● After​ ​completing​ ​the​ ​shutdown​ ​procedure​ ​or​ ​latest​ ​when​ ​the​ ​voltage​ ​at​ ​thesupercapacitors​ ​falls​ ​below​ ​1V​ ​the​ ​Raspberry​ ​Pi​ ​(SBC)​ ​will​ ​be​ ​disconnected​ ​fromthe​ ​5V​ ​supply​ ​rail.
● Waits​ ​until​ ​external​ ​power​ ​supply​ ​voltage​ ​will​ ​be​ ​recovered​ ​to​ ​start​ ​Charge​ ​mode
again

20

Juice4halt

Typical​ ​backup​ ​times
The​ ​times​ ​T​ST​​ ​and​ ​T​TB​​ ​shown​ ​in​ ​Figure​ ​7​ ​depend​ ​on​ ​the​ ​current​ ​consumption​ ​of​ ​theRaspberry​ ​Pi​ ​(SBC)​ ​and​ ​on​ ​the​ ​type​ ​of​ ​supercapacitors​ ​used.​ ​Table​ ​1​ ​shows​ ​ ​typical​ ​valuesfor​ ​the​ ​following​ ​configuration:● no​ ​peripheral​ ​devices​ ​attached● 2x​ ​supercapacitors​ ​22F/2.7V/85m​Ω● T​AMB​=25°C● The​ ​Raspberry​ ​Pi​ ​(SBC)​ ​is​ ​replaced​ ​by​ ​a​ ​constant​ ​current​ ​load
The​ ​current​ ​consumption​ ​of​ ​the​ ​Raspberry​ ​Pi​ ​3,​ ​with​ ​running​ ​OS​ ​Rasbian​ ​equals​ ​to​ ​anaverage​ ​constant​ ​current​ ​of​ ​ca.​ ​250mA​ ​when​ ​shutting​ ​down.​ ​ ​For​ ​other​ ​SBCs​ ​or​ ​loads
with​ ​different​ ​total​ ​shutdown​ ​currents​ ​use​ ​Table​ ​1​ ​for​ ​estimation​ ​of​ ​the​ ​backup​ ​times.
output​ ​load(constant​ ​current)

Backup​ ​time​ ​for
Max.​ ​Total​ ​Backup​ ​time
Short-term​ ​power​ ​failures T​TB​ ​(max)
T​ST

100mA

53​ ​sec.

141​ ​sec.

200mA

33​ ​sec.

87​ ​sec.

I​AV​​ ​(Raspberry​ ​Pi​ ​3)

31​ ​sec.

81​ ​sec.

300mA

24​ ​sec.

62​ ​sec.

400mA

19​ ​sec.

47​ ​sec.

500mA

16​ ​sec.

39​ ​sec.

600mA

13​ ​sec.

32​ ​sec.

700mA

11​ ​sec.

27​ ​sec.

800mA

9​ ​sec.

23​ ​sec.

900mA

8​ ​sec.

20​ ​sec.

1000mA7​ ​sec.

18​ ​sec.

Table​ ​1:​ ​Typical​ ​backup​ ​times

21Juice4halt

PCB​ ​assembly

Fig.8:​ ​Juice4halt​ ​–​ ​5V-USB​ ​model,​ ​top​ ​and​ ​bottom​ ​side

22

Juice4halt

PCB​ ​Mechanical​ ​Drawing

Fig.9:​ ​PCB​ ​top​ ​view​ ​drawing

23

Juice4halt

Related​ ​products
Product

Description

Comments

J4H-HV-TRM-RTC-485 ● Supercapacitor​ ​based​ ​energy
storage​ ​module​ ​for​ ​micro-UPS
applications● designed​ ​for​ ​Raspberry​ ​Pi● 7V...28V​ ​screw​ ​terminal​ ​input● Real-Time​ ​Clock● RS-485​ ​interface● Power​ ​ON/OFF​ ​Button
J4H-HV-TRM● Supercapacitor​ ​based​ ​energy
storage​ ​module​ ​for​ ​micro-UPS
applications● designed​ ​for​ ​Raspberry​ ​Pi● 7V...28V​ ​screw​ ​terminal​ ​input

24Juice4halt

Revisions​ ​and​ ​Changes
Product​ ​Revision
Rev

Date

DescriptionA

Oct​ ​2017

Initial​ ​release

Datasheet​ ​Document​ ​Revision
Rev

Date

Description

20

Oct​ ​2017

Initial​ ​releaseThis​ ​work,​ ​unless​ ​otherwise​ ​expressly​ ​stated,​ ​is​ ​licensed​ ​under​ ​aCreative​ ​Commons​ ​Attribution-ShareAlike4.0​ ​International​ ​License​.

Juice4halt​ ​is​ ​a​ ​registered​ ​trademark

Nelectra​ ​s.r.o.,​ ​Vančurova​ ​11,​ ​83101​ ​Bratislava,​ ​Slovakia
tel:​ ​+421​ ​(0)903/191​ ​229,​ ​E-mail:​ ​info@nelectra.eu​,​ ​Web:​ ​www.juice4halt.com
25