26 May 2023

Cyclometer ๐Ÿšต

The SpacerLabs "Cyclometer" is a cycle 'trip-computer' which provides a cyclist ๐Ÿšด with data on number of wheel revolutions (Revs), distance travelled (Kms), average speed (Av.Kph) and current speed (Kph). It comprises a display unit, magnetic switch and magnet. 3-D printed enclosures for these separate parts give the Cyclometer a smart appearance. The Cyclometer is powered by an internal 3.7V rechargeable Li-Ion polymer battery.
Cycle wheel revolutions are detected by the magnetic switch which is closed and opened by the magnet fixed to a wheel spoke as it passes by close to the switch. The switch is wired to the display unit which counts and displays the revolutions. The distance travelled is calculated from the number of wheel revolutions and the wheel outer circumference measurement. A free-running internal milli-second timer allows the cycle speed to be determined.
The Cyclometer display unit
The Cyclometer display unit is unusual as it also acts as a BluetoothⓇ server ( SPACERLABS_CS ) using the 'Bluetooth Low Energy'  ( BLE ) variant of BluetoothⓇ. Connecting to it with a paired BluetoothⓇ client device ( e.g., a smart phone ๐Ÿ“ฑ), having a suitable App installed enables the Cyclometer ready for use. The BLE features of the Cyclometer have been modelled on the standard service and characteristics of the BluetoothⓇ "Cycling Speed & Cadence Service", though no cadence, ( crank ), data are required by the current version of the Cyclometer. An additional characteristic has been provided to support the wheel outer circumference measurement.
The SpacerLabs 'Cyclometer' App
Many general purpose BLE client App's are available. However, here at SpacerLabs, we have built our own custom 'Cyclometer' App for Android devices to make the process of updating sensor location and wheel size quick and easy !

23 March 2023

Solar UV Radiation Meter๐ŸŒค

Frequent or prolonged exposure to high levels of solar ๐ŸŒž ultra-violet ( UV ) radiation can damage the human skin.
The SpacerLabs solar 'UV Radiation Meter' ( abbreviated UVRM ) provides a way to measure the radiation and display the result as the UV Index and UV Level. Informed decisions about appropriate precautions can then be taken if necessary. ๐Ÿ˜Ž๐Ÿค 
The UVRM is based on the Silicon Labs SI1145 'UV Index sensor', together with a 32bit micro-controller, blue 0.96" 128x64px OLED display module and power management system. The UVRM is powered by an internal 3.7V rechargeable Lithium battery, which can be charged in-situ via the micro USB connector. A custom 3-D printed blue & white hand-held enclosure gives the UVRM a smart appearance.
UV Index ( zero to 11+ with a resolution of 0.01 ), and UV Level are displayed according to the W.H.O definitions; Low, Moderate, High, Very High & Extreme. The SI1145 also derives a "Visible Light Index" ( VIS ) and an "Infra-Red Index" ( IR ). These indices are not displayed directly by the current versions of the UVRM.
UVRM displaying an indoor UV reading
Two main options have been developed allowing the UVRM to be used as a stand-alone device when extended battery life is important or the option of wireless connectivity using BluetoothⓇ.
SpacerLabs has developed a custom App called  "Light_Meter" to connect to the UVRM using BluetoothⓇ communications.
The SpacerLabs 'Light_Meter' App
Using one of the BluetoothⓇ versions of the UVRM with a paired and connected mobile device running the App makes it easier to view the data in some outdoor situations ๐ŸŒž. The VIS and IR indices are also exposed.
 
( W.H.O = World Health Organisation )
 

15 March 2023

Multi Sensor Air Quality Monitor

