Menu

And a new sensor type

I was digging through my box of Pi/Arduino goodies and came across a few old sensors. Two of them have been destroyed by leaving them out in the weather unprotected. We don't have a lot of weather in SoCal, but we do have thick fogs regularly, which is not at all friendly to electronics outdoors.

At any rate, There was one GYBMEP board in there, so I plugged into a Pi Zero W, checked out the sensor code, and fired it up. It said "Invalid chip ID 0x57." A quick web search revealed that was was indeed a BMP280 chip, not the BME280 I have on the front of the house. What's the diff? The BMP280 has temperature and pressure, but not humidity. It's also a somewhat simpler protocol. Adafruit of course has a CircuitPython module for the BMP, so I hacked up the sensor code to support both, added another setting to the ini file so you can tell the code which you have, et voila! A sensor ready to go.

I still have some physical work to do to prep this for outdoors: conformal coating the Pi Zero W and the sensor, gooping up the connections with silicon sealant, and most importantly tracking down a weatherproof case. I think I'm going to try a weatherproof junction box first, using a cable gland to get the power in and the sensor out. Positioning is important for a temperature sensor, it needs to be in clear air flow, but not in direct sunlight. I have a wooden post sticking up in my garden where I want to mount this, so getting it put in place and out of the sunshine is going to take some thinking.

In the meantime, I need some better chart displays, including a display that shows both sensors now. More Chart.js, yay!

Posted by Wes Peters 2020-01-09 Labels: sensor BMP280 BME280 Raspberry Pi ZeroW
Attachments:

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.