Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

The goal of this guide is to provide everything you need to set up, configure, and start collecting data from your Sparrow Development Kit. Let’s start with a quick overview of what Sparrow is, then look at what’s in your Sparrow Development Kit box, and finally get everything up and running.

What is Sparrow?

Sparrow is a technology that enables one or more Nodes to communicate with a paired Gateway using a LoRa radio. That gateway, in turn, can then communicate with the cloud over Wi-Fi or cellular.

This architecture allows you to add cloud connectivity to a local cluster of devices while keeping per-device costs as low as possible.

With your Sparrow Development Kit you’ll create the following specific setup to implement this architecture.

To understand how everything fits together, let’s next look at the specific pieces of Sparrow hardware.

What’s in the Box

Your Sparrow Developer Kit contains the items shown below. Let’s quickly define what each of these items are before discussing how to hook everything up.

1. Notecarrier-AL with a pre-installed Wi-Fi Notecard

The Wi-Fi Notecard is a System-on-Module that makes it easy to send data over a Wi-Fi network. The Notecarrier-AL is a companion board that houses the Notecard.

2. Essentials Board

A microcontroller that acts as the radio that performs the LoRa-based communication with the Sparrow Reference Nodes. The Essentials board also provides connectors for power (Lipo and coin cell) and external sensors with Qwiic and female headers.

3. Reference Nodes

Enclosed boards that include a temperature/humidity sensor, a PIR motion sensor, and a dual-AAA-battery holder for power.

4. Female-to-Female JST SH (Qwiic) connector

A Qwiic JST connector you’ll use to attach the Essentials Board to the Notecarrier-AL.

5. STLINK-V3MINI

A stand-alone debugging probe for STM32 microcontrollers. You can use this to debug and update firmware on both the Essentials Board and Reference Nodes.

Getting Up and Running

Now that you know what you’re working with, let’s look at the steps you need to take to get your hardware up and running.

Power Up Your Devices

  • 1) Remove the four screws from the back of each of the two Reference Node enclosures, and insert two AAA batteries in each. Leave the backs of the enclosures off for now.

  • 2) Connect your Essentials Board to your Notecarrier-AL using the included Qwiic cable.

  • 3) Ensure the DIP switch on the Notecarrier-AL is set to 3V3, as 3V3 is a requirement when using a Wi-Fi Notecard.

    • TIP: The end of a safety pin works well for flipping DIP switches.

  • 4) Use the included Micro USB to USB-A data cable to connect the Notecarrier-AL to your computer. After a few seconds you should see green LED lights on both the Notecarrier-AL and Essentials Board.

  • 5) [OPTIONAL] Connect a LiPo battery to the JST connector labeled LIPO on the Notecarrier-AL. The LiPo battery can power the gateway if you want to run everything without a USB connection after you complete this setup. The LiPo battery will charge when the Notecarrier-AL is connected to power through USB.

Set up Notehub

Notehub is a cloud service that receives data from the Notecard, and can route that data to your own cloud apps and services. You’ll need to set up a Notehub account and project to receive sensor data from your reference nodes.

To set up Notehub complete the following steps.

  • 1) Navigate to Notehub at notehub.io, and create a new account if you haven’t already.

  • 2) Once you’re on the Notehub dashboard, click the Create Project button.

  • 3) Give the project a Project Name, and then click the Create Project button.

  • 4) Copy your new project’s ProductUID, as that’s the identifier Notehub uses to associate your Notecard to your project.

  • 5) With that ProductUID on your clipboard, next navigate to the Notecard Playground in your web browser.

  • 6) Click the Connect button and select your Wi-Fi Notecard.

  • NOTE: Not seeing your Notecard? Make sure you’ve connected your Notecarrier-AL to your laptop with a micro-USB-to-USB-A cable.

  • 7) Issue the following command to connect associate your Notecard with your newly created Notehub project, making sure to substitute <productUID> with your own value.

    {"req":"hub.set","product":"<productUID>"} 
  • 8) Finally, issue the following command to connect your Wi-Fi Notecard to your home Wi-Fi network, making sure to substitute <ssid name> and <password> with your own values.

    {"req":"card.wifi","ssid":"<ssid name>","password":"<password>"}

