Creating a heated climate controlled box

May 6, 2024, 19:55

astrydax

I do ant keeping and need to keep my ant testubes at consistent warm temperatures. I'm not sure how the 5v pins work on the raspi and how many 5v components I can attach if someone can point me in the right direction. I've not have much luck doing my own research. Let me know if this reddit post is viewable with its links detailing the parts I'm ordering. https://www.reddit.com/r/raspberry_pi/comments/1clejt4/trying_to_make_a_climate_controlled_box_will/

oops.se

Different Raspberry Pi versions (and you haven't stated your version) can provide power that way, but I don't recommend it.

astrydax

Sorry yeah, in the post on reddit I have a pico and a waveshare2040

oops.se

Then its like 40mA or so

astrydax

So the pi itself would just need to power a temp sensor, a screen, and fan. The heater would have its own source controlled by a relay

oops.se

And?

oops.se

If you state no facts, it is impossible to assist you!

astrydax

Im sorry I thought those were relevant facts. I'm not sure what facts you're looking for. I was under the impression that those 3 components I mentioned wouldn't draw too much current. I see that the fan draws about 150milliamps. What I really don't understand is how people connect multiple components that need to draw from 5v on the pi when there is only 1 or 2 pins that are marked 5v.

thunder07337

Breadboard

thunder07337


riothedev

breadboard or a custom pcb, although i don't suggest plugging a fan and a screen together just in case, so u could just have a seperate power source or a shared power source with the pico

riothedev

u can draw a maximum of around 300ma from it in total

riothedev

but even so i suggest letting the pico do the thinking and get another source for the power

astrydax

Would I be able to put both the heater and the fan on the other end of the relay? I have a 12v power for the heater, I'm just not sure how I would also connect the fan. I could get 12v fans.

riothedev

no need u could just step down the 12v to 5v

riothedev

im kinda confused though

riothedev

putting the fan on the same relay as the heater

riothedev

then u'd be turning on both at the same time no?

riothedev

so from what i see u'll need a 12v relay for the heater, a 5v relay for the fan and screens can usually be connected straight to the pico <@237258018348204032>

riothedev

the pico has a built in temperature sensor but i dont know how accurate it is, so u could get something like an LM35

riothedev

it has 1c accuracy so it wont be accurate down to the decimals so i dont know if its fitable for u

riothedev

but that can be connected to the pico itself as well

astrydax

I didn't know it had a sensor. That's usefully. Ok so I could do two relays. The fan is to circulate the heat for even heating so I suppose it would be ok if it only came on when the heater did. I was going to put a temp sensor at the bottom and top of the box to make sure the temperature isnt a gradient in the enclosure. Running three power sources to the box for two relays and a pi seems like a lot though.

riothedev

ah i thought the fan was to cool things down or something so then if u only need it to turn on while the heaters on then u can just step down the 12v to 5v for the fans

riothedev

also u dont need to run 3 different power sources to the box

riothedev

u could just have a single 12v power source

riothedev

which can be stepped down to 5v for the pico

astrydax

I'll give these a shot

riothedev

10 of them?..

astrydax

I don't mind getting extra at that price. I'm going to be making a few of these boxes. I've got different species of ants that will want different temperatures

riothedev

u should search around locally, there tend to be some electronic components shops that sell boards such as that

astrydax

So I'll need a few enclosure

riothedev

before buying them i suggest making a schematic or something os u know exactly what u'll be making

astrydax

I'll work on that then first

riothedev

wait

riothedev

<@237258018348204032> I was thinking something like this

astrydax

Oh sweet yeah that looks good. That's awesome thanks for making that.

riothedev

ure welcome, although im not an expert or anything so i'd have someone else look over it just in case if it could be any better

astrydax

Oh you know what. I think the buck converter might distrub the ants with EMI. I'll have to look into that too.

riothedev

good idea

riothedev

<@237258018348204032> kinda curious, did u figure anything out?

astrydax

I'm here right noe

astrydax

Now

astrydax

I think I will edit the schematic to have two buck converters instead of two relays however and just power the fan off the same relay as the heater

riothedev

oh thats pretty cool

riothedev

yea i was thinking that too just thought it'd be cheaper to have two relays instead of two buck converters

astrydax

I struggled quite a bit writing the driver for the aht21 temp sensor and for some reason I'm getting responses saying the temp in the thousands with the correct temp sprinkled in every so often. I just filtered out any response over 230f but I'd like to know what's causing that to happen

riothedev

thats weird, are u using a library to read the temp?

astrydax

I tried one I found on GitHub but it wasn't working for some reason, doesn't seem to be a lot of stuff out there for this sensor. But it's way more affordable than everything else I've seen more commonly used

riothedev

this too?

riothedev

can u show me ur code

astrydax

I ended up fixing the driver

riothedev

nicee

astrydax

looks like the stepdwon convertors i ordered are either faulty or i'm using them wrong. They didn't have the best reviews. Is there one you suggest using? This is what I tried https://www.amazon.com/dp/B08JZ5FVLC

astrydax

video

riothedev

thats rly nice

astrydax

Any idea about getting this boy to work on the pico? It's SPI but doesn't have a CS pin and is kinda labeled like i2c?

oops.se

New question = New topic