gsuberland,
@gsuberland@chaos.social avatar

if anyone's got some spare time, I'd very much appreciate some technical review of the mk2 CO2/AQI sensor board design for EMF Camp.

full schematics, top/bottom copper, renders, and BoM are in the PDF: https://poly.nomial.co.uk/junk/CO2SensorBoardMk2_20240426.pdf

relevant info:

  • ESP8266 devboard plugs in underneath, board is either powered by USB Micro on devboard or USB-C on mainboard
  • fab & assembly by JLC
  • 4L board, inner layers are solid ground planes
  • 4P header is for SSD1306 OLED
projectgus,
@projectgus@aus.social avatar

@gsuberland Very neat board, btw. Is the idea to read from all three sensors and do some comparative analysis / "sensor fusion"? I'll be interested to see what you find.

gsuberland,
@gsuberland@chaos.social avatar

@projectgus reporting them all over MQTT.

last time we just had the MH-Z19D and SHT35. the readings got skewed a lot by foggers in the nullsector and other areas. we're switching to the SCD40 which is a much better photoaccoustic NDIR design with two internal sensors (one for autocal & deskew, one for the measurements). the SGP30 should hopefully help provide additional insight into TVOCs.

I'll also be adding a PM sensor to a couple that'll be operating in fogged areas.

gsuberland,
@gsuberland@chaos.social avatar

@projectgus these sensors are intended to have two main functions: to help orgas identify places where airflow is a concern, and to help attendees make informed decisions. all the data will be publicly available via a Grafana dashboard for anyone to check out.

projectgus,
@projectgus@aus.social avatar

@gsuberland Really interesting, and a very worthwhile goal!

gsuberland,
@gsuberland@chaos.social avatar

@projectgus we did this at the last EMF and it was very interesting to see all the data. lots of people checked it out and asked questions, too!

projectgus,
@projectgus@aus.social avatar

@gsuberland Is it too late to talk you into an ESP32 family devboard instead of 8266?

It'll be fine but switching gives you better firmware options, hardware I2C and PWM, and overall less rough bits. Although if you have a mature ESP8266 firmware stack in mind then that probably trumps any of this.

gsuberland,
@gsuberland@chaos.social avatar

@projectgus I built this to use the ESP8266 devboards I have in stock, to save costs, but the specific ones I have (Plusivo) are no longer manufactured so I will be building NodeMCU ESP8266 and NodeMCU-32S adapter boards anyway to give me options.

gsuberland,
@gsuberland@chaos.social avatar

@projectgus I already have the rev1 firmware for these boards so I decided to stick with them for this.

in hindsight it would've been better to build them for ESP32 since I'd forgotten how limited the GPIO was on ESP8266, but I'm committed to this design now. although since it's just I2C for everything except the MH-Z19D (which is UART) it's trivial to make adapter boards.

projectgus,
@projectgus@aus.social avatar

@gsuberland Also, I assume you are all over this as your depth of MOSFET knowledge trumps mine, but the AO3400 level shifters look like they'll be still in their linear region when 1.8V side pulls low. I don't see a section of graph in the datasheet that covers it, but I assume it'll still be much more conductive than the small current they need to pass to pull down a 10K pullup quick enough?

gsuberland,
@gsuberland@chaos.social avatar

@projectgus from what I can tell they're well into conduction at 1.8V.

Figure 2 of the datasheet shows Id at around 9-10A by the time you get to Vgs=1.8V

https://aosmd.com/res/datasheets/AO3400A.pdf

projectgus,
@projectgus@aus.social avatar

@gsuberland Ah yeah, my mistake. Somehow missed that one on first glance!

gsuberland,
@gsuberland@chaos.social avatar

@projectgus you'd have been right at 1.5V though. the worst-case Vgs(th) is 1.45V and at that point it only sinks about 250uA, which wouldn't be enough to pull the rail down.

(although in practice it might be ok at that low a voltage since Vgs(th) typ is 1.05V)

projectgus,
@projectgus@aus.social avatar

@gsuberland Yeah I saw that and then went looking for where it transitions to On, missed figure 2 somehow.

I think something in my brain still hasn't accepted how good modern FETs can be.

gsuberland,
@gsuberland@chaos.social avatar

@projectgus Rds will still probably be a few tens of ohms at that point but it'll be more than enough to pull that rail down :)

gsuberland,
@gsuberland@chaos.social avatar

a few notes:

I'm aware that the 1.8V LED might be very dim due to the low voltage. one solution would be to use a MOSFET to drive it from 3.3V with the gate tied to 1.8V, but that's kinda clunky.

all signal vias should have a z-axis GND reference via close by regardless of expected transition speed; I don't think I missed any.

the heavy via stitching is for both electrical and thermal reasons. keeping the sensors at the same temperature will help keep the measurements as accurate as possible.

gsuberland,
@gsuberland@chaos.social avatar

the fan output is for periodic operation. these sensors have special guidelines around airflow. the chassis will be designed to produce fairly laminar airflow over an aperture to avoid turbulent air movement over the sensor. every so often (e.g. once every 15 mins) the sensors will stop taking measurements, the fan will operate for a few seconds, then the sensors will resume after some settling time. this way we avoid air stagnating inside the sensor but don't mess up the readings with the fan.

gsuberland,
@gsuberland@chaos.social avatar

the board cutout is intended to pull double duty. it improves airflow to the sensors under the MH-Z19D, and also aligns with the position of the PCB antenna on the ESP8266 dev board.

it turns out these Plusivo ESP8266 boards from the rev1 design are now no longer made, so I'm intending to build some NodeMCU adapter boards. those will cause the devboard to sit further off the board, so RF attenuation should be less of a problem, but I still intend to align the antenna with the cutout if possible

gsuberland,
@gsuberland@chaos.social avatar

the pads and via stitching around the edge are intended to make it super easy to mount the ground clip on a scope probe for debugging.

the 0Ω resistors (e.g. GPIO net ties, and those in the 1.8V logic level conversion) are defensive design features to make it easier to separate things and rework them if needed.

the VIN-VUSB jumper (J1) is there for similar reasons. makes it easy to verify I've got the connections right first, then bring up the DC-DC.

gsuberland,
@gsuberland@chaos.social avatar

I have fixed the most heinous of errors: the misalignment of the section box around the ESP8266 connector in the schematic.

claudius,
@claudius@darmstadt.social avatar

@gsuberland
Why not something more recent like any of the Esp32 models?

gsuberland,
@gsuberland@chaos.social avatar

@claudius holdover from rev1, so it's what I had on hand. I have designed bridge boards to support ESP32 devkits

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • cubers
  • DreamBathrooms
  • ethstaker
  • magazineikmin
  • thenastyranch
  • ngwrru68w68
  • Youngstown
  • slotface
  • modclub
  • love
  • kavyap
  • everett
  • InstantRegret
  • mdbf
  • megavids
  • khanakhh
  • tacticalgear
  • osvaldo12
  • rosin
  • tester
  • GTA5RPClips
  • cisconetworking
  • Durango
  • Leos
  • normalnudes
  • anitta
  • provamag3
  • JUstTest
  • All magazines