TroubleshootingGravity

Help with MiCS-4514 sensor

userHead JackFerretti 2022-06-11 00:08:52 760 Views6 Replies

Hi, 

I am having serious trouble getting my MiCS-4514 sensor working. 

No matter what I try but the sensor is not being detected.

Obviously, I am missing something.

 

I made the connections following this guide: https://wiki.dfrobot.com/_SKU_SEN0377_Gravity__MEMS_Gas_Sensor_CO__Alcohol__NO2___NH3___I2C___MiCS_4514#target_0

 

 

In step 2 of the tutorial, the guide says:

"Turn the selector switch to the I2C side." 

But I can't understand where this Selector is… what does it mean? I do not see any “selector” on the sensor board or in the Arduino.

 

By downloading the sample sketch I always get noticed that no devices have been found. I am at one of my first experiences with Arduino and sensors so I am still not very confident. 

 

Thanks in advance to anyone that will reply with suggestions.

 

 

 

 

 

2022-06-15 21:41:51

Ok, I solved it.

The problem was that in line 26 of the code: “#define Mics_I2C_ADDRESS ADDRESS_0”, the last ADDRESS_0 must be substituted literally by “0x75” which is the I2C address.

The instructions are misleading for anyone that is not an expert… a simple comment would have been sufficient to make things more clear….like: “if the I2C address is ADDRESS_0, then substitute ADDRESS_0 with 0x75”….  

Anyway, I hope this will help other people to solve similar problems.

userHeadPic JackFerretti
2022-06-15 01:03:03

I also had a similar issue which is solved by visiting this forum.

userHeadPic RichAdam
RichAdam wrote:

https://gbapps.net/gbwhatsapp-apk/

2022-06-15 20:02:41
1 Replies
2022-06-11 13:15:20

MiCS-4514 has only I2C working mode, "Turn the selector switch to the I2C side" sentence can be ignored.

The device is not found because the I2C address in the code is not correct, copy the code in the WIKI directly to the IDE and you can use it. If you use the code of the sample sketch, you need to change line 26 of the code "#define Mics_I2C_ADDRESS ADDRESS_0" to "#define Mics_I2C_ADDRESS ADDRESS_3".

The I2C address of the sensor can be scanned by “Scanner.ino” :  https://www.arduino.cc/reference/en/libraries/i2cscanner/ 

userHeadPic Xiao
JackFerretti wrote:

Hi, 

thanks a lot for your answer.

 

I've run I2Cscanner and it returned me this:

 

--- Scan started ---I2C device found at address 0x75  !--- Scan finished ---

 

So the address should be the ADDRESS_0 right?

 

However, if I copy-paste the code from the wiki it always returns me an error at line 26 (even changing #define Mics_I2C_ADDRESS ADDRESS_3 with #define Mics_I2C_ADDRESS ADDRESS_0 and vice versa).

The error is this:

 

'ADDRESS_3' was not declared in this scope#define Mics_I2C_ADDRESS ADDRESS_3                         ^C:\Users\Jack_PC\OneDrive - unife.it\Documents\Arduino\nh3\nh3.ino:27:30: note: in expansion of macro 'Mics_I2C_ADDRESS'DFRobot_MICS_I2C mics(&Wire, Mics_I2C_ADDRESS);                             ^~~~~~~~~~~~~~~~C:\Users\Jack_PC\OneDrive - unife.it\Documents\Arduino\nh3\nh3.ino:26:26: note: suggested alternative: 'MICS_ADDRESS_3'#define Mics_I2C_ADDRESS ADDRESS_3                         ^C:\Users\Jack_PC\OneDrive - unife.it\Documents\Arduino\nh3\nh3.ino:27:30: note: in expansion of macro 'Mics_I2C_ADDRESS'DFRobot_MICS_I2C mics(&Wire, Mics_I2C_ADDRESS);                             ^~~~~~~~~~~~~~~~exit status 1'ADDRESS_3' was not declared in this scope 

 

 

2022-06-15 00:02:49
1 Replies
2022-06-11 00:21:51

userHeadPic JackFerretti