AfterBurner GPIO CAPABILITY User manual

The Afterburner
USER MANUAL V3.4.6
GPIO CAPABILITY

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 2
Table of Contents
Hardware description .............................................................................................................................3
GPIO Expansion port...........................................................................................................................3
Digital Outputs Orange or Yellow wires..........................................................................................4
Digital Inputs Blue or Green wires...................................................................................................5
Analogue Input White wire .............................................................................................................6
GPIO configuration (User Settings menu loop).......................................................................................7
Digital Input configuration..............................................................................................................8
Digital Output configuration.........................................................................................................11
Analogue input configuration .......................................................................................................15
GPIO Status menu.................................................................................................................................16
Digital Inputs.................................................................................................................................16
Digital Outputs..............................................................................................................................17
Analogue input..............................................................................................................................17
User interaction ............................................................................................................................17
“Analogue” gauges................................................................................................................................18
Showing actual values...................................................................................................................18
Resetting usage (for resettable inputs).........................................................................................18
Suggested external hardware...............................................................................................................19
GPIO breakout PCB .......................................................................................................................19
Ventilation mode heater modification .........................................................................................22

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 3
Hardware description
Production PCBs can be fitted with extra input and output conditioning circuitry to allow the ready
addition of external switches or status indicators/relays.
The prototype Mk1 PCB can still provide these GPIO functions, but care needs to be taken to protect
the fragile inputs of the ESP32 processor. (eg: 3.3V logic, intolerant to errant voltages).
GPIO Expansion port
A 7-pin JST PH header is provided to allow
•2 contact closure inputs
•2 open collector outputs
•1 analogue input
•5V Power & 0V (ground) sources
Wire Colour
Purpose
Blue
Digital input #1
Green
Digital input #2
Orange
Digital output #1
Yellow
Digital output #2
Black
Ground, 0V
White
Analogue input
Red
Power, +5V (from heater ECU)
NOTE: the PCB header locations of 5V, 0V and the
Analogue input shifted locations on production
PCBs from hardware version V3.5 onwards.
The flying lead supplied with a unit is correct for
the unit supplied.

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 4
Digital Outputs
Orange or Yellow wires
Production Afterburner digital output circuitry
User furnished
equipment:
Driving an LED
User furnished equipment:
Driving a relay, the diode must be
included.
The 2 digital outputs are offered as open collector devices, effectively providing a path to ground
when active.
The load can be a 12V device, eg: relay, if desired.
When driving a relay, a diode must be installed across the relay’s coil as shown to manage the back
EMF when the relay is turned off. Not doing so may harm the open collector output with the excess
voltage spike generated as the magnetic field rapidly collapses.

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 5
Digital Inputs
Blue or Green wires.
: User furnished equipment
Digital Input circuit of production Afterburner
Digital Input topology summary
Diode array:
Blocks positive external voltages.
Shunts negative external voltages to 0V.
The external input is pulled up by the 10kΩresistor; transistor conducts, logic 0 at ESP.
A contact closure to 0V on the input prevents the transistor conducting, creating a logic 1 at ESP32.
(ESP32 uses internal pullup)
An open input typically presents ~1.9V at the input pin.
Digital Input Functional description
A digital input is considered as being active when the external pin is connected to the same 0V
reference used by the Afterburner.
As the production PCBs use an input transistor the input is inverted to a high level at the ESP32.
During initial birthing (or factory reset), the PCB version is identified so the correct digital input
behaviour occurs for either the prototype or production PCBs, so a 0V input is always considered as
an active input.

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 6
Analogue Input
White wire
Suggested input circuit for a
potentiometer
Analogue input circuit of the production Afterburner
Analogue Input topology summary
Diode array clamps to 3.3V or 0V.
100k pull down only exists on V2.1+ PCBs.
Series 470Ωresistor limits clamping current via diodes, and minor filtering with 100n capacitor.
Analogue Input Functional description
The ESP32 analogue input accepts a voltage in the range from 0.0V to 3.3V.
The power supplied from the Afterburner on the GPIO connector is 5V so if using a pot you must pad
the top end with a resistor to limit the maximum expected voltage, as shown above.
Note that there are clamping diodes in the input circuit, but these are a safety feature and should
not be relied upon.

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 7
GPIO configuration (User Settings menu loop)
The GPIO Configuration menu is found in the User Settings menu loop and is only made available if
GPIO capability was detected on the PCB.
This menu only appears if GPIO hardware has been installed to the Afterburner PCB.
The assignment of GPIO functions is only via this menu:
The top 2 left hand entries show the input mode of the 2 digital inputs.
The 2 right hand entries show the output mode of the 2 digital outputs.
The 3rd line shows the analogue input mode.
The GPIO line to be configured is selected by using the UP/DOWN keys.
The mode is then changed by using the LEFT/RIGHT keys.
Some modes have a further option, in which case a long hold of the LEFT or RIGHT keys will allow
you to switch focus to the extended parameter(s).

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 8
Digital Input configuration
Input #1 –Blue wire
Input#2 –Green wire
The 2 digital inputs can be configured as:
•Disabled
•Start
•Stop
•Start / Stop
•Run
•External Thermostat
•Zero Fuel Usage (reset)
•Max Power
•Pulse Counter
•Permit Start
•Inhibit Start
Disabled
Fairly obviously, no action takes place when an input is disabled.
Start
A momentary closure of the input starts the heater.
If the input is held closed for 1.5s or more, the heater will be stopped if
it is running.
This mode may be useful for those wishing to use a GSM relay to start
or stop the heater.
By generating appropriately timed pulses (eg 1 second or 2 seconds) a
single input can be used to start or stop the heater via a single input.
Stop
Stop mode stops the heater upon a momentary closure of the input.
Start / Stop
Start / Stop mode will show Start & Stop alternating in the selection
field, hence the twin image shown here.

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 9
Upon a momentary closure of the input, Start / Stop mode will either
start the heater or stop the heater, according to the current state of
the system.
No time sensitivity exists.
Run
The heater will run whilst the input remains closed.
If opened the heater will be requested to stop, performing the usual
shutdown sequence.
An example usage may be using a conventional “dry contact“ furnace thermostat, with the heater
starting and stopping according to the condition of the thermostat’s output.
Bear in mind it takes over 5 minutes to start the heater, and a couple of minutes to shut down the
heater.
External Thermostat
This mode is specifically intended for use with an external “dry
contact“ thermostat.
When the contact is closed, the heater will be made to run at
maximum power. When the contact is open the heater will be made to
run at minimum power.
If the heater is off upon the initial closure, it is requested to start.
Additionally, a timeout can be associated with this mode.
If the contact remains open longer than the selected time interval, the heater is requested to stop.
This allows operation solely using the wall thermostat. Initial operation will see the heater start, then
cycle according to the setting. Finally disabling the thermostat will see the heater eventually stop
once the timeout elapses.
If the timeout is set to zero, the heater will always run unless commanded to turn off.
The hold time adjustment is accessed by holding down the RIGHT key for a second or more.
Zero Fuel Usage (reset)
This input allows a switch to be mounted nearby the fuel tank, to be
used to reset the accumulated fuel usage when the tank is re-filled.
If the input is held closed for longer than 1 second, the fuel usage
counter is reset.
Resetting the accumulated fuel usage is important if you are using the
Excess Fuel Usage shutdown feature to avoid running the tank dry,
which usually requires the fuel line to be re-primed.

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 10
Max Power
When the input is closed, the heater will be asked to run at maximum
power.
If the heater was stopped, it will be started.
Upon the input opening, the heater will return to the state it was in
prior to the input closure, ie standby, or normal running.
Pulse Counter
Input pulses can be counted.
The typical usage being intended for water flow meters.
Typical units have a specification of 450 counts / litre.
Holding the RIGHT key for longer than a second allows the calibration to be defined.
The pulse count will only be retained until the next Afterburner reboot
unless a I2C EERAM chip is added to the system. A TL4704 is
recommended for this.
As the Afterburner does employ a watchdog timer, this is a recommended precaution.
Permit Start
The input must remain closed to allow the heater to start and keep
running.
If the input is opened whist the heater is running, the heater will be
requested to shut down.
Inhibit Start
The input must remain open to allow the heater to start and keep
running.
If the input is closed whist the heater is running, the heater will be
requested to shut down.

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 11
Digital Output configuration
Output #1 –Orange wire
Output #2 –Yellow wire
Either of the two digital outputs can be configured as:
•Disabled
•User Controlled
•Status LED
•Absolute temperature (under or over)
•Relative temperature (under or over)
•Run Status
•Low Fuel
•Ventilation
Disabled
Fairly obviously, no action takes place when a GPIO output is disabled.
User Controlled
The GPIO output can be switched on or off under user command.
When in the heater control modes, holding the LEFT or RIGHT buttons
down will toggle the state of the 1st or 2nd output respectively.
It is also possible to control via the JSON data interface
ie: Bluetooth or WiFi applications, eg web browser.
Status LED
The GPIO output is intended to be attached to status LED, connected
across the 5V output to the GPIO output.
•When the heater is off, the LED will be off.
•When the heater is starting, the LED will cycle in an increasing
brightness manner.
•When the heater is running, the LED will be constantly on.
•When the heater is shutting down, the LED will cycle in
decreasing brightness manner.
•If the heater is suspended, typically due to the cyclic mode
threshold being activated, the LED will momentarily flash every
second or so.

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 12
Absolute Temperature Threshold (under or over)
The GPIO output will operate according to the temperature of a sensor.
Normally this would be the sensor being used for the thermostat role but can be another if more
than one sensor is fitted to the Afterburner.
This selection is achieved, as is the temperature threshold, via the threshold mode extended
capabilities menu.
Relative temperature threshold (under or over)
The GPIO output will operate according to the temperature of a sensor relative to the system
thermostat setting.
Normally this would also be the sensor being used for the thermostat role but can be another if
more than one sensor is fitted to the Afterburner.
There are also the same extended capabilities as the Absolute Temperature Threshold Extended
Capabilities, as described previously.
Temperature Threshold modes - Extended Capabilities
Holding the RIGHT key down whilst a temperature threshold mode selection is shown (absolute or
relative, under or over) allows the threshold and extended capabilities to be defined.
Single sensor
Multiple Sensors
Navigation between the fields is by using the UP & DOWN keys.
Adjustment of a field by using the LEFT & RIGHT keys.
Return to the prior menu by pressing the CENTRE key.
Note: no settings are changed until you press CENTRE again in the GPIO setup menu.
The GPIO mode and the output line are shown on the top line of the menu, adjacent to the
threshold.
Threshold adjustment (1st field)
Adjustment of the threshold takes place in the 1st field, using the LEFT & RIGHT keys.
The step change is 0.5°C (1°F).

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 13
Conditional operation (“When” field)
Despite the temperature condition being met, a condition may be specified before it is activated:
Always
Heater On
Heater Off
Input 1 active
Input 2 active
Output Mode (“Op” field)
The output can be a pure digital on/off signal, or a pulse width modulated signal spanning the
hysteresis range.
Pure digital output
PWM output
Hysteresis
Hysteresis is used in conjunction with the output mode to prevent the output
oscillating when near the threshold.
The magnitude of the hysteresis value adjustment varies according to the
current value:
Hysteresis value
< 1.0°C
1.0°C < 5.0°C
> 5.0°C
Step change
0.1°C
0.5°C
1.0°C
The output behaviour of according to output mode and hysteresis is as follows:
Digital On/Off output mode, over temperature
The output becomes active when the temperature exceeds the defined threshold.
It only returns inactive when the temperature falls below the threshold minus the hysteresis.
eg: threshold = 25°C, hysteresis = 5°C ⇒Output on when > 25°C, output off when < 20°C.
Digital On/Off output mode, under temperature
The output becomes active when the temperature falls below the defined threshold.
It only returns inactive when the temperature rises above threshold plus the hysteresis.
eg: threshold = 25°C, hysteresis = 5°C ⇒Output on when < 25°C, output off when > 30°C.
PWM output mode, over temperature
The output is 100% PWM (full on) when the temperature exceeds the defined threshold.
The output is 0% PWM (full off) when the temperature is below the threshold minus the hysteresis.
eg: threshold = 25°C, hysteresis = 5°C ⇒100% PWM when > 25°C, 0% PWM when < 20°C.
PWM output mode, under temperature
The output is 100% PWM (full on) when the temperature is below the defined threshold.
The output is 0% PWM (full off) when the temperature is above the threshold plus the hysteresis.
eg: threshold = 25°C, hysteresis = 5°C ⇒100% PWM when < 25°C, 0% PWM when > 20°C.

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 14
Sensor ID Selection
The sensor used for the temperature reading is selected according to its
logical index.
The primary thermostat is sensor ID 0. The next priority is sensor ID 1, etc.
for as many sensors are fitted (maximum of 3 DS18B20s plus a possible
BME280).
Run Status
The GPIO output is active when the heater is in any state other than
standby.
If the heater is suspended (in standby) due to Cyclic Mode, the output is
not active.
Low Fuel
The GPIO output is intended to be attached to a warning LED, powered
from 5V.
The Fuel Warning and Tank Capacity values are defined in the heater
tuning menus.
It is important to remember that the warning is for that quantity of fuel
remaining in the tank.
Normal
Fuel Warning (volume remaining)
Excess Fuel consumed
OFF
Flashing
ON
It is not possible to start the heater when the excess fuel error is active.
A GPIO input can be defined to conveniently reset the fuel usage after filling the fuel tank.
Ventilation
Ventilation mode is a user controlled PWM output intended to drive a
fan motor.
Ventilation mode can only be activated if the heater is in the
Ready/Standby state. If ventilation mode is activated, attempts to start
the heater will be denied.
To activate ventilation mode, hold down the LEFT or RIGHT key in the normal heater control
menu(s), according to whether the mode is defined on GPIO output #1 or #2.
With suitable circuitry, the heater can be physically modified with extra circuitry to:
1. Detect the PWM signal and operate a relay to switch away from the ECU’s fan output.
2. Drive a power MOSFET with the PWM signal than then runs the heater’s fan motor via the
switched relay.
As the heater modification requires electronics skills, the construction of the circuit board and
installation within the heater is left to the end user. No prebuilt units will be offered.
This hardware is described in the Suggested external hardware chapter of this document.

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 15
Analogue input configuration
Analogue input - White wire
The single analogue input can be configured as:
•Disabled
•Enabled
•Fuel Sender
The allowed input voltage range is from 0.0V to 3.3V.
Clamping diodes and a series resistor on the ADC input help protect against excess voltage but
should not be relied upon.
Disabled
No analogue input is expected.
Enabled
The input voltage applied to the white wire is digitised and presented as
a percentage of the usable range (0 –3.3V)
Fuel Sender
The input voltage applied to the white wire is digitised and scaled to
present the value from a fuel sender in a 0 to 100% manner.
A simple constant current interface to a typical fuel sender (to keep the operation linear) will
typically max out at ~2V, which is only ~60% of the ADC’s full range.
The scaling allows this to be restored to a more user friendly 100% range.
The scaling is defined as the minimum and maximum ADC counts for the empty and full tank
conditions These are accessed via the Fuel Sender Limits menu by holding the RIGHT key for 1
second.
Press the CENTRE key to return to the GPIO mode setup menu.

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 16
GPIO Status menu
The GPIO status menu lives in the Root Menu loop allows the current signal states of the GPIO port
to be visualised.
This menu only appears if GPIO hardware has been installed to the Afterburner PCB.
Digital Inputs
The 2 digital inputs are represented by the incoming arrow icons to the top left of the screen.
Depending upon how the GPIO inputs have been configured, the icons presented adjacent to the
inputs will be one of the following:
Disabled
Changes at the input are ignored
Start
Momentary closure will start the heater, a long closure will stop.
Stop
A momentary closure will stop the heater.
Start / Stop
Alternate momentary closures will start or stop the heater.
Run
The heater will run whilst the input remains closed.
External
Thermostat
The heater will cycle high/low power according closed/open.
Fuel Usage Reset
The fuel usage counter will be reset upon a 1 second hold.
Maximum Power
Heater runs at maximum power when closed.
Reverts to original state when open –may be stopped or resume.
Pulse counter
Pulses are accumulated and scaled to represent a volume of fluid.
Permit Start
Heater starts will be denied if the input is open.
Inhibit Start
Heater starts will be denied if the input is closed.

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 17
The switch icon shows the state of the digital input:
The input is open circuit.
The input is closed to ground.
Digital Outputs
The 2 digital outputs are represented by the outgoing arrow icons to the top right of the screen.
Disabled
The output remains inactive.
LED Status
An attached LED will dynamically indicate the heater run state.
User
The output is controlled by user command.
Absolute Temperature
threshold
(under or over)
The output is active according to the defined absolute
temperature threshold.
Thermostat relative
threshold
(under or over)
The output is active if the temperature over or under the
thermostat setting by the defined value.
Heater On status
The output is active whenever the heater is not in the
standby/stopped condition.
Low Fuel indicator
An attached LED will flash when in warning state, illuminate
solid when excess fuel consumed.
Ventilation mode
User can manually control a fan speed, the PWM duty cycle will
be shown.
The state of the output is reflected by the ‘bulb’ icon:
The output is inactive
The output is active
Analogue input
The input voltage applied to the Analogue input is presented as a percentage between 0.0V and
3.3V.
User interaction
If a digital output has been defined as User Controlled or Ventilation mode, the current state can be
toggled by holding down the LEFT or RIGHT keys:
The LEFT key toggles digital output #1
The RIGHT key toggles digital output #2

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 18
“Analogue” gauges
If a GPIO digital input is configured as a Pulse counter, the GPIO analogue input is enabled, or the
Maximum Fuel Usage has been defined, a bar graph style gauge will be created and can be viewed in
the Root Menu loop.
The initial view is a s a percentage for each gauge.
Each gauge is titled, according to the source of the value being shown:
•Fuel Usage
•Pulse Counter (on GPIO Digital input #2 here)
•Fuel Sender (or basic analogue input) attached to the GPIO Analogue input.
Showing actual values
Press the DOWN key to reveal the actual litres value (for instance) behind each gauge.
For the GPIO Analogue input, this will be the ADC digitised value (0-4095).
Resetting usage (for resettable inputs)
Press UP to enable reset mode.
A loop will circle the selected gauge and rapidly flash, use LEFT or RIGHT keys to make the selection.
Press the CENTRE key to select the reset action, press UP to confirm.

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 19
Suggested external hardware
GPIO breakout PCB
This circuit board offers:
•Power MOSFET outputs for fans or pumps
•Resistive Fuel Sender interface
•A place to connect additional DS18B20 temperature sensors
•Headers with 5V power for the Digital inputs (eg flow sensor inputs)
•Through hole parts, no fiddly SMD skills required.
The board design is only offered as Gerber files. It is expected people would build their own versions
especially as not all parts may be needed in all instances. (eg:, no fuel sender, leave the bits out!)

Afterburner user manual, V3.4.5–GPIO Capability
http://www.mrjones.id.au/afterburner Page 20
Prototype of GPIO breakout ready for installation in my own caravan.
There it is being used with a secondary DS18B20 temperature sensor installed in the heat exchanger
of the absorption fridge and a pair of ventilation fans to assist convection are controlled using the
Afterburner’s Absolute Temperature threshold (over temp) in PWM mode.
In addition, a water flow meter is fitted to GPIO input #1 to measure water usage from the
freshwater tank.
Adding an extra DS18B20 is simplified by using the JST PH-3 headers, all hooked in parallel.
I do not have a fuel sender so those parts were omitted.
STL files for the 3D printed case are available.
Table of contents
Popular Controllers manuals by other brands

Rain Bird
Rain Bird Image Series instruction manual

ESI
ESI KeyControl 25 XL manual

Emerson
Emerson Bettis XTE3000 Installation, operation and maintenance manual

Lamptron
Lamptron FC Touch instruction manual

Spa Power
Spa Power SP500A Mk2 user guide

Savant
Savant Director Lite HST-DIRECTORLITE Quick reference guide

Rockwell Automation
Rockwell Automation micrologix 1200 installation instructions

SCHIEBEL
SCHIEBEL ACTUSMART CM Series operating instructions

DELTA DORE
DELTA DORE TYXIA 641 installation instructions

Xylem
Xylem McDonnel & Miller 157S-RBP-MD instruction manual

Estun
Estun TRIO Flex-X Nano user manual

Fireye
Fireye PPC6000 Series Programming guide