Evaluating the TCS34725

Evaluating the TCS34725

An RGB light sensor we evaluated for use in the Evaporometer project.  This sensor measures RGB, color temperature, lumens, and visible light spectrum, and has features that won't necessarily be useful for our project, but are still worth documenting in this post.

Some Useful Diagrams Illustrating Evaporometer Processes

Some Useful Diagrams Illustrating Evaporometer Processes

So far we have used this series of blogposts to discuss a lot of the technical details about how certain processes are happening within the Evaporometer Transmitter and Receiver.  A series of diagrams has been made to help visualize how everything comes together.  First will be a diagram showing how all the sensors are connected to the Feather 32u4 and battery, followed by two flowcharts illustrating how abstract environmental conditions are transformed into the data logged in our spreadsheet.

Successful "Real Time" Data Logging (Finally!) - A Step by Step Walk Through

Successful "Real Time" Data Logging (Finally!) - A Step by Step Walk Through

After months of prototyping, experimenting and redesigning we have successfully deployed our first, "fully open source" transmitter and receiver with near real time updates to a google spreadsheet.  This post will give a step by step procedure on how to set up all the software and web interfaces for this project. 

Visit to HJ Andrew's Experimental Forest

Visit to HJ Andrew's Experimental Forest

On Thursday July 27th, members of the OPEnS Lab finally deployed a working prototype of the Evaporometer at the HJ Andrew's Experimental Forest.  They were accompanied by Professor Bo Zhao, a member of his data visualization team, and coordinators at the HJ Andrews Forest as the receiver hub was set up at a station near the Discovery Trail and the Evaporometer-transmitter was drilled into a log overlooking a stream.  

Data Logging Using The Ethernet Featherwing

Data Logging Using The Ethernet Featherwing

For the past several weeks the primary focus of myself and the other undergraduate researchers at the OPEnS Lab has been to get a working, deployable prototype of an Evaporometer (link here) sensor for use for a partner research group. This project required numerous data transmission protocols and untimely it is our hope to add remote data-logging capabilities using the Ethernet Feathering.  

The Evaporometer 2.0: Improvements After a Return from a Brief Vacation

The Evaporometer 2.0: Improvements After a Return from a Brief Vacation

It has been some time since any updates were posted on development of the Evaporimeter device designed to remotely transmit evaporation data via LoRa transmission to a central receiver and then to an internet hub.  There have been A LOT of changes - so many additions and revisions to the overall design that perhaps now it is best to introduce the Evaporimeter as an entirely new model with an expanded focus on reporting data for a multitude of environmental factors.

Working with the "Internet" for the Internet of Agriculture

Working with the "Internet" for the Internet of Agriculture

WiFi Data Logging

For the last few weeks, I have been working on using an Arduino Uno and a couple different ESP8266 WiFi modules for the purpose of logging sensor data in real time to a Google sheet and develop a network Gateway for all of our sensor devices.

Nordic RF shields for Adafruit ProTrinket

Abstract:

This post provides an update on the near-range (up to 100m) RF branch of the Internet of Agriculture Project. New PCB design makes an improvement on a general-purpose, opensource, plug-n-play wireless sensor kit.

Objective:

The previous version of the RF IoT sensor kit had some minor layout flaws, and failed to accommodate a 'handshake' button for auto synchronizing an RF sensor node with its base station, a power button, and some other small details. A new version adds these features and reduces the overall device volume by one-third.

Methods and Materials:

Eagle CAD was used to modify a previous version of the PCB. A whole new layout was explored that reduced overall device volume substantially and new features added including: power button, handshake button, removing 12VDC power adapter on base receiver (for now), placing LiPo Backpack on the underside of the transmitter, and creating a "stackable" offset for the ProTrinket, should anyone wish to make further shields to extend this devices capacity.

Results:

See below! PCBs are in the fab house now. . .

WASN_HonorsBrd.png

A First Look at Field Deployment

A First Look at Field Deployment

As progress on the LoRa radios leads to integration into the Evaporometer Project, we take a closer look at some of the aspects of data transmission and providing portable power.

Moving on to Smaller and Better Things

Moving on to Smaller and Better Things