An inexpensive domestic 'Air Quality Monitor'  ( abbreviated AQM ) has been modified with additional sensor support, display module and 32-bit micro-controller.
The original AQM, ( made in China ), uses a Cubic PM1006 Particulate Matter sensor to determine the PMx ( x =  microns ) particulate matter concentration in the air and changes the colour ( green, yellow or red ) of an illuminated indicator accordingly. This feature has been retained in the SpacerLabs modified versions.
The modified versions measure PM1, PM2.5 & PM10 and, optionally, have either a CCS811 sensor or AHT20 sensor also fitted to provide TVOC & CO2 or temperature & humidity data as well. The measurement data are displayed on a blue or white 128x32 pixel OLED display. Firmware which controls the sensors and the display is uploaded to the micro-controller via a micro USB connector.
AQM version PM1006/CCS811
AQM version PM1006/AHT20 will be deployed in the kitchen where airborne particulate matter ( smoke ) and high humidity caused by cooking can be monitored.
AQM version PM1006/CCS811 is suitable for a workshop environment where CO2 & TVOC could be present, in addition to particulate matter.
A SpacerLabs App, called "Air_Quality", has been designed, so that the PM1, PM2.5 & PM10 measurements can be viewed on a mobile device, using BluetoothⓇ communication. The PM2.5 concentration value will change colour in the same way as the illuminated visual indicator on the original domestic AQM.
SpacerLabs 'Air_Quality' App
The AQM can be powered by a USB charger connected by a cable with a USB-C plug.
The micro-controller also has built-in wifi as well as BluetoothⓇ. This opens up the future possibility of integrating the multi-sensor AQM into a 'smart home' network.

TVOC  = Total Volatile Organic Compounds ( paint, solvents etc ).

05 January 2023

Touch Screen for the Greenhouse Gas Monitor

Nowadays it seems almost obligatory that electronic gadgets have a touch screen display user-interface. Such a display has now been incorporated in a Greenhouse Gas Monitor ( see 28 July 2022 ).
This particular display type is a 2.8" 240x320 pixel touch panel display with SPI and using the ILI9341 driver chip. On the back is an SD card slot. Cost when purchased was just under GBP11.
Either Methane ( CH4 ) or Carbon Dioxide ( CO2 ) concentration data can be displayed separately in real-time by tapping on a displayed 'button', without having to connect to the 'ThingSpeak' or 'Ubidots' cloud repositories as before in order to view the data; the cloud would still be required, however, for data storage ( unless SD card used ) and processing.
An experimental version comprising the display and an ESP32 micro-controller development board ( with new firmware ) mounted on a prototyping board was assembled and connected to the same pair of outdoor gas sensors ( MQ-4 & MQ-135 ) used previously.
The Methane CH4 concentration is selected
The Carbon Dioxide CO2 concentration is selected
( SPI = Serial Peripheral Interface )
   

18 December 2022

Meshtastic network using LoRa wireless modules

