element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Low Power IoT Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Low Power IoT Design Challenge
  • More
  • Cancel
Low Power IoT Design Challenge
Blog Smart Air Quality Monitor #3 - Exploring Air Quality Sensor ZMOD4510 and Pmod Type 6A (Extended I2C)
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: vlasov01
  • Date Created: 9 Oct 2021 12:17 PM Date Created
  • Views 3288 views
  • Likes 2 likes
  • Comments 6 comments
  • troubleshooting
  • air quality sensor
  • i2c
  • zmod4510
  • arduino-ide
  • win 10
  • low power iot design challenge
  • lesson
  • ubuntu 20.04
  • arduino nano 33 iot
  • i2c communication
Related
Recommended

Smart Air Quality Monitor #3 - Exploring Air Quality Sensor ZMOD4510 and Pmod Type 6A (Extended I2C)

vlasov01
vlasov01
9 Oct 2021

Renesas Air Quality Sensor ZMOD4510

I want to collect air quality data around my neighborhood. The device should be portable and with low power consumption. ZMOD4510 Outdoor Air Quality sensor can measure pollutants like ozone and NOx and calculate Air Quality Index. It can perform these measurements and calculations using a very low amount of energy.  So I've decided to use it for my project.

image

 

ZMOD4510 Pmod Type 6A (Extended I2C) Interface

Pmod Type 6A (Extended I2C) is a relatedly new interface spec, which was introduced in 2020. It defines the physical and electrical parameters of the interface. Not a lot of boards support it. But good think about it it still can be used with the standard I2C interface. ZMOD4510 board already has 4.7k pull-up resistors for the I2C interface. They can be disconnected by removing jumpers.

image

ZMOD4510 Development Plan

ZMOD4510 comes with quite extensive documentation and libraries for different MCU types and examples for Arduino and Renesas EVK, I need to develop an I2C wrapper and HAL specific to PSoC6 to be able to connect it to CY8CKIT-062S2-43012. I plan to evaluate the sensor first with Arduino 33 Nano IoT and then implement code for PSoC6.

 

ZMOD4510 Arduino Example Setup

I've first tried to use provided Arduino example from my Win10. But run into issues during the build. Win10 has limitations on the length of the commands. So I've installed IDE on my Ubuntu 20.04 following the provided guide. It is very important to complete Arduino IDE installation by running provided arduino-linux-setup.sh script, which grants permission to access serial ports. It is required to upload firmware and read output from the serial port for debugging.

 

The first step after the installation was to add the ZMOD4510 library to Arduino IDE:

image

Then I've added Arduino SAMD Boards using Boards Manager. Arduino Nano 33 IoT is part of the SAMD family.

image

ZMOD4510 library comes with an example sketch. I've opened it.

image

I've selected Arduino Nano 33 IoT as the target board:

image

At this point, I'm close to deploying it to MCU. But I need to run verify/build first.

image

I've connected the board and run dmesg to verify if it was connected without errors:

[  341.936131] usb 2-7: new full-speed USB device number 3 using ohci-pci
[  342.181157] usb 2-7: New USB device found, idVendor=2341, idProduct=8057, bcdDevice= 1.00
[  342.181162] usb 2-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  342.181164] usb 2-7: Product: Arduino NANO 33 IoT
[  342.181165] usb 2-7: Manufacturer: Arduino LLC
[  342.181167] usb 2-7: SerialNumber: B8A47CB350573738352E3120FF122625
[  343.598471] cdc_acm 2-7:1.0: ttyACM0: USB ACM device
[  343.607625] usbcore: registered new interface driver cdc_acm
[  343.607629] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

 

And before I can upload the sketch I've selected the target serial port. The only port I can use on my Ubuntu box is /dev/ttyACM0.

image

I've uploaded the sketch to the Arduino board.

image

 

Connecting and Testing ZMOD4510 Arduino Example

 

And I've opened the Serial Monitor in Arduino IDE. At this point, ZMOD4510 was not connected. I've expected to receive an error message. But there were no errors or anything else. Just to make sure my board and Serial Monitor are working I've tested it with the Blynk example. And everything was working as expected and I've got some text in the Serial Monitor. I've switched back to ZMOD4510  sketch and added some debug statements and delay(3000) in setup(). And I've started getting some output as well.

Initializing ZMOD4510 hardware 
Ezpected PID 25376
Reading sensor information
Error -4 during reading sensor information, exiting program!

 

I've connected ZMOD4510 to Arduino Nano 33 IoT.

 

image

I've used the following cables color coding

  • SCL blue
  • SDA green
  • V3.3 red
  • ground black

 

Here is how it looks:

image

 

I've switched it on But got the same error as before.

 