As this project continues to develop, it is time to begin looking to add a more practical means of implementing these systems into the environment in a small and user-friendly package. The problem? The Arduino Uno is an excellent prototyping microcontroller, it's easy to work with, has several built-in functions with many pins ready to be used, however, this ease of use and functionality comes at the cost of a bulky, power-hungry micro controller that likely can do much more than you need it to. The solution? The Adafruit (3 Volt) Pro Trinket.

What's Up with the LoRa Devices

This post describes all progress up to this point and the integration of LoRa communication into the currently in progress Evaporometer project.

Coding with the nRF08001 Chip and Other Evils

Coding with the nRF08001 Chip and Other Evils

After concluding testing on basic functionality earlier this week with positive results , it was time to dig into the real work... developing a protocol that would allow this Bluetooth LE breakout board to be used to transmit sensor data in a convenient and uniform way across the "Internet Of Agriculture" project . In addition, a second nRF08001 module was set up, and experimenting with two modules began.

ESP 8266 and IFTTT

Background:

I have been working on connecting to IFTTT using the ESP. IFTTT is a platform that makes it easy to connect different web apps and services to create applets or recipes. They work in an If this, then that (that is where the letters IFTTT come from) format. For example, if I like a video on YouTube, save its name and link to a list on Evernote. 

IFTTT has a service called Maker that allows a user to send a web request to their Maker service which can then trigger an action. I used this feature to create an applet, which, when triggered by the ESP will send data to a Google Drive spreadsheet. 

 

Process:

This will be wired the same way as all my previous Arduino and ESP guides. Most of the code is fairly similar and it is explained there as well. The wiring is here and the general info about sending GET requests is here

The first step is to create an IFTTT account and then create an applet (this link answers many of the questions about applets) using Maker.

After creating an applet, go into settings on the Maker page.

settings

Then, copy your personal URL and go to that page. 

 

On this page, you can see the information for sending HTTP requests and the full link that can be used in a GET request. The code will show how to add data values which can be sent over as query parameters in the request. 

Once this is all set up, you have the necessary information to send data to the web using IFTTT and your ESP. 

Next, download the code, add your credentials, and then upload it to the Arduino. 

 

This guide may be helpful, it is how I got my start. However, like many of the guides, this uses the ESPWifi library which I did not use. 

More Testing with the nRF08001 Bluetooth LE

More Testing with the nRF08001 Bluetooth LE

Note: The nRF8001 sends out packets of data, 20 bytes at time. Keep this in mind if you want to send a lot of data it will be packetized into chunks of 20. You can of course send less than 20 bytes.

Exploring Mobile Interface

