>>> Join Us in the Fight Against Air Pollution

AirGradient Forum

Looking into options integrating AirGradient into schools

Hi everyone,

I’m working on a project to re-design the electronics of a school ventilation system. Here’s the background: the school purchased a high-quality ventilation system four years ago, but unfortunately, the manufacturer went bankrupt. Now the electronics are failing, and the ventilation is intermittently stopping. The mechanical components of the system are in excellent condition, but the electronics are beyond repair and replacement is no longer an option.

I’ve successfully designed new electronics for the main ventilation system, and it’s working great. The next step is to design a control panel for each classroom, and this is where I could use some advice.

I’m considering using the AirGradient open-source system as the basis for the classroom control panel. It already has a four-pin screw terminal and breakout cable, which I can use for communication via a LIN bus (one-wire). I’ve worked with LIN communication before and can handle adding the necessary code to the AirGradient firmware (it’s available online), so integration with my ESP32-WROOM-based ECU shouldn’t be an issue.

Each classroom control panel needs two manual buttons for teacher control:

  • Button LOW: Reduces ventilation by 15% for the next 2 hours.
  • Button HIGH: Increases ventilation by 15% for the next 2 hours.

The issue is that the AirGradient system doesn’t have built-in buttons, and I only have one free IO pin left. Here are the options I’ve considered so far:

  1. Use an I²C IO expander to add more pins for the buttons.
  2. If the AirGradient has remaining analog pins, I could potentially multiplex two buttons onto one IO.
  3. Physically modify the AirGradient case to add the buttons. However, I don’t have an AirGradient unit yet, so I can’t check how feasible it would be to drill or CNC-mount two buttons onto the front of the case.
  • Has anyone modified an AirGradient case to add external buttons? Is there enough space for this, and are there tips for drilling or mounting buttons cleanly?
  • What’s the simplest way to add two buttons with only one IO left? Would an analog multiplexing approach be practical, or is an IO expander the better choice?
  • Are there other systems or ideas I should consider for this kind of classroom control panel?
1 Like

Interesting use case. I think to drill holes into the enclosure to mount push buttons should work fine. The enclosure is made of ASA plastic and fairly strong.

To wire a front mounted push button to the existing Boot push button on the back might work and allow for a second button.

I expect that the CO2 sensor module is in use and controls the speed of the fan of the ventilation system? If the PM module is not in use then it might also be possible to use one of these pins. Otherwise I would expect that multiplexing with the single remaining analog pin would work fine too.

Hi Nick, thank you for your reply. Good to know that drilling a hole would be fine. I had some discussion and probably we go for the i2c io expander route as that gives us more headroom. I will design a small pcb to make that possible together with the LIN bus interface.

This project will be a showcase for possible more schools as the ventilation units are delivered all over Netherlands and Germany, and both are not serviceable anymore. I will add this module to the list of options that we will select in the future meeting.

One more question. In the past I used many OLED’s. But after a year of use a lot of the OLED screens where going very dark, did anyone of you also notice this or do you dim the OLED when it not used?

I had to replace over 100 units because of the OLED burn in at that time.

I’ve noticed the same with OLEDs after some 2 years of 24/365 usage and then started to switch them entirely off at night. The manufacturer said in this case that pixel aging occurs after 72h.

1 Like

Thank you for letting me know.

Final question, is the cloud of AirGradient Dashboard open sourced? I could not find it, only the ESP code.

No, our cloud is not open source.

That said, a lot of us have a fair bit of success using Grafana for our data visualization needs. Both the AG-built firmware and alternatives (e.g. the one based on ESPHome) can expose the data and measurements in a format that’s easy to put into variety of time series databases such as InfluxDB or Prometheus.

3 Likes

Thanks a bunch for the replies.

Too bad that the cloud is not open source while the whole project is from hardware to software. What is the reason for this?

My setup proposal is as follows for the first school

  1. Buy 15 air gradients
  2. Add 2 push buttons into the case of the air gradient
  3. Design a add on pcb LIN bus interface
  4. Let the data from the Esp32 send to a mqtt cloud service EMQX

This is the part I need to figure out. I’m not so good in online cloud dashboards but I consider

  1. Setup a home assistant on VPS in the cloud (digital ocean)
  2. Add database to home assistant with the InfluxDb addon
  3. Use Grafana plugin in home assistant to make dashboards.
  4. Buy the online home assistant service to support that project monthly.

Then the school admin can have a big screen at the entrance that shows the quality of each classroom with Grafana Dashboards.

And the school admin can also manual control the ventilation like speed, co2 thresholds, air mixing valve (recirculation vs new air intake), and I can show alarms on home assistant like replacing filters.

Reason for hone assistant is that I’m expert in that environment including software from and to Esp32 devices. Especially over mqtt in the cloud.

Altho I know it’s now made for this, I do not see any issue to do so. Home Assistant has great automated updates, is very stable. It only misses multi user privilege options but in this case it is not needed.

The backend is very complex and started as a closed source project so it is not very accessible as an open source code base.

We might offer something in future as an open source backend but there are a lot of solutions available already like Home Assistant or Grafana.

You can also use our cloud platform first. The first year is included in the purchase price and then build up your own solution in parallel.