We have launched a new Community! Please post any new forum topics there. This forum will remain available as an archive, but we hope you enjoy the new experience and feature set the latest NCD Community will offer!

ZADR45PROXR_USB and COM modules

I have the ZADR45PROXR_USB board made in 2012 with the USB COM module. If I want to change the COM module to, say WiFI or Ethernet, do I simply purchase that module and swap the module for one or the other (I understand I will have to code for the specific module, I'm just talking about the hardware). 

Or, do I have to purchase a new ZADR45PROXR_USB board?

I noticed there was a "ADHOC" jumper on the new boards as well. What's that for? My board does not have that jumper.

Gerald

T

Hi Gerald,

If you have a ZADR45ProXR then you can just purchase a WiFi module for it for sure.  However I am not sure if your board has the 12VDC pin for Ethernet or not.  Is there any way you can post a photo of the XBee socket on the board(that's where the USB module is plugged in) without the USB module installed?

G

G

Also, I'm trying to learn API Codec. In the quick start page, there is a reference to help "users better-understand the API Codec, a new control panel was created that allows you to enter commands in Standard Format and encode/decode the responses.  This is a valuable learning tool for users who may wish to learn and troubleshoot the API Codec.:" However, I cannot find that control page anywhere in Basestation. Where is it located?I have not been able to figure out how to add up the checksum using the API Codec. It may be easy for you, Travis, but I can find nothing about the math function "AND" or how to use it. If I google it, it just thinks it is adding the two numbers.  Can you direct me to more detailed information about how that function works or help with a better explanation? I use Visual Studio, so how would the API be used in that environment? I couldn't find any documentation in the library command  set. Or do I just code to connect to the port after the board is configured using the SB Configuration Adapter so it connects to the WiFi wireless router?

T

Hi Gerald,

Yes, that board has the 12VDC pin required for the Ethernet module so you should be able to plug in an Ethernet module.

The API codec is dependent on the ProXR Enhanced firmware.  To check if your controller has the ProXR enhanced firmware locate the 20 pin Pic chip installed in the board.  If it says Pic18F14K22 then it has enhanced firmware, if it says Pic16F690 then it has the older ProXR standard firmware and is not compatible with the API Codec.

G

Yep, it has the Pic18F14K22  chip.

What about the rest of my questions? I need some help learning the API Codec, particularily figuring out how to add the checksum and that missing control panel referenced. But does the visual studio library use the API? Do I need it at all?

T

Hi Gerald,

Just wanted to confirm that before we went much further.

So here's a basic breakdown of how the API codec works.  To begin here is an API formatted byte array which is the command to turn on relay 1:

170, 3, 254, 108, 1, 24

The first byte(170) is the API codec header byte.  Every API encoded command frame will start with a 170 byte.

The second byte(3) is the length of the command being sent(254, 108, 1 in this case).

The next 3 bytes are the command we are sending to the board.  We are using 254, 108, 1 which is the command to turn on relay 1.

The last byte in the packet(24) is the checksum.  This is calculated by adding all previous bytes and then anding them with 256.  Like this(sudo code):

byte checksum = (170+3+254+108+1)&256

Let me know if you have any questions on this.

G

How does the visual studio command send commands such as:

NCDComponent1.ProXR.RelayBanks.TurnOnRelayInBank(1,1)

Does it send it as 170 3 254 108 1 24 ? If so, then I really don't need to be concerned about bytes at all, do I?

G

Travis,

Before we go further with this, I need to see if it is really even feasible, from a practical standpoint, to use this module for our end users. The relay board is inside a sealed case, pre-wired for end users for relays and thermistors. If the only way to configure the WiFi is to remove the board from the case, and plug it into the ZIGMO adapter so it can be configured to the end user SSID of choice, and then replaced on the board, (with it configured to AutoConnect on boot up), I don't think this will work. 

Am I correct? Is there any other way to connect to the WiFi module with it installed on the relay board so the end user can configure it? I know Microchip makes other boards that have the USB port built in. Are any compatible with your boards so we wouldn't have to use the ZIGMO adapter, if that is required every time the end user wants to change the SSID? 

T

Hi Gerald,

The NCD Component sends commands that are not API encoded I believe.  I do not code in VS all that much so I cannot say for sure.

It is required that the WiFi module be removed from the board and installed in a configuration board in order to set it up for the user's network unfortunately.

Can you tell me a bit more about your application and what you need the device to do?  Perhaps we can suggest an alternative product.

G

It does exactly what the ZADR45PROXR_USB board does. We use the relays to turn on heaters and fans and monitor the ambient and other temperatures using the A/D ports. We have a sizable investment in time in developing an application using your NCD Component in VS, so it would have to be compatible with that. I don't want to re-invent the wheel, particularly one that took a lot of work to do.

 

It would be ideal if there was some way you could use a compatible chip from Microchip (or have one made that would be) that would allow an end user to connect using USB so the board could be configured, and then disconnect once the board is configured. Realistically, having to remove the board to configure it makes it a non-starter as most end users won't have the skills or desire to do that in the field every time the WiFi needs a new configuration.

 

T

You should be able to retrofit your application to use a TCP socket connection to pass commands to the WiFi board rather than over the COM port you used for the USB boards.

We are working on a new line of relay controllers which use this WiFi module:

https://store.particle.io/products/photon

It will do pretty much everything you are looking to do it sounds like.  We hope to have this line of products out early this year.

G

That sounds very promising. I'll wait for the new line as the current method of removing the card really is not practical for end users where the board is not easily accessible.

Thanks. I look forward to the new product line. I'll check back occasionally on your site, unless you can sign me up for some kind of notice when the product line is launched.

Gerald