Intro to the N20K48 WiFi module - Novus Cloud

Free Shipping! - USA Orders Over $75

Customer Reviews

Intro to the N20K48 WiFi module - Novus Cloud

Description

The N20K48 WiFi module turns this powerful PID controller into an IoT device suitable for a wide range of applications. In this video, we'll walk through how to get started with using the WiFi Module for communication with Novus Cloud through MQTT.

IOThrifty N20K48 WiFi bundle - https://www.iothrifty.com/products/temperature-process-controller-with-wifi-connectivity

Getting Started with the N20K48 - https://www.youtube.com/watch?v=GVZczL65wnw

Intro to the N20K48 WiFi module - TCP/IP Communication - https://youtu.be/5UAfl9mJaDU?si=gRB97OULieCGBg8f

Registers Table - https://cdn.novusautomation.com/downloads/communication_protocol_n20k48_v10x_a_en.pdf

Novus Cloud - https://iot2.novusautomation.com/

 

Check out IOThrifty's line up of PID Temperature Controllers.

Transcript

Overview

The N20K48 is a versatile and affordable PID controller. It’s built with extensibility in mind through plug and play modules that connect to the main controller through a dock. The latest module that was released is the CG-Wifi Module. This powerful new module turns the N20K48 into an IoT device that can perform signal acquisition through the cloud. This allows for remote access and monitoring via WiFi which wasn’t before possible.

In today’s video, we’ll show you how to set up, configure, and access the N20K48 via the cloud through Novus Cloud. If you don’t have much experience with the N20K48, it might be helpful to check out our video on how to get started with the N20K48 or check out our previous video on the WiFi module to learn how to use the N20K48 with WiFi over modbus TCP/IP.

Hardware Setup

In order to use the N20K48 with Wifi Connectivitiy, you’ll need the N20K48 Controller, the CG-DOCK Module Expansion Chassis, the CG-WiFi ClickNGo Module, and the WiFi Antenna.

IOThrifty sells the N20K48 with Wifi Connectivity as a package that includes everything you need to get started or you can purchase the controller and each of it’s accessories separately.

First connect your dock to the N20K48. Then Connect the Wifi Module to the dock. The Wifi Module will take up two slots in the dock. Last, you’ll need to screw your antenna onto the back of your Wifi module.

Once you’ve done this, you’re ready to configure your device.

Configuration

The N20K48 supports wireless communication by Modbus TCP/IP and MQTT protocol. To set up communication you must first configure the N20K48 through the QuickTune desktop app via a USB cable or through the QuickTune mobile app via bluetooth. Today, we’ll be using the desktop app to configure the N20K48 to communicate over the MQTT protocol which is what we’ll use to connect to the Novus Cloud.

Before you get started with QuickTune, make sure your device is plugged into your computer’s USB port.

When you open QuickTune, the first thing you’ll want to do is select Read Device. You should see your device display on the screen. Click on that.

It may take a few seconds to update your configuration data.

Before doing any configuration, it’s important to note that you may need to update your firmware. In order to use the WiFi module, the N20K48 must have firmware 103 or higher. You can update the firmware by clicking on the Firmware Update button in Quicktune and choosing the correct version. We’re currently on version 103 so we’ll proceed with configuration.

First let’s head into the Cycles tab, we’ll set a setpoint to 20 degrees. This isn’t required for Wifi configuration, but we’ll use it to demonstrate how you can read from your controller later in the video.

We’ll also want to ensure that our controller is set to read a thermocouple input. You can set this on the Analog Input tab. We’ll change sensor type of the main input to a K type thermocouple or Tc k.

Now let’s jump over to the features tab. If you’re familiar with QuickTune, you’ll notice that there are a few new tabs at the end. We’re going to start with the WiFi Communications tab.

Set Enable CG-Wifi Module to activated. Once you do this a number of other options will show on this tab.

Set Enable AP mode to Disabled - Using AP mode means that your controller will become the access point.

Your Access Point SSID will be the name of your wireless network

Access Point Password is the password of your wireless network

Set your obtaining IP Address to DHCP because we’ll be using Dynamic IP and let our network server assign the IP.

Set Enable Modbus TCP Server to No. To learn about how to use the N20K48 with Modbus TCP/IP check out our previous video which is linked to in the description.

