I have been trying to run the test code from the adafruit code on github.
https://github.com/adafruit/Adafruit_EM ... c2101_test
The code compiles and loads the M0 express. All connections are made per the ref. diagram. The only output in the serial monitor shows is "Adafruit EMC2101 test!".
I've researched issues for hours. I also tried using Mu and Micropython. There I get an error about device ID. I see there are posts about that issue. I'm relatively new to Python and not able to discern how to interpret using anything related to this post. I am using Python 3.2.
https://github.com/adafruit/circup/issues/90
Is there something I'm missing or some area you can point to which is causing such a problem?
// Basic demo for readings from Adafruit EMC2101
#include <Adafruit_EMC2101.h>
Adafruit_EMC2101 emc2101;
void setup(void) {
Serial.begin(115200);
while (!Serial) delay(10); // will pause Zero, Leonardo, etc until serial console opens
Serial.println("Adafruit EMC2101 test!");
// Try to initialize!
if (!emc2101.begin()) {
Serial.println("Failed to find EMC2101 chip");
while (1) { delay(10); }
}
Serial.println("EMC2101 Found!");
// emc2101.setDataRate(EMC2101_RATE_1_16_HZ);
Serial.print("Data rate set to: ");
switch (emc2101.getDataRate()) {
case EMC2101_RATE_1_16_HZ: Serial.println("1/16_HZ"); break;
case EMC2101_RATE_1_8_HZ: Serial.println("1/8_HZ"); break;
case EMC2101_RATE_1_4_HZ: Serial.println("1/4_HZ"); break;
case EMC2101_RATE_1_2_HZ: Serial.println("1/2_HZ"); break;
case EMC2101_RATE_1_HZ: Serial.println("1 HZ"); break;
case EMC2101_RATE_2_HZ: Serial.println("2 HZ"); break;
case EMC2101_RATE_4_HZ: Serial.println("4 HZ"); break;
case EMC2101_RATE_8_HZ: Serial.println("8 HZ"); break;
case EMC2101_RATE_16_HZ: Serial.println("16 HZ"); break;
case EMC2101_RATE_32_HZ: Serial.println("32 HZ"); break;
}
emc2101.enableTachInput(true);
emc2101.setPWMDivisor(0);
emc2101.setDutyCycle(50);
}
void loop() {
Serial.print("External Temperature: ");
Serial.print(emc2101.getExternalTemperature());
Serial.println(" degrees C");
Serial.print("Internal Temperature: ");
Serial.print(emc2101.getInternalTemperature());
Serial.println(" degrees C");
Serial.print("Duty Cycle: ");
Serial.print(emc2101.getDutyCycle());
Serial.print("% / Fan RPM: ");
Serial.print(emc2101.getFanRPM());
Serial.println(" RPM");
Serial.println("");
delay(100);
}
adafruit emc2101 Adafruit Circuit Python test code not working
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Mhov
- Posts: 14
- Joined: Wed Apr 13, 2016 3:31 pm
- adafruit_support_mike
- Posts: 67391
- Joined: Thu Feb 11, 2010 2:51 pm
Re: adafruit emc2101 Adafruit Circuit Python test code not working
Post a photo showing your hardware and connections and we'll take a look. 800x600 images usually work best.
- Mhov
- Posts: 14
- Joined: Wed Apr 13, 2016 3:31 pm
Re: adafruit emc2101 Adafruit Circuit Python test code not working
Here are the pics.
- Attachments
-
- 20230307_095403.jpg (204.19 KiB) Viewed 249 times
-
- 20230307_095313.jpg (217.02 KiB) Viewed 249 times
-
- 20230307_095306.jpg (232.73 KiB) Viewed 249 times
- Mhov
- Posts: 14
- Joined: Wed Apr 13, 2016 3:31 pm
Re: adafruit emc2101 Adafruit Circuit Python test code not working
tip120 dsheet
- Attachments
-
- 20230307_095728.jpg (174.17 KiB) Viewed 249 times
- Mhov
- Posts: 14
- Joined: Wed Apr 13, 2016 3:31 pm
Re: adafruit emc2101 Adafruit Circuit Python test code not working
just noticed the tip120 Vbe = 5v. My adafruit Feather M0 is 3.3v. You think I need 5v's on that rail?
- Mhov
- Posts: 14
- Joined: Wed Apr 13, 2016 3:31 pm
Re: adafruit emc2101 Adafruit Circuit Python test code not working
although I would expect the code to get past "Adafruit EMC2101 test!
- adafruit_support_mike
- Posts: 67391
- Joined: Thu Feb 11, 2010 2:51 pm
Re: adafruit emc2101 Adafruit Circuit Python test code not working
Yeah, it should either report finding a device or not finding one.
Try disconnecting the EMC201 from SDA and SCL and see if you get different output.
Try disconnecting the EMC201 from SDA and SCL and see if you get different output.
- Mhov
- Posts: 14
- Joined: Wed Apr 13, 2016 3:31 pm
Re: adafruit emc2101 Adafruit Circuit Python test code not working
Mike have you had a chance to review?
- Mhov
- Posts: 14
- Joined: Wed Apr 13, 2016 3:31 pm
Re: adafruit emc2101 Adafruit Circuit Python test code not working
Apologies just saw your respnse.
- Mhov
- Posts: 14
- Joined: Wed Apr 13, 2016 3:31 pm
Re: adafruit emc2101 Adafruit Circuit Python test code not working
ran test as suggested. Disconnected I2C. Output from serial monitor is
"Adafruit EMC2101 test !
Wrong Chip ID
Failed to find EMC2101 chip"
"Adafruit EMC2101 test !
Wrong Chip ID
Failed to find EMC2101 chip"
- Mhov
- Posts: 14
- Joined: Wed Apr 13, 2016 3:31 pm
Re: adafruit emc2101 Adafruit Circuit Python test code not working
I moved the feather board to another spot on board, reconnected SDA/SCL and code didn't get past "Adafruit EMC2101 test!". There is an I2C scanner and Test examples in Arduino. Both compile and load, neither produces an output in the serial monitor.
/***************************************************
Copyright (c) 2018 Luis Llamas
(www.luisllamas.es)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License
****************************************************/
#include "I2CScanner.h"
I2CScanner scanner;
void setup()
{
Serial.begin(9600);
while (!Serial) {};
scanner.Init();
}
void loop()
{
scanner.Scan();
delay(5000);
}
/***************************************************
Copyright (c) 2018 Luis Llamas
(www.luisllamas.es)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License
****************************************************/
#include "I2CScanner.h"
I2CScanner scanner;
void setup()
{
Serial.begin(9600);
while (!Serial) {};
scanner.Init();
}
void loop()
{
scanner.Scan();
delay(5000);
}
/***************************************************
Copyright (c) 2018 Luis Llamas
(www.luisllamas.es)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License
****************************************************/
#include "I2CScanner.h"
I2CScanner scanner;
void setup()
{
Serial.begin(9600);
while (!Serial) {};
scanner.Init();
}
void loop()
{
scanner.Scan();
delay(5000);
}
/***************************************************
Copyright (c) 2018 Luis Llamas
(www.luisllamas.es)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License
****************************************************/
#include "I2CScanner.h"
I2CScanner scanner;
void setup()
{
Serial.begin(9600);
while (!Serial) {};
scanner.Init();
}
void loop()
{
scanner.Scan();
delay(5000);
}
- adafruit_support_mike
- Posts: 67391
- Joined: Thu Feb 11, 2010 2:51 pm
Re: adafruit emc2101 Adafruit Circuit Python test code not working
It sounds like you're having problems with the jumpers or continuity through the breadboard clips.
Measure the resistance from the microcontroller's I2C pins to the EMC2101 breakout's I2C pins, with the probes touching the solder joints on both boards.
The trouble with continuity measurements is that the probes can bridge a gap or push pieces together. To avoid that, you have to move the contact points back from any possible trouble spots. The solder joints between the PCB and the pin header should be solid, so that's where you should put the probes to find any problems along the rest of the path between the boards.
Measure the resistance from the microcontroller's I2C pins to the EMC2101 breakout's I2C pins, with the probes touching the solder joints on both boards.
The trouble with continuity measurements is that the probes can bridge a gap or push pieces together. To avoid that, you have to move the contact points back from any possible trouble spots. The solder joints between the PCB and the pin header should be solid, so that's where you should put the probes to find any problems along the rest of the path between the boards.
- Mhov
- Posts: 14
- Joined: Wed Apr 13, 2016 3:31 pm
Re: adafruit emc2101 Adafruit Circuit Python test code not working
Hey Mike,
Thanks for responding. I rechecked and re-applied solder paying attention to the scl and sda lines. When I run the Ic2 Scan without connecting the scl line (or both),serial monitor reports 'no i2c device found'. I also tried using the Quicc connector on the emc2101 and I don't get power to the emc2101. I even tried connecting a BMP280 alone (reports i2c address) then connecting thru to the emc2101 with Quicc. The emc2101 does not power thru pass thru of bmp280 quicc connection. Appling power alone to the emc2101 (from arduino unor3 or feather m0) works. Any thoughts?
Thanks for responding. I rechecked and re-applied solder paying attention to the scl and sda lines. When I run the Ic2 Scan without connecting the scl line (or both),serial monitor reports 'no i2c device found'. I also tried using the Quicc connector on the emc2101 and I don't get power to the emc2101. I even tried connecting a BMP280 alone (reports i2c address) then connecting thru to the emc2101 with Quicc. The emc2101 does not power thru pass thru of bmp280 quicc connection. Appling power alone to the emc2101 (from arduino unor3 or feather m0) works. Any thoughts?
- adafruit_support_mike
- Posts: 67391
- Joined: Thu Feb 11, 2010 2:51 pm
Re: adafruit emc2101 Adafruit Circuit Python test code not working
That's what I'd expect. I2C devices ignore SDA until they see a START condition on SCL.
That's unusual. Check along the wiring to see where you lose power.
That sounds very much like a connection problem. The next step will be to check the voltage at the input and output of each wire to see where the connection is broken, or at least losing voltage.
Please be positive and constructive with your questions and comments.