-
Notifications
You must be signed in to change notification settings - Fork 2
Other Sensors
I2C is a serial two wire protocol and it is distinguished from other serial protocols by the use of addressing to communicate with the particular sensor.
The sensors usually have addresses embedded in eeprom from manufacture and the manufacturers data sheet is needed whilst connecting to any micro controller.
For the purpose of this project, a BH1750FVI Light sensor mounted on the GY-30 module was used in a sketch to display another attribute of the mesh network which can be seen at https://thingspeak.com/channels/59185.
The light sensor sketch can be obtained from the https://github.com/rickii/SensorRF24 site.
In the case of this sensor, an Arduino UNO was used which requires that the sketch is small as the memory requirements of the UNO become a problem. The use of a larger micro in terms of memory is advisable, providing more space for debugging code if desired.
There are a number of I2C sensors available, however although these use the same protocol it would be difficult to take a generic approach due to the requirements of each sensor.
For this project, the main focus was on the analogue temperature sensor listed as the Arduino_Node on https://github.com/rickii/SensorRF24. The Analogue sensors are effectively generic with a few adjustments to the code, any type of voltage driven sensor can be applied such as voltage monitoring as an example. there is one note thought, the voltage range must remain within the zero to 5Volt range. External circuitry would need to be used to achieve this outcome. A search on voltage dividers would provide information on a simple application.
Another note on Temperature sensors, whilst we choose to use an MCP9701 temperature device because of it's linearity, other more basic temperature devices such as a thermocouple or a thermistor does not have a linear temp/voltage curve and needs to be compensated for either in the arduino sketch or by external circuitry based on the characteristics of the device.
Other analogue sensors include pressure, light and gas as an example will require a knowledge of the electrical characteristics of the device as explained earlier.
Digital sensors relatively simple to incorporate and are normally associated with alarm systems such as switching circuits. They are generally associated with with a threshold. These can be implemented within the arduino sketch using an analogue sensor or as a unit such as a proximity sensor.
There are a number of serial sensors available such as GPS modules. The GPS Modules are significantly more complex and requires an Arduino board with sufficient memory to use. https://github.com/rickii/SensorRF24 shows an example sketch that we had developed and then regrettably abandoned due to insufficient Memory resources of our boards.
There are a large variety of sensors available which depends on the type of application. In general, consideration of the application, electrical characteristics, and the complexity will govern your choice of implementation. Deciding on a system to suit your needs should at an early stage, research into the sensor you require and implement the system based on the that sensor.
Introduction
Project Components
Troubleshooting
Further Information