Hey friends! I just got my AVR-IoT mini board and was excited to get started!
This is a guide for getting started with the AVR-IoT Cellular Mini.
It combines some of the instructions from a few of the official docs in a more concise manner. See the links at the end for the official docs.
The kit from Microchip comes with the dev board, antennae, and sim card.
The kit comes with a nice prepaid sim card from Truphone. Nice!
I opened up the sim and noted the number on the card. You will need that later to register the SIM card.
Inserting a SIM card can be a bit confusing if you haven't done it before. I've shown the correct orientation in the picture below.
Slide the SIM card into the holder on the back side of the board as shown.
Push the sim card in all the way until it's fully inserted.
Side note - I love that this board includes solder pads for an eSIM integrated circuit. That is almost essential for a company that wishes to use this type of board in a real product or a high-reliability area. Sim cards can easily vibrate out or degrade due to thermal cycling etc on a board like this.
AntennaNow to attached the included antennae.
If you haven't attached an antennae cable before, it can be a bit tough. The first step is to align the two connectors as shown. It's easy to break the connector or cable if the alignment isn't quite right, so do a double check!
Push firmly and make sure the connector seats properly and is flush with the board. See the picture before for the correct look.
Horary! The hardware is ready to go!
The only last step is to connect the board to your computer via a USB C cable as shown. Now we can move to register the SIM card and upload an application!
In order for our board to connect to the internet via the cellular module, we need to register the sim card. The board is also compatible with a variety of other SIM card providers. Feel free to bring your own SIM if you'd like.
However, the Microchip kit comes with a great prepaid sim card which is excellent as an easy way to get started.
The official getting started guide lists a few steps:
- Verify you are in a region with LTE-M Coverage from Truphone on the Truphone website.
- Go to https://web.truphone.com/connectit/ and start the registration
You'll find a website like this:
Once you have created an account, you should see a dashboard like this. Find the "Activate SIMs" section in the top right.
You'll be taken to this page, where you can enter the SIM number you noted earlier.
Once you have entered the SIM card info, go back to the dashboard and you'll need to find the SIM card you just entered. Select the SIM Card list in the left hand sidebar:
Click on your SIM in the list.
Scroll down on the page and find the status section. If the card is not Active, you'll see a green Activate button. Click that and activate the sim. (Note this took me a few times to get it to work).
You can verify that the sim is active by returning to the SIM status and confirming it is listed as Active.
Great! Now you are ready to test the board.
Test It!The fastest way to test if everything is working is to use this awesome onboarding site and preloaded firmware that Microchip has provided.
They have a link that allows you to download the latest firmware image and have instructions to drag and drop it to your board. P.S. Make sure your board is plugged into the USB port of your computer via a USB cable.
After the SIM card has been activated, the board should automatically connect to the Microchip Sandbox.
Allow up to five minutes of initial connection setup. Depending on the board's location, different cellular operators are used. These different operators use different frequency bands, which must be searched. This process can take a couple of minutes. Upon a successful connection, the band settings are saved.
Upon a successful connection, the above progress bar will advance. Check the LEDs on the board for the board state. The connection to Truphone might take a little while on the first connection.
- CELL: Blinks during connection attempts / band search. On if a connection to the cellular network has been established
- CONN: On if a connection to the Microchip Sandbox has been established
- DATA: Toggles whenever data is sent to the Microchip Sandbox
You can also use the Board Serial Output below to see debug messages from the board. These messages are read through USB.
The sandbox detects a connection when it receives a heartbeat message from the board. This heartbeat is sent every minute. Click SW0 on the board to force a heartbeat.
Microchip also includes some helpful debugging steps if you are having issues.
You can also connect your board to their serial terminal in the browser to see a debug log as you go.
Now, the moment you have all been waiting for, getting our custom code onto the board.
The official docs on this are here.
You'll need the Arduino IDE and a few libraries described here.
They have lots of good examples on how to use the hardware included in the AVR docs, but I have also included a basic HTTP example from Microchip here (see attached code)
ConclusionSo that's it! You are off and running developing with a great cellular dev board.
Reminder if you are excited about this kind of project, be sure to enter the Future of Resilience Contest with Microchip here.
Hope this guide helps and gets your excited about this.
See more in the official docs from Microchip below regarding specific hardware or software details of the board.
Official DocsCritical Bug Fix for the Contest (Nov 15)DxCore installation bug
- Scope: Appears to affect any external core library as specified by the File → preferences → external URL
- config. Showed up in latest Arduino 2.1.1 release, possibly before that.
- Symptom: Packages specified by the external URL’s do not show up in the Board manager, presumed to also have the same problem on the Library Manager for index files that have a .com, .org or any other extra “.” In the file name.
- Root cause: The index json filename for the package located under \AppData\Local\Arduino15 is mangled such that the Arduino IDE does not load and index the package correctly.
package_drazzy.com_index.json
is incorrectly renamed aspackage_drazzy.json.
The ‘_index’ is critical to the Arduino IDE detecting the package json file
Workaround
Rename package_drazzy.json
to package_drazzy.com_index.json
, restart Arduino IDE and the DxCore option will appear in Board Manager.
Comments