LoRa WAN ( see 16 March 2022 ) and a point to point LoRa wireless data link have been used previously. This post describes setting up a "Meshtastic" based secure private network comprising 2  nodes again using cheap, low power, LoRa wireless modules, operating on a frequency 868MHz.
Meshtastic allows encrypted text message type communication between nodes ( upto 80 ) in an "off-grid" mesh type network which requires no gateways, infrastructure or internet servers; the underlying technology used is LoRa.
A user-group called SpacerLabs, and 2 nodes named Webmaster ( Wbms ) and Laboratory ( Lbrt ) were created. Node 'Webmaster' uses a TTGO T-Beam board. Node 'Laboratory' uses the same TTGO LoRa32v2 board as on 16 March. Both boards support BlueTooth Low Energy ( BLE ) and have LoRa transceivers; the T-Beam has additionally a Ublox Neo-6M GPS receiver allowing tracking its position.
(L) Node Webmaster [T-Beam], (R) Node Laboratory [LoRa32v2]
The appropriate 'Meshtastic' firmware version was uploaded to each board. Both boards have to be paired with a BlueTooth enabled device, e.g. smartphone or tablet. The 'Meshtastic' app was downloaded and installed on a smartphone.
Although LoRa allows communication between nodes dispersed over a wide area and upto several kilometres apart depending on intervening terrain and antenna type and position, for demonstration purposes the two nodes were positioned just a few centimetres apart. Short text messages were sent from each node using the smartphone. In the above image note the message which was sent to the Laboratory from the Webmaster.
Viewing messages on the Meshtastic app
Currently there is no actual requirement for a Meshtastic based network for a SpacerLabs user-group. It was, however, an interesting exercise finding out about Meshtastic and getting a simple network up and running. Two spare LoRa modules are available and could easily be used to add more nodes to the group, perhaps on different floors or buildings e.g., 'Office' and 'Warehouse'. ( visit https://meshtastic.org for more information ).
 
      

21 August 2022

Oven Temperature Controller

This usb dongle style temperature controller has been successfully used to control the temperature of an oven during reflow-soldering electronic circuit boards. It incorporates the MAX31855 14bit 0.25C resolution thermocouple to digital converter chip, and connects to a Type-K thermocouple and solid state relay (SSR), which together with a mini-oven form a self-assembled reflow soldering setup.
The SSR (not shown) connects to the screw-terms
It can also be used simply to measure the internal temperature upto 255C of any domestic oven (not microwave), by omitting the SSR.
Custom pc software for either purpose has been written using Visual Basic language.
Clear style dongle enclosure - cover removed
The temperature controller has also been designed to fit a typical dongle enclosure.
 

 

28 July 2022

Greenhouse Gas Monitoring System

Methane, CH4, and Carbon Dioxide, CO2, are two prominent "greenhouse" gases which have an impact on global warming.
A Methane sensor, type MQ-4, and a Carbon Dioxide sensor, type MQ-135, together with an ESP32 microcontroller are being used to measure the concentration ( in parts per million/billion ppm/ppb ) of these gases in the atmosphere. Measurements are sent every 15 minutes to cloud hosted repositories, ( "thingspeak.com" and "ubidots.com" ), for display and analysis.
Prototype system during development, left MQ-4, right MQ-135
Only the sensors are deployed outdoors, in a protective enclosure. The microcontroller is situated indoors for reliable WiFi connectivity and convenience when uploading the software.
Sensors deployed outdoors
A channel having public access is available for viewing the data on ThingSpeak. Search for channels belonging to user ID "spacerlabs". Select "Greenhouse Gas Monitor".

07 June 2022

Capacitance Meter

A capacitance meter has been constructed, based on a PIC microcontroller development board and OLED display.  A Capacitive Voltage Divider, CVD, comprising the capacitor under test, Cut, and sample/hold capacitor, Chold, of the integrated PIC ADC was used to derive the capacitance of Cut,  by the 'double sample', differential CVD measurement method.
VCHOLD1 = sample 1 voltage across the internal ADC hold capacitor.
VCHOLD2 = sample 2 voltage across the internal ADC hold capacitor.
CUT = capacitance in picoFarads of the capacitor under test.
After designing a suitable jig, the meter will be useful in determining the value of unmarked smd capacitors.
Cut is two 22pF capacitors in parallel
ADC = Analogue to Digital Converter.

16 March 2022

LoRa WAN

A "LoRa" ( Long Range )  wireless data link had already been used in a previous project to collect soil moisture data; but was not joined to a LoRa WAN network, in which nodes ( end-devices e.g. sensors ) are connected to gateways which then connect to the network server where the data from the end-device can be displayed and accessed by other applications for long-term storage and visualisation.
The public "TheThingsNetwork (TTN)" global IoT LoRaWAN network with the "Things Stack Community edition" server were used to test the possibility of connecting a node comprising a TTGO LoRa32v2 development board, before designing future projects with sensors. Only a short text message was to be sent; "TTGOLoRa32v2 node test".
The message was successfully received by a gateway 6kms away and forwarded to the server.
The upper image shows the experimental node in a temporary location by a window. The lower image is a partial screen capture of the live data on the server console.
 
TTGO LoRa32v2 node successfully joined TTN

Live data from the TTGO LoRa32 node on the Things Stack server
 
For more information on TheThingsNetwork visit https://thethingsnetwork.org
IoT = Internet of Things
 

27 February 2022

Digital Inclinometer

The MPU-6050 is an Inertial Measurement Unit comprising a MEMS 3-axis gyroscope and 3-axis accelerometer. The gyros provide angular velocity data; the accelerometers give relative 'g' (  acceleration due to earth's gravity ). Several were obtained, already mounted on evaluation boards. The project was to use it in a digital inclinometer. For this application, however, only the accelerometers were needed. The image below shows the setup used for developing software for the prototype. A digital angle meter was used for comparison. For the y-axis orientation in use, the inclination is displayed as negative degrees; a downwards slope.
(L) MPU-6050 evaluation board, (R) micro-controller/display board
Two versions were completed, with or without a display and having different enclosure styles, suitable for whether the inclinometer would be visible or located remotely when in use. The display version is shown in the image below. It is indicating 0 degree inclination and 1 degree roll to the right when placed on a "flat horizontal" surface.
Display version of the Inclinometer in attractive enclosure with lid
Both versions have Bluetooth functionality, enabling the inclination and roll meaurements to be displayed on a paired mobile device.

MEMS = Micro Electro Mechanical System.