I've looked at the code in ihal_arduino,cpp, 2c_wrapper_arduino.cpp and zmod4xxx.cpp. init_hardware(&dev) calls arduino_i2c_setup() which calls Wire.begin() of Arduino I2C Wire library. And error -4 means that "ERROR_SENSOR_UNSUPPORTED". I'm expecting to get 3, which is ERROR_I2C. But I never got it even when the board was not connected at all.

 

I've verified all electrical connections and they seem fine. So now I need to identify where is the problem.

 

Here is the list of options I'm considering:

  • Connect another I2C device to verify if my Arduino Nano 33 IoT board works well.
  • Use an I2C analyzer to review communication.
  • Implement the I2C wrapper and HAL code for CY8CKIT-062S2-43012 required by the ZMOD4510 library and test the sensor from PSoC.

 

Update #1

I've used an I2C Scanner sketch from https://wiki.seeedstudio.com/Arduino_Software_I2C_user_guide/

#include <Wire.h>



void setup()

{

  Wire.begin();



  Serial.begin(9600);

   while (!Serial); // Wait for serial monitor

  Serial.println("---I2C Scanner---");

}



void loop()

{

   byte error, address;

   int nDevices;



  Serial.println("Scanning...");



  nDevices = 0;

   for(address = 1; address < 127; address++ )

  {

  Wire.beginTransmission(address);

  error = Wire.endTransmission();



  Wire.beginTransmission(address+1);



   if (error == 0 && Wire.endTransmission() != 0 ) // Special flag for SAMD Series

  {

  Serial.print("I2C device found at address 0x");

   if (address<16)

  Serial.print("0");

  Serial.print(address,HEX);

  Serial.println("!");



  nDevices++;

  }

   else if (error==4) 

  {

  Serial.print("Unknown error at address 0x");

   if (address<16) 

  Serial.print("0");

  Serial.println(address,HEX);

  }

  }

   if (nDevices == 0)

  Serial.println("No I2C devices found\n");

   else

  Serial.println("done\n");



  delay(5000);  // wait 5 seconds for next scan

}

 

It was able to detect only on-board I2C devices:

Scanning...
I2C device found at address 0x60!
I2C device found at address 0x6A!
done

 

As per https://forum.arduino.cc/t/communicating-directly-with-arduino-nano-33-iots-onboard-lsm6ds3-over-i2c/702602   0x60 is for the crypto chip and 0x6A is for the LSM6DS3.

Arduino Nano 33 IoT has built-in 4.7k pullups resistors. I've removed 4.7k pullups resistors from ZMOD4510, but I've got the same results.

 

Update #2

I've got a response from the Renesas support team on the issue with the reading data. The suggestion was to completely power off the system and then power on it again. I was a bit skeptical about it at first. But it helped! I've started getting data from the sensor now! As I understand ZMOD4510 has its own MCU. And if this MCU is in the wrong state then the only option to restart it is to power cycle. the board  And I was just doing the reset on the Arduino, which was not resetting ZMOD4510 MCU. It was a very good lesson for me.

 

Initializing ZMOD4510 hardware 
Expected PID 25376
Reading sensor information
Preparing sensor
Starting measurement
*********** Measurements ***********
 Rmox[0] = 556314.88 kOhm
 Rmox[1] = 3162.08 kOhm
 Rmox[2] = 1699.68 kOhm
 Rmox[3] = 1389.33 kOhm
 Rmox[4] = 1218.32 kOhm
 Rmox[5] = 1094.78 kOhm
 Rmox[6] = 991.05 kOhm
 Rmox[7] = 926.60 kOhm
 O3_conc_ppb = 0.00
 Fast AQI = 0 EPA AQI = 0
Warmup!
*********** Measurements ***********
 Rmox[0] = 103550.50 kOhm
 Rmox[1] = 1174.82 kOhm
 Rmox[2] = 832.85 kOhm
 Rmox[3] = 778.90 kOhm
 Rmox[4] = 736.13 kOhm
 Rmox[5] = 703.86 kOhm
 Rmox[6] = 674.41 kOhm
 Rmox[7] = 645.62 kOhm
 O3_conc_ppb = 0.00
 Fast AQI = 0 EPA AQI = 0
Warmup!

 

So the sensor is working and I can try the same procedure with the PSoC6 board.

  • Sign in to reply
  • VextoR
    VextoR over 1 year ago

    Hello, I see you did use Arduino ZMOD4510 lib for your project. I could not find it on renesas website. Could you please help to locate where exactly I can download the Arduino example. Thank you

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • marwa
    marwa over 3 years ago

    why it displays 8 RMOX number.can you explai to me and whe RMOx 0 is very high  compared to others

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Hung12
    Hung12 over 3 years ago

    I can't scan the I2C address of ZMOD4510. It only appears for the first time and then disappears. How can I communicate with it?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • vlasov01
    vlasov01 over 4 years ago in reply to DAB

    The problem was found and resolved. I've published the update.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • vlasov01
    vlasov01 over 4 years ago in reply to DAB

    Thanks, DAB!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube