I am building multiple hobby projects every year and for most of those I am using sensors. In the beginning, any available type around me was a perfect fit. But the problem with this thinking was the “time to market”. In other words you have to read the datasheet, create a small test platform and then write your own driver. And this is time consuming! The only good outcome created from this process was the pure learning! You get familiarized with the datasheets, the communication protocols, the making techniques and how to write good drivers!
Now I am following different footsteps! I am using a predefined sensor set that I am constantly reusing over my last projects. The result is a fast “time to market”, a more relax time for the hobby and perfectly made drivers! I am still making things to learn and to widen my knowledge but this is mainly swift to my professional job as an engineer.
So, the result of all those was the sensor stick! A small sensors module that I am using almost everyday so far! Actually, I thought this name was my original “invention” but latter on I figure out that Sparkfun was using this name already! The PCBs was on their way home and somehow I stick with the name because… I like it!
The sensors I am using are the SHT10 that can measure temperature and humidity, BMP085 that can measure pressure, altitude and temperature and finally the “amazing” MPU6050 with integrated three-axis accelerometer, three-axis gyroscope and as the previous ones temperature sensor as well!
All of those are connected to the same I2C bus and interact with each other without any problem using different unique addresses:
MPU6050 (3-axis Guro, 3-axis Accel, Temperature) :
0xD1 read, 0xD0 write
BMP085 (Pressure, Altitude, Temperature):
0XEF read, 0xEE write
SHT10 (Humidity, Temperature):
I2C compatible sensor
The problem with those sensor modules is the power supply that they can handle. Every single sensor has its own voltage range that most of the times are not wide enough or they are at the low levels and not suitable for the 3.3V to 5V most commonly used for hobby (and not only) projects.
The solution is to first find a “sweet” voltage spot that can be handled from all the sensors. Then, use a local LDO regulator with wide acceptable input and capable to produce this common sensor voltage. The result is that you have solved the first part of the problem. The power supply! For this module the voltage range is between 3V to 6V. A wide range for “any” project out there!
And now its time for the digital IO’s voltage lever solution. For the sensor stick those are the two I2C lines, the Data -> SDA and the Clock -> SCL. Depending of the sensors set used, this can be an easy answer or a little bit trickier one.
You can use just pull-up resistors to set the high level but some ICs on the same bus probably can’t handle it, or you can use a lower high level voltage even if its not the Vin in case that this is inside the understandable logic 1 range. For the logic 0 you don’t have to think a lot. It’s always tide to ground (for common projects and “normal” protocols).
My solution is to use a logic translator. You can’t find them in multiple packages and multiple price tags. But the simples ones are to the ones you can build by your own with basic components. In other words a singe mosfet (2N7002) with two resistors can do the job easily! Plus, this logic translator is also a two way one!
If you like this module then hit the like button bellow! If you have any question type it bellow and I will have an answer as soon as possible! For any other info drop me a mail on: firstname.lastname@example.org with the subject: SensorStick
By the way, I know a few people that they are trying to keep modules like this one clean after use in a lab or from a project that was operating outside for a long time. As a cleaning solution they are using alcohol or other PCB type cleaners. Pay attention to this! Sensors like the BMP085 and the SHT10 or any other slot type sensors are extremely sensitive to chemicals, even to the not so aggressive ones!
For example if you wipe the surface of the BMP085 sensor with a paper with just a few drops of alcohol the probability to destroy the sensor and to return continuously the same data (mostly negative values) is extremely high! If you want to clean slot type sensors then just use a dry cleaning towel and be careful with the static electricity.
Schematic: SensorStick PDF
Code examples, some of the best ones out there:
You want one? Have a look here:
Or for any question mail me at: email@example.com