Stn11Xx: Powersave Functionality
Stn11Xx: Powersave Functionality
PowerSave Functionality
Table of Contents
1.0 PowerSave Functionality ..............................................................................................................................3
1.1 Control Modes .............................................................................................................................................3
1.1.1 Native PowerSave Mode.........................................................................................................................3
1.1.2 ELM327 Low Power Mode ......................................................................................................................3
1.2 Sleep Triggers .............................................................................................................................................3
1.2.1 STSLEEP and ATLP commands ............................................................................................................3
1.2.2 UART Inactivity........................................................................................................................................4
1.2.3 External SLEEP Input .............................................................................................................................4
1.2.4 Voltage Level Sleep ................................................................................................................................4
1.3 Wakeup Triggers .........................................................................................................................................4
1.3.1 UART Rx Pulse Wakeup.........................................................................................................................5
1.3.2 External SLEEP Input Wakeup ...............................................................................................................5
1.3.3 Voltage Level Wakeup ............................................................................................................................5
1.3.4 Voltage Change Wakeup ........................................................................................................................5
1.4 Voltage Trigger Considerations ...................................................................................................................5
1.5 External Power Control Output....................................................................................................................6
1.6 Device Specific Details ................................................................................................................................6
1.6.1 OBDLink Hardware Rev 1.x ....................................................................................................................6
1.6.2 OBDLink Hardware Rev 2.0 – 2.4...........................................................................................................6
1.6.3 OBDLink Hardware Rev 2.5 and Above .................................................................................................7
1.6.4 OBDLink S...............................................................................................................................................7
1.6.5 microOBD 200.........................................................................................................................................7
1.6.6 STN1110 .................................................................................................................................................7
1.7 Trigger Summary.........................................................................................................................................8
2.0 PowerSave ST Commands............................................................................................................................9
2.1 Command Summary....................................................................................................................................9
2.2 Command Descriptions ...............................................................................................................................9
2 of 13 www.ScanTool.net STN11XXPSB
STN11xx PowerSave
4 of 13 www.ScanTool.net STN11XXPSB
STN11xx PowerSave
1.3.1 UART Rx Pulse Wakeup amount of time the voltage must stay below or above
the threshold for the device to wake up.
STN11xx can be configured to wake up on an
The voltage level wakeup trigger can be used to
active pulse detected on the UART Rx input. The host
wake up the device when the engine starts up and the
can generate the pulse by holding the Rx line in a logic
alternator causes the system voltage to increase. The
low state, transmitting an RS232 “break” signal, or
default settings should work for most vehicles with
sending a character on UART whose bit pattern
lead-acid batteries.
produces a pulse of the required duration.
Use the STSLCS command to verify that the trigger
The wakeup pulse has minimum and maximum
was properly configured. An exclamation point (‘!’) in
timing requirements, which are set using the
front of the voltage setting means that the trigger
STSLUWP command, and are accurate to within
setting is invalid, and the trigger will never activate.
approximately 5 μs. By default, the minimum wakeup
Refer to section 1.4 “Voltage Trigger Considerations”
pulse width is set to 0, which translates to an absolute
for more information.
minimum pulse width requirement of 20 ns. It can be
increased to improve noise rejection; however,
Note: In order for the voltage level wakeup trigger
increasing the minimum pulse width will limit the
to operate properly on STN1110 IC or microOBD 200
maximum baud rate that the host must use to transmit
module (STN1120), the voltage measurement must be
the wake-up character. Due to the implementation
calibrated using the ATCV or STVCAL commands. The
limitations, setting the minimum wakeup pulse width to
calibration is not necessary for the OBDLink scan
any value below 15 μs will cause it to be rounded down
tools, since it is done at the factory.
to 0 (20 ns).
The purpose of the maximum wakeup pulse
width requirement is to avoid unintentional wakeups.
Some PC hosts (especially ones using the RS232 1.3.4 Voltage Change Wakeup
connection) cause the UART Rx line to go low or The STN11xx can be configured to wake up when
generate a slow (200 ms or longer) pulse as the host is the difference between two consecutive voltage
shutting down or entering standby. The default setting samples taken at the ANALOG_IN input exceeds a
is 30 ms, which allows the device to wake up on a predefined threshold. The settings specify polarity of
character transmitted over UART at baud rates as low the change (rising, falling, or either), the change in
as 300 baud. To disable the maximum pulse volts or ADC steps, and the time between the samples.
requirement and have STN11xx wake up on the high to The voltage level wakeup trigger can be used to
low UART Rx transition (instead of a pulse), set the wake up the device when the starter motor is cranking
maximum pulse timing setting to 0. the engine (battery voltage dips) or when the engine
starts up (voltage rises due to alternator running). This
wakeup trigger can be more reliable than the voltage
1.3.2 External SLEEP Input Wakeup level wakeup trigger, since it does not rely on a specific
voltage level which can vary between vehicles, but
STN11xx can be configured to wake up when it
instead detects voltage change, which happens every
senses logic high on the external SLEEP control input.
time engine starts no matter what the battery level or
The STXWT commands sets the minimum time the
the alternator voltage is.
SLEEP input must remain high in order to bring the
Use the STSLCS command to verify that the trigger
device out of the sleep state. The setting of 0 will result
was properly configured. An exclamation point (‘!’) in
in a minimum time requirement of 15 μs.
front of the voltage setting means that the trigger
setting is invalid, and the trigger will never activate.
Note: STN1110 and microOBD 200 (STN1120)
Refer to section 1.4 “Voltage Trigger Considerations”
allow the polarity of the external SLEEP input to be
for more information.
inverted, via the STSLXP command.
Note: If a non-default voltage scaling is used for the
Section 1.2.3 lists possible applications for the
STN1110 IC or the microOBD 200 module (STN1120),
external SLEEP input.
the voltage measurement must be calibrated using the
ATCV or STVCAL commands, for the voltage change
wakeup trigger to operate properly.
1.3.3 Voltage Level Wakeup
The STN11xx can also wake up based on the
voltage on the ANALOG_IN input. This trigger can be 1.4 Voltage Trigger Considerations
configured in a variety of ways. The settings specify
voltage threshold, whether the trigger is active above Analog voltage that STN11xx “sees” on the
or below the threshold setting, and the minimum ANALOG_IN pin is represented internally by a 12-bit
integer. The conversion is done by an internal Analog
STN11XXPSB www.ScanTool.net 5 of 13
STN11xx PowerSave
to Digital Converter (ADC for short). The voltage 14V, a trigger set at 15V will no longer be inside the
represented by a single bit is called an “ADC step”, and valid range.
is measured in volts per bit (V/bit). Additional examples of invalid settings are a voltage
Since the maximum voltage that can be directly level trigger specified as ‘below 0V’, and voltage
measured by the ANALOG_IN pin is very low (about change trigger parameter set to a value less than one
3V), the pin is normally connected to the voltage ADC step size.
source to be measured via an external voltage divider. Whenever a parameter value falls outside the valid
As its name implies, the voltage divider outputs a range, the STSLCS command will display a ‘!’ in front
voltage that is a fraction of the actual input voltage. For of the voltage setting to indicate that it is invalid, and
example, a 1:10 voltage divider would output 1.2V for the trigger will never activate.
an input voltage of 12V.
Parameters to the voltage based triggers can be
specified either in volts, or as raw ADC values. 1.5 External Power Control Output
When a parameter is specified in volts, STN11xx
internally converts it to a corresponding ADC value. The PWR_CTRL output can be used to put
The size of the ADC step depends on the ratio of the external circuitry into a low power mode. This pin
voltage divider. By default, it is calibrated for a voltage outputs a logic “high” while the device is awake, and a
divider with a ratio of 1:7.2. Keeping in mind that the “low” when STN11xx enters sleep mode.
maximum voltage on the ANALOG_IN pin is STN1110 stand-alone IC allows the polarity of the
approximately equal to VDD (typically, 3.3V), the PWR_CTRL to be changed via the STSLPCP
maximum voltage that can be measured by the ADC command or bit 6 of the 0E programmable parameter
using default calibration is about 24V: (ELM327 LP mode only). The polarity is fixed for all
other STN11xx ICs.
3.3V ÷ 7.2 = 23.76V
To use voltage triggers with a voltage divider that 1.6 Device Specific Details
has a different ratio, and to account for parts
This section describes device-specific PowerSave
tolerances, the device must be calibrated using the
implementation details for the different STN11xx-based
ATCV or STVCAL commands.
ScanTool.net devices.
When a parameter is specified as a raw ADC value,
calibration must be done in the host software. To get
the size of the ADC step, divide the actual measured
voltage by the ADC value reported by the STVRX 1.6.1 OBDLink Hardware Rev 1.x
command. For example, if the actual measured voltage OBDLink devices with hardware revision 1.x have
is 12V, and the STVRX command returns 0x7FF, the the following limitations:
size of the ADC step is: • In sleep mode, current consumption is about
37 mA (54 mA if the USB cable is plugged in
12V ÷ 0x7FF = 0.00586V/bit and the virtual COM port is closed).
• External SLEEP control input is not enabled
To convert voltage to ADC steps, divide it by the (ATIGN always returns “ON”, and STSLXS
ADC step size. For example, using the values above, always returns “WAKE”).
8V is equal to 0x554 steps: • The “STATUS” LED is not controlled by the
STN1100, and remains on during sleep.
8V ÷ 0.00586 = 0x554
6 of 13 www.ScanTool.net STN11XXPSB
STN11xx PowerSave
The STN1100 turns off the “STATUS” LED during Likewise, the SLEEP input can be configured to
sleep. wake up the device when the chip detects an active
host.
Note 1: In sleep mode about 15 mA of current will The STN1101 turns off the “STATUS” LED during
be drawn from the USB socket if the host is active. To sleep.
maximize power savings, USB must be unplugged or
the host must be shut down or put into standby mode. Note 1: Some non-compliant USB to RS232
Note 2: Wireless add-on modules (Bluetooth, WiFi) converters do not generate valid RS232 voltage levels.
are unpowered in sleep mode. Therefore, it is not The SLEEP input sleep/wakeup triggers should not be
possible to wake up the device over a wireless link; used with such converters. Use the UART Rx pulse
use one of the voltage-based wakeup triggers instead. wakeup trigger (see section 1.3.1) instead. A lower
than normal baud rate may be necessary to wake up
reliably, due to the wakeup requirements of the RS232
1.6.3 OBDLink Hardware Rev 2.5 and transceiver IC.
Note 2: In sleep mode, the RS232 transceiver
Above
remains active if there is a valid voltage on the RS232
OBDLink devices with hardware revision 2.5 and Rx pin. The transmitter can draw up to several mA of
above operate identically to the devices with hardware current, depending on the resistance of the load on the
revisions 2.0 – 2.4 with one exception: SLEEP input in RS232 Tx line. For maximum power savings, disable
revisions 2.0 – 2.4 only detects unplugged USB cable the RS232 transceiver on the host side, shut down the
and host shut down or in hibernate mode. Hardware host, or unplug the serial cable.
revision 2.5 and above devices will also detect when
the host PC is in standby or sleep mode.
STN11XXPSB www.ScanTool.net 7 of 13
STN11xx PowerSave
Sleep Triggers
Trigger Default state
ATLP User initiated. This trigger is available only in ELM327 Low Power mode
STSLEEP User initiated, always available
UART inactivity Off
External SLEEP input Off
Voltage level Off
Wakeup Triggers
Trigger Default state
UART Rx pulse On
External SLEEP input On
Voltage level Off
Voltage change Off
8 of 13 www.ScanTool.net STN11XXPSB
STN11xx PowerSave
STN11XXPSB www.ScanTool.net 11 of 13
STN11xx PowerSave
SLU sleep, wakeup SLVLS <|> volts|0xhhh, sec
UART sleep/wakeup triggers on/off. Each of the two Configure voltage level sleep trigger. The “<” or “>”
parameters can be independently configured as “on” or character specifies whether the trigger region is above
“off”. The first parameter specifies sleep trigger (UART or below the threshold voltage: “<” = below, “>” =
inactivity timeout) setting, and the second one specifies above. The threshold voltage can be specified in volts
wakeup trigger (low pulse on UART Rx input) setting. with the maximum precision of two decimal places. It
The defaults are sleep = off, wakeup = on. can also be specified in raw ADC steps by prefixing the
value with ‘0x’. The sec parameter specifies how long
Example: STSLU off, on the voltage must remain above or below the threshold
before the device will enter sleep mode. The default is
<13.00, 600 (below 13V for 600 seconds).
SLUIT sec
Set UART inactivity timeout. The parameter is Examples: STSLVLS <12.85, 60
specified in seconds (decimal). The default is 1200 STSLVLS >0x8ab, 0
(20 minutes).
Examples: STSLVLW >13.15, 0
SLVGW [+|-]volts, ms STSLVLW <0x8cd, 5
Configure voltage change wakeup trigger. The first
parameter specifies voltage difference between two
samples. The optional ‘+’ or ‘-’ sign, preceding the SLX sleep, wakeup
voltage, specifies whether the trigger detects only Enable or disable sleep/wakeup triggers associated
rising voltage (+), only falling voltage (-), or a voltage with the external sleep control input (SLEEP pin). Each
change in any direction (no sign). The second of the two parameters can be specified as “on” or “off”.
parameter specifies the time between the samples in The defaults are sleep = off, wakeup = on.
milliseconds. The value specified will be rounded to the
nearest multiple of 250 ms, with any value below 250
being rounded up to the minimum setting of 250 ms.
SLXP 0|1
The default setting is 0.2, 1000 (voltage changing by
0.2V in any direction, with one second between the Configure polarity of the SLEEP input.
samples).
0: LOW = sleep, HIGH = wake up
Example: STSLVGW +0.15, 750 1: LOW = wake up, HIGH = sleep
12 of 13 www.ScanTool.net STN11XXPSB
STN11xx PowerSave
SLXST ms SLXWT ms
Specifies how long the SLEEP input must be held in Specifies how long the SLEEP input must be held in
the active (“sleep”) state to put the device to sleep. The the inactive (“wake”) state to wake the device from
ms parameter is the minimum time in milliseconds. The sleep. The ms parameter is the minimum time in
default is 3000 (3 seconds). milliseconds. The default is 2000 (2 seconds).
STN11XXPSB www.ScanTool.net 13 of 13