And with that, you now have Notehub set up, and your Notecard is ready to send local data to Notehub from your hardware. Your last step is to pair your devices so you can see data flow all the way through.

Pair Your Devices

The Sparrow Essentials Board must pair with each Reference Node before it can communicate with them over LoRa. Pairing the two is as easy as pressing a few buttons.

  • 1) Press and release the PAIR button on the Essentials Board.

  • 2) Press and release the PAIR button on each Reference Node.

While pairing, both the Essentials Board and Reference Nodes should show a solid blue LED light, which indicates the devices are in pairing mode. Pairing can take several seconds, and can sometimes take up to a minute. When pairing finishes you’ll see a flash of red and green LEDs on the Reference Nodes to acknowledge that the pairing succeeded.

  • NOTE: Having trouble pairing? Pairing LoRa devices works best if the devices are separated from each other (opposite sides of the table should be fine).

And with that, you’re now completely set up and ready to go. If all went well, your Reference Nodes should already be collecting data, sending that data to your gateway via LoRa, and your gateway should be sending that data to your Notehub project.

Let’s go back to Notehub to make sure everything is working as expected.

Viewing Your Data

  • 1) Open your web browser, return to Notehub, and open up your Sparrow project.

  • 2) Click Events to open your project’s event list.

  • 3) On the Events page locate the textbox to the right of the “All Devices” dropdown. Type “sensors.db” in this textbox as a filter (see image below). If all went well, you should see one sensors.db event for each Reference Node you paired.

  • Over time you’ll see two additional types of events in Notehub.

    • air.qo events report the temperature, humidity, and barometric pressure from the node's onboard BME280 environmental sensor. The nodes take hourly environmental readings by default.

    • motion.qo events report motion detected from the node's onboard PIR motion sensor. The node reports motion as soon as the sensor detects it, however, the node will only send one motion.qo event every 15 minutes to save on battery. The event’s count reports the number of times the sensor detected motion since the previous motion.qo, and the event's total reports the number of times the sensor detected motion since the device was last reset.

And with that, you have now completed the setup of your Sparrow Development Kit! Let’s look at one more tip before you re-attach the backs of your Reference Node enclosures.

Distinguishing Between Multiple Reference Nodes

Each reference node in your Sparrow Development Kit has a unique identifier. You can view this identifier in the Filefield of each of the node’s air.qo and motion.qo events. For example, the screenshot below shows how to find a node’s identifier on a motion.qo event. (You can double click the event to view the full identifier, and to copy the value to your clipboard.)

Having the identifier can be useful whenever you need to differentiate between multiple nodes, aka whenever you need to tell which node is which.

Whenever you need to determine a specific node’s identifier, you can press and release the node’s PAIR button. Doing so creates and syncs a _health.qo event that contains the pressed node’s identifier in its body.

Make note of any identifiers, and when you’re ready, go ahead and re-attach the backs of your Reference Node enclosures.

Next Steps

Now that you have everything connected and communicating, this is what we recommend as next steps.

  • 1) Move your hardware to different locations. Go ahead and reposition your Essentials Board and Reference Nodes to get readings from different locations.

    • NOTE: There are no hard-and-fast rules that dictate how far apart you can place LoRa devices because the optimal distance depends on whether your devices have a clear line-of-sight, or the signal needs to penetrate walls, concrete, and the like. In a home or building, devices will need to be placed closer together, ideally less than a hundred meters apart. Out in the open, devices can reach one another across 1 KM or more. As with anything, we strongly suggest you test your application under real-world circumstances prior to deployment.

  • 2) Read more about what you can do with Sparrow. This quickstart helped you get your Sparrow Development Kit up and running, but there’s a lot more you can do with Sparrow. As a next step, we recommend checking out our Sparrow Setup and Run Guide, which provides a more detailed look at everything you can do with your Sparrow hardware.

  • No labels