Pi with camera, switches, a relay and a BME680 or 688?

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
YetAnotherMike
 
Posts: 7
Joined: Thu Oct 02, 2014 3:29 pm

Pi with camera, switches, a relay and a BME680 or 688?

Post by YetAnotherMike »

Please forgive any stupid questions... I'm a rank newbie on the Pi... My last microcontroller
project was on a Z80 back in the late 1980s with assembly code...
I welcome any comments from the more experienced people... and thanks in advance!

I'm collecting the parts to add to a Pi 3 that I was given a year ago along with a Pi camera
and have both still in the boxes...

I want to mount both in a plastic housing on my garage wall:
a) with a camera looking at both the dog's bed and at the door,
b) with magnetic switches telling me that the garage door is open, closed, or inbetween
(see attached wiring diagram, picture a magnet on the door, when the garage door is open
the "open" switch is activated, when closed the "closed" door is activated)
c) an Adafruit BME680 or 688 sensor unit

The Pi will talk to the house WiFi... I'd like to have the Pi hosting a web page showing:
a) the current camera image
(maybe take a picture once a minute and save it in RAM, and display that,
saves writing to the card and wearing it out...)
b) the garage door status (open, closed, or in between)
c) the BME680 / BME688 sensor numbers,

Anyway... Am I missing something? I see no difference between the 680 and the 688?
How do I connect a "STEMMA QT / Qwiic / JST SH Cable - 100mm long" to Pi ?
Or is there a better way to interface it to a Pi ?
Is there a downloadable Pi library for the 680 or 688?
Is there an existing project that someone has posted that I've overlooked?
(maybe I don't have to reinvent his/hers wheel...)

Is there a question I should be asking that I am not?

And long-term I'd like to add an additional relay that will close (which sets off
an alarm) if the BME680 / BME688 sensor numbers exceed set thresholds...

If I can figure out a way to secure the web page I'll add a web page "button" to
trigger a relay whose contacts "press the button" on the garage door opener.

As I said above... Comments are welcome!

Thanks in advance

Mike
Attachments
Garage door opener switch wiring.jpg
Garage door opener switch wiring.jpg (179.94 KiB) Viewed 76 times

User avatar
barshatriplee
 
Posts: 200
Joined: Wed Mar 22, 2023 10:11 am

Re: Pi with camera, switches, a relay and a BME680 or 688?

Post by barshatriplee »

Mounting the Pi and camera in a plastic housing on your garage wall is a good idea. Just ensure that the Pi is securely mounted, and the camera has a clear view of the desired areas.

Using magnetic switches to detect the status of the garage door (open, closed, or in-between) is a common approach. The wiring diagram you mentioned can work well for this purpose.

Both the BME680 and BME688 are environmental sensors that can measure temperature, humidity, pressure, and gas resistance. The BME688 has additional features for detecting volatile organic compounds (VOCs). The connection to the Raspberry Pi can be done using the STEMMA QT/Qwiic/JST SH Cable. These cables typically have female connectors at both ends, allowing you to connect them directly to the sensor's breakout board and the Raspberry Pi's GPIO pins.Adafruit provides Python libraries for both the BME680 and BME688 sensors.
If you want to secure the web page hosted by the Raspberry Pi, you can consider using encryption protocols like HTTPS and authentication mechanisms to restrict access. Implementing SSL/TLS certificates and proper authentication methods can help secure the communication between the web page and its users.
Adding an additional relay to trigger an alarm when the BME680/BME688 sensor readings exceed set thresholds is a feasible idea. You can connect the relay to the Raspberry Pi's GPIO pins and control it through your code. When the sensor readings exceed the thresholds, you can activate the relay to trigger the alarm.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”