-
Ozone sensing - design changes
08/13/2017 at 23:59 • 0 commentsThe original design used a carbon monoxide (CO) sensor from SPEC, in a 6 lead through hole package. They also offer a number of sensors in the same package: NO2, alcohol, O3, SO2, H2S.
I was interested in the ozone (O3) sensor, as electrostatic filters can generate some ozone.
It is essentially a drop in replacement, however some circuit elements and code needs to be changed. For comparison:
Carbon Monoxide (110-102) Ozone (110-401) Sensitivity 4.75 nA/ppm -12 nA/ppm Range 0 to 1,000 ppm
0 to 4.75 uA0 to 5 ppm
0 to -60 nASo while the sensitivity is higher, the range is much smaller and higher TIA gain is needed. Recommended is 500k, however the LMP TIA amplifier used will only go up to 350k. This means a maximum voltage output at -60nA of only 21mV. With a 10-bit ADC and a 3.3V reference, that would give us only ~26 counts to cover the full range of the sensor.
The reference voltage needs to be reduced, but there is a limit. LMP91002 has a lower level of 1.5V:
STM32L476 has a lower limit of 1.62 to 2.4V:
So U8 can be replaced by LM4120AIM5-1.8 for example, to provide 1.8V Vref and 48 counts to cover the full range. Still not great, but better than before. Oversampling will help, although this point is really pushing the gain of the LMP91002. -
Monitoring air during forest fires
08/07/2017 at 03:12 • 0 commentsAir quality today is very poor outside due to forest fires (Vancouver). This is PM2.5 of 120 ug/m³ or about 185/500 on the US AQI (https://aqicn.org/calculator/).
Electrostatic filter is keeping it clean inside though, huge reduction in PM2.5 levels, up to 10x.Air needs cycling, as CO2 slowly increases over a day or two period, and all windows are closed.
-
Public git repo
06/18/2017 at 17:36 • 0 commentsI just realized the git repository was not public, so I have changed the settings to make it publicly accessible.
Settings for gitlab, repository needs to be changed to "Everyone" apparently:
https://gitlab.com/thmjpr/Air_Quality/
The code is written to work with PMS7003, and the SDS021 support is in there as well, but it won't auto switch. So I change this line with the class definition:
There must be a better way to do it in C++ but haven't figured it out.
One way would be to have a master "particulate" class that searches for available sensors, and then calls the appropriate class depending on what was detected on startup. But it seems a bit redundant, as all functions would be copied to that class.
-
Measuring input voltage spike, ceramic capacitors
06/13/2017 at 21:39 • 0 commentsI read some reports of input voltage spikes when using plugpacks and large ceramic input capacitors, with low ESR. In traditional designs an electrolytic is used with a higher ESR, and this spike is generally not an issue.
You can find the explanation in this TI paper,
"Applying a voltage step to the input capacitors through a long cable causes a large current surge that
stores energy in the power-lead inductances. The transfer of this energy to the capacitor produces a
voltage spike whose amplitude can be up to twice that of the original voltage step."Input Filter Design for Portable Power Management System: http://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/179/3487.Input-voltage-spike.pdf
I measured minimal overvoltage initially:
Rapidly unplugging and plugging was able to achieve a bit of ringing:
Worst case I was able to achieve the ~16V peak voltage above, 30% over expected. This is likely limited by the small plugpack (12V, 1A). Of course my input buck regulator is fine with this voltage (26V max), but, something to keep in mind with a sensitive circuit. To add an input TVS is not too expensive, and will protect against short and long term overvoltage (with a fuse).