Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino Nano BLE Sense does not work with OneWire #92

Open
srv-config opened this issue Mar 27, 2020 · 6 comments
Open

Arduino Nano BLE Sense does not work with OneWire #92

srv-config opened this issue Mar 27, 2020 · 6 comments

Comments

@srv-config
Copy link

srv-config commented Mar 27, 2020

Issue is related to Arduino Nano Sense BLE and DS18B20 sensor (waterproof version) are not working together.

What I tried so far. I performed a test on UNO to isolate possible powering and sensor fault. Test looked as follows:

Connection of DS18B20

Black > GDN
Red > 3V
Yellow > D2

Last two connected via 2k2 resistor (2k2 instead 4k7 as I use 3V).

Then, to exclude possible coding mistakes I used ready example:

// Include the libraries we need
#include <OneWire.h>
#include <DallasTemperature.h>

// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS 2

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);

void setup(void)
{
  // start serial port
  Serial.begin(9600);
  Serial.println("Dallas Temperature IC Control Library Demo");

  // Start up the library
  sensors.begin();
}
void loop(void)
{
  // call sensors.requestTemperatures() to issue a global temperature
  // request to all devices on the bus
  Serial.print("Requesting temperatures...");
  sensors.requestTemperatures(); // Send the command to get temperatures
  Serial.println("DONE");
  // After we got the temperatures, we can print them here.
  // We use the function ByIndex, and as an example get the temperature from the first sensor only.
  Serial.print("Temperature for the device 1 (index 0) is: ");
  Serial.println(sensors.getTempCByIndex(0));
  delay(1000);
}

Result? works perfectly fine.

Then I switched to Nano Sense BLE board. without disconnecting the sensor I just switched connection on board's end and attached GDN, 3.3V and D2.

Result, -127. When trying to find DS18B20 address the result is none.

I noticed there is few topics around internet regarding nano series and none are resolved. I found also IoT and Every has the same problem.

@drdiesel
Copy link

I can verify OneWire is broken on the IoT.

@fbartsch95
Copy link

fbartsch95 commented May 2, 2020

Just to draw some attention to this: I am encountering the same problem as srv_config. I'm quite sure it's also related to the missing support of the nrf52840 based boards in OneWire, as described in these posts: https://forum.arduino.cc/index.php?topic=673098.0 https://forum.arduino.cc/index.php?topic=643463.0

@PaulStoffregen
Copy link
Owner

I'm depending on the open source community to contribute these I/O register defines.

Please feel free to volunteer. Or at least keep following this issue. Sooner or later someone familiar enough with the I/O registers in this chip will do it. Then testing & confirmation by other people using this board will be needed.

@uzi18
Copy link

uzi18 commented May 11, 2020

@PaulStoffregen isn't it already covered by #33 ?

@RedaBousbah
Copy link

The library kinda works, but after a few reads makes the whole Arduino crash.

@matevy
Copy link

matevy commented Dec 12, 2023

I tried library 2.3.7 on Nano BLE and it did not work at all. After creating a support for the board (actually NRF52840) it works good.

@PaulStoffregen Shall I contribute it / is this of any interest at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants