I have been running my UDOO Neo
solar powered in my shed for a while. I have been meaning to attach some bitcoin miners to it, just to support the network, since I am too far behind the curve with hardware to make any money off it. From what I read, the mining farms have taken over a whole hydroelectric dam
somewhere in China.
|
Solar powered UDOO Neo |
Anyway I finally got around to attaching the
I2C bricks sensors that came with my UDOO Neo kit. There is an
LM75 based temperature sensor and an
MPL3115 based pressure/temperature sensor which can used an altimeter/barometer. These 2 sensors can be used to get some basic parameters for upload to
Weather Underground or simply
Thingspeak.
|
UDOO Neo with Sensor Bricks |
The first set is grabbing the data from the sensors. The UDOO comes with modules to map the i2c devices to the linux device tree and fetch data from them by simple file reads, no I2C knowledge needed. I also found
Tentacle Pi which is essentially an I2C multiple device driver library for Python. In my solution I ended up using a hybrid approach of direct i2c reads using Tentacle Pi and some /sys/ reads.
|
Results of i2c scan on channel 1 |
The MPL3115 is read using the /sys/ method as shown in the gist below:
The LM75 is read using direct i2c and Tentacle Pi:
There is a few degrees of discrepancy between the 2 temperature readings, however I trust the temperature from the dedicated temperature sensor more. A simple test to show the data on console works fine.
|
Testing sensor bricks |
From there it is a matter of pushing it out to Thingspeak to
get a graph. I am looking at adding other sensors from the future bricks line or designing some myself using my I2C knowledge, particularly a
wind speed sensor and a
light sensor. The wind speed will help me determine if I can install a mini windmill generator and I can use the light data to correlate my solar panel output to solar intensity.
No comments:
Post a Comment