MakeWithMaxim: ScienceSensorHub

#MakeWithMaxim
Introduction


Teaching science is not just about rote learning from a textbook. It's about engaging students, and providing the tools they need in order to solve a problem. Sometimes that tool is as simple and inexpensive as a ruler, sometimes it's as complex and costly as a spectrophotometer. Usually, our needs are right in the middle. There are already three families of devices used in schools. Vernier Software, Pasco Scientific, and Ward's Science all produce sensor products aimed at the middle school market. These are good products, but they’re too expensive for many schools. Ward's DataHub is the closest product to what I’m developing. It sells for $511.99. My Bill Of Materials is under $100.

My project, ScienceSensorHub is an extendable sensor hub with on-board data storage and bluetooth smart connectivity. I include a small low-power display on the sensor hub for sensor reading and battery level and you can connect your Bluetooth Smart enabled device to see more sensor data, including historical data. Most user interactions are expected to take place via the Bluetooth Smart device (smartphone, tablet, chromebook). The sensor hub includes sensors for Temperature, Humidity, Ambient pressure, Accelerometer, and Gyroscope. There are expansion ports - 2 Vernier Interface ports (1 Analog, 1 Digital), and 2 ScienceSensor Ports for connecting sets of sensors.

Each ScienceSensorPort has a Serial Interface, an I2C interface, and a 1-Wire interface. It also provided 3v3 and 5v. Each ScienceSensorSet includes a 1-Wire memory device to store sensor calibration and identification data.

These ScienceSensorSets are organized to match up with Next Generation Science Standards as implemented for Middle School Science in California.

My project is focusing on the ScienceSensorHub and the "Plants" ScienceSensorSet, which includes:

  • Soil wetness
  • Light
    • Lux
    • Infrared
    • UV
  • CO2

BOM

ScienceSensorHub
· MAX32630FTHR (Digi-Key MAX32630FTHR#-ND )
· Adafruit FeatherWing OLED 128x32 Display (Digi-Key 1528-1547-ND)
· Panasonic 8GB uSD Card (Digi-Key P17028-ND)
· Sparkfun 2000mAh Lion battery
· Sparkfun Vernier Analog Jack
· Sparkfun Vernier Digital Jack
· Sparkfun BMP280 Breakout (Digi-Key 1568-1259-ND)
· 800 point breadboard.
· Random jumper wire.

ScienceSensorSet “Plants”
· Adafruit TSL2561 Lux Breakout (Digi-Key 1528-1004-ND)
· Adafruit VEML6070 Breakout (Digi-Key 1528-1694-ND)
· AliExpress: MH-Z19 CO2 Sensor Module
· AliExpress: Soil Moisture Sensor

Schematics




Instructions
1574644172239.png

I have built the initial version of this product using a breadboard, and sensor sample modules purchased from Sparkfun, Adafruit, and Alibaba.

The next version will include custom PCBs, which will lower the per unit costs and increase reliability.

Resource Utilization:
· UART0: Used by Bluetooth module
· UART1: Used by DAP-Link
· UART2: Used by ScienceSensorPort1. For prototype, connected to MH-Z19 CO2 Sensor Module.
· Secret UART3: P5_3 + P5_4 make up UART3. Used by ScienceSensorPort2
· I2CM1: OLED Display
· I2CM2: BMI160, MAX14690, TSL2561, VEML6070

Batteries: The MAX32630FTHR board uses -PH power connectors. PH and XH are both common types - make sure you get PH connectors. The Mikroe-1120 batteries i initially purchased use the XH connector and I had to put on new connectors. Batteries from SparkFun and Adafruit should have –PH connectors. I picked a 2,000mAh Lion battery. The minimum operating time must be 8 hours, giving me a power budget of 250mAH

Display: The Adafruit OLED Featherwing works great. It even provides a handy reset button. EXCEPT IT KILLS THE SECRET UART. Take a look at your 32630FTHR pinout. On the bottom right side, we see pins P3_4 and P3_5, which are configured as I2C1 SDA & SCL. The OLEDFeatherWing uses those pins for controlling the display. The OLEDFeatherWing also includes 3 buttons, which are connected to P3_2, P3_3, and p5_3. P5_3 is part of UART3.
Generic OLED displays from alibaba work just as well, minus the buttons and at about 1/10 the price.
1574644184111.png

The 128x32 displays give you 4 lines of text. The 128x64 displays give you 8 lines of text!

The original plan was for the ScienceSensorHub to have no display and all user interaction would occur through a Bluetooth enabled device. User input will still occur through Bluetooth, but a small OLED display allows me to display current sensor readings and diagnostic information. I’ve leveraged the BMI160 to allow the user to scroll through data screens by tapping on the device.

Storage: The MAX32630FTHR board includes a microSD slot. I've equipped this system with an 8Gb uSD card so it can data log continually. The ScienceSensorHub will allow access to the storage when connected to a host computer via USB. The physical uSD card should not be accessible to students

Real Time Clock: The MAX32630 has a built-in Real Time Clock. Initially the plan was to set the clock from a Bluetooth device. Updated plans call for a GPS module to provide the system with Date/Time/Location. Location logging will use the accelerometer to determine when the sensor is sitting still for extended periods of time so the GPS module can be powered down for power savings.

Ambient Brightness Sensor: The TSL2561 provides Lux data.
1574644191417.png

UV Sensor: The Vishay VEML6070 UV-A sensor had no mbed library. Now it does! https://developer.mbed.org/users/smatthew/code/VEML6070/ Vishay provides great implementation guides.
1574644198054.png

Video
Let's see your project in action! Paste the YouTube link here and it will automatically be embedded.

Source Code

https://developer.mbed.org/users/smatthew/code/FTHR_SensorHub/

CAD Files
Attach or link to any CAD files if relevant to your project.


Next Steps

The ScienceSensorHub needs a better way of measuring battery life. Currently the battery state of charge can only be approximated by measuring the voltage. I am going to attempt to use an MAX17211 which combines coulomb counting and VOC to determine the state of charge of lithium ion batteries. It would be awesome if Maxim integrated the MAX17211 on a future version of the 32630FTHR board.

The MAX32630FTHR board is really picky about it’s USB power sources. I have not found any USB power adapters that will make the board boot up.

The VEML6070 sensor measures UV-A. It needs to be replaced with the VEML6075 which measure UV-A and UV-B separately.

Blog entry information

Author
smatthew
Views
982
Last update

More entries in General

Share this entry

Top