Questions with regards to ESP8266 Basic and hardware interfacing and control via Basic commands

Moderator: Mmiscool

User avatar
By livetv
#48186 I am planning to use about 6 One Wire capable temperature sensors on one ESP8266 pin. I'm going to run power to most if not all of them just to avoid trouble but the concern I have is that the sensors will not be mounted at the board. They will be varying distances from the board, ranging from about 3 feet to about 30 feet. I am a little concerned about interference and echoes. I'll be sure that my data and ground lines for each sensor are on a twisted pair and not run parallel to any AC power, but I'm wondering if I need some sort of termination.

If this was good old RS232, I'd probably conclude that the data rate is low and there won't be a problem since any echoes would be long stabilized as mid-bit samples are taken. However, since the path is not linear but spidering out from pin 2, I'm not sure what effect echoes may have. If I was not powering the sensors, I'd think that the power draw of each would dampen sufficiently but since I am powering, what then?

My hunch is that this will be fine as is, but I thought someone may have had this experience already.

Also, would it be advisable for me to put small capacitors between +3.3v and ground at each temperature sensor?
User avatar
By forlotto
#48189 If you are powering it should be fine follow the rules for DC voltage drops for lengths of wires and use the appropriate gauge wire for transmission you may find it cheaper and easier to have multiple esp8266 devices. Use a separate power source with enough amps to not only handle the amps of the device but the distance this is another way to do it providing you don't over power the wire due to the gauge that it is.

I have seen people use 2 with zero problems I personally have not tested but all typical electrical rules and formulas apply.

You can find the info via google now that you know what to look for the only thing I am not sure of is if there is a 1wire device cap on esp8266 basic or if it follows the standard 1 wire transmission standards.

Communications should not be a problem really 1 wire is pretty good at communications with multiple devices. I have heard of people using cat 5e to do longer runs with 1 wire powered transmission might want to try that out and use stp if you are worried about emi.

Anyhow enjoy!
User avatar
By livetv
#48307 Thanks for the response!

Now this is where a hardware question gets specific to the BASIC interpreter. A pull-up resistor is needed on the data line. However, I don't know if anything is implemented in pin2 already. My assumptions are that there are no pull up/down resistors enabled internally and that the temp function just bit-bangs its way through the process (probably a blocking function too).

Are these assumptions correct, especially about any internal resistor?
User avatar
By forlotto
#48360 Not 100% on this to be honest but I would give it a try without if I recall correct there was bit banging going on early on but I do know that people have done multiple sensors I have yet to try a single temp sensor myself I got one but it is far down on my list of things to do in order of importance to be frank.

I do not recall others mentioning using a resistor in this case while this does not mean for a moment that is what is or is not used as many people who already know this may consider it common knowledge I just know what I would do is try it without and see how things blow over.

I wish I could tell you I know the answer here but I don't some folks that have used temp sensors should be able to help.

Errr I forget did you say which temp sensor variant you are using? It may be helpful to know this for starters.... We know it is one wire but I don't recall reading anything about the model.

Hopefully you can get this question answered.