Multiple RJ45 to Terminal Block Breakout

Hi,

I want to connect more than 6 DB18B20 sensors and I'm wondering if it is possible to connect 2 breakouts to my emontxV3. 

And is it possible to (serial)print the unique ID of the DB18B20 sensors, so I can identify the sensors?

 

Robert Wall's picture

Re: Multiple RJ45 to Terminal Block Breakout

I don't see a reason why you can't do both these things.

You'll need to connect the sensors one at a time to extract their serial numbers, the sketch to do it is in Building Blocks under DS18B20. That article also has a lot of information and links about the problems that you might encounter with multiple sensors.

glyn.hudson's picture

Re: Multiple RJ45 to Terminal Block Breakout

Just increase max number of one wire sensors in the emonTx V3 default sketch 

https://github.com/openenergymonitor/emonTxFirmware/blob/master/emonTxV3...

You will need to make corresponding change to emonhub node decoder in emonhub.conf.

See https://github.com/openenergymonitor/emonhub/blob/emon-pi/configuration.md

 

Bart's picture

Re: Multiple RJ45 to Terminal Block Breakout

Thanks for the references.

@Robert and Glyn,

Till now I had no time to react, but thanks for your input (again)

I will connect a second terminal block with another cable to the second RJ45 port of the first block.

Unfortunately the links on the page https://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing are dead. I'm especially interested in the temperature_search sketch, to adjust the discrete sampling sketch to serial print out the identifying numbers in sort of debug mode.

 

 

 

Robert Wall's picture

Re: Multiple RJ45 to Terminal Block Breakout

Not ALL the links on that page are broken, but it appears that the Shucksmith blog has disappeared. This is the danger of linking to third party sites. It would have been helpful if you had listed the links that you'd found broken. The sketch is in GitHub, but not in a very obvious place, and you need to change the line

  #define ONE_WIRE_BUS 4

to

  #define ONE_WIRE_BUS 5

for the emonTx V3

Bart's picture

Re: Multiple RJ45 to Terminal Block Breakout

That's correct and it would indeed be better to give the exact links for updating the page and improve this platform.

The sensors are working now with 10 sensors on one terminal breakout (ugly solution), by changing the number of sensors. I thought that I could easily connect the two breakouts with an RJ45 in the second RJ45 port, but then it doesn't work anymore. Has something to do with parasite and normal mode?

Robert Wall's picture

Re: Multiple RJ45 to Terminal Block Breakout

What second RJ45 port? It's not very clear what you mean. You don't mean the Ethernet port, do you?

Bart's picture

Re: Multiple RJ45 to Terminal Block Breakout

I meant that a RJ45 to Terminal Block Breakout for DS18B20 has two RJ45 ports. Is there a difference between them? That it isn't possible to connect the second terminal block?

The exact question is, how should I connect more than 6 sensors properly?

Robert Wall's picture

Re: Multiple RJ45 to Terminal Block Breakout

Without checking what you have, I can't answer that. There is much information about connecting one-wire sensors on the Maxim website (there's a link to the app. note on that Resources page). What it boils down to is if they are connected in "star" (i.e. each sensor is cabled back separately to the 'controller' (in this case your Pi), or there are branches in the cabling, then the signal from one can hit the controller and at the same time travel up all the other cables, get reflected back at the end, and you end up with a jumble of delayed reflected signals confusing everything. The preferred method according to Maxim is to 'daisy-chain' the sensors along one cable.

Bart's picture

Re: Multiple RJ45 to Terminal Block Breakout

My setup is:
EmontxV3 with discrete sampling sketch, with 4 CT's and 10 DB18B20 encapsulated temperature sensors. 

I use the terminal block which is selled by OEM(see attachment). Sheepwalk electronics says about the wiring the follows:

"The 1-Wire network is designed to work as a bus, rather than a star. This means you should design your network so that the sensor devices are connected in one long line starting at the master and not so that there are several cables from the master heading out to sensors in all directions. Most of our modules feature a pair of RJ45 sockets to allow you to easily connect your sensors in a bus topology using standard ethernet cables."

If the breakout was only meant for using it in star, the second RJ45 port would be useless, isn't it?

So what you are saying is, that the second breakout causes a sort of up traveling data that interferes the whole setup. I could test this by first chaining an empty breakout without sensors connected and via this breakout connect my second breakout with the sensors?

I'm trying to understand, so probably some questions are weird.

 

Robert Wall's picture

Re: Multiple RJ45 to Terminal Block Breakout

I recommend that you read the Maxim app. note. It is explained there far better and in greater detail than I can, unless I copy that note of course, which would be plagiarism. 

Bart's picture

Re: Multiple RJ45 to Terminal Block Breakout

I had contact with Sheepwalk electronics, and they confirmed that the second RJ45 socket is for daisy chain multiple terminal blocks. I redesigned the lay-out of my network, regarding to the guidelines for reliable network and now it is working :-). I think that I first connected the wrong way or the network was to large for the Emontx.

For those who want to use the same setup. I used:

- 1 SWE2B, with 6 encapsulated DB18B20 sensors. Extended length to 5 x 3,8m and 1 of 5,5 m
- 1 SWE2B, with 4 encapsulated DB18B20 sensors with the standard length of 1m.
- Connected Emontx with first SWE2B by a 2m cat5E UTP cable and the same for the first SWE2B with the second SWE2B.

I also tested a 12 m cable instead of the 2m cat5E UTP as mentioned above, but then it didn't work anymore. 

 

I bought a simple case (Aliexpress) and adjusted it to fit the SWE2B. See the attachment therefore. 

 

@Robert, thanks for thinking along!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.