@hard-shovel It worked! I used pin 4 on the D1 Mini and did direct power and i'm reading temps now! Thank you so much! One final question about the pinouts. Is there some kind of guide that you know of to determine which pins to use? i.e. how did you know how to use pin 4 on the D1 Mini but keep 2 specified in the sketch? Please ELI5.
SirZlimz
@SirZlimz
Best posts made by SirZlimz
-
RE: Trouble wiring a Dalla 18B20 to Arduino D1 Mini
-
RE: Trouble wiring a Dalla 18B20 to Arduino D1 Mini
@zboblamont Moved yellow jumper from 21 to 25 as suggested and I'm still getting -127.00 on each line. Any other ideas?
-
RE: Trouble wiring a Dalla 18B20 to Arduino D1 Mini
@hard-shovel you are definitely not stating the obvious. As originally stated, I'm a complete noob at this stuff and I'm not aware of what all these acronyms mean yet haha I'll definitely have to remember that in the future when looking up pinouts and the like. I will let you know how this goes! Thanks again for all your help!
Latest posts made by SirZlimz
-
RE: Trouble wiring a Dalla 18B20 to Arduino D1 Mini
@hard-shovel It worked! I used pin 4 on the D1 Mini and did direct power and i'm reading temps now! Thank you so much! One final question about the pinouts. Is there some kind of guide that you know of to determine which pins to use? i.e. how did you know how to use pin 4 on the D1 Mini but keep 2 specified in the sketch? Please ELI5.
-
RE: Trouble wiring a Dalla 18B20 to Arduino D1 Mini
@hard-shovel Awesome, I'm excited to try this with my own setup when I get home. Thanks for explaining those nuances. I'm sure there will be many more stumbles as I get more into this stuff. There aren't really any "how to get started" guides for folks who aren't already programmers and electrical engineers (at least I haven't found any). I see a lot of copy/pasta in my future!
-
RE: Trouble wiring a Dalla 18B20 to Arduino D1 Mini
@hard-shovel you are definitely not stating the obvious. As originally stated, I'm a complete noob at this stuff and I'm not aware of what all these acronyms mean yet haha I'll definitely have to remember that in the future when looking up pinouts and the like. I will let you know how this goes! Thanks again for all your help!
-
RE: Trouble wiring a Dalla 18B20 to Arduino D1 Mini
@zboblamont So I'm looking for voltage across Vdd and DQ, or from ground to each? I have between 4.6-5V between Vdd and ground, and 3.something from Vdd to DQ I believe. Sorry, trying to recall from last night when I checked. I'll give that code a try tonight.
-
RE: Trouble wiring a Dalla 18B20 to Arduino D1 Mini
@zboblamont Moved yellow jumper from 21 to 25 as suggested and I'm still getting -127.00 on each line. Any other ideas?
-
RE: Trouble wiring a Dalla 18B20 to Arduino D1 Mini
@boozz ```
#include <SPI.h>
//#include <MySensors.h>
#include <OneWire.h>
#include <DallasTemperature.h>// Data wire is plugged into pin 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");pinMode(2,INPUT);
// 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");Serial.print("Temperature for Device 1 is: ");
Serial.print(sensors.getTempCByIndex(0)); // Why "byIndex"?
// You can have more than one IC on the same bus.
// 0 refers to the first IC on the wire}```
-
RE: Trouble wiring a Dalla 18B20 to Arduino D1 Mini
@boozz The code is provided at the end of the article in the link I posted in the original post. I didn't modify any of it except which pin I was using. (I tried pins 2,3,4 just in case one of those was the cause).
-
RE: Trouble wiring a Dalla 18B20 to Arduino D1 Mini
@zboblamont Power from 25 is going through the resistor to 22. The guide I followed stated that the center pin on the 18B20 can do power and data, so ground is shorted to Vdd, and power and data are both on the center pin. Maybe that's incorrect? I can try moving the jumper though as you described and see what happens.
-
RE: Trouble wiring a Dalla 18B20 to Arduino D1 Mini
@zboblamont Can you explain that in a bit more detail? What is MIS?
-
Trouble wiring a Dalla 18B20 to Arduino D1 Mini
So, I'm trying to wire up my first sensor. I had been trying to get a 18B20 connected to my Sensebender gateway, but there seems to be a lot less documentation on that board in general. I had ordered some Arduino D1 Minis to so I figured I'd give that a shot instead. I followed this guide:
http://www.hobbytronics.co.uk/ds18b20-arduino. I hooked up everything exactly as shown in the guide, but the output to the serial monitor is Temperature for Device 1 is -127.00. I don't think the 18B20 is even supposed to read that low, so I'm guessing something is either configured wrong, or maybe my sensor is bad? I tried 2 of them, so unless they are both bad it has to be some sort of wiring/configuration issue. Here's a couple pics of my exact setup to compare.Total noob to all this stuff, so I'm guessing it's something obvious. Still learning all this electrical and programming stuff. I have an IT background, but I'm new to this kind of thing.
Thanks for any help.