Getting Started with InnoSwitchTM3-Pro
Code Library using Arduino
Author
Applications Engineering Department
Document
Number
Application Note 77 (AN-77)
Date
September 6, 2018
Revision
1.0
Summary
InnoSwitch3-Pro is a digitally controllable CV/CC QR Flyback Switcher IC with integrated
High Voltage MOSFET, Synchronous Rectification and FluxLink Feedback.
RDK-641 is a reference design board rated for 40W output power and is programmable
from 3V to 20V output voltage. This reference design features an on board PIC16F18325
microcontroller and uses the InnoSwitch3-Pro integrated power supply IC.
This application note describes use of Arduino code libraries provided by Power
Integrations to develop control logic and firmware for customizing RDK-641.
Information presented in this application note was used to develop firmware for Arduino
UNO.
PATENT INFORMATION
The products and applications illustrated herein (including transformer construction and circuits external to the products) may
be covered by one or more U.S. and foreign patents, or potentially by pending U.S. and foreign patent applications assigned
to Power Integrations. A complete list of Power Integrations' patents may be found at www.powerint.com. Power Integrations
grants its customers a license under certain patent rights as set forth at https://www.power.com/company/intellectual-
property-licensing/.
Power Integrations
5245 Hellyer Avenue, San Jose, CA 95138 USA.
Tel: +1 408 414 9200 Fax: +1 408 414 9201
www.power.com
AN-77 Getting Started with InnoSwitch3-Pro using Arduino 06-Sep-18
Revision History .................................................................................................... 27 10
Page 2 of 28
AN-77 Getting Started with InnoSwitch3-Pro using Arduino 06-Sep-18
Power Integrations
Tel: +1 408 414 9200 Fax: +1 408 414 9201
www.power.com
1 2 3 4 5
6 7 8 9 10
Introduction 1
This application note describes the structure and the application interface of the
InnoSwitch3-Pro Arduino Code Library as well as using it on a demo application. The
code was designed to be highly portable to other microcontroller platforms, and was
written in C++ language to be compatible with the Arduino library standards. This demo
application runs on Reference Design RDK-641 (Figure 1) and Arduino UNO (Figure 3).
Figure 1 – RDK-641 Board Top
Figure 2 – RDK-641 Board Bottom
Page 3 of 28
AN-77 Getting Started with InnoSwitch3-Pro using Arduino 06-Sep-18
Power Integrations
Tel: +1 408 414 9200 Fax: +1 408 414 9201
www.power.com
Number
Description
Label
1
AC Input Terminals
TP1, TP2
2
DC Output Terminals
TP3, TP4
3
MCU GPIO Headers
J8
4
Green LED Indicator
D5
5
Pickit3 Programming Header
J5
6
Push Buttons
SW1, SW2
7
uVCCand I2C Isolation Jumpers
J3, J6, J7
8
External Interface Header
J4
9
PIC16F18325 microcontroller
U3
10
InnoSwitch3-Pro IC
U1
SCL
SDA
GND
The RDK-641 board’s key features are indicated on the table below
System Requirements 2
The following are required to run the InnoSwitch3-Pro Arduino demo application
Arduino Software version 1.8.2 or later
Arduino UNO Rev3 SMD
RDK – 641 Board rev C
InnoSwitch3-Pro Arduino Library version 1.0.0
Page 4 of 28
Figure 3 – Arduino Uno Rev 3
AN-77 Getting Started with InnoSwitch3-Pro using Arduino 06-Sep-18
Power Integrations
Tel: +1 408 414 9200 Fax: +1 408 414 9201
www.power.com
Jumper
Description
Settings
J3
uVCC and MCU
Supply Jumper
If connected the uVCC output pin of the InnoSwitch3-Pro
will provide power to the on board microcontroller and
provide pull up voltage to the I2C lines
J6 , J7
I2C Lines
Isolation
Jumper
The user can select whether or not the SDA and SCL lines
from the MCU will be connected to the InnoSwitch3-Pro
Header
Description
Settings
J4
InnoSwitch3-Pro I2C lines
Header
When J6 and J7 are removed, an external I2C
Master can be connected through these header
J5
PICkit3 Programming
Header
For MCU Firmware Update using PICkit3 In-
Circuit Debugger/Programmer
J8
MCU GPIO Header
This can be used as Debug Pins
Hardware Overview 3
The Reference Design (RDK-641) hardware consists of an 8-bit Microchip microcontroller
(PIC16F18325), interface headers and the user interface elements: two push buttons and
a green LED.
The InnoSwitch3-Pro can be controlled using it’s on board microcontroller or by an
external I2C Master through the interface header.
This Demo Application does not use the on board microcontroller but an Arduino Uno as
2
an I
C Master and InnoSwitch3-Pro as slave device.
SDA and SCL lines pull-up resistors R24 and R23 respectively are available on the
board. The output of the InnoSwitch3-Pro provides 3.6V pull up voltage from its μVCC
output pin.
To further ease in development, the following documents are available and
recommended as supplemental reference resources I2C
RDR-641 - 40 W Variable Output (3 V to 8 V, 5 A; 8 V – 20 V Constant Power)
Supply Using InnoSwitch3-Pro and Microchip’s PIC16F18325 Microcontroller
AN-74 InnoSwitch3-Pro Programming Manual
3.1
Headers and Jumpers Settings
The table provides the description for each jumper available on the board.
The following headers are also available on the board.
Page 5 of 28
AN-77 Getting Started with InnoSwitch3-Pro using Arduino 06-Sep-18
Power Integrations
Tel: +1 408 414 9200 Fax: +1 408 414 9201
www.power.com
By configuring the I2C lines isolation jumpers, the RDK-641 board can be controlled using
Arduino UNO.
Connection details:
Remove Jumpers J6 and J7 and retain Jumper J3
Connect J4 to Arduino Uno I2C lines (SDA, SCL and GND).
Make sure to check the I2C labels of J4 and Arduino UNO board
Wires on the Image above
o Blue – SDA
o Red– SCL
o Black – GND
Page 6 of 28
AN-77 Getting Started with InnoSwitch3-Pro using Arduino 06-Sep-18
Power Integrations
Tel: +1 408 414 9200 Fax: +1 408 414 9201
www.power.com
InnoSwitch3-Pro Arduino Code Library 4
To simplify the technicalities on controlling the InnoSwitch3-Pro, a simple code library is
provided as a reference.
The library contains all the registers needed for controlling the device. These registers
are organized as Command Registers and Telemetry registers. Command registers are
sent to the device for performance control and Telemetry Registers are for reading back
values.
Computation Macros are presented to aid in set point calculations. Register default values
are also defined to simplify writing to the required registers at device initialization.
The InnoSwitch3-Pro Arduino code library is available from the Power integrations
website.