Challenger - ZMOD4510 - Outdoor Air Quality Sensor
Hello element14 Family,
I don't believe I could do a better job of describing the first unpacking experience and the Renesas software review than the other challengers have already done. I thus made the decision not to reiterate the facts as my experience was pretty similar:
- Blog #3: Experimenting with ZMOD4510-EVK Software
- In The Air Tonight - First Tests of the Evaluation Kit
I began the construction of my portable exposure unit by making a little tweak to the environmental sensor breakout. Since I couldn't find the BME 280, I used a different sensor I had lying around instead: the Si7021, which can detect relative humidity with an accuracy of 3% over a range of 0–80% and temperature with an accuracy of 0.4 °C over a range of -10–+85 °C. The HS4001 has a superior humidity range (0% to 100% RH) and precision (1.5% RH/0.2°C), but I was unable to find an Arduino library for it, therefore I was unable to incorporate it at this time.
On the Renesas website, I requested the software downloads for the 1st Gen and 2nd Gen libraries.
In the meantime, I installed the required libraries for using the components, through the library manager:
- Adafruit Si7021 Library: https://github.com/adafruit/Adafruit_Si7021
- Adafruit SSD1306 Library: https://github.com/adafruit/Adafruit_SSD1306 which also installs the required dependencies for additional GFX
After a day, Renesas sent me a link to download the library; all I had to do was add the.zip file as a library to the Arduino IDE, and the following examples appeared:
I connected the board to Feather M0 in accordance with the pin arrangement of the module, as was described in the ZMOD4510 Evaluation Kit User Manual (the backside of the connector is shown in the image):
3.3 V (on Feather M0) – ZMOD4510 Pin 1 (VDD)
GND (on Feather M0) – ZMOD4510 Pin 14 (GND)
Pin 21 (on Feather M0) – ZMOD4510 Pin 5 (SCL)
Pin 20 (on Feather M0) – ZMOD4510 Pin 7 (SDA)
However, upon running the example, I was met with the following error:
19:13:39.745 -> Starting the Sensor!
19:13:42.265 -> Error -4 during reading sensor information, exiting program!
19:13:42.265 ->
I came across the blog by vlasov01, which mentioned the same error, although, a full system reset didn’t work for me. I connected the Adafruit Featherwing OLED, to confirm the functionality of the I2C port, and the sample code ran without any errors! Hence, I reached out to the Renesas Community for further support and debug and received the following reply after a day:
Well, later, I decided to try my luck with an Arduino MKR board as in a blog by ntewinkel, it was running out of the box! I caught hold of an old rusty MKR WAN 1300 (well, apparently it was the first LoRa board by Arduino, and that quite explains the rust ) and hooked up the ZMOD4510
and voila…
I was able to see the serial logs on the console!
Then, I looked at the schematics of the port and noticed that there were pull ups on the SCL and SDA lines,
which were absent on the SCL, SDA pins on my Feather M0!
And sheesh! It was indeed mentioned on the pinout website (which I hastily took for granted as the OLED display functioned out of the box!):
I rummaged through my box to find some resistors and I finally found a couple of 10k ohm resistors! I wired them up, connected using the alligator clips (I know, not recommended ), and finally was able to see the logs on my Feather M0 as well!
Later, to check that this doesn’t affect the operation of my OLED display, I wired it up with the pull ups and the sample application worked fine.
So, the next steps include 3D printing the case (now that the board and display work with the sensor) and putting the rest of the sensors together in a portable package!
Next Blog Series: Summer of Sensors Design Challenge - In The Air Tonight – Blog #4 (Data Acquisition)