Skip to main content

California fires + Air Quality + Ada + Bluepill + PMS7003

Camp fire

The Camp fire has had a big effect on the Air Quality Index (AQI) in the Bay Area over the past week or so. AQI is typically measured as an entry in one of 7 bands:


To compute the AQI (typically cited from the PM2.5 #) a formula is used. See the wiki page above.

The PM2.5# is in µg/m3 fortunately there is a Chinese sensor, the PMS7003 that can provide PM1, PM2.5 and PM10 in those units:


So we have a sensor, we already have a Bluepill running Ada with an SPI screen to display the results. 


The sensor is a $20 eBay purchase. Bluepills are < $2 as documented on this blog, screen is a little over $3. So for $25 or so you can build your own AQI meter.

Code is in: 



Comments

Popular posts from this blog

Ada on a $2 eBay 'Bluepill' board (STM32F103C8T6)

For about $2 a 'bluepill' board can be obtained from eBay. Taking its name from the PCB patina this small board is used in the Arduino community. The SoC itself per ST's early docs on it was 64k flash and 20k data, that said, all STM32F103C8's you buy nowadays are 128k flash. The CPU is a Cortex-M3 which can be run at 72Mhz maximum. There is a good website that shows the schematic and pinout of the bluepill: http://wiki.stm32duino.com/index.php?title=Blue_Pill If you are an Arduino programmer, the link above will take you where you want to go. But suppose you wanted to try programming and using the bluepill a different way? Well that is what this blog entry is about. An Ada port was done via AdaCores Ada_Drivers_Library and the Libre GNAT toolchain to the bluepill. This is preliminary work but it is able to generate working code that the author already is using as of yesterday (a garage parking measurement sensor).  The port of the library is derivative, ...

The Air32F103

 Bluepills Its no surprise that Bluepills, such as they were, a smoking sub $2 deal would dry up eventually, taken over by clones, some subtle, some overt. With supply issues still plaguing ST parts for hobbyists, what about these cheap Chinese clone parts? Lets dive into the Air32F103. Air32F103 I bought 5 of these $1.90 boards. They look like this: Some notables vs a stock bluepill: 1) Castellated pins with flat underside for use as a module 2) 3 LEDs R/G/B (vs just the G for a bluepill) 3) Clone of ST's peripherals 4) over clockable to 256Mhz (spec is 216Mhz) (original STM32F103CB is 72Mhz) 5) 32K of ram. But, via secret regs, 97K(!) 6) top and bottom debug pads, top for JLINK, bottom, legacy STLINK SWD 7) USB C vs USB mini 8) BOOT as a button vs jumper 9) 2 12bit DACs (STM32F103CB's don't have that) 10) QSPI (hidden support) 11) Undocumented crypto block from MegaHunt (includes: AES/DES/3DES/SHA/SM[1,3,4,7]) Clocking As mentioned 256Mhz is possible. One Q is how do they...

Welcome to HRRZI – The Digital Home of Hedley Rainnie

  If you recognize the DECsystem-20 assembly instruction in the URL, you are in exactly the right place. Welcome. I am a retired firmware engineer, a lifelong science fiction fan, and the author of the hard sci-fi corporate thriller, Mind the Machines . About the Book What if death wasn’t the end, but the start of a different kind of life? LifeSim Inc. has made the impossible real: a digital afterlife where minds can live forever. But when consciousness becomes a service, ownership becomes a question. Mind the Machines explores the unsettling cost of eternal existence—and the quiet terror of discovering that your future may belong to someone else.  In paperback and Kindle https://www.amazon.com/Mind-Machines-Hedley-Rainnie-ebook/dp/B0GT8RD16X Also on Goodreads https://www.goodreads.com/book/show/250164231-mind-the-machines About the Author Hedley is a retired firmware engineer living in Silicon Valley. His lifelong passion for science fiction began at age eight, when he sat b...