I have rebuilt the 'people counter' from the ground up, with an eye toward submitting a design and prototype to the bitlab. I have a 0-5000ppm sensor from CK Sensors (an obscure company in Kentucky) but I still have my eye on the industry standard CO2 sensor that uses infrared absorption technology, the K30.
The device consists of several modules:
The sensor and associated control board. The board is more complex than it needs to be since I ripped this out of another instrument. It works however, so I'll keep it intact until I get a replacement. I soldered jumper wires to the +5volt, GND and the signal line that varies between zero and 4 volts.
Analog signal amplification. When a person enters a room, the CO2 concentration increases by 30 to 200ppm depending on the size of the room and the ventilation. In order to have sufficient precision and the ability to scale the sensitivity of the counter, the signal is amplified. The unamplified signal with fresh air (about 400ppm CO2) is about 400 mV. In a large room, with a single person the output of the sensor module is around 425mV. A small room with 5 people will have an output of 1.2volts. Clearly the device must have a sensitivity setting. I want to do this early and with hardware, so the processing code will be more clear. So I put a NTE928 op-amp with a potentiometer to adjust the gain. The gain is adjustable up to 3X.
NOTE: There should also be a LV(M)321 op-amd buffering the signal line. I have not been able to obtain this chip yet, so I just left it out. It would be present, along with other protective components, in a real bit design.
Digital signal processing and data interpretation. The Bit will have two modes: percent CO2 (ppm/10000), and People Count: the number of people in the air space. I would also like to have a trigger output when a person enters the room. Currently only the %CO2 part runs reliably, but if I play with the sensitivity setting and software parameters, I can count up to 5 people in my 120 sf office. This software development is another area I will concentrate on.
Here is a picture of the three modules, powered by a p3 USB Power bit, and being read with a Number bit. Parts of the schematic I wrote while proctoring the last regular organic chemistry exam a couple days ago, is shown in the backdrop:
Here is the amplifier section:
And here is the business end of the sensor:
Thanks to everyone here who has helped me learn the electronics used in this project, including anyone I have forgotten to name below:
cc: @JackANDJude, @StuckInSynth, @Philip_Verbeek, @alexpikkert, @br1wr2el3, @henrique007, @codewizard58, @matthiasmwolf, @syedBits