LTE IoT Add-On Kit and Arduino IOREF

Solved
jrecchio's picture
jrecchio
Junior(1)

The hardware manual for this chip says that the shield is made to interface with arduino, and that the shield standard is 3.3V. However, the arduino uno is a 5V device. The IOREF pin on the arduino is set to 5V, but the IOREF pin on this shield is connected to 3.3V. Is there a different arduino aside from the uno that has the R3 pinout form factor but runs at 3.3V? It seems like there will be problems using it with an uno at present.

 

LightCollector's picture
LightCollector
Moderator(18)

Hi, The shield was designed to work with the k64f freedom board which is 3.3v.  I am not familiar with the uno board but sometimes 3.3 and 5v can be mixed.  You will need to look into the following:  the compatible voltages for the uno as well as the cell shield schematics and specifically the level translator chips to see if they are compatible.

 

Best Regards.

 

 

teknomike's picture
teknomike
Junior(0)

There are 2 ways to approach this, but neither addresses the biggest issue (more about that later in this comment). You can either use a standard 5V Arduino board plus a "logic level converter" (available on Amazon, eBay and other sources) to perform the conversion from 3.3 to 5 V for each pin -- typically these modules can handle 4 separate pins and you actually only need 2 (TX and RX) for the Arduino to LTE shield interface. Or you can use a 3.3V Arduino board from an alternate supplier (such as the 3.3V "Arduino Pro Mini" from Adafruit or Sparkfun, which always work well, or from alternative suppliers on Amazon or eBay, which have also worked well for me) and connect directly to the LTE shield -- but in this case all your GPIO will be 3.3V and your Arduino board IDE interface also is unique and there are plenty of learning hurdles in there. Plus, the 3.3V Arduino board pinouts are different and don't match the LTE shield -- so you'll be jumpering everything -- and you might end up using a logic level converter anyway to interface to typical Arduino sensors. Unless you have good Arduino expertise, it's easiest to stick with a standard 5V Arduino Uno R3 and work out from there.

But the biggest issue with using an Arduino with this LTE shield is you really need the libraries to simplify control and use of the LTE shield -- otherwise it's a very complicated item indeed -- and I haven't been able to find any such libraries for this board yet. Connection to the LTE network is complicated and specific, and if you don't get it just right your connection will be rejected. The library should have all of this already developed, but so far I can only find libraries for this LTE board that support the Raspberry Pi and ARM MBED environments -- not Arduino. Will comment back here if I find anything.

teknomike's picture
teknomike
Junior(0)

Update -- just found this comment on the FAQ page (https://starterkit.att.com/faq#other-microcontrollers ): "Currently, there is no software library for Arduino itself, however. You could implement your own using the AT Command Guide on the Resources page." Note: that AT Command Guide is huge; probably the best way to determine the proper set of AT commands for specific objectives is to deconstruct what's already in the RPi and FRDM board libraries....

LightCollector's picture
LightCollector
Moderator(18)

Our mbed WncControllerLibary and WncControllerK64F libraries should be able to pretty easily port to Arduino and it has most of the functional commands at least for passing data back and forth and setting up the modem.  You would take the base class WncControllerLibrary and build an Arduino class on top of it using the WncControllerK64F as an example.

 

We are in the middle of upgrading these to mbed 5, the tagged revisions work with earlier version of mbed OS.  You can find these libaries and more here:  https://developer.mbed.org/teams/Avnet/

 

Best Regards

jrecchio's picture
jrecchio
Junior(1)

Thanks for the help, I'm in the process of porting the code to arduino.  I ran into a specific problem with the "WncControllerK64F::initWncModem" function.  In the FRDMK64F example code they don't really add any extra delays in here. When I run the code on Arduino, though, I need to wait ~28 seconds after re-enabling the LTOE signal for my commands to receive responses.  Any clue why this is the case?

LightCollector's picture
LightCollector
Moderator(18)

It does take the modem a while to boot up, inside of the device is an ARM core running a Linux variant.

 

After initializing the GPIO's to turn on the level translators and also to boot the 14A2A into a mode that uses the serial uart, the K64F code does then sit and wait until it sees an OK response to the 'AT' command.  There is a timeout, I think I have it set to 45 seconds, or maybe it was 60 seconds (it's configurable at a certain level).  If it doesn't see an OK response by the timeout it assumes it's not working correctly.

 

To my recollection, 28 seconds sounds about right for how long it takes to boot up...

 

Best Regards

LightCollector's picture
LightCollector
Moderator(18)

Hi,

 

I see what you mean now, in the K64F by itself it doesn't have the timeout, you should look at WncInterface (or any of the other application programs) to see it in use, I will add a comment about how long to wait for the next release to make it clearer to somebody using it stand-alone!

 

Again 28 secs is correct!

 

I can't think of anything else to do EXCEPT make sure you either have the APN set on your 14A2A already or do it with the set APN method for the WncControllerLibrary class.  For now it should/must be set to "m2m.com.attz".  Once the APN is set it sticks in non-volatile memory.

 

Best Regards