After initial setup and software tests, I was able to explore the Adafruit developer smart phone application found in the android market, "BlueFruit LE". (APK file linked here

Much like Serial you can use the .write and .print functions allow us to send data out to the connected device:

Features included in Bluefruit LE App

 

Home screen of the "Bluefruit LE" smartphone application

Home screen of the "Bluefruit LE" smartphone application

Display after connection with Bluetooth module

Display after connection with Bluetooth module

Info

Displays MAC address and other relevant Device Information

Screenshot_20170412-101741.png

 

UART

Screenshot showing a message being transmitted to the Arduino from my smartphone 

Screenshot showing a message being transmitted to the Arduino from my smartphone 

The "UART" function allows a basic text message interface from smartphone to the Arduino Series monitor. However, after testing it was apparent that although the application allows infinite characters of transmission, the messages are broken apart into 20 character fragments due to the data transmitting capabilities of the bluetooth chip.

Snip showing successful reception of the message from my smartphone to the Arduino seriel monitor

Snip showing successful reception of the message from my smartphone to the Arduino seriel monitor

 

 

Pin I/O

The Pin I/O section of the mobile phone application allows the user to control input and output of pins (both analog and digital) on Arduino shield. However, this particular function required significant code modification in order to allow functionality on Android enabled devices. Once the code is finalized it will be published and linked here. In order to display this faciniating functionality a small demo was contructed in order to deminstate the smart phone interfaces capabilities. 

With just a slide of my finger I am able to modify the signal strength being admitted from the Arduino 

With just a slide of my finger I am able to modify the signal strength being admitted from the Arduino 

The Blue LED is only lightly illuminated due to low PWM signal as specified by the photo on the left 

The Blue LED is only lightly illuminated due to low PWM signal as specified by the photo on the left 

The PWM slider was moved all the way to right to allow for maximum signal strength

The PWM slider was moved all the way to right to allow for maximum signal strength

The increased signal strength as shown on the left caused the LED to shine brightly

The increased signal strength as shown on the left caused the LED to shine brightly

This section of the Bluefruit LE application appears to be very useful, unstable and will require further explanation.

Controller

Streams sensor data from smart phone sensors (Quaternion (6-axis accelerometer), Accelerometer, Gyro, Magnetometer, Location)

Beacon

Puts smartphone in a state to receive pop-up text messages from serial monitor up to 20 characters  

Snip from the Arduino Serial Monitor during transmission testing

Snip from the Arduino Serial Monitor during transmission testing

Screenshot of the recived message from the Ardiuno 

Screenshot of the recived message from the Ardiuno 

          Messages are restricted to only 20 characters 

          Messages are restricted to only 20 characters 

Neopixel

Needs further exploration.

 

Conclusions

**Initial testing of connectivity shows an approximate range of 20 feet for reliable signal strength.**

After initial testing it would appear that  the Pin I/O will have the most practical capabilities and research of its functionality will continue. 


 

- Tom DeBell, Beginning Researcher Support Program researcher

Getting Started with the nRF08001 Bluetooth LE chip

Getting Started with the nRF08001 Bluetooth LE chip

 

Initial setup for this project began early this week starting with soldering header pins onto the nRF08001 Bluetooth LE (Low Energy) breakout board so that a physical connection could be made with an Arduino Uno module to begin testing. A valuable resource that helped getting started can be found at adafruit.

The wiring of the Bluetooth board to the arduino was done as follows. 

Wiring Schematic

Wiring Schematic via Adafruit 

Wiring Schematic via Adafruit 

Wiring completed on April 5th to begin testing

Wiring completed on April 5th to begin testing

  • VIN connects to the Arduino 5V pin (Red Wire)
  • GND connects to Arduino ground (Black Wire)
  • SCK connects to SPI clock.  (Blue Wire)
    On Arduino Uno/Duemilanove/328-based, thats Digital 13
    On Mega's, its Digital 52 and on
    Leonardo/Micro its ICSP-3 (See SPI Connections for more details)
  • MISO connects to SPI MISO. (Yellow Wire)
    On Arduino Uno/Duemilanove/328-based, thats Digital 12
    On Mega's, its Digital 50 and on
    Leonardo/Micro its ICSP-1 (See SPI Connections for more details)
  • MOSI connects to SPI MOSI. (Teal Wire)
    On Arduino Uno/Duemilanove/328-based, thats Digital 11
    On Mega's, its Digital 51 and on
    Leonardo/Micro its ICSP-4 (See SPI Connections for more details)
  • REQ connects to our SPI Chip Select pin. We'll be using Digital 10 but you can later change this to any pin. (Grey Wire)
  • RST connects to Digital 9 - this is for resetting the board when we start up, you can later change this to any pin. (Orange Wire)
  • RDY is the interrupt out from the nRF8001, we'll connect to Digital 2 but be aware that if you want to change it, it must connect to an interrupt capable pin (see this Arduino page for which pins are interrupt-capable. Digital 2 is OK on Uno/Leonardo/Micro/Mega/etc.) (White Wire)
  • Note: Wire colors refer to first wiring diegram

Initial Testing

After wiring was completed testing of bluetooth transmissions and functionality began with positive initial results. By running a sample arduino code found on GitHub we were able to communicate to the arduino via the "Bluefruit LE" android application and likewise was able to transmit data from the command line of the arduino workspace directly to a smart phone via the bluetooth module.  Further Testing will contiuno next week.

Snip from the Arduino Serial Monitor during testing

Snip from the Arduino Serial Monitor during testing

- Tom DeBell, Beginning Researcher Support Program researcher

Testing the range of LoRa radio breakouts

Testing the range of LoRa radio breakouts

Today I confirmed that the range of the LoRa devices is at least 1-2 km; the documented range on Adafruit's website is 2km line of sight in an open area.  I took a walk and brought along one LoRa radio to the far west side of campus.  

Progress with LoRa Transmitter/Receiver

In this blog post we go over how to we assembled the LoRa transmitter and receiver.  We include instructions on how to set up the Arduino IDE as well as the code for our test devices.