ON Semiconductor EVBUM2715 User Manual

NCN5100 Arduinot Shield Evaluation Board User's Manual
EVBUM2715/D
KNX [3] is a popular open home and building automation standard ON Semiconductor has a series of transceivers that handle the low level communication.
The NCN5100ASGEVB evaluation boards are Arduino-compatible shields enabling rapid prototyping with a microcontroller of choice. All external components necessary for operating the transceivers are present on the shield. Plug it in a Arduino-compatible development kit and start developing!
FEATURES
Arduino Uno V3 compatible connectors
Compatible with a wide variety of microcontroller development
boards
Four on-board buttons/LEDs to build a dimmer application
Available in UART- and SPI-version
Fully KNX-compliant transceiver
Easily get started with KNX
Maximum bus current up to 40 mA
2
Two high-efficiency DC-DC converters
3.3 V fixed output1.2 V to 21 V variable output
Integrated 20 V linear regulator output
1
.
www.onsemi.com
EVAL BOARD USER’S MANUAL
Figure 1. NCN5100AS-1 Evaluation Board
OVERVIEW
The NCN5100ASGEVB boards come in three variants containing the NCN5110, NCN5121 and NCN5130 transceivers. The NCN5110 is a bit transceiver and all the timings are handled by the microcontroller. Both the NCN5121 and NCN5130 also implement the MAC layer, reducing the software development effort. All critical timings are handled by the transceiver.
All transceivers include two high-effciency DC-DC converters. One fixed converter generating 3.3 V, supplies the transceiver and other optional peripherals such as a microcontroller. The second DC-DC converter has an adjustable output voltage ranging from 1.2 V to 21 V
and can be used to supply peripherals such as, relays, a display, etc. ...
The Arduino shield form factor makes it easy to start developing; just plug the shield into a compatible microcontroller board and start coding. Thanks to the on-board buttons and LEDs, it is not necessary to plug in additional shields to start testing. A simple dimmer application can be set-up in no time with only the KNX Arduino-shield.
1
https://my.knx.org
2
For the NCN5130 and NCN5110 version. The NCN5121 goes up to 24 mA.
© Semiconductor Components Industries, LLC, 2020
October, 2020 Rev. 2
1 Publication Order Number:
Figure 2. NCN5100AS-2 Evaluation Board
EVBUM2715/D
EVBUM2715/D
Both the NCN5121 and NCN5130 come with an SPI and UART communication interface. The latter is fully TP-UART compatible, enabling the use of existing compatible software.
The boards are 2 layer PCB’s with single-sided assembly, demonstrating that it is possible to easily develop low-cost applications.
EVALUATION BOARD OVERVIEW
The main connectivity to the evaluation board is provided through the Arduino V3 headers which can be seen in Figure 1. This has the advantage that the board is compatible with a wide variety of microcontroller development boards. Refer to Appendix C
The KNX-Bus
, Table 6 for a list of tested platforms.
The KNX-bus consists of a twisted pair cable providing both data and power. The voltage on the bus varies between 21 V to 32 V (V
in Figure 3). Communication on the bus
DC
is done at 9600 baud asynchronously. A logic one is represented by the DC-level on the bus staying constant. For a logic zero, the bus is pulled 3 V to 10 V below the DC-level first. This is called the active pulse which has a duration of typically 35 ms. Following immediately after is the equalisation pulse. During this time, the voltage can swing up to 13 V above the DC-level and will decay exponentially in 69 ms.
V
BUS
V
eq
V
end
V
act
V
DC
Fan-in
Every device connected to the KNX-bus will draw current from the bus to supply the application. The KNX standard specifies the current should be limited to the real need. For every KNX-device the maximum current draw is specified in its datasheet according to the fan-in-model [1]. The fan-in-model is used to determine how many devices can be connected to one physical segment of the bus. All the ON Semiconductor KNX transceivers contain a built-in mechanism to keep the draw within the value specified in its datasheet. This makes sure that the device complies with the standard.
The fan-in pin sets the maximum current drawn from the bus. The transceiver will actively keep the current below the set limit.
Both transceivers (NCN5121 and NCN5130) have two pre-defined fan-in modes. These can be selected by either connecting the fan-in pin to GND or leaving it floating. Leaving it floating, the maximum bus current is limited to 10 mA. Tied to GND the limit is set to 20 mA.
The NCN5130 also offers an external fan-in mode. In this mode the current limit can be set linearly from 5 mA to 40 mA. This is achieved by connecting a resistor with a value of 10 kW to 93.1 kW to the fan-in pin. The fan-in-model [1] specifies discrete current classes. When designing the application and defining the current consumption, the next higher value of one of the classes must be selected. According to section 3.3 of the KNX test specification [2] the maximum allowed bus current consumption for a fan-in-model of 10 mA is 12 mA. For other fan-in models it is allowed to scale this value accordingly. For example, a 20 mA fan-in-model allows to draw 24 mA from the bus.
Active
Equalisation
pulse
35 ms
pulse
69 ms
Figure 3. Waveform Seen on the Bus when
Transmitting a Logical Zero
Figure 3 shows a typical waveform on the bus
representing a logical zero.
2 k
40 mA
10 k
Figure 4. The Different Fan-in Settings
www.onsemi.com
20 mA 10 mA
Pre-defined
fan-in
R
3
0
t
Linear range
External fan-in
Only for NCN5130
Table 1. RECOMMENDED FAN-IN RESISTOR VALUES
1. According to the fan-in-model [1].
2
I
bus,lim
R
3
11.4 mA 10 mA
0 W
10 kW
13.3 kW
20 kW
42.2 kW
93.1 kW
(Typical Values)
5 mA
250 k93.1 k
22.3 mA 20 mA
43.9 mA 40 mA
33.0 mA 30 mA
22.1 mA 20 mA
10.7 mA 10 mA
5.1 mA 5 mA
Pre-defined
fan-in
Current Class
(Note 1)
EVBUM2715/D
A list of recommended fan-in resistor values can be found in Table 1. For the listed resistor values, the corresponding current limits are specified in the datasheet.
If a resistor value is used, other than the ones specified in Table 1, the following formula can be used to calculate the corresponding bus current limit:
Buffer Capacitor
I
bus,lim
+ 4 10*4)
434
R
A
3
(eq. 1)
Besides the maximum allowed current drawn from the bus, the KNX standard also specifies at which rate the bus current is allowed to change. This requirement introduces the need for a large buffer capacitor. When the load current changes abruptly this capacitor must deliver the required energy. The KNX-transceiver will charge the capacitor again after the load step using a fixed current slope.
According to the KNX test specification [2] a device with a fan-in-model of 10 mA is allowed to change its current draw from the bus with a slope of 0.5 mA/ms. Section 3.3 specifies that this can be increased accordingly with the fan-in-model. The following formula can be used to calculate the allowed bus current slope:
DI
bus
+ 0.05ńms @ I
Dt
faninmodel
(eq. 2)
The datasheet (pages 1819) of the NCN5121/NCN5130 describes how to dimension the buffer capacitor. The KNX Family Efficiency Calculator
3
is a tool developed to help
customers with this dimensioning.
Common Mode Choke
If desired optionally a common mode choke such as the Murata 50475C can be mounted on the footprint of L1. This helps to block common mode disturbances, but in most applications, this is not required.
Before soldering the choke on the foreseen footprint of L1, the tracks shorting the component must be cut.
Figure 5. Wago 243211 Terminal Block
3
https://www.onsemi.com/pub/Collateral/KNX%20FAMILY
%20EFFICIENCY%20CALCULATOR.XLSM
Power
The board is powered through the KNX-connector. These two pins (KNX+/KNX- in Figure 9) mate with a typical KNX terminal block such as the Wago 243211, illustrated in Figure 5. No additional connection is required as the board will generate its own supply voltages. An input voltage up to 30 V is tolerated. Using a standard KNX power supply is the safest option as it generates the correct voltage and has a built-in protection.
It is possible to use a laboratory supply, but be sure to correctly set the output voltage to avoid damaging the board. By using a laboratory power supply, it is not possible to send messages on the KNX-bus. To enable communication on the bus, a special choke must be placed between power supply and development board. An example of such a choke is the Siemens GAMMA Choke N 120/02.
To power the microcontroller development board there are several options.
Most modern microcontroller development boards can be
supplied through the 3V3-pin, this eliminates the need for additional LDO’s, and lowers the overall power consumption. On the shield, there is always a 3.3 V supply present, which is also used to supply the KNX transceiver. This supply voltage can be routed to the 3V3-pin on the Arduino headers by shorting J11 (Figure 6).
Arduino-compatible development boards typically
accept a supply voltage of 7 V to 12 V, either through the on-board DC-jack (if present) or the VIN-pin on the headers. The shield can supply the microcontroller through the VIN-pin. When J10 is shorted (see Figure 6), the 9 V generated by DC-DC2 is routed to the VIN-pin. In this configuration, the whole system is supplied through the KNX-bus and no additional power supplies are required.
The microcontroller development board may be supplied
through an external supply. This occurs when debugging the board through USB with the KNX-connector disconnected. In this case remove both J10 and J11 (Figure 6).
Debugging
During the development of the application code it is very likely the microcontroller development board is powered through the USB connection with the PC while debugging. This introduces the risk that the KNX-transceiver is powered through the reset line. Current can flow from the NRST-output of the debugger into the RESETB-pin of the transceiver through the internal ESD diodes as shown in Figure 7. As a result, the NRST-line might be pulled low, resetting the microcontroller. This makes it impossible to debug the application.
www.onsemi.com
3
EVBUM2715/D
To avoid this situation a transistor is added in series with the NRST-line as shown in Figure 8. If the 3.3 V from the KNX transceiver is absent, the transistor does not conduct, and prevents current flow into the RESETB-pin. However, if the 3.3 V supply is present, it is still possible for the KNX transceiver to pull the NRST-line low. It is not necessary to
use this circuitry in the end application. In almost all applications, the microcontroller will be powered from the transceiver’s supply, and this situation will never occur.
KNX power supplies are isolated. This means that the KNX-ground is not connected to earth. On most microcontroller development boards the ground connection on the Arduino headers is connected to USB ground. The USB ground on a PC is always connected to the earth potential. So when connecting the development board to the PC the KNX-ground is connected to the earth potential. This might lead to the “pick-up” of interferences leading to communication errors. To avoid these it is a good practice to use an USB-isolator, such as the Olimex USB-ISO.
J11
J10
3V3 from DCDC1 to 3V3 on the Arduino headers
NCN5100 evaluation board
KNX
DCDC1
3.3 V
Powering External Circuitry
The transceiver’s 20 V LDO and DC-DC2 converter can be used to power additional circuitry, e.g. a relay. When additional shields are stacked, which take their power from the VIN-pin, these can be powered by connecting DC-DC2 to the VIN-pin. This can easily be done by placing J10 as shown in Figure 6.
If the additional circuitry is not a shield or if the shield is powered in another way, the three pin screw terminal can be used. Figure 9 shows the pin-out of this connector. It is also possible to power additional circuitry using DC-DC1. This converter delivers a fixed 3.3 V with a maximal output current of 100 mA, ideal to supply, for example, a microcontroller.
Arduino
3V3
NCN5100 evaluation board
KNX
NCN5100 evaluation board
KNX
DCDC2
20 V LDO
DCDC1
DCDC2
20 V LDO
DCDC1
DCDC2
20 V LDO
1.2 to 21 V
20 V
J11
3.3 V
1.2 to 21 V
20 V
J11
3.3 V
1.2 to 21 V
20 V
VIN
USB 5 V
J10
9V from DCDC2 to VIN
Arduino
3V3
VIN
USB 5 V
J10
Arduino motherboard supplied externally
Arduino
3V3
VIN
USB 5 V
5 V LDO 3.3 V LDO MCU (3.3 V)
5 V LDO 3.3 V LDO MCU (3.3 V)
5 V LDO 3.3 V LDO MCU (3.3 V)
USB from PC
Figure 6. Jumper Settings for the Three Possible Supply Configurations
www.onsemi.com
4
EVBUM2715/D
Arduino
Debugger
NCN5100 evalutation board
Vdd
NRST
RESETB
3V3
NCN5100
Figure 7. The Internal ESD Diodes Pulling the
NRST-line Low
NRST
3V3
Or use the KNX Family Efficiency Calculator
4
which can
be found on the ON Semiconductor website.
Inputs and Outputs
Arduino Header Pin-Out
Most of the buttons and LEDs are connected to digital pins on the Arduino headers. Two of the buttons and one LED are connected to analog input pins. This was done to keep the
2
I
C-pins free for other purposes. The same applies for the
TREQ-pin.
The SAVEB-pin is connected to a digital pin which has interrupt capabilities. This is necessary to provide a signal to the microcontroller as fast as possible indicating the bus voltage is dropping.
All the LEDs are connected to PWM-capable pins, allowing the application to dim the LEDs if desired. A complete net list for the microcontroller connections is given in Appendix A
, Table 4 and in Appendix B, Table 5.
NCN5110
RXD1
RXD2
SPI_MISO
SPI_MOSI
SPI_SCK
SPI_CS
SW3
LED4
SW3
LED4
SW1
SW1
LED2
LED2
SW4
LED3
SW4
LED3
SAVEB
LED5
SAVEB
LED5
TX
TX
RX
RX
NCN5121 NCN5130
R
1
560 W
Q
1
R
2
10 kW
RESETB
3V3
NCN5100
Figure 8. The Transistor Q1, Prevents Current Flow
when the 3.3 V is Not Present
Adjusting the DC-DC2 Output Voltage
DC-DC2 is adjustable and can be configured to generate a voltage between 1.2 V to 21 V. This enables supplying a very wide range of applications. By default, the output voltage is set to 9 V. This makes it suitable to supply an Arduino-compatible development board, which typically accepts an input range of 7 V to 12 V.
To adjust the output voltage the values of the feedback resistors must be changed. These are located at the bottom left corner of the PCB, making them easily resolderable. The required resistor values can be calculated from:
* 1.2
V
R18+ R22@
VDD2
1.2
(eq. 3)
AVDD
GND
D13
D12
D11
D10D9D8D7D6D5D4D3D2D1D0
CH1 CH2
SW3 SW4
LED4
SW1 SW2
LED2
GND
GND
VIN
A0
ANAOUT
TXD
NRST
IOREF
RESETB
RESETB
3V3
5V
A2
A1
SW2
TREQ
SW2
LED5
LED3
A3
A4
S1
LED6
S1
LED6
LED1
Power
KNX*
KNX+
XCLK 8 MHz / 16 MHz
Programming
button/LED
LED6
S1
D15
D14
Figure 9. Evaluation Board Connectivity
(KNX-Shield)
4
https://www.onsemi.com/pub/Collateral/KNX%20FAMILY
%20EFFICIENCY%20CALCULATOR.XLSM
Arduino
GND 9V 20V
Arduino
A5
NCN5121 NCN5130
NCN5110
www.onsemi.com
5
EVBUM2715/D
User Buttons and LEDs
The shield has 4 on-board push buttons (SW1...4) and 4 LEDs (LED2...5) to enable the development of switching apps in particular. For a dimmer application the four buttons are split into two groups marked on the PCB as channel1 and channel2 (CH1/CH2). The upper button in the channel is used to dim up, whilst the other one is used for dimming down. Refer to Appendix A
, Table 4 and Appendix B, Table 5 to see how these are connected to the I/O pins of the microcontroller.
It is possible to stack other shields containing I/Os which are used for the end application. Remove R26R29 and R33R36 if the buttons or LEDs conflict with the pin-out of the other shields used.
Programming Push Button and LED
To assign an individual address to a device in a KNX-network, the device must be put into programming mode. The simplest way to do this is by pressing the programming button (S1). LED6 indicates if the device is in programming mode.
It is possible to customize the entering in programming mode e.g. pushing two buttons simultaneously.
Microcontroller Clocking
NCN5130 and NCN5121 have the capability to deliver a clock signal to the microcontroller. This clock signal is available on the XCLK-pin of the transceiver and routed to a 2.54 mm header pin on the shield (See Figure 9). Because the Arduino headers do not foresee a dedicated pin to pass clock signals, it is mandatory to route this signal manually to the microcontroller. This is only necessary if it is desired to use this signal to clock the microcontroller. In most cases the microcontroller will be clocked from its internal RC-oscillator or from an external crystal.
By default, the clock signal on the XCLK-pin is 16 MHz. It can be changed to 8 MHz by tying the XSEL-pin to ground: De-solder R23 and solder a 0 W resistor on the pads of R30.
Digital Communication Interface
Both the NCN5121 and NCN5130 implement the mac layer of the OSI model as shown in Figure 10. They will handle the coding and decoding of messages, sending acknowledges, etc... Critical low level timings such as the duration of the active pulse are all managed by the transceiver. The transceiver makes sure that the collision avoidance
5
is handled correctly without any intervention by
the host controller. This greatly reduces the software development effort. To communicate with the mac layer both a UART- and SPI-interface are supported. Note that
5
CSMA/CA: Carrier-sense multiple access with collision avoidance.
when the transceiver operates in SPI-mode it acts as the master. The microcontroller must support slave mode in order to be able to communicate with the transceiver. To select in which mode the KNX-transceiver operates (UART or SPI) the MODE2-pin is used. When tied to GND using R32, the transceiver operates in UART-mode. Tying it to
V
using R25 puts the transceiver in SPI-mode.
DD1
7
6
5
4
3
2
1
Figure 10. Placement of the Transceivers
Application layer
Presentation layer
Session layer
Transport layer
Network layer
Logic link control
Data link layer
Media access control
Physical layer
in the OSI Model
Host controllerNCN5121/30
560 W resistors protect the I/O lines going to the
microcontroller. Depending on which resistors are mounted either the UART or the SPI-lines are connected. If desired it is possible to transform a UART shield into SPI and vice versa by soldering/de-soldering the resistors as listed in Table 2.
Table 2. COMMUNICATION INTERFACE RESISTOR MOUNTING OPTIONS
Communication Interface Resistor Mounted
UART R16, R17, R32
SPI R9, R11, R12, R13, R15, R25
Table 3. SELECT THE RIGHT BAUD RATE USING J1/J2
J2 J1 Parity Bit Baud Rate
0 0 even 19 200 bps
0 1 even 38 400 bps
1 0 none 19 200 bps
1 1 none 38 400 bps
www.onsemi.com
6
EVBUM2715/D
Selecting The Baud Rate
Jumpers J1 and J2 allow easy configuration of the baud rate and parity. This is only used in UART-mode. In SPI-mode, the communication speed is fixed to 500 kbps.
To make the UART-communication more robust, it is possible to enable the transmission of an even parity bit with every data byte. For the complete settings refer to the silkscreen on the shield or to Table 3.
Analog Communication Interface
The NCN5110 transceiver doesn’t contain any digital functionality, implementing only the physical layer of the OSI model. Both the TXD- and RXD-lines are directly connected to the KNX-transmitter/receiver.
Pulling the TXD high will make the transceiver drop the bus voltage as shown in Figure 11. Once the transmit line is pulled low again, the transceiver will put an equalisation pulse on the bus. The duration the bus voltage stays by an amount of V
below VDC, is determined by the
act
microcontroller. As a consequence the microcontroller is also responsible for collision detection and avoidance. As well as the encoding and decoding of messages, sending acknowledges, etc... must be implemented in the microcontroller, increasing the software complexity.
The RXD-line will become high when an active pulse is detected on the bus. As the transceiver also receives the data itself transmitted on the bus, this line will also become high during transmission.
V
BUS
V
eq
V
end
V
act
Active
Equalisation
pulse
TXD
&
D12 D11
pulse
35 ms 69 ms
TXD/RXD
[V]
3.3
0
Figure 11. Communication with the NCN5110 and the
Corresponding Levels on the KNX-Bus
V
DC
t
t
Enable Interface
The timing of the pulses which drive the NCN5110 are extremely time critical. Some microcontroller families have special timer modes which can be used to generate the correct pulses. Using these modes, would limit the use of the software to a certain microcontroller family.
An AND port combines the signals coming from D11 and D12. The schematic is shown in Figure 12. It provides a mechanism to set and clear the transmit signal, without the use of special timers only available in specific microcontroller families.
Two timers can be used, one to generate a rising edge, the other to generate a falling edge. Both signals are combined to create the desired transmit signal as shown in Figure 13.
Both input pins of the AND port are pulled low. This ensures that during the startup of the microcontroller, the transceiver won’t transmit.
&
Figure 13. Combination of a Rising and Falling Edge
to Create the Transmit Signal
PCB LAYOUT GUIDELINES
When designing a PCB for the KNX-transceiver it is important to take certain layout aspects into consideration. The following good practices will help to improve the EMC performance of the whole application. The Arduino shield is a two-layer PCB, with the main ground plane on the bottom layer. Empty space on the top layer is filled in with ground copper, but this is not a ground plane.
DC-DC Converters
Electromagnetic interference is dominated by the DC-DC converters. These converters switch at frequencies around 300 kHz. Without due consideration for PCB layout, radiated emissions can become a serious issue.
Figure 16 shows an example schematic of an inverter driving a capacitive load. The PCB tracks going to and coming from the load will act as an inductor at high switching frequencies. The return path can be the common circuit ground, but this is not always the case!
When constructing the PCB layout it is very important to pay attention to the signal return path.
The first situation in Figure 14 shows a single-layer design. Here the signal and return path form a large loop, which will act as an antenna at higher frequencies.
2 x 10 kW
Figure 12. An AND Port Can be Used to Combine the
Signals Coming from Two GPIO Pins
www.onsemi.com
7
EVBUM2715/D
Singlelayer design
Signal
Return
Singlelayer optimized
Signal
Return
Figure 14. Optimizing the Return Path in a Single-layer Design
Duallayer design
Signal
Duallayer optimized
Signal
Return
Return
Figure 15. Optimizing the Return Path in a Dual-layer Design
Inverter Load
Signal
Z
PCB
Return
Z
PCB
Figure 16. Inverter Principle Schematic Showing
a Critical Current Loop
This layout can be improved significantly by routing the signal and return path close to each other. They should be routed as if they were a differential pair.
In most circuit designs, the return path for most signals is the common circuit ground. For these circuits using a two­or four-layer PCB with the main ground on the bottom- or inner-layer is the recommended choice. It simplifies the layout work and makes it much easier to create optimal return paths.
Still care has to be taken during the design, as it is easy to overlook common mistakes. Figure 15 shows a situation
where there is a slot in the ground plane. The return path now goes around the slot creating a slot antenna.
Ideally the bottom ground plane should never be
interrupted.
Figure 17 shows the current loops for the two DC-DC converters on the Arduino shield. All the components on the shield are placed and routed to minimize the loop surface areas.
When the DC-DC converter switches on its top transistor, the instantaneous current spike is drawn from the small 100 nF capacitor C8. As these current spikes are short, they will have a high frequency. So the most critical loop, is the current flowing from C8 into the parasitic capacitance at
V
as shown in red. To keep this loop very small, C8 must
SW
be placed as close as possible to the VIN-pin. If possible, place it right next to it as in Figure 18.
Keeping all the tracks on the top layer avoids any disruptions in the bottom ground layer and resistance/ inductance being added by vias. The two grey arrows show the larger current loops created by the DC-DC converter. These should also be kept as short as possible to minimize radiated emissions. Figure 18 shows the optimal layout, used on the shield, to keep these loops small.
www.onsemi.com
8
EVBUM2715/D
The larger buffer capacitor C9 can be placed further away from the VIN-pin, as long as the small ceramic capacitor C8 is placed very close to it.
Vin
C8
KNX+
KNX*
D1
D2
L3
Cpar
R21
C12
Vsw
Figure 17. Schematic Showing the DC-DC Converter
Current Loops
VDD2
C11
R20
VDD2MC
VSS2
VSW2
VIN
VSW1
VSS1
C8
VDD1
VDD1M
R21
C12
To VBUS
D1
D2
Figure 19. Wrong Layout for the TVS Diode
D2
KNX+
KNX*
D1
To VBUS
D1
D2
L2
L3
Figure 18. DC-DC Converter Current Loops on the
Arduino Shield
TVS Diode
It is important to optimize the layout of the Transient Voltage Suppression (TVS) diode in order to effectively protect the transceiver against surges. When a surge occurs, the TVS diode must clamp the voltage to a level which doesn’t damage the transceiver. To achieve this, the series resistance should be as low as possible.
This can be done by connecting KNX-directly to the TVS diode before being routed to the rest of the PCB ground as shown in Figure 20. This ensures that the current path to the TVS has the lowest resistance and no transient current will flow to the transceiver.
Figure 20. Optimal Layout for the TVS Diode
GETTING STARTED
The Arduino shield comes with demo software developed by Tapko Technologies GmbH. The software includes a demo version of KAIstack which runs on a STM32F103-NUCLEO board. This software contains all the necessary software components to connect to the KNX-bus and comes with a variety of demo applications. The demo version of KAIstack can be used to start developing custom application software.
The following limitations apply to the demo version:
Limited to 16 group addresses, 16 associations and 16
communication objects instead of 255.
Application interface objects have been removed.
The rout-count is set to zero in the network layer, limiting
the application use to only one line.
There are no repetitions on the transport layer.
It is not possible to change the individual address of the
device through ETS.
Only one derivative is supported.
www.onsemi.com
9
EVBUM2715/D
Prerequisites
Listed below are all the components needed to construct
a small KNX-network with the NCN5100ASGEVB.
KNX power supply (including a choke).
USB-KNX interface to communicate with ETS on the
PC.
A demo version of ETS.
STM32F103-NUCLEO board to plug the shield into.
Any version of the NCN5100ASGEVB.
Figure 21. Hardware Modifications on the Top Side of
the Nucleo Board
To meet the timing requirements to communicate on the KNX-bus, it is mandatory to have a more accurate clock than the on provided by the internal RC-oscillator of the microcontroller. Two options are suggested below.
Placing a Crystal
Mount a crystal in the X3 footprint on the Nucleo board. This crystal must have a frequency of 16 MHz. For the recommended value of the loading capacitors C33/C34, refer to the datasheet of the crystal. A good crystal is the 9B-16.000MEEJ-B, which needs loading capacitors of 18 pF.
To get the crystal working on the Nucleo board the following configuration is required (Figures 21 and 22):
Place 0 W resistors at R35 and R37.
Solder the loading capacitors on C33 and C34.
Remove the 0 W resistor at SB50.
Solder the crystal on X3.
Apply An External Clock
The second option is to use an external clock.
Use the XCLK-output of the KNX-transceiver as a clock input for the microcontroller. By tying the XCLKC-pin high/low a clock frequency of 16 MHz or 8 MHz can be selected. By default on the Arduino shield, the XCLKC-pin is pulled high, meaning a clock signal of 16 MHz is present on the XCLK-pin. This method has the advantage that the complete application only needs one crystal.
To use the XCLK-output as a clock signal, the following configuration is required:
Place a 0 W resistor at SB55.
Remove the 0 W resistor from SB50.
Connect the XCLK-pin on the Arduino shield to pin 29 of
CN7 on the Nucleo board. Do this using a wire which is as short as possible.
UART Communication
On the Nucleo board the USART2 interface is by default used to communicate with the on-board ST-LINK. This means that it is not possible to use D0 and D1 on the Arduino headers for UART communication, as they are not connected.
To enable UART communication on the Arduino headers execute the following steps (Figures 21 and 22):
Remove the 0 W resistors from SB13 and SB14.
Mount 0 W resistors at SB62 and SB63.
Figure 22. Hardware Modifications on the Bottom
Side of the Nucleo Board
Hardware Modifications
To get started with the demo software, a NCN5110, NCN5121 or NCN5130 Arduino shield is required in combination with a STM32F103-NUCLEO board. In order to get the software running on the microcontroller, a couple of hardware modifications are required.
www.onsemi.com
These steps will disable the communication between the microcontroller and the ST-LINK. Then it is no longer possible to use the Virtual COM-port on the Nucleo board. To keep using the Virtual COM-port, connect another USART peripheral to the ST-LINK. USART3 is a possible candidate which can be used by connecting two wires as follows:
Connected pin 1 of CN7 (PC10-USART3_TX) to the RX
pin on CN3.
10
EVBUM2715/D
Connected pin 2 of CN7 (PC11-USART3_RX) to the TX
pin on CN3.
Setting Up A Network
Once the STM32F103-NUCLEO board is ready, a small network can be set up to get started with the NCN5100ASGEVB.
Connecting Power
There are several options to power the Nucleo board. Refer to Section Power for all the possible configurations. To get started, remove the jumpers J10 and J11 from the Arduino shield and place JP5 on the Nucleo in the U5V position. This way the microcontroller will be powered from the USB port while the KNX-transceiver is powered from the KNX-bus.
To power the complete solution from the KNX-bus, place J10 on the Arduino shield and JP5 in the E5V position on the Nucleo.
Figure 24. Picture of the Practical Setup
ETS
KNXPSU
USBKNX interface
NCN5100GEVB
Figure 23. Minimal Network Setup
KNX bus
UART Communication
The demo software from Tapko communicates with the transceiver at 19.2 kb/s using an even parity bit. Place J1 and J2 in the ‘0’-position to select the correct communication speed.
Building The Network
A minimal network setup consists of a KNX power supply, KNX USB-interface and the NCN5100ASGEVB. This setup is displayed in Figure 23. The KNX USB-interface is used to configure the NCN5100ASGEVB through ETS and to send and receive messages.
After setting up the network, connect the USB coming from the KNX USB-interface and the Nucleo to the PC. The physical hardware setup is now complete.
Installing The Software
The microcontroller demo software can be found on the ON Semiconductor website [5]. Download the software, unpack it and execute the installer.
The installer will first ask in which folders to install the software. The first folder will contain KAIstack, the compiler, software examples and the documentation. In the second installation folder, some additional tools and the documentation for KAIstack are installed.
Figure 25. Selection of the Installation Folders
Figure 26. Select which Components to Install
www.onsemi.com
11
Loading...
+ 25 hidden pages