Now let’s head over to the MQTT tab. MQTT is the protocol that the N20K48 uses to pass data to the cloud. With Quicktune you can specify a custom broker to connect to, or you can use Novus Cloud, the software created by the manufacturer of the N20K48. For this video we’ll show you how to connect to Novus cloud.

We’ll set Enable MQTT function to yes. Once this is done, several new options will display.

For the purposes of this video we’re going to set the cloud type to Novus cloud, but as mentioned earlier, you can also use a generic broker.

The broker address for Novus cloud should be mqtt.tago.io

The next field is device token. You can get this from Novus cloud. Let’s jump into Novus cloud and walk through that. Don’t close out of Quicktune, we’ll come back momentarily.

To access Novus Cloud you can sign up for a free account. They offer free use with one device for a year.

We’re already logged into our account. Next we want to create a new device. To do this, we’ll give our device a name, then select the model which is N20K48 in our case. Once we select the model it will ask us to add the serial number which can typically be found on a sticker on the device. Once complete hit the Create Device button on the bottom right of the screen. I’ve already added my device so I’m not going to hit Create Device. Once your device has been successfully created, head over to the management screen. You should see your device listed. You’ll want to copy the device token and head back into Quicktune.

Paste the device token that you copied from Novus Cloud in the device token field.

Make sure your service port is set to 1883.

Now we’re going to head into the MQTT Channels tab. Here were going to set the registers we want to reference remotely. In our case we’ll want to set the Process Variable, which is our temperature reading, and the set point.

In order to do this, we have to know which registers these represent. To figure that out we’ll need to reference the registers table which can be found on the Novus website.

The registers table shows you the address or register for controller data. In our case we want to find the process variable, typically abbreviated as PV and the Set Point, typically abbreviated as SP. On the N20k48 registers table these live at address’s 201 and 200.

Now let’s head back into QuickTune and add our two channels.

Click the add channel button. We’ll give this a tag of PV. The source is the N20K48 and the register we’ll be using is 201. Everything else looks good so let’s click OK.

Now we need to add our Set Point channel so we’ll click add channel again. We’ll call this one SP. The source is the N20K48 and the register is 200. Let’s click ok to add the channel.

Once all of those settings are properly filled out, you should be properly configured to communicate with your device over MQTT and read values from Novus Cloud. Let’s send those changes to our device, by clicking send to device in the bottom right.

Once that’s complete, Quicktune will have a valid IP address for your device. You may not see it immediately, but if you return home, then head back into your device, then back into the Features, WiFi Communcations tabs you should see it.

Novus Cloud

We’ve disconnected our controller from the USB port. We’ve also hooked up our controller to power and our type k thermocouple which is reading reading room temperature.

Earlier in the video, we set up a device in Novus Cloud and entered it’s device token into QuickTune. Now we’re going to try to read the process variable and setpoint from Novus Cloud.

First, head to the management tab. Then create dashboards and widgets, then select create dashboard. We’ll just name our dashboard “test”.

Now we’ll want to add a widget to our dashboard, so we’ll select Create Widget. We’ll set the dashboard to “test” and name the widget, “read PV”. For the type, we’ll use display, but Novus cloud has a lot of options and we’d encourage you to select whatever works best for your use case. Then we’ll set the device to the device we created earlier, and the variable to PV which is the value we entered into quicktune representing the process variable earlier in the video.

Now let’s do the same for SetPoint. Again we’ll want to select Create Widget, then we’ll want to add it to the “test” dashboard. We’ll give it a title of “read SP” and a type of display. We’ll set the device to the device we configured earlier. The major difference between this Widget and the Widget we just created is that for this widget, we’ll use the variable SP which represents our setpoint.

At the time of this recording, Novus Cloud can only read values via MQTT, it cannot write them.

Let’s check out our dashboard and ensure that the values are properly being read.

We can access our dashboard by clicking on the dashboard name. Once we get on the dashboard you’ll notice that we only have one widget in the viewport. This threw us off at first, but the other widget was dropped to the bottom of the page, so you just need to scroll down to see it.. To bring the widget into the desired position, we can enter edit mode and just move the widget.

You can see that both values in the widget match what we’d expect to see and we were able to successfully read from the cloud.

We hope you enjoyed this video. All of the links we referenced should be posted in the description. If you’d like to purchase an N20K48 with Wifi Connectivity, head over to IOThrifty.com where you can always find great deals on quality brands.