#Air quality sensorness
1 messages ยท Page 1 of 1 (latest)
If you're using forced calibration then it doesn't actually need 24 hours before doing it, only about 5 minutes IIRC (my code gives it that +2 minutes I think). I think if you turn on automatic after it'll use the existing value as a base. Here's my code for it, though you'll need to point it to a couple of fonts to work, can chuck you those too if you want.
now you've got me curious ๐ I thought you'd need, after auto_calbration_enabled = false, to call scd4x_device.force_calibration() with a known value then persist settings, then possibly reinit. There's a pdf I was reading just the other day, but on my phone so no idea the link, but the sensirion scd linked guidance.
It's called Testing Guidance, on the scd41 page
Increase health, improve energy-efficiency, ensure safety & comfort - for a better tomorrow.
Oh my code does that eventually (line 243), it just runs it for a while first
ah got you, somehow I missed that, maybe time of night ๐
also, did you mean this board? https://www.adafruit.com/product/5649
So my hope was to do that to all the sensors, then ship them out as part of kits with the code set for ABC off, and a written reminder, then all should be good. Also I heard it's lowest CO2 about 5am, as the dusk changes and before traffic. Yeah that's the board
Crucial difference ๐
I forgot that one existed, would make it a bit easier, though I'm still a little tempted by the board Adafruit sell that's totally plug + play, but the Sensirion sensor is rated for 3x longer life and does NOx
Are you powering them over USB?
so it turns out to be a massive unit, and theyve as good as admitted its just the sgp41 in there plus PPM. So look at other ppm to. Yeah over usb. Battery would suck for the sen5x, it internally poles at 1hz. You can persist its auto-learning but only for ten minutes before You should consider it invalid (after deepsleep / recharge)
Hmm it does seem bigger than the Adafruit/Plantower one
what is up with PM sensors having weird connectors
I used them, and the panasonic/philips one (smaller and quite nice). So annoying, and this latching one is a right pain, but readin the previous version having bad connection problems makes some sense
Looks like it was meant to be uart too, as you have to enable i2c
yeah latching jst
jst GHR i think
ahh
I'm very disattisfied with the sen5x only having a gas "index" for voc and nox instead of ppb, but they downrated their earlier sensors to say similar. At least it has onboard smarts, hence the 1hz internal polling
huh, the sgp41 doesn't do an actual NOx number?
nor voc, and if you check the sgp3X (VOC) and update notice from sensirion they say it aint ppb it's worth thinking of it as an index ๐
haven't found any realiable cheap mems gas sensors.
ah, just found that
This is the panasonic one (I got a sample) and it uses the same latching but less pins. If you snip a pin of the sen5x cables it fits nicely.
https://industry.panasonic.eu/products/components/sensors/particulate-matter-sensor
So much smaller. Add an SGP41 and you've beaten the sen5x for size and matched features.
Just heard theres a co2 sensor from company begining with I (sorry forgot name), they've got a competition running on hackster.io and free hardware which mentioned it.
yeah I got a Honeywell one years ago but I think it's UART only IIRC and has a maddeningly tiny little connector
only rated for 5 years though
the Sensirion ones are for at least 10 years, probably helps that they have a self cleaning thing
ooh good spot. I figured my rating would be 2 at best for any of them. Amount of dust / humidity before a quick swap every x years or once data looks anomalous
(smoking house, but also I imagine clients / real world abuse)
Not sure I've run into any issues with the board itself making much heat though, you sure that's why the temp readings are wrong?
I'm curious, I have a load of the SHT3x and 4x too, all the models with differing accuracies, and then some other si7021 + htu21 (all mems humidity too), and they read hotter than some DS18b20's and other i2c only reasonbly high accuracy temp sensors.
I think the mems humidty sensors report higher generally.
Separately to that my first box had no holes, and compared to another identical set of components with no box showed massive heating. You can feel the screen is hot generally (I must have max brightness). And then one box with holes showed an improvement compared to sealed box, but still degrees above the loose in air components setup. I now have two other boxes that are more holes than box (the sensor is only a few cm away from esp32), but still show increase compared to in-air setup.
I can't remember if it has a default offset/needs one, though I added a TMP117 and use that instead
try adding a dedicated sensor and seeing what it reads
This was my thought, have another reference, but I know technically I should be doing loads of enclosure testing then adding a correct offset, or even using the esp32's core temp to influence the scd4x offset ๐
You using an off the shelf enclosure? I've been trying to work out what I'll use for an outdoor sensor because I live in an apartment very high up, so it's a bit unclear if I should put it on the outdoor windowsill or try and mount it to my window or what, plus I'd like to weather seal it but obviously that won't work if I'm going to do humidity and/or PM
Not currently, some laser cut madness, and was experimenting with 3d printed. I wanted people to be able to use different suppliers modules and swap them out / replace one small piece.
I'm indoors mentally for most of the devices. Got a greenhouse that does the high humidty testing, but most don't like it. The si7021 has PTFE membrane and is so say 100%. They all say non-condensing humidity usually. I'm pretty sure there's a cap, sensirion SF2, but it brings the co2 response time to 2minutes, and no-one sells them fitted, and there's an SMT level gluing job (possible by hand with syringe or just skill, but they recommend you try a few with precise amounts and verify squidge / coverage afterwards, pick best and continue, like your not a hobbyist but an SMT line)
If I had a garden I'd probably just get one of these, though not sure how I'd attach it to either the windowsill or the window. https://shop.pimoroni.com/products/weatherproof-cover-for-outdoor-sensors?variant=40047884468307
Yeah, they've got a cool name too. My mental issue is microclimate accuracy (very different from 1corner to next in greenhouse)
I mean right now I mostly just want to know when it's actually cooler outside than inside so I can open the windows heh
ooh, just stumbled on this https://sensirion.com/products/catalog/SPS6x
Increase health, improve energy-efficiency, ensure safety & comfort - for a better tomorrow.
ah good spot, the end of the more info says "The particulate matter sensing component is available as a part of the SEN6x."
Increase health, improve energy-efficiency, ensure safety & comfort - for a better tomorrow.
..though I can't work out what is actually upgraded
they've combined the certification of the 42 for californ
*ia, and clarified the low power stuff, but basically same
Just coming back to this now and wondering if I should order a SEN55 hmm. Tempted by the Adafruit board because I know it'll be super duper easy to use, just trying to go over your code and pick out just the SEN55 related bits
Go sen54, the nox won't offer you anything
Takes a flame under a saucepan to react
I mean the difference is like ยฃ4
Goto the sen5x driver repo and use the simple example for circuitpython
https://github.com/good-enough-technology/CircuitPython_sensirion_i2c_sen5x/blob/master/docs/quickstart.rst
ahhhhhh I missed the example
Took me weeks to see it and update it ๐
Yeah, there's a cool components (uk) cable with dupont, and I got a bunch of double ended cables to cut in half. Someone's doing a grove version, probably seeed, and now sensirion say cable coming soon
Yeah not tried in cpy yet, I'm blessed with slow but okay WiFi over garden too
I need to tidy it up a lot, but I've got code for it if you want it, the big thing for me is that you can use it to potentially massively improve battery life by using it with another ESP32 board connected to power as a relay
https://learn.adafruit.com/u/tyeth/pages/wippersnapper-sensirion-sen55-particulate-voc-nox-sensor -- still updating and chopping the end off into a separate guide, but shows the parts link
it takes wake time down from 10-12 seconds to around 3, and it's lower power during that time too
that's significant. I still wonder if wifi can ever be low power enough, but if BLE can then the frequency works, just needs to be something like espNOW or I want to play with LongRange wifi (ESP only too)
I mean best case scenario is probably Thread or LoRa
but Thread isn't supported in CP yet and LoRa comes with some extra challenges and you have to very actively pick boards that have it, while WiFi means you can use it or ESPNOW
yeah waiting for the new H series chips to be volume and bigger ram/flash etc, then matter here I come.
the license thing with most lora meant chip price fixed at $12
maddening
also be aware that last I checked, the TFT boards had a bug which made it hard to fully turn off the I2C regulator for deep sleep
You got a PPK2?
nooo, shoestring budget. still want a nice scope+logic analyser
I'm a big fan of it heh
super good, but only once I need to power optimise, worth buying then for sure
the sen5x didn't seem great for low power due to the internal algorithm preferring continuous data and polling at 1hz, but I did stick it straight on one ๐
it can prefer whatever it wants right up until I kill power to the I2C regulator ๐
hah, yeah, absolutely right, down with you LDO
while I get the ease of use thing, I hate the LEDs on STEMMA QT boards, good that some of the newer ones have a pad you can cut
also I am still dreaming of Adafruit finally making the ABLIC low power timer board they teased last year
oh yeah same, like to see it working, then desperate for the pads to cut.
Ooh not heard of that
the ABLIC promo video is a lot
it's a super low power timer chip that's programmed over I2C
okay save that for later. In my head the esp with correctly disabled LDOs should be enough to get super-low levels.
okay the numbers speak volumes
it's super simple, but I find this calculator really useful to see how different variables affect it https://www.of-things.de/battery-life-calculator.php
iot device power consumption battery lipo calculator for arduino, raspberry pi, raspberry pi 3, beaglebone, esp8266, huzzah, feather, wemo and other microcontrollers
What's the two ground pin thing about?
interface select to i2c, pin 5. man that took a while
ahh, this probably means I can't just use the Sparkfun cable + a dupont-> stemma cable
the stemma running 5v?
yeah was gonna use the boost board
oh fine then, thats what ive done too, just merge the grounds
yeah just thinking about the best way to do it physically
surprised that nobody seems to have thought to stick a boost chip in the sensors themselves so you can run them at 3V
left is double-ended (cheapest), then one joined to 4pin header, then 3xQwiic/StemmaQT direct connections (for the qwiic boost boards)
oh and bag of sparkfun at top. Someone also sells the female dupont version
I should probably think about getting heatshrink heh
I keep meaning to buy electrical tape but then have trouble finding any that isn't PVC
to be fair hotglue and some backing paper from stickers/tape works so well for diy cables, strain relief too
oh and are you aware of WAGO connectors btw?
they're what I usually end up using instead of heatshrink/soldering wires together heh
yeah, and the clones ๐
thought you meant higo conectors, not cool, very good but hard to seperate
ah no
https://www.wago.com/gb/electrical-interconnections/discover-installation-terminal-blocks-and-connectors/221 are my goto
WAGOโs 221 connects solid, stranded and fine-stranded conductors easily, quickly and safely.
They look good in proper mounts, my sticky pads are good-enough but not great cleanup
yeah it's the inline 221s I really like, but it is weird to me they still haven't made ones akin to the knock-offs that are joined but connect multiple separate things
ha, really? I love the inlines too. Got some crazy ones for i2c, 4 to 12, coloured too, but the spings soo strong if you open all the contacts at once it's case separates / detonates
yeah this is the downside of knockoffs heh
I consider it a feature? or sign the springs will retain force for years to come ๐
it's like WAGO, just make this as one item pls
I found that style easily / cheaply, but these are always crazy money
still, a dollar a piece or whatever saves you so much faff
also small thing but Sparkfun sell silicone wire versions of stemma qt cables
love me some silicone wires
oh nice. I wish that was legally required labelling, material type.
I'm looking forward to the EU banning PVC in the years to come, though the flexibility of materials usually tells you
I got a fancy USB 4 cable and it's TPU and oh my god it's so flexible it's glorious
Interesting, not seen that exact one but sense air is familiar. Got some Winsen too, but they're all quite big. Its the no soldering element that blows the design size
Want to try the infineon one, only saw last month, but similar small i2c.
Yeah I'm mostly interested it in terms of the seemingly much lower power consumption
should make longer battery powered operation for CO2 a lot more feasible
though looks like it can't work under 0C interestingly
Ah good spot. The other one for me is ideally high humidity. Most won't take condensing humidity ๐
There is the SF2 filter cap for sensirion scd4x, but raises response time from 30s to 2mins. (Obviously its more responsive than 30s/2min but they say for settling time and to guarantee accuracy at stated percentages.)
Makes it waterproof, so say, 100% humidity and condensing too, instead of non-condensing only. The app notes to glue it on show some expensive trial and error and precision. Not worth my time probably...but no one sells assembled units
I only get to high 90s but its condensing. Think greenhouse or bathroom.
I'm still trying to work out how to deal with the extra wire. Ugh, why can't it be I2C by default?
ha, had those thoughts too many times. right old pain. but also maybe the ,metal case was grounded so you could just wedge it under the metal case (i unclipped one and it has a spring connecting the metal clip case to the inner circuit board)
..so is it grounded or not?
can't remember ๐คฆโโ๏ธ
I think it was, or at least I guessed it was to improve shielding or whatever
lol Adafruit are now selling the cable for the SEN54/55 and are apparently making a breakout for it soon
Same day I order one and a sea of cables from Digikey heh
"We might have a breakout board that lets you connect to those in the future.."
aand it already shipped darnit
Just got my SEN55 though the boost board isn't going to be here until tomorrow. Until then, am I right to assume I could do:
USB pin on USB-powered Feather (so 5V output) -> VDD on SEN55
GND pin from Stemma QT connector on Feather -> GND on SEN55, bridged to the SEL pin
SCL pin from Stemma QT connector on Feather -> SCL on SEN55
SDA pin from Stemma QT connector on Feather -> SDA on SEN55
Got one connected exactly like that.
The boost makes the qwiic cables possible, but that's a custom cable I made, and battery powered mode. Otherwise what you have now is easiest
cool
oh and I think the metal is indeed grounded yeah
Still find it odd nobody seems to just stick a boost chip onto these sensors so they can run from 3V
ooh that's like a constallation of test pads
I'm tempted to make an inline cable version like that
you saw that Adafruit are gonna make a breakout for it btw?
I heard yeah, so they use the double ended jst GHR cables.
Thats why I thought maybe the inline qwiic boost cable made more sense, get a tiny inline package
to be clear, I figure their breakout will be like their one for the Plantower sensor, with an integrated boost
also the sparkfun adapter cable's colors vs this thing are surreal, VDD is green okay then
Yeah and to sit flat etc. Makes more sense. I like the cable for replacing after x years, imagining a more industrial setting like HVAC vent
not sure why the cable is better than an integrated connector on a board tbh
My cables are random rainbow, and using a double ended cable as two singles means ones always wrong. Very confusing.
Easier to mount in smaller space maybe
ah makes sense for that
small thing but you have 2.4MB total storage space on your Feather TFT right?
They vary sometimes if not erased between large version upgrades, but yeah (no i have a 900kb font but yeah)
I never wanted to come back to a frozen device, rather see the line number in the log file
A lot of that code relates to being throttled on adafruit IO, makes the file huge
should NameError: name 'SEN5X_DEFAULT_ADDRESS' is not defined not be an issue once I actually plug it in?
No, that's an issue. I haven't actually run the quickstart code. Fudge it to be similar to my code.py
In theory that should be part of the sen5x library in that repo
Hmm should the fan spin as long as it has 5V?
oh its missing from the import
I added:
SCD4X_DEFAULT_ADDRESS = 0x62
SEN5X_DEFAULT_ADDRESS = 0x69
and that fixed it, but then I get NameError: name 'device' is not defined
though the fan not spinning is worrying me a bit, also:
Note, that there is an internal electrical connection between GND pin (2) and metal shielding. Keep this metal shielding electrically floating to avoid any unintended currents through this internal connection. If this is not an option, proper external potential equalization between GND pin and any potential connected to the shielding is mandatory. Any current though the connection between GND and metal shielding may damage the product and poses a safety risk through overheating.
Hoping that means it's fine that I copper taped the SEL pin to it..
refresh, fixed the quickstart. Import is there, and device corrected to sen5x_device
ImportError: no module named 'sensirion_i2c_sen5x.SEN5X_DEFAULT_ADDRESS'
sorry my bad, there is no default address
it's a default argument, i've removed from quickstart
glad someones finally testing it ๐
File "code.py", line 9, in <module> TypeError: function takes 3 positional arguments but 2 were given
which module and whats line 9 do
not sure what module? and line9 is your line9: transceiver = I2cTransceiver(i2c)
Change the import and that to CircuitPythonI2cTransceiver, but I think my code.py does it like that with just i2ctransciever
CircuitPythonI2cTransceiver
This bit should mean the correct one gets imported anyway, but I changed the detection logic and not retested:
https://github.com/good-enough-technology/CircuitPython_sensirion_i2c_driver/blob/master/sensirion_i2c_driver/__init__.py#L10-L11
so
`from sensirion_i2c_sen5x import Sen5xI2cDevice
from sensirion_i2c_driver import circuitpython_i2c_transceiver,I2cConnection
import board
setup i2c - see CircuitPython docs, or get from board
i2c = board.I2C()
transceiver = circuitpython_i2c_transceiver(i2c)
sen5x_device = Sen5xI2cDevice(I2cConnection(transceiver))`
No as I wrote it, not underscored
ImportError: no module named 'sensirion_i2c_driver.CircuitPythonI2cTransceiver'
(can you tell I'm basic and also sleep deprived?)
hmm
do you have that library there?
can you import sensirion_i2c_driver
man I should have tested that better. I would have before release, and it's still not released to community bundle cos I need to fix/generate docs etc.
I copied all the stuff from the lib folder into my one
though I used underscores because in it, it's circuitpython_i2c_transceiver
I am your Ralph Wiggam
though if I use the underscore version (from sensirion_i2c_driver import circuitpython_i2c_transceiver,I2cConnection) I instead get:
File "/lib/sensirion_i2c_sen5x/device.py", line 121, in device_reset
File "/lib/sensirion_i2c_driver/device.py", line 61, in execute
File "/lib/sensirion_i2c_driver/connection.py", line 115, in execute
File "/lib/sensirion_i2c_driver/connection.py", line 131, in _transceive
AttributeError: 'module' object has no attribute 'API_VERSION'```
(line 13 is sen5x_device.device_reset())
from sensirion_i2c_sen5x import Sen5xI2cDevice
from sensirion_i2c_driver import I2cTransceiver,I2cConnection
That's all I use in code.py, but I do define the default address and pass it into the contructor
https://github.com/good-enough-technology/Good-Enough_Air-Quality-Device_CO2-SCD4x_PM-SEN5x_CircuitPython/blob/main/code.py#L433C1-L433C1
I'm so confused
what do I do?
If I do:
from sensirion_i2c_driver import I2cTransceiver,I2cConnection
# setup i2c - see CircuitPython docs, or get from board
i2c = board.I2C()
transceiver = I2cTransceiver
sen5x_device = Sen5xI2cDevice(I2cConnection(transceiver))```
I get this for the device reset line:
``` File "code.py", line 13, in <module>
File "/lib/sensirion_i2c_sen5x/device.py", line 121, in device_reset
File "/lib/sensirion_i2c_driver/device.py", line 61, in execute
File "/lib/sensirion_i2c_driver/connection.py", line 115, in execute
File "/lib/sensirion_i2c_driver/connection.py", line 141, in _transceive
File "/lib/sensirion_i2c_driver/connection.py", line 162, in _transceive_v1
TypeError: function missing required positional argument #0```
If I modify it to be:
transceiver = I2cTransceiver(i2c, SEN5X_DEFAULT_ADDRESS)```
then I get:
``` File "code.py", line 22, in <module>
NameError: name 'device' is not defined```
sorry just got new phone delivered. very distracted. I think the transciever needs to be passed the i2c bus, so line 466 equivalent
ooh shiny
do careful manually find and replace for device and sen5x_device
I then get:
File "/lib/sensirion_i2c_sen5x/device.py", line 99, in get_version
File "/lib/sensirion_i2c_driver/device.py", line 61, in execute
File "/lib/sensirion_i2c_driver/connection.py", line 121, in execute
File "/lib/sensirion_i2c_driver/connection.py", line 210, in _interpret_response
File "/lib/sensirion_i2c_driver/connection.py", line 224, in _interpret_single_response
File "/lib/sensirion_i2c_sen5x/commands/wrapped.py", line 266, in interpret_response
File "/lib/sensirion_i2c_sen5x/commands/generated.py", line 1129, in interpret_response
ValueError: bad typecode```
whats this running on?
S2 TFT Feather
cool
Just did an basic I2C scan to check and it finds it
just realised, if Adafruit are looking at making a breakout, maybe they're working on a library too?
okay amusingly if I comment out the print device info section, it gets data, though not any NOx or VOC data weirdly
Mass Concentration PM1.0: 2.8 ยตg/m^3
Mass Concentration PM2.5: 2.9 ยตg/m^3
Mass Concentration PM4.0: 2.9 ยตg/m^3
Mass Concentration PM10.0: 2.9 ยตg/m^3
Ambient Humidity: 32.69 %RH
Ambient Temperature: 27.42 ยฐC
VOC Index: 0.0
NOx Index: 0.0
Device Status: 0x00000000 [OK]```
Do I need to do something to tell it it's a SEN55 and it can do that?
then nox = 1 and voc=~100
so whats the code you ahve, basically the quickstart only?
import board
from sensirion_i2c_sen5x import Sen5xI2cDevice
from sensirion_i2c_driver import I2cTransceiver,I2cConnection
# setup i2c - see CircuitPython docs, or get from board
i2c = board.I2C()
SEN5X_DEFAULT_ADDRESS = 0x69
transceiver = I2cTransceiver(i2c, SEN5X_DEFAULT_ADDRESS)
sen5x_device = Sen5xI2cDevice(I2cConnection(transceiver))
# Perform a device reset (reboot firmware)
sen5x_device.device_reset()
""" sen5x_product = sen5x_device.get_product_name()
# Print some device information
print("Version: {}".format(sen5x_device.get_version()))
print("Product Name: {}".format(sen5x_device.get_product_name()))
print("Serial Number: {}".format(sen5x_device.get_serial_number())) """
# Start measurement
sen5x_device.start_measurement()
while True:
# Wait until next result is available
print("Waiting for new data...")
while sen5x_device.read_data_ready() is False:
time.sleep(0.3)
# Read measured values -> clears the "data ready" flag
values = sen5x_device.read_measured_values()
print(values)
# Access a specific value separately (see Sen5xMeasuredValues)
mass_concentration = values.mass_concentration_2p5.physical
ambient_temperature = values.ambient_temperature.degrees_celsius
# Read device status
status = sen5x_device.read_device_status()
print("Device Status: {}\n".format(status))
time.sleep(5)```
curious, all those get-product name and serial etc work for me
not recently tested, but I check the serial each time
and product name ( so i can skip not available metrics and know if thats due to errors or missing features)
Have you got the SEN55 specifically?
just checked and it's the Version one specifically that fails
I was wondering why the readings were going up and now I think I can smell a neighbour smoking weed
oh the best rope... its funny that there's so much stigma
ha, pleasure. Thanks for the impromptu testing ๐
heh I meant the neighbour, but you're welcome, thanks for the library/code
oh yeah, I remember you mentioned heating from the chip, have you tried dimming/disabling the display backlight to see if that's related?
too much lettuce for me too.
Definitely related, but the qtpy gets hot too, the esp32's all do in my experience. Full backlit display just makes it a lot worse
30mm fan 5v super low power but solved as it were.
are you time.sleeping when you can?
asking because I know it drops power usage basically to the same level as light sleep when you invoke that
i got a person sensor with the plan to turn off display until ppl, but I dont like the idea of not being able to glance from afar. Probably be an RGB LED and E-Ink display for stats in future versions
also wondering if I need to construct a little bit of cardboard or something to thing to try to make the air inlet/outlets distinct from one another
so if directly exposed then its okay
You aware of Memory Displays?
if not then you want a channel
ah yeah it's just gonna be in free air is the plan
Sharp ones? but out my league right now
yeah I wish they weren't so pricey
but instant updates with zero lag or display flashing
eink flashing isn't compatible with ADHD heh
exaclty. I get upset about $10 for a couple of inches, be a long time before I have some
oh yeah good point. Maybe some e-ink hybrid without the strobing refresh
also, you aware of the Oddly Specific Objects displays?
yeah he's making a Stemma QT version right now
but shocked the product page doesnt show all the symbols, only the video does
pretty sure it's in the docs
shows the moon and time, but no wifi etc I think
I was surprised when I saw about 5 extra things I hadn't known were there
oh yeah, sorry meant the adafruit product page for it. new new new was where i saw it
Just had a thought, might be related to no delay after resetting device. I have a 1.1second delay in my code before interrogating the device, but I also don't use get_Version
thanks for testing it
Np, is there any particular reason for resetting it?
hmm, can't remember if it was part of the datasheet or just bad habit
also the VOC and NOx indexes aren't changing from 100 and 1
okay lighting a match got the VOC one to shoot up at least
Stick under a cooking pan or tub, light the match under the pan/tub, make sure to have shut pan/lid back down, NOx will rise.
Watch their YouTube video on it
I've got no gas
also me forgetting to order a Stemma QT multiport = the most absurd cable spaghetti I've ever seen now
Ha, my home made adapters are like spikeballs of pins and headers with qt cables winding out. Then imagine sensors protruding. Spaghetti is being generous
it's annoying that cable making tools are so pricey
Would be lovely to be able to make lots of little silicone cables with Stemma QT/JST PH/header pins on each end
Got the kit eventually, although not many of the qt ph ends, but so much faff. Still, worth it for a few. Was desperate to do some jst battery connectors, plus more dupont cables.
Is it bad I'm almost sorta disappointed that the PM levels in my bedroom seem pretty low? mostly sub 5?
also is it normal that almost all of the measures are around the sound, only the PM1 varies and even then it's marginal
Thats fair. I did see sometimes higher with pollen or after fabric/paper microfibres released. Also any kind of aerosol / dust / smoke.
They have poor resolution changes at lower values it appeared to me
Increase health, improve energy-efficiency, ensure safety & comfort - for a better tomorrow.
Been waiting 6months for that announcement, includes co2 sensing. Sadly mid 2024 release date
yeah I saw it a while ago, thought it was meant to be later this year though
Any chance you have the code so it doesn't have to relearn the VOC index again?
sen5x_device.Sen5xI2cDevice.get_voc_state() before sen5x_device.start_measurement()?
No sorry, after reading its only valid for a short time I skipped it.
Itโs about 10 minutes I think
yeah that sounds right.
maybe can be useful for deep sleep application but not my current need
Once it goes onto battery then it's a requirement
oh sorry the driver includes all code, it's a fork of the official one. check the other repos
I think sen5x_device.get_voc_state() did it, I mean, it didn't crash
though it also seems weird as a command to be just get state
you need persist settings and all that stuff, there's a good flow chart in one doc. (might be thinking of another sensor)
Yeah I think persisting is for the SCD4x
https://github.com/good-enough-technology/CircuitPython_sensirion_i2c_sen5x but better off reading the official docs for the original python library, then using the cpy lib instead.
Hmm I'm not sure how to do this
https://sensirion.github.io/python-i2c-sen5x/api.html#cmdgetvocalgorithmstate
yeah it didn't help heh
oh fair, it's a bit like swimming through mud sometimes
I tried printing this and it output some hexy/binary stuff
so maybe I need to get that string and feed it to it?
usually I goto the offical arduino implementaiton, see whats going on there, and then do some googleing for the commands I don't understand. searching github occasionally yields results too.
I thought you could only use that data for passing to the set command, and maybe there were two, one for nox too
or to some init equivalent instead of set
could also try searching through the pdfs on the tech downloads section for that command or some parts of the words and you should see what to do
I mean I think the link explains it I'm just bad at reading docs ๐
got a feeling there's something about the order of things, maybe that's just about the legnth of time the data is valid, but I wonder if there was more in one of the docs. I'll shout if I revisit and find at some point.
sure, the reason I care about this is that I'm currently moving it between rooms a couple of times a day with power cycling and it'd be nice to not have it be useless for ages
If I do sen5x_device.set_voc_state() I get: TypeError: function takes 2 positional arguments but 1 were given
check the offical examples
where are those?
all on the product page in theory
what did it print from the Get command
surely it's two hexy stuff things as you put it, which could be passed in
b'*\x90\x8b\x94\x001t\xe3'
it only takes two arguments to set, in the sense that the first argument is self and is implicit, so you only pass in one argument, the value from get command
so what should the code be?
found this in the SGP40 docs and wonder if it applies/helps: https://sensirion.com/media/documents/9071DF8C/616453C2/Sensirion_Gas_Sensors_SEK-SVM40__I2C_Interface_Description_D1.pdf#page=9
yeah that's why I checked it
all the tech docs are similar, but the information will be in the docs linked from the SEN54 product page.
not a specific python code example though
if I do this, I get None printed, does that seem right?
print(sen5x_device.set_voc_state(a))```
if you look it doesn't return anything as it's return type in the doc comment above the method
Whereas the Get method doc string shows this: https://github.com/good-enough-technology/Good-Enough_Air-Quality-Device_CO2-SCD4x_PM-SEN5x_CircuitPython/blob/0ebdfbf56835384db8c7a248e5a89f5ff3fd5aee/lib/sensirion_i2c_sen5x/device.py#L587
just trying to work out a way to see if I've actually done it correctly, have stuck a sen5x_device.get_voc_state() inside my loop later on as well
the key is, save it somewhere permenant, and then reboot the device and read it from the permenant storage and use it before starting readings, then VOC should stabilise very quickly and be accurate more quickly (no idea, it could be straight away)
It's not super clear to me if the sensor has memory that is being used here or if I have to provide that myself
no it doesnt
no memory
after sensor reset it needs that value setting
i think it might help to read some more docs, but maybe fresh and not today
blows lower CO2 air at you
need to work out how to get it to save this into a file and read it then hmm
lol, I need it, locked in a greenhouse, smoke central, bound to be depleted o2 in here
save to flash, or sleepmemory or nvm storage. You could also test by asking for the value over serial before letting the sensor start readings, but that's only to test not any real use
..I should probably learn how to do any of those things ๐
also Royal Mail seem to have decided not to bother trying to deliver my boost board ๐ฆ
ah dont, they've got more sen5x's for me too
do we have store command?
not seemingly, but I thought if the SGP40 has it then this would too
Unless it's just something the svm40 eval kit has
hmm I think it might be
ignore the SVM, it has extra components. probably like nvm / flash storage chip. They have specific software for it, but it's a combined SHT and SGP with the extra components, so just look at the SGP40 docs, or more sensibly, just the SEN55/54 technical links on the product page
Hmm, so I got code that I thought should work, but even after an hour or two the VOC index was still showing as 1
There's some advice for some sensors about not using the baseline for the first X hours, like a settling in period
was doing sen5x_device.set_voc_state(microcontroller.nvm[0:8]) before starting measurement, then microcontroller.nvm[0:8] = sen5x_device.get_voc_state() in my loop later on
yeah I thought doing it like this would ensure it updated it as time went on
You may have set a bad value too soon and won't see normal again until you reset sensor and don't set baseline.
I think it's 12 or 24hrs before the baseline is considered valid, and should be re obtained and saved somewhere every hour. Those times might be wrong
but I thought by putting it in the loop it'd keep updating the value as it learned
and when I had it plugged in it seemed to be doing that
Every time it boots it's setting and starting with a bad value.
sure, but I assumed it would keep updating, and it appeared to do just that, as I had the loop print the VOC binary and it was different each time
I think you need to set it off initially and only set it on after a time period where you can be sure the value is valid.
hmm
Mine finally showed up, just trying to work out if it runs from 5V logic as well as 3V as if it doesn't, there's a jumper I need to cut on the back
think you want to double check data sheet but it might be fine. I know the panasonic one I have states 5V VCC but only 3v logic
yep
so it should be able to handle 5V logic?
thats my interpretation
yup, worked fine though had to push all the jumper wires from my now absurd series of different wires, together properly
kinda wishing I'd ordered a second cable for the sensor from Digikey so I could try making a custom cable without worrying too much that I'd mess it up and be left unable to operate it
Oh and if you ever want to test a VOC sensor, filling the cap of a bottle of vanilla extract with it and then putting it next to it, works rather well..
Anything you can smell is usually a volatile organic compound. You can usually detect human breath too
Update line 1129 in generated.py to this:
firmware_debug = bool(checked_data[2]) # bool
#firmware_debug = bool(unpack(">?", checked_data[2:3])[0]) # bool
fixed here:
https://github.com/good-enough-technology/CircuitPython_sensirion_i2c_sen5x
Is there some kind of combined value for PM I can get out of it? Sen5xMassConcentration?
no idea, let us know what you find
Just realised that with some cable surgery, the boost board should fit onto the top of the sensor, which should make it much tidier
Oh yeah, what crimp tool did you get? Wondering if I can get one that'll let me make custom PH and SH cables
just a cheap-ish kit that included the standard model with changeable heads (only 1 supplied tho - but with box and connectors). Not got all those tiny jst connectors tho, some are too small and fiddly. I;ll do the odd one but well worth buying instead.
which "standard model"?
Most common on Amazon and AliExpress, with ratchet, not for ferrules. Changeable teeth / crimp jaws.
hmmmm
guess who just got an electric air duster..
an air duster? whats that then
550W of targeted air that blasts dust off/out of things: https://www.theverge.com/23551860/electric-air-duster-cleaning-pc-compressed-air
I have the model this guy is using to clean his vacuum cleaner: https://www.youtube.com/watch?v=fiC_K18MfVg&t=647s
This small but powerful air duster is designed to keep computers and other I.T. equipment dust free, but it also has multiple uses around the home. See why I wanted this machine and watch as I blast a load of dust out of my Dyson V10 cordless vacuum cleaner.
Check out current prices and availability from the Amazon affiliate links:
Amazon UK: ...
Ah brilliant, thank you. I want to clean an air filter and don't have access to compressed air (I have one can but wouldn't waste it on that). I thought about vacuuming it but awkward as ribbed.
If you buy it directly from the company it's actually cheaper than Amazon in the UK btw
just be aware the filter on the bottom will often get filled with dust quicker than you expect, you just pull it out, remove the dust, then shove it back in (there's no door etc.), and that if something is really dusty, you really should do it outside and/or wear a good quality mask
Hey, any chance you know what size of heatshrink works well for joining Stemma QT cables to the SEN5X cables?
Smallest one I have is a bit tight, one up only good for the double wire. About 1.5-2mm I'd guess
Is that the preshrunk or after shrunk size?
Need to order some and would prefer not to get a big kit with sizes I won't use
Hey, long time. I assume you've seen that Adafruit made a dedicated board for the SEN5x, though I don't think they know you've got it working on CP. https://www.adafruit.com/product/5964