External wire climate sensor recomendations?

Hi,
I’ve finally found out, why I have a strange value gaps in plots from external sensor.

obrazek

It is causes by slats, that are from metal. Each time, I close them for night, communication between core and external node becomes very unstable. Lot of messages are not received.

Situation (arrows shows how are modules oriented):

| |          |                   |              | |
| |          |                   |              | |
| |          |                   |              | |
| |          |                   |     Turris   | |
| |          +-------------------+      with    | |
| |                                    Dongle   | |
| |                                         ⇐ * | |
| |                                             | |
+-+---------------------------------------------+-+
+-+---------------------------------------------+-+
| |             <-  cca 5 meters ->             | |
| |                                             | |
| |                                             | |
| |                                             | |
 *|  External node                              | |
 ⇓|                                             | |
  |                                             | |
  |                                             | |
| |                                             | |
| |                                             | |

I think, that the best (and cheapest) way, how to solve the issue, is move node inside and connect Climate module with the core via short wire. E.g 1 meter. According to my searches on internet, it could be possible with I2C.

What wire and connectors will be the suitable for it? I’m thinking about Jack 2,5mm, 4 pol or the grean one used on sensor module (what I don’t know how is named :wink: )

So I tested, I’m using twisted pairs wire and it seems to work, values are sent, except temperature. No temperature from climate module, no temperature from core.

node/outdoor_1/info {"version": "v1.7.4", "firmware": "generic-node-battery-mini"}
node/outdoor_1/battery/-/voltage 2.77
node/outdoor_1/battery/-/percentage 64
node/outdoor_1/battery/-/level middle
node/outdoor_1/hygrometer/0:4/relative-humidity 61.1
node/outdoor_1/lux-meter/0:0/illuminance 5.4
node/outdoor_1/barometer/0:0/pressure 97541.50
node/outdoor_1/barometer/0:0/altitude 319.94
node/outdoor_1/barometer/0:0/pressure 97523.00
node/outdoor_1/barometer/0:0/altitude 321.62
node/outdoor_1/barometer/0:0/pressure 97545.25
node/outdoor_1/barometer/0:0/altitude 319.81
node/outdoor_1/barometer/0:0/pressure 97527.75
node/outdoor_1/barometer/0:0/altitude 321.00

But when I unplug the wire from Climate module, temperature is sent:

node/outdoor_1/barometer/0:0/altitude 319.81
node/outdoor_1/barometer/0:0/pressure 97527.75
node/outdoor_1/barometer/0:0/altitude 321.00
node/outdoor_1/barometer/0:0/pressure 97538.75
node/outdoor_1/barometer/0:0/altitude 320.56
node/outdoor_1/thermometer/0:1/temperature 20.56

According to schema, I connected only pins 15 (GND), 16 (VDD), 17 (SCL0) and 18 (SDA0). I didn’t connected pin 19 (INT).

When I connect Climate module directly, all values are sent, including temperature.
Is there something I miss? Do I need connect more pins? Or any other reason, why thermometer events are not sent?

It’s a quite issue for me, as outdoor temperature is the most important value for me :smiley:

Hello, the I2C is not designed for long run of cables. It is designed for maximal 30 cm traces on the PCB inside televisioons, PCs.

The twisted pair is not great because the clock and data will be capacitive coupled which can add noise to the transmission. Also twisted pair with combination SDA/GND and SCL/GND is also an issue because the bus is driven with open collector and pull-up could have issues to quickly put the SCA or SCL to logical 1.

Also reflections can be issue, but it is ussualy problem for much higher speeds above 1 MHz I guess.

You can try to lower the communication speed from 400kHz to 100kHz. This is not a clean solution we would like to be used, but you can try that. Please add i2c_init funtction call to the app_init() with parameters I2C0 and 100kHz
http://sdk.bigclown.com/group__bc__i2c.html#ga8f29242288303f0328c6514068e516fa

Which temperature sensor is not working when you connect Climate over twisted pair. The one on the Climate, or on the Core ? You can also try to use the seconds I2C bus on the module.

You can try to lower the communication speed from 400kHz to 100kHz. This is not a clean solution we would like to be used, but you can try that. Please add i2c_init funtction call to the app_init() with parameters I2C0 and 100kHz

Thanks, will try

Which temperature sensor is not working when you connect Climate over twisted pair. The one on the Climate, or on the Core ?

No one. No temperature from Core, no temperature from Climate shield. But rest of values are sent, as is visible above.

You can also try to use the seconds I2C bus on the module.

This needs a special configuration in firmware and another wires, right?

I connected pairs GND/VCC and SDA/SCL.
Strange is, that I have no issue with other values. Only temperature is missing. I would expect that in case of some noise I will get temperature value from time to time. And always I will get temperature from Core.

Maybe I could try Accelerometer on Core to check whether I2C bus on Core works correctly.

The second I2C needs to be initialized by the same i2c_init function. Also you could not use the bc_module_climate because that is fixed to the BC_I2C_I2C0 bus, see the https://github.com/bigclownlabs/bcf-sdk/blob/master/bcl/src/bc_module_climate.c#L30

You have to init your climate sensors on the second bus yourself one by one with the same init code like in bc_module_climate_init, but with BC_I2C_I2C1 bus parameter.

Try the 100kHz speed solution first and let us know.
Martin

Will try during the weekend.

Thanks

BTW:
Maybe the hole, I’ve to cut for wires, or (unconnected) wires itself caused that there were no gaps from Monday. Even with closed slats.

obrazek

Hi Marián,

how is your data monitoring working now? I’m a little bit confused what you mean by “slats”. Do you mean sunblinds?

So before you had issues with twisted pairs. Now you rewired SCL,SDA signals? Your last post sounds like you are again running on the radio protocol and that the unconected wires improved the signal?

Martin

Hi :wink:

Yes, no gaps or strange steps till now: http://mkyral.tmep.cz/

Yes. this looks like correct english word :smiley:

My issue was, that, with Climate module connected by wires, I received data about humidity, light intensity and atmospheric pressure from Climate module. But no temperature values (external or internal sensor) at all. As soon I disconnected climate module, Core starts sending internal temperature. It confused me a lot.

Yes, I’m back on radio. Wires are not connected now, but still are there. As visible on the picture above. I think, the hole, or rather the slit, I had made, helped a lot. Wires are there only to make the slit more open. Or maybe are used as “conductor” or “transmitter” for the radio signal. I don’t know, I have to test without wires. But currently I have not enough time to play with it.

I think, all is connected with the box I’m using to cover module: https://www.elima.cz/obchod/1000050-fd-10-krabice-plastova-do-vlhka-p-9676.html and white electrical tape I’ve used to convert grey box to white :wink:

It looks like it has a big impact to signal strength.

The final state now:
I cut a square hole on the right side of the box (covered by the tape) and now I made the slit in this tape “cover”.