Also meisner I just added some basic display code as well:
Now I just need to figure out an updated enclosure.
Also meisner I just added some basic display code as well:
Now I just need to figure out an updated enclosure.
meisner I did talk to some folks at Golioth since they have used the nRF52 + ESP32 combo and they had some feedback on the Argon:
I used it, but the process was super cumbersome to update the ESP32 to the right firmware
I can try to get some instructions here and overlay files. But I used a Adafruit tutorial to install CircuitPython with some passthrough firmware to flash the ESP32
It didnât worked properly with the built in firmware here
So it may not be so straight forward. Proceed with caution. Maybe something like a Huzzah32 instead?
Well ⌠I came back here since I finally received my Argon (and other pieces) and tried to get this working, but have encountered only problems. For some reason I was not being notified of your replies.
Right now, I registered the Argon and have it working with their WebIDE. I can write code in the WebIDE and deploy it to my Argon. But the AQW seems to be having problems. If I set the hpma115 to false in the AirQualityWingSettings_t struct, I do get temp & humidity (although it seems unrealistically high). But when âHas HPMA115â is set to true, I get the following on the debug terminal (yes, I picked up a serial debug module):
Air Quality Wing for Particle Mesh
0000129893 [app] WARN: Error tvoc - no data
0000139894 [app] ERROR: hpma timeout
0000139895 [app] ERROR: Error hpma115
So first of all, it seems as though my Honeywell HPMA115 is not working.
Based on your last reply (and the feedback from Golioth), it feels like I wasted my money (& time) on the Particle Argon board. Would you agree? I can easily pick up a Huzzah32 and continue working on this, but it seems like all of your instructions are based on Particle board usage. I chose the Argon based on your comment âNote: if youâre just starting out, the Argon is your best bet.â on the site https://www.jaredwolff.com/how-to-use-particle-squared-air-quality-sensor/.
Am I missing something here??? I feel like this shouldnât be this difficult.
Another detail; looking at your photo above, the orientation of the HPMA115 sensor seems to be different than the board I received. Is the one you have in the pic an old one (like a different rev)?
meisner Well ⌠I came back here since I finally received my Argon (and other pieces) and tried to get this working, but have encountered only problems. For some reason I was not being notified of your replies.
You may want to check and make sure whatever account youâre using is providing a valid email address. Iâm getting notifications on my end.
meisner Based on your last reply (and the feedback from Golioth), it feels like I wasted my money (& time) on the Particle Argon board.
Itâs not necessarily wasted, but as I mentioned the previous Particle library does not work directly with the latest version of the AQW. The HPMA though should be measuring as that hasnât changed, so Iâm not sure whatâs happening there. Are you using your own cable and HPMA?
The documentation you should be referring to is here: https://docs.jaredwolff.com/air-quality-wing/index.html
meisner Another detail; looking at your photo above, the orientation of the HPMA115 sensor seems to be different than the board I received. Is the one you have in the pic an old one (like a different rev)?
This was a prototype board. I ended up flipping the pinout that way no matter what orientation you plug the cable it works every time.
jaredwolff You may want to check and make sure whatever account youâre using is providing a valid email address
NopeâŚit was me! I didnât know I had to âFollowâ or subscribe to this thread. I am used to that automatically happening when you start a topic.
jaredwolff Are you using your own cable and HPMA?
NopeâŚI got the sensor and cable from you when I ordered my AQW. Invoice #: YxnD1TKa.
I also notice the fan in the sensor never turns on. Is there some debugging I can do with the HPMA to test it separately?
jaredwolff The documentation you should be referring to is here: https://docs.jaredwolff.com/air-quality-wing/index.html
OK, I have come across multiple articles, so I will try to follow this one. It sounds as thought using the Zephyr kernel is the recommended way to go? I was trying other paths since it seemed like Zephyr wasnât the only optionâŚmaybe that was my first problem?
jaredwolff This was a prototype board. I ended up flipping the pinout that way no matter what orientation you plug the cable it works every time.
GoodâŚjust wanted to be sure I was connecting it properly.
meisner NopeâŚit was me! I didnât know I had to âFollowâ or subscribe to this thread. I am used to that automatically happening when you start a topic.
Super weird. It should do that especially if youâre the author. Iâll have to test that on my side.
meisner NopeâŚI got the sensor and cable from you when I ordered my AQW. Invoice #: YxnD1TKa.
I also notice the fan in the sensor never turns on. Is there some debugging I can do with the HPMA to test it separately?
Got it. Can you send me a picture of your setup to make sure I assembled the cable correctly? In order to save time on the motor, it only turns on when it takes a measurement.
meisner OK, I have come across multiple articles, so I will try to follow this one. It sounds as thought using the Zephyr kernel is the recommended way to go? I was trying other paths since it seemed like Zephyr wasnât the only optionâŚmaybe that was my first problem?
It is. I just updated the documentation a bit to use the VSCode plugin. You should be able to build for the particle_argon
target but I have no tested it. You do need an external programmer for it to work. (A nRF52 DK works fine)
jaredwolff Got it. Can you send me a picture of your setup to make sure I assembled the cable correctly? In order to save time on the motor, it only turns on when it takes a measurement.
Hereâs the cable, sensor, Argon and AQW. Hopefully it shows what you needed.
jaredwolff It is. I just updated the documentation a bit to use the VSCode plugin. You should be able to build for the particle_argon target but I have no tested it. You do need an external programmer for it to work. (A nRF52 DK works fine)
I just placed an order for an nRF52 DK from Digikey ⌠so when I get that, I will give it a try. In the meantime, review the page you mentioned and start assembling my Zephyr dev environment. Does the VSCode plugin also require a Zephyr cross-compile setup? I am referring to this page; https://docs.zephyrproject.org/latest/boards/arm/particle_argon/doc/index.html#programming-and-debugging
Thanks!
meisner Hereâs the cable, sensor, Argon and AQW. Hopefully it shows what you needed.
Looks great!
I did notice though that youâre trying to insert the Argon on the pins. Youâre not going to make a good connection here and things will likely not work the way you expect. I suggest putting female headers on the AQW if you want to do this.
(if all the pins are soldered, disregard. I simply canât see the underside!)
meisner I just placed an order for an nRF52 DK from Digikey ⌠so when I get that, I will give it a try. In the meantime, review the page you mentioned and start assembling my Zephyr dev environment. Does the VSCode plugin also require a Zephyr cross-compile setup? I am referring to this page;
It installs everything for you including the toolchain for ARM devices. So you should be good to go!
jaredwolff Thanks for the confirmation the cable is good. Do you think it may be related to not using the recommended dev environment like Zephyr? Based on what you mentioned before, it seems like the HMA enable is not being asserted (since the fan doesnât come on).
Steve
Itâs most likely because youâre not making a good connection at the Argon with the AQW. Again, I canât see if things are soldered but generally this isnât a way to connect the boards.
I would also trace each pin on the cable and make sure they go to the same position on the other side.
jaredwolff Just to put this idea to bed, it is not the quality of the connection. I did tack the underside with a minimal amount of solder on each pin to allow me to desolder it later (since I wasnât sure how I wanted to set it up yet). I just replaced the âtackedâ joints with female headers and I got the same result.
I did visually check the cable as well and found it to a 1-to-1 match. The connectors are too small for any test probes I have, so I couldnât check the connections electronically. But if you lay the cable flat there is a clear 1-to-1 pairing. So I canât check if one of the connectors is crimped poorly.
Once I get the Zephyr setup going, I will let you know how I make out.
I managed to find some 28gauge solid wire to use as probes and applied +5v to the HPMAâŚthe fan starts. Then I checked the output of the AQW and it never sets pins 2 & 8 (5v & gnd) to +5v. So I am putting my money on the Zephyr dev environment.
meisner Just to put this idea to bed, it is not the quality of the connection. I did tack the underside with a minimal amount of solder on each pin to allow me to desolder it later (since I wasnât sure how I wanted to set it up yet). I just replaced the âtackedâ joints with female headers and I got the same result.
Got it!
meisner I did visually check the cable as well and found it to a 1-to-1 match. The connectors are too small for any test probes I have, so I couldnât check the connections electronically. But if you lay the cable flat there is a clear 1-to-1 pairing. So I canât check if one of the connectors is crimped poorly.
Ok good. Thanks for double checking.
meisner I managed to find some 28gauge solid wire to use as probes and applied +5v to the HPMAâŚthe fan starts. Then I checked the output of the AQW and it never sets pins 2 & 8 (5v & gnd) to +5v. So I am putting my money on the Zephyr dev environment.
Sounds good. If you want to use the Argon, you should be able to use the particle_xenon
target. I have not tested it but the pins that matter are the same.
Update after a dayâs worth of investigation;
Is there any simple way to get some data out of this somewhere? I believe itâs working, but canât be sure.
Oh and I had to flash the device using the SWD & Particle Debug board in an undocumented way (it was the only way that worked):
~/.particle/toolchains/openocd/0.11.2-adhoc6ea4372.0/bin/openocd -f ~/.particle/toolchains/openocd/0.11.2-adhoc6ea4372.0/share/openocd/scripts/interface/cmsis-dap.cfg -f ~/.particle/toolchains/openocd/0.11.2-adhoc6ea4372.0/share/openocd/scripts/target/nrf52-particle.cfg -c âadapter_khz 1000â -c âtransport select swdâ -c âinitâ -c âreset haltâ -c ânrf5 mass_eraseâ -c âflash write_image build/zephyr/merged.hexâ -c âresetâ -c âexitâ
Sorry for the long text with the absolute paths, but I thought it may be significant.
Just changed the STANDARD_SENSOR_INTERVAL to 15 and rebuilt/flashed and yes, the fan comes on every 15 secs. So it is working. But for me to further develop (add MQTT and ESP32 support) I will need some debug/printk support.
I would love to hear any thoughts on this you may have!
meisner Using the Particle Argon and building for the Xenon board works fine. The resulting âmerged.hexâ file once flashed causes the fan to spin every 60 seconds. So I assume it is working.
Excellent it looks like itâs working!
meisner Nothing on the SWD serial console. I began to look into adding MQTT to push the data, but donât have the energy for that right now. Even looking into Zephyrâs support to blink an LED is overly complicated.
Youâll need to use Segger RTT for the particle boards. There is a Makefile
in the root directory which you can use to start a server and console. This works on OS X but should be similar for other platforms.
For programmingI use nrfjprog
which you can get here: https://www.nordicsemi.com/Products/Development-tools/nrf-command-line-tools (Itâs essentially a wrapper for J-Linkâs software)
By the way hereâs a link to getting half of the equation for Zephyr on an Argon:
jaredwolff Youâll need to use Segger RTT for the particle boards.
OK thanks for all the help so far Jared, but I need to take a different path here. It seems like at many turns I need to buy another piece of HW or spend a good deal of time learning something I had no interest in. My goal was air quality info to be sent via MQTT. I have gone down so many tangential paths that this is taking too much time.
jaredwolff By the way hereâs a link to getting half of the equation for Zephyr on an Argon:
YesâŚeven this article you cited is about replacing the stock firmware with CircuitPython ⌠already saw this and determined, âNopeâŚdonât want to go down that path.â
Instead, I am looking at my first idea of using the AQW with an Adafruit Feather (with wifi support) and the Arduino IDE. I just need to understand the AQW interface & API better now.
meisner Instead, I am looking at my first idea of using the AQW with an Adafruit Feather (with wifi support) and the Arduino IDE. I just need to understand the AQW interface & API better now.
Got it. Sorry itâs taking longer than expected. I have a Huzzah32 here. Let me see if I can get the AQW code working on it. Iâll likely be able to get it working with Golioth fairly easily if youâre open to using something like that. They have a generous dev tier which is sufficient if youâre doing this for hobby purposes.
OKâŚsuccess!
I have had the AQW running (in the 3D printed enclosure you designed) for most of the day today using the HUZZAH32 and the Arduino IDE. Hereâs the project:
https://github.com/smeisner/AirQualityWing
Let me know if you have any thoughts. This is the first version of the code, so improvements would be welcomed!! There is a âto doâ list at the end of the README as well.
meisner Thatâs fantastic. Glad you have something working.