Before you start, please make sure you have the following components:
- Cricket Wi-Fi module (https://www.thingsonedge.com/)
- Soil Moisture Sensor
- 6-Way Terminal Block
- 2xAAA batteries (either AAA or AA)
- AAA batteries pack (either AAA or AA)
- 3x Female/Female Jumper Wires
If you are ready let's get started!
Solder the 6-way terminal block to the Cricket module. The terminal block makes it easier to play around with cables.
Now you need to connect batteries and the moisture sensor to the Cricket module with the following steps:
- Connect battery VCC / + (red cable) to Cricket's BATT portNOTE: The Cricket module can be powered either onAA or AAA batteries
- Connect the sensor VCC / + (green cable) to Cricket's 3V3 portNOTE: 3.3V port supplies stable 3.3V regardless of a battery voltage level
- Connect the sensor AOUT analog signal (yellow cable) to Cricket's IO2 portNOTE: This port can be configured as an analogue signal. The data will be reported to yoursmartphone
- Connect the sensor GND / - (blue cable) to Cricket's GND port
- Connect the battery GND / - (black cable) to the same Cricket GND port
A complete assembled device
Well done you have successfully assembled the device!
Before you start using the device it needs to be configured in Developer Portal. Please go to the next section.
In a few steps you will connect your device to the internet over your Wi-Fi network. All you need to do is to activate Cricket's private Wi-Fi hotspot and then open a private web page to pass your Wi-Fi network credentials. Please follow the steps below:
- Press and hold a button on the module for 5 seconds until the LED is constantly lit.
- Once the LED is constantly lit Cricket opened a private Wi-Fi hot spot. Connect from either a laptop or smartphone to the hot spot with the following credentials:SSID: toe_deviceNo password is required
- Once connected, open a private web page: http://192.168.4.1/index.html
NOTICE:make sure LED is still ON! If is OFF repeat the steps from the beginning
- Now you can pass your Wi-Fi network credentials and click CONNECT. If you passed correct SSID and Password then after few seconds the device should report it is online and the LED will be OFF.
Configure your device
NOTE: new Cricket versions 1.0 (with metal cover) can be configured entirely locally or from the cota.thingsonedge.com service. Also please note dev.thingsonedge.com was replaced with cota.thingsonedge.com with this new Cricket versions.
For the moisture sensor it is recommended to set the following configuration:
- Set IO2 as an analog input
- Report moisture level every 2 hours - it will make your device running on 2xAAA alkaline batteries for more than 2 years.
Set the following configuration:
- Connectivity type: MQTT_TOE
- RTC: ON
- RTC Units: Seconds (to be changed later)
- RTC Units Value: 30 (to be changed later)
- IO2: Analog In
- IO3: Off
- Battery monitor: On
- Battery divider: 0
- Temperature sensor: Off
- Force updates on - IO1 Wake Up: On (to be changed later)
- Force updates on - RTC Wake Up: On (to be changed later)
- Post Events: leave all empty
More information on how to configure Cricket can be found in the documentation here.
Let's now go and configure your phone to receive data from Cricket.
The device is live and connected to the internet! You can start reading the data from the sensor on your smartphone or any other internet services. Please see the next section as an example.
You can use any preferred MQTT client. However for the completeness for this project let's use IoT MQTT Panel application to receive and visualise data. The Cricket module connects through low-latency Things On Edge MQTT broker (mqtt.thingsonedge.com). You just need to do the following steps:
- Configure a server connection with the following details:Server / Broker IP address: mqtt.thingsonedge.comPort number: 1883Network protocol: TCP
- Add device...