Feather ESP8266 - CCS811 sensor

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
groubis
 
Posts: 3
Joined: Fri Feb 28, 2020 8:36 pm

Feather ESP8266 - CCS811 sensor

Post by groubis »

Hello everyone,

i am trying to connect feather esp8266 to an CCS811 sensor. Unfortunately the result is not promising, this is what i get in serial port monitor:

Code: Select all

02:37:23.149 -> ⸮!⸮⸮<1H1⸮CCS811 test
02:37:23.337 -> Failed to start sensor! Please check your wiring.
02:37:26.427 -> 
02:37:26.427 -> Soft WDT reset
02:37:26.427 -> 
02:37:26.427 -> >>>stack>>>
02:37:26.474 -> 
02:37:26.474 -> ctx: cont
02:37:26.474 -> sp: 3ffffdf0 end: 3fffffc0 offset: 01b0
02:37:26.521 -> 3fffffa0:  feefeffe 00000000 3ffee494 402020ac  
02:37:26.568 -> 3fffffb0:  feefeffe feefeffe 3ffe84ec 40100ea1  
02:37:26.615 -> <<<stack<<<
02:37:26.615 -> ⸮!⸮⸮<1H1⸮⸮CCS811 test
02:37:26.802 -> Failed to start sensor! Please check your wiring.
Please note that the exact same device, with the exact same connections works perfectly on my arduino uno R3 board.

Connection:
20200229_024031.jpg
20200229_024031.jpg (571.73 KiB) Viewed 161 times
I also tried another i2c device to my feather and it works fine out of the box (bmp180).

Any suggestions?

User avatar
groubis
 
Posts: 3
Joined: Fri Feb 28, 2020 8:36 pm

Re: Feather ESP8266 - CCS811 sensor

Post by groubis »

Hello,

after some more research, in viewtopic.php?f=19&t=121816 thread, users say that modifying i2c clock stretching can resolve the issue I am facing.

I have found the file in my pc, located here:

C:\Users\georg\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266\core_esp8266_si2c.cpp

And i have set the limit to 460:

Code: Select all

void Twi::init(unsigned char sda, unsigned char scl)
{
    // set timer function
    ets_timer_setfn(&timer, onTimer, NULL);

    // create event task
    ets_task(eventTask, EVENTTASK_QUEUE_PRIO, eventTaskQueue, EVENTTASK_QUEUE_SIZE);

    twi_sda = sda;
    twi_scl = scl;
    pinMode(twi_sda, INPUT_PULLUP);
    pinMode(twi_scl, INPUT_PULLUP);
    twi_setClock(preferred_si2c_clock);
    twi_setClockStretchLimit(460000L); // default value is 150 mS
}
Unfortunatelly i still have issues, this is the output i get:

Code: Select all

20:51:28.749 -> ⸮!⸮L⸮<1⸮1⸮⸮CCS811 test
20:51:28.937 -> Failed to start sensor! Please check your wiring.
20:51:32.022 -> 
20:51:32.022 -> Soft WDT reset
20:51:32.068 -> 
20:51:32.068 -> >>>stack>>>
20:51:32.068 -> 
20:51:32.068 -> ctx: cont
20:51:32.068 -> sp: 3ffffdf0 end: 3fffffc0 offset: 01b0
20:51:32.106 -> 3fffffa0:  feefeffe 00000000 3ffee494 402020ac  
20:51:32.154 -> 3fffffb0:  feefeffe feefeffe 3ffe84ec 40100ea1  
20:51:32.201 -> <<<stack<<<
20:51:32.248 -> ⸮!⸮L⸮<1⸮1⸮⸮CCS811 test
20:51:32.389 -> Failed to start sensor! Please check your wiring.
Can someone from Adafruit team help me? Thanks!

User avatar
groubis
 
Posts: 3
Joined: Fri Feb 28, 2020 8:36 pm

Re: Feather ESP8266 - CCS811 sensor

Post by groubis »

Hello admins,

looks like both purchases i did feather huzzah esp8266 and ccs811 are not actively supported so feel free to mark this as closed.

Thanks,

User avatar
CollinW
 
Posts: 2
Joined: Sun Jun 13, 2021 3:42 pm

Re: Feather ESP8266 - CCS811 sensor

Post by CollinW »

I can't find anything saying they aren't actively supported. I just got these (and a few other sensors). The other sensors work fine, but the CCS811 (https://www.adafruit.com/product/3566) doesn't work on my Feather Huzzah (https://www.adafruit.com/product/3046). I'm getting the same errors as the OP.

Do I need to get another board or sensors?


(I also got the following error code when I used 115200 baud on the arduino serial monitor.)

Code: Select all

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3460, room 16 
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4 
tail 4
chksum 0xc9
csum 0xc9
v00042eb0
~ld

User avatar
adafruit_support_carter
 
Posts: 29159
Joined: Tue Nov 29, 2016 2:45 pm

Re: Feather ESP8266 - CCS811 sensor

Post by adafruit_support_carter »

Make sure the WAKE pin on the older style board is wired to ground. It appears to be done in photo in first post above. But could still be a connection issue. Check soldering on header pins. Restage everything onto a single breadboard and wire more directly.
https://learn.adafruit.com/adafruit-ccs ... iring-test

It should work. Just tested old style breakout with a Feather ESP8266 and using the example sketch from the library.
https://github.com/adafruit/Adafruit_CC ... CS811_test
ccs_test.jpg
ccs_test.jpg (384.14 KiB) Viewed 110 times
Screenshot from 2021-06-16 12-32-51.png
Screenshot from 2021-06-16 12-32-51.png (30.3 KiB) Viewed 110 times

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”