Author Topic: Humidity proof temp sensor PCB  (Read 1859 times)

0 Members and 1 Guest are viewing this topic.

Offline n4teTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: pr
Humidity proof temp sensor PCB
« on: September 24, 2023, 03:46:55 am »
I made a PCB that has a temp/humidity (ENS210) and VOC sensor (ENS160) and used an ESP32-C3 MCU (Xiao). I found it runs surprisingly hot, so the temperature is not accurate.

Now I've redesigned using an STM32F411CEU6. I put the two LDOs at the bottom and the sensors at the top, ~54mm away. I cut a bunch of 1mm slots and made the traces going to the sensors very long: SDA, SCL, GND, 3.3V, and 1.8V traces are 0.16mm (~6mil) and about 160mm in length. It's a 4 layer board and I kept the long traces on the outer layers, to better shed heat. I held back the copper pour from the long traces but kept signals opposite GND or 3.3V. Hopefully it's a poor antenna.

It looks like this (may have gone nuts with slots, but it's the purpose of the board):


This sensor will be used in a bathroom that has a shower, hidden in or near the exhaust fan or in the duct. It will turn on the exhaust fan based on temp, humidity and VOCs.

Finally my main question: Given the humid air, how should I treat the board?

I will use epoxy filled vias.

I have a conformal coating spray (MG Chemicals 422B, silicon modified acrylic). I can use that (after masking the sensors) but as I understand, it isn't intended to be waterproof. Is it good enough for bathroom humidity? Is there something better?

I could pot the board in epoxy resin, leaving the slotted area exposed (with the conformal coating). There is a 4 wire terminal block that also needs to be exposed. I'm not worried about repair/rework, if the board dies I can just make a new one. However, would the epoxy cause the two NCP114 LDOs and STM32 to run hot, potentially ruining the sensor readings?

I plan to run the STM32F411CEU6 (a 100MHz MCU) at 25MHz. Can I expect that to run cool? Is there a better STM32 pick that is pin compatible with running cool in mind?
 

Offline luudee

  • Frequent Contributor
  • **
  • Posts: 283
  • Country: th
Re: Humidity proof temp sensor PCB
« Reply #1 on: September 24, 2023, 08:53:09 am »

Hello,

filling vias with epoxy will not do anything for your PCB,  unless you used really huge vias.
Typical solder mask actually covers vias pretty well, usually sufficient to apply 1-3 conformal coats.

For your project, from everything you have said, I would go for epoxy or silicon base, and submerge
the PCB in that base. I'm not sure if the slots in the PCB will do anything once you submerge
the PCB in epoxy. Even is you manage to expose the slots through the epoxy, might want to
check thermal characteristics of epoxy/silicone.

Another thought ... I would have made one or two small PCBs for the sensors only, and submerged
those in epoxy/silicone ... and have the CPU and other active components be at some other place.
I2C can easily handle 1-2 meters, for the sensors, and for your application, you can throttle the I2C
clock (100khz) and get even larger distances to the sensors ...

Good luck !
luudee
 
The following users thanked this post: Someone

Offline n4teTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: pr
Re: Humidity proof temp sensor PCB
« Reply #2 on: September 24, 2023, 02:05:57 pm »
My via hole size is 0.4mm and 0.33mm. I think epoxied vias is ~$16 (JLCPCB), not a huge problem for a one-off board. I thought it would help make the board slightly more resistant to moisture. If anything it's pretty convenient to be able to stick a via in a pad occasionally!

Can you recommend a product for epoxy or silicone submersion? The Wago 4 wire connector may be tricky to protect from epoxy incursion. I could use Sugru (clay that turns into silicone rubber) on the back before the epoxy.

I like the cleanliness of not having wires but I may need two PCBs if I can't fix the thermal problems. I can't tell how much the VOC sensor heats up, so I'm a little worried about it being near the temp sensor even on a separate PCB.
 

Offline Microdoser

  • Frequent Contributor
  • **
  • Posts: 423
  • Country: gb
Re: Humidity proof temp sensor PCB
« Reply #3 on: September 24, 2023, 02:41:58 pm »
You want to ensure you don't clog up the hole in the sensor when you apply any coating. Personally, I have a similar board that runs in 80%+ humidity constantly without issues, and it has no coating or specialised vias. If you are placing in the actual vent, that would dry it out every time humidity got above a certain amount so I personally wouldn't worry too much about the board getting too moist as it directly controls the thing that will reduce the moisture...

Your temperature will run hot as the gas sensor uses a heated element to detect the air quality. If you want accurate temperature sensing, you might want to consider splitting the two sensors into their own housings. If it's just for a shower room, I'd run with only temperature and humidity and then detect when the light gets turned on and off, and run the fan for a set amount of time when the light turns off. That should cover all situations of 'excess VOC' in the bathroom. It could be done very cheaply with a LDR and you would have accurate temperature readings.
 

Offline n4teTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: pr
Re: Humidity proof temp sensor PCB
« Reply #4 on: September 24, 2023, 10:40:17 pm »
Aye, definitely need to mask the sensors (and terminal block).

Good point that the device's very job is to ensure it doesn't see to much humidity. I am probably over worrying, as one does. I think I'll try just a conformal coating and see how it goes.

I separated the 2 sensors specifically for a worry about the VOC heater. On my hot ESP32-C3 board I can't tell if it's the VOC sensor or the MCU (or both) heating up the whole board. ScioSense says the two work well together, as the temp sensor can report temps to the VOC sensor to adjust its algorithm, but they don't say anything about the VOC sensor in the layout app note. They also don't mention anything about the VOC sensor heating nearby components.

I mainly care about temp and humidity, the VOC sensor is mostly for kicks. I can rate people's dumps or whatever. ;D

I already control the lights via a motion sensor. I know when the light goes off because my code turns it off. I want smarter fan control though, mostly just for a fun side project. It's nice not to run the fan just because the lights are on, and to run the fan only as necessary to reduce humidity.

I made a little 3D printed enclosure for kicks (the slots are ovals, just a bad 3D export from DipTrace):





I hope to place it on its side, like in the pics, with the temp sensor at the lower position, possibly with magnets under it. We'll see when I get the new Panasonic exhaust fan.

It's hard to see, but it's a C shape so the board can slide in from the side, then the lid slides in and holds it together.

 

Offline n4teTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: pr
Re: Humidity proof temp sensor PCB
« Reply #5 on: October 22, 2023, 03:01:36 pm »
I hate it when threads don't have closure, so here's the finished project! The STM32F4 runs super cool compared to the ridiculously hot ESP32-C3. It's 100MHz but I'm running at 25MHz and it doesn't get warm at all. Total current draw is ~36mA. About ~25mA of that is the VOC sensor but it doesn't seem to affect temps even when running a long time. I'm not sure if the slots were necessary, but I'm really happy the device is working well.

On the board is the STM32, LDO, ENS210 temp/humidity sensor, ENS160 VOC sensor, and RS485. The sensors are the only components on the back side, to keep them farther from everything else. In retrospect maybe the VOC sensor should have been on the top to put it that much farther from the temp sensor. I haven't yet applied the conformal coating, but that's the plan (sensors masked).





 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6247
  • Country: es
Re: Humidity proof temp sensor PCB
« Reply #6 on: October 22, 2023, 04:05:23 pm »
Why such long traces? You could route them in the pcb border, 6-8mil traces won't transfer enough heat to become a problem.

Epoxy filled vias only add cost, coating should be enough.
Normally, sensitive parts come with Kapton tape sealing the critical areas, gonbe removed after fabrication and washing.
So you could apply the coating and later peel them.
Otherwise, just apply masking tape to the sensor holes, connectors, etc.
We do that a lot, there're some poor bastards doing this all day at my work.
« Last Edit: October 22, 2023, 04:14:57 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline n4teTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: pr
Re: Humidity proof temp sensor PCB
« Reply #7 on: October 22, 2023, 05:10:18 pm »
Copper conducts heat extremely well, sadly it's pretty important for the parts to work. ;) Maybe they don't need to be so long, but I was a bit traumatized by how hot everything got using an ESP32-C3. At least this way I'm sure I've done all I can.

No kapton tape comes on these parts, but I have some to apply. I wouldn't want to mess with conformal coating all day, even with protection. Soldering makes me nervous enough. I use a filter and wash my hands a lot, but still can't help being nervous, especially with leaded paste. It's so easy to get that crap everywhere.
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6247
  • Country: es
Re: Humidity proof temp sensor PCB
« Reply #8 on: October 22, 2023, 09:14:57 pm »
Show the first version of the board!
Four 2" long 6mil thick traces won't make a considerable heat path, but definitely a solid pcb will, specially if you used ground planes and/or short distances between the esp32 and the sensors.
The STM32FF411 power is negligible at 25MHz, 10mA would be already a lot for it, and it would be just 33mW!
That power won't cause any temperature increase, but other parts consuming more might.
Disabling the ESP32 modem and lowering the core speed to 80MHz reduces the current 18mA, should give much better results.
« Last Edit: October 22, 2023, 09:24:35 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline n4teTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: pr
Re: Humidity proof temp sensor PCB
« Reply #9 on: October 22, 2023, 09:32:49 pm »
On the latest board there are 6 sensor traces, each 6mil and ~6.3" (160mm) long, without copper fill around the slots.

Sure, here's the old board. 4 layers, solid GND internal layers, Xiao ESP32-C3 soldered like an SMD. The sensors are just on the bottom wherever, next to the 1.8V LDO. :D The ethernet jack is for power and RS485.





With the ESP32-C3 I disabled WIFI and BT. IIRC I had some issue running it slower than 160MHz. On regular ESP32s I often use light sleep to run more slowly, that uses less power than running the CPU slower. I found I can't do that with the ESP32-C3 because the USB CDC is internal and shuts off in light sleep. Now that I've built some STM32 boards I greatly prefer them when I don't need ethernet/PoE, so I'll probably not use the ESP32-C3 again.
« Last Edit: October 22, 2023, 09:37:43 pm by n4te »
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6247
  • Country: es
Re: Humidity proof temp sensor PCB
« Reply #10 on: October 23, 2023, 12:28:57 am »
Well that was totally the opposite!
Everything packed very tighly, large copper planes, sensors placed right next to the LDO... :D
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline n4teTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: pr
Re: Humidity proof temp sensor PCB
« Reply #11 on: October 24, 2023, 02:58:31 am »
The esp32c3 can be downclocked and the WiFi turned off, did you try those two things?
Yes, and turned off BT. I still didn't find it to run cool. No problem now that I moved to STM32.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf