Hi all,
This would be my first Raspberry PI project, but I have extensive experience with embedded systems (10+ years ago), and have 10+ years of professional software engineering. I am currently looking into building a environment control system with a Raspberry, but I have several questions.
## Question 1
This project doesn't require too much power:
- I think 15-20 sensors/switches, persisting the data in some form (SQlite would be great).
- Expose a website with some graphs, and metrics
So it seems a Raspberry 5 would seem overkill, although I could re-use this PI for another project later this year.
Any tips on how to attach so many sensors in a sane way to the PI would also be welcomed.
## Question 2
None of the sensors I found seems to list safe temperate & humidity operating ranges.
Quite soms of the sensors I want to use have exposed PCBs, so I am afraid exposing them to high humidity is safe.
For example:
- Pi Camare 3 NoIR (cannot have any light during cycle), is it safe to operate outside or in humdity that sometimes ranges towards 80-90%? If not, what are some solutions?
## Question 3
What are some ways to package this in a sane way? I mean I don't mind a lot of long wires with sensors coming out of the PI, once it's properly installed it would not get detached/re-attached for long times. However if I want to keep the Raspberry PI out of the high humidity enviroment, I would need to work with long cables. Including a ~2m ribben for the camera (or two).
Thanks in advance!
Looking forward to all feedback, and ideas and getting started wtih my PI adventure.
k9t33n
1. there's 40 gpio so you should be able to wire it up correctly with just gpio
2. id put it in a 3d printed box or maybe just like a lunch box would be fine
3 well 2 answers question 3
shishio3708
You would put the camera in a small box, with a clearing for the lens?
For 3, I was planning to put it outside in its vanilla casing you get in the. kits.
shishio3708
Looking for 3D schematics is probably best.. I've never done that before, and I guess there is still no IP guarantee on any 3D printed box.
k9t33n
wdym vanilla casing? just exposed? I wouldn't do that
shishio3708
This one, I've been seeing it advertised as "the original case" since the first raspberry
k9t33n
oh yeah that's not really the vanilla casing and also not my main worry
k9t33n
that wouldn't really protect it against humidity and probably intact make it worse with the fan
shishio3708
You I dind't mean the bare PCB, sorry for the confusion. My worry is mostly with the sensors.
Some _should_ clearly be safe for high humidty for exampke the DHT22, but I'm more concerned about the camera.
shishio3708
The Raspberry can sit outside of the high humid, although it can still go to 80% in the area where it would sit.
shishio3708
Actually the raspberry PI could go in a water safe junction box if really necessary
shishio3708
That way it can stay closer to the components if needed for wiring.
k9t33n
how much of the sensors will need to be out of the box? because I'm thinking to just put everything in the box as much as possible
k9t33n
the pi goes inside
k9t33n
because if we create a case for each one the readings for it won't be accurate
shishio3708
Temp, and humidity sensors cannot go inside, capacitive soil moisture cannot go inside, other controllers like relays, or drivers cannot go inside, only perhaps the camera but it would probably blur it.
k9t33n
the camera can with a cutout
shishio3708
Well, neverind the relays can but some drivers don't but those should all be water safe.
shishio3708
Okay, so I guess I need to figure out something special for the camera
k9t33n
id still put them all inside just to be safe
shishio3708
No, there are also waterpumps, etc but that is not a problem
shishio3708
Everything can go inside, except the camera. Are there any off the shelf product you can use with Raspberry PI?
k9t33n
well just drill a small hole and tape the camera to it so the camera acts as a sort of seal, I think it it's will be fine
k9t33n
I mean pretty everything works with the gpio
shishio3708
For example, I have a Sonoff wrapped DHT22 sensor that works with AM2302, so I should be able to use it as a DHT22 through AM2302.
k9t33n
just make sure to count up the gpio pins your using because you might run out
shishio3708
Yes, I might need an extension but I'll slowly be building out. I'll likely start with only 7.
k9t33n
I think(?) idk I've never heard of these before
shishio3708
I'm going to try the Sonoff, and try get it to work 🤷♂️
shishio3708
The device it was connected to is no longer supported by the app -.- So it's useless atm anyway
this makes sure that everything keeps in check if the power goes
k9t33n
and/or shutdown the pi when that happens to make sure you don't get file damage
shishio3708
I guess I'll have to start looking for a nice junction box I like 😁 I'll report back soon with some pictures.
Stil deciding between trying Java4pi, or just going with python. What is the top recommendation actually? I have experience with a lot of languages, but I'd like something modern with a vribrant eco-system of libraries so I can for example easily expose a website with some nice graphs, etc.
k9t33n
robotics tend to go well with python
k9t33n
also python is the only launguage I know atm so I can help you if you like
k9t33n
oh actually just fully read this, with the website part you might want to a mix of both along with html
shishio3708
I think I'm okay with power, it's pretty reliable here but good point on the file damage. SQlite shouldn't give me any file damage, and missing a bit of data due to power outage should be fine.
shishio3708
Not entirely sure yet how I'm going to do the website part yet. Considering htmx should make things easy with sqllite
k9t33n
well if it's doing something whilst the power cuts and it isn't shutdown properly everything is do do
k9t33n
also talking about reliability SSD > SD card
k9t33n
quite easy and cheap to do as well, I'm running that configuration rn
shishio3708
What are you running?
k9t33n
on my pi?
k9t33n
well my pi 5 which is booting off a SSD is right now my self hosted VPN, pihole server and Nas
k9t33n
sson it's also going to be my discord bot server and BBS server
shishio3708
I see, I'm not sure yet I need to go the SSD way. So I am going to stick to SSD for now, but I'm trying to stick closer to an embedded system than a micro pc ;p