Breakout Gardener (preview)

PREVIEW RELEASE == REQUEST FOR EARLY FEEDBACK 😉

Breakout Gardener is a framework application based on Node.js using the i2c-bus library. The name is a pun on the Pimoroni Breakout Garden, as the project started out as a way to present various sensor data on that system’s OLED display. As geeky projects often do, however, it eventually grew into something bigger, with more elaborate interworking…

Breakout Gardener currently supports the following devices and sensors (I2C unless otherwise noted) through modules:

  • ADS1015 : Texas Instruments ADS1015 Analog-To-Digital Converter
  • ADT7410 : Analog Devices ADT7410 Digital Temperature Sensor (preliminary/untested)
  • BMP280 : Bosch Sensortec BMP280 Barometric Pressure Sensor
  • CAP1166 : Microchip Technology CAP1166 Capacitive Touch Controller
  • DS18B20 : Maxim Integrated DS18B20 Digital Thermometer (1-Wire)
  • IS31FL3731 : Integrated Silicon Solution Inc (ISSI) IS31FL3731 Matrix LED Driver
  • LSM303D : STMicroelectronics LSM303D eCompass 3D Accelerometer and 3D Magnetometer
  • MCP9808 : Microchip Technology MCP9808 Digital Temperature Sensor
  • SH1107 : Display Future / Sino Wealth SH1107 Dot Matrix (128x128 pixel) Mono OLED Driver/Controller
  • TCS3472 : ams TCS3472 Color Light Sensor
  • VEML6075 : Vishay Semiconductors VEML6075 UVA and UVB Light Sensor

It also supports additional display modes through its SYSTEM, CLOCK and KOMPIS modules, data exposure and related visualization through its PROMETHEUS module, as well as a HTML5/CSS3 browser DASHBOARD module (see image above) that provides an overview of the current status and readings of all sensors and devices available on the system (nb. the “Shop” button is there just to support the tinkering community’s favourite suppliers; Pimoroni (UK) and Adafruit Industries (US)) (no affiliation to either, I just like their products and geeky dedication to the cause 😉)).

Note that, as this is a first preview release, there is still some cleaning up and optimizing under the hood to do (I have been reworking a lot of stuff along the way but some parts are older/newbie stuff that I just haven’t gotten to yet), but it should be in good enough shape for general use already. The product examples linked to on the GitHub page (nb. I couldn’t include actual links into this post due to forum restrictions) are the actual products I have used during development, but with some minor caveats (e.g. differences in physical orientation of an accelerometer sensor and similar) the module implementations should hopefully be mostly generic. Last but not least, any further project information and/or updates (no promises 😉) will be uploaded to the GitHub project page and referenced here along the way.

Anyway, without further ado:

- Install Node.js
- Clone the repository
- Install i2c-bus
- Run!

Enjoy! 😎

…and if you do, please Star this project on GitHub, add your comments and feedback here, and perhaps also tag me on Twitter (@xoblite) or Instagram (@xoblitedotnet). Thanks! 😄

BR//KHH [xoblite]

2 Likes

PS. The Mono OLED Breakout and 5x5 RGB Matrix Breakout (nb. the SH1107 and IS31FL3731 modules, respectively) complement each other nicely using Breakout Gardener - check it out if you have them both! 😄

A not-so-good-but-hopefully-at-least-illustrative photo of the two taken in a dark room:

oled-and-rgb-matrix2

1 Like

This is awesome- thank you for sharing! I’ve bumped your forum trust level so it should be easier for you to post images/links now.

Ditto to the above awesome comment. Taking pictures of lit up LEDS is tricky. Its a struggle for me anyway with my camera. They always seem to bloom. Even behind a difusser.
I like putting my LED Shim etc behind the black ninja difussers. It takes away the little pin prick of light you see in some RGB LEDS.

Thanks Phil, thanks Kerry, much appreciated!

Version 19.2.8 (aka RC1b), including some bug fixes (e.g. there were some missing device availability checks that I forgot to add before the original release, sorry about that) as well as preliminary support for the Analog Devices ADT7410 Digital Temperature Sensor (see e.g. https://www.adafruit.com/product/4089), is available on the GitHub project page since a few days back. If anyone happens to have an ADT7410 nearby already, please check it out and let me know if it works as expected; the current implementation was based purely on the information available in the datasheet but should hopefully be ready for prime time already 😉

If time allows, I will use my new-found forum powers to add some more photos etc within the next few days - stay tuned!

BR//KHH [xoblite]

1 Like

Version 19.2.26 (aka RC1c) is now available on the GitHub project page. Thanks to some nice weather (finally! 😄) here in Sweden, I had the chance to properly test and adjust the VEML6075 (UVA/UVB sensor) module under more than gloomy indoors conditions… This release also includes some minor bug fixes and refinements to the I2C device identification functionality.

BR//KHH [xoblite]

PS. We peaked at UV index 2.7 (i.e. still “Low”, see e.g. this link) here today… 😉

I have a Si1145 in my portable weather clock that I use to get the UV index. It hit Moderate 3 the other day in bright sunlight. It was -8c or so at the time, lol. I have mine round off to whole number. It just makes it easier to read when displayed in my scrolling message.
My Si1145 kind of fudges the reading anyway. It doesn’t actually read UV light. It reads IR and ambient and calculates the UV index from that. I compromised on this sensor because it does the math for me and calculates the UV index all on its own. And reads the ambient light level. I use that to auto adjust my display brightness. Didn’t want to have to use two sensors.
Anyway, keep up the good work. =)

Thanks! I actually decided on the VEML6075 for the opposite reason - that it was a real UVA/UVB sensor - and the necessary code was actually fairly simple:

var uva = I2C_BUS.readWordSync(I2C_ADDRESS_VEML6075, 0x07); // Uncalibrated UVA
var uvb = I2C_BUS.readWordSync(I2C_ADDRESS_VEML6075, 0x09); // Uncalibrated UVB
var uvcomp1 = I2C_BUS.readWordSync(I2C_ADDRESS_VEML6075, 0x0a); // UV compensation value 1
var uvcomp2 = I2C_BUS.readWordSync(I2C_ADDRESS_VEML6075, 0x0b); // UV compensation value 2

var uva_adjusted = Math.round(uva - (uva_a_coef * uvcomp1) - (uva_b_coef * uvcomp2));
var uvb_adjusted = Math.round(uvb - (uvb_c_coef * uvcomp1) - (uvb_d_coef * uvcomp2));

var uv_index = ((uva_adjusted * uva_resp) + (uvb_adjusted * uvb_resp)) / 2;

All according to information readily and easily available in the datasheet and related application notes (which is more than you can say for some other devices/vendors…).

BR//KHH [xoblite]

It was years ago when I was mulling over what sensor to buy. I started out wanting something that actually measured UV light, but all that was available at the time, wouldn’t also give me an ambient light reading? It seemed to be one or the other, but not both?
I am keeping an eye out for a replacement for my Si1145, something that actually measures UV light “and” ambient light.
My info is displayed in a continuously scrolling message on my Sense Hat LED matrix. In normal light conditions the different elements are color coded based on conditions. Temp text is Red if its hot out and Blue if its cold out etc for example. Problem is my eyes have a hard time seeing Red text in very bright sunlight. Blue text is a struggle too, so I toggle all text to bright white to make it easy to read from a distance. And in dark low light conditions I set the display back to colored text and dim it. Its easier on the eyes and doesn’t distract you. My portable weather clock is headless with no keyboard mouse etc. And minimal buttons and switches. A shutdown button and a power switch. It’s for the most part water resistant. Vent holes on the bottom of the case and the buttons on the bottom out of the weather. The light sensing and adjustment are all automatic. Build pictures are in the link below. On my indoor version I just use the sense hat joystick to switch things if need be. It pretty well just runs 24/7 with colored text and the display dimmed.

https://1drv.ms/f/s!AjOYwiwlwDtpgq8_0VrdS3_H5xL_AA

++ Adding an example of a simple Grafana visualization dashboard, enabled by the PROMETHEUS module, showing off the indoors (read: sunlight through the window) UV radiation earlier today:

(…yes, the BMP280 device [on an Enviro pHAT], its readings and/or the necessary related proprietary math code [grr!] is behaving oddly, not sure which or why yet… @gadgetoid, have you seen anything like this on your side? Anything above 26.4 degrees C and it seems to consistently wrap around or something. I think I’ve translated the datasheet reference code correctly into Javascript, but who knows… 😉)

BR//KHH [xoblite]

@alphanumeric: Nice illustrative photos of your work, thanks for posting! What did you use as cover for the UV sensor though? (I don’t think it was shown in any photo)

My BG related stuff still sits on a pHAT Stack with various extensions… 😎

BR//KHH [xoblite]

I believe the cover started out as this,

I just cut it down to size with my dremel and then used silicon bathtub caulking to seal around it and hold it in place. Best I could do at the time I built it. I have yet to find a better solution.
I toyed with using one of the Pimoroni frosted difussers but it blocked some of the light and skewed the reading a bit.
I do like the black ninja diffusers though as covers for LED display etc.

EDIT: Build pictures of most of my Pi projects are here,
https://1drv.ms/f/s!AjOYwiwlwDtpgUMsp2qnevKpGEHb
If you’d like to take a look see.

I’ve come across things like this before- always good fun to debug. In this case, though, I can’t see that your code differs all that much from my Python implementation so I don’t know where this bug could be creeping in.

Can you print out the raw register data and compensation values alongside the temperature?

…and sometimes one is just looking in the wrong place… (simple typo) 😊

bmp280_typo

(As per the datasheet: “The data are read out in an unsigned 20-bit format both for pressure and for temperature.”)

Thanks for the inducing trout slap Phil… 😉

…new version 19.2.28 uploaded.

BR//KHH [xoblite]

That one of the “fun” things with working with say a temp sensor. How do you test all your code? Do you put it in your fridge, or stove, lol, to get the whole range of readings?
My portable weather clock was occasionally glitching on me. It would just quit and stop showing any message. I went over and over my code looking for a typo but didn’t see anything? And of course, it never did it while I was watching it so I had no idea if it was the temp, humidity or pressure code that was erroring out. Or even if that was what was happening?
While fixing another hardware issue I found I had a glitchy powerboost board. Since replacing that and replacing a very overworked proto hat (from modifications etc) all seem fine again.
I toyed with just setting temp as a variable and doing a t = t +1 starting low and letting it cycle through to a high. Then watch the temp slowly climb. If that was fine I’d then wash rinse and repeat with humidity and pressure. I’d at least know my code was Ok and it was a hardware issue.

1 Like

Try a thermocouple :D :D :D

Turns out there aren’t many readily available safe sources of 800 degrees C around :D

1 Like

Danger will Robinson, danger danger, lol. :D

As per reference.com:

The temperature of a burning match is 600 to 800 degrees Celsius. The temperature of a burning candle is 600 to 1,400 degrees Celsius, and that of a Bunsen burner is 1,570 degrees Celsius.

(That’s unless you’re a fan of Elon, of course; then a not-a-flamethrower plus the “overpriced fire extinguisher” add-on would also work I guess… 😉)

“YMMV”

BR//KHH [xoblite]

Hello all,

next up after a long life-induced hiatus:

Order just in for an SGP30 Air Quality (TVOC and CO2eq) Sensor, VCNL4010 Proximity/Light Sensor, ADXL343 Triple-Axis Accelerometer, ADT7410 High Accuracy Temperature Sensor (nb. already implemented, but which I have yet to test myself), IS31FL3731 11x7 White LED Matrix Breakout, and the N76E003AQ20 MCU based Trackball Breakout! 😊

By the way, @gadgetoid, since we now have both multiple display breakout options as well as a straightforward control breakout option thanks to the trackball, could you please also poke your peers about some kind of sound/audio breakout maybe? 😉 (e.g. in its simplest form maybe something like the small speaker/buzzer on the Adafruit Circuit Playground Express; not sure whether there are e.g. more elaborate MEMS options or similar out there if the needed sound levels are kept low enough (?)). And, just out of curiousity but possibly related, does the N76E003AQ20 MCU based implementation used on the Trackball Breakout open up for other, new non-I2C-native (?) stuff in the future, and if so what are its capabilities/constraints on a high level? Do you provide the microcode yourselves? (etc; note that I haven’t yet had time to look at your reference code for it so maybe the answer is partly in there somewhere; any further comments appreciated though)

Stay tuned!

BR//KHH [xoblite]

An i2c Real Time Clock Breakout, with a simple one line installer is what I’m wanting. I’m using Adafruits DS3231’s at the moment. Hookup is pretty easy, the setup procedure to get them working is a bit of a pain.