logo elektroda
logo elektroda
X
logo elektroda

Raspberry - Single wire cable for temperature sensor - Raspberry

maleo77 4716 24
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 15351034
    maleo77
    Level 8  
    Hello,
    I have checked other topics related to my thread, but there is no direct answer in them.

    I'm currently using regular prototyping board connection wires to connect any sensors etc from Raspberry.

    I am now wondering about a couple of things:

    (a) what kind of cable should I buy to be able to connect, for example, a temperature sensor over a longer distance than a few centimetres? and, in addition, how to provide any capacity for these cables? Browsing the internet, I noticed that these connection cables are made of 0.22mm wire, but I wonder if this is also applicable for longer distances? aND what type of cable should this be?

    (b) how can I estimate the length of cable where there will not be so much 'loss' at longer distances, i.e. incorrect readings?

    Regards
  • ADVERTISEMENT
  • #2 15351315
    thoczek
    Level 11  
    You are probably referring to 1-Wire.
    Below is a link to an article from maxim on the subject:

    Link
  • #3 15351336
    maleo77
    Level 8  
    Thanks, that's useful for me too, but I'm more concerned with how, or in other words, with what cable can I distribute other sensors over further distances?

    E.g. PIR motion sensor HC-SR501. I'm going to have them in different locations at different distances, and with connecting cables it probably doesn't make sense.
  • #4 15352066
    Dinkss
    Level 12  
    Further distances specify.

    To me the ds18b20 measurement works on about 30m of twisted pair cable.
  • #5 15352250
    maleo77
    Level 8  
    Dinkss wrote:
    Further distances specify.
    Further distances
    Not so much. i'm going to have temperature measurements in various places, but I assume it won't be more than say 10m. The same goes for the other sensors.

    Dinkss wrote:

    Me measuring with ds18b20 works on about 30m of twisted pair cable.

    and how then to connect it to the twisted pair? We have several pairs of wires there after all?
  • #6 15352272
    TvWidget
    Level 38  
    Think perhaps about wireless sensors. A Raspberry running Windows ioT, for example, works seamlessly with off-the-shelf Bluetooth 4.0 (BLE) sensors. The data collection application is trivial. All that is needed is to enable background scanning.
  • #7 15352276
    maleo77
    Level 8  
    TvWidget wrote:
    Think perhaps about wireless sensors. A Raspberry running Windows ioT, for example, works seamlessly with off-the-shelf Bluetooth 4.0 (BLE) sensors. The data collection application is trivial. All that is needed is to enable background scanning.


    I have everything ready to go, so I wouldn't want to re-mix my kit. Now all that's left for me to do is to lay out the layout of the sensors.

    Additionally, I am not convinced about Microsoft systems.
  • ADVERTISEMENT
  • #8 15507610
    masterpascaler
    Level 11  
    maleo77 wrote:

    a) what kind of cable should I buy to be able to connect e.g. a temperature sensor over a longer distance than a few centimetres? and in addition, how can I ensure the capacity of these cables? Browsing the internet, I noticed that these connection cables are made of 0.22mm wire, but I wonder if this is also applicable for longer distances? aND what type of cable should it be?


    I use AWG28 wire - it's flexible, the diameter will just be something around 0.2mm, costs on average £2 for 1 metre of 10 conductor wire. You cut off as many strands as you want and as long as you want. I've used it successfully (just for the Raspberry) to transmit both 230V AC control voltages, digital 3.3V (e.g. from motion sensors), and analogue 3.3V (e.g. from temperature sensors) over distances of 10 to 15 metres. The only thing that can interfere with your data at longer distances is if you pull the wires close to a strong electromagnetic source (e.g. behind a microwave). Just arrange the wires with your head and you won't have a problem.

    maleo77 wrote:

    (b) how can you estimate the length of cable where there will not be so much "loss" at longer distances, i.e. incorrect readings?



    Ohm's law comes into play - the higher the current you send, the higher the losses, the lower the losses. Remember that the current capacity of the individual GPIO outputs on the Raspberry is only 10 mA. Well if you didn't pay attention in physics or as a reminder : Ohm's law ;)

    PS: I also use the PIR HC-SR501 ;)

    PS2: I still think that if you were pulling those wires I don't know how long and the measured voltage drop e.g. from the motion detector to the Raspberry itself would be significant (e.g. from 3.3 to 2.5V) , then you can always e.g. add a pull-up resistor from the +3.3V GPIO output before the Raspberry on the prototype board. I just don't know if this would work for temperature sensors, with digital inputs (0/1) - yes.
  • #9 15542079
    Jacek Rutkowski
    Level 28  
    masterpascaler wrote:
    I use AWG28 wires - they are flexible, the diameter will just be something around 0.2mm, costs on average £2 for 1 metre of 10-strand wire. You cut off as many strands as you want and as long as you want. I've used it successfully (just for the Raspberry) to transmit both 230V AC control voltages, digital 3.3V (e.g. from motion sensors), and analogue 3.3V (e.g. from temperature sensors) over distances of 10 to 15 metres. The only thing that can interfere with your data at longer distances is if you pull the wires close to a strong electromagnetic source (e.g. behind a microwave). Just arrange the cables with your head and you won't have a problem.

    What kind of insulation does this wire have that you are giving it to 230AC?
    Not 150VDC or 300VDC by any chance?
  • #10 15585107
    masterpascaler
    Level 11  
    Jacek Rutkowski wrote:

    What kind of insulation does this wire have that you are giving it to 230AC?
    Not 150VDC or 300VDC by any chance?

    Insulation - I don't know, under a magnifying glass looking at the eye it is a bit thicker than the copper bundle itself - with 0.4mm. Such a wire is more than enough to drive a 230V AC 100mA relay. This has been working for me for a couple of months now and the 'compuet' sometimes keeps the light on all afternoon and evening on these wires. Remember that assuming (with alternating current) the permissible load of 8A per 1 mm square, such a wire should be able to pull even 1.6A 230V AC. I haven't checked in practice because I don't need to, for me it is enough that it "pulls" relays in continuous operation and is very flexible and, in addition, cheap. What more could the author of the topic want?
  • ADVERTISEMENT
  • #11 15587639
    Jacek Rutkowski
    Level 28  
    If the insulation is 0.4mm thick then it should definitely not be used under mains voltage....
  • #12 15589746
    masterpascaler
    Level 11  
    Jacek Rutkowski wrote:
    If the insulation is 0.4mm thick then it should definitely not be used under mains voltage...

    Justification...
  • #13 15590285
    retrofood
    VIP Meritorious for electroda.pl
    masterpascaler wrote:
    Jacek Rutkowski wrote:
    If the insulation is 0.4mm thick then it should definitely not be used under mains voltage...

    Justify...


    Justify question. If someone has no idea about installations, they should put their hands in their pockets.
  • #14 15592866
    Jacek Rutkowski
    Level 28  
    Question for me or the author of the topic?
  • #15 15592908
    retrofood
    VIP Meritorious for electroda.pl
    Jacek Rutkowski wrote:
    Question to me or to the author of the topic?


    To Col. masterpascaler .
  • #16 15593939
    masterpascaler
    Level 11  
    I have not received an answer so I am already explaining why the question. The reason for the question is that I do not understand why such a cable must not be used for AC 230V according to my colleagues? Especially as I have been using it myself for X months and everything works as it should. In fact, below is the specification of the cable from the shop we all know. I would like to add that I have SEP E-1.2 and E-1.10 certificates, and I deal with electricity and electronics more than half of my life on a daily basis, I also work as a maintenance electrician, I am not writing this to boast, but to make my colleagues aware that since we are talking like electricians, let's talk as electricians, and let someone explain to me - rationally - why I cannot (or should not?) use AWG28 cable for such AC voltages/voltages. A man is a lifelong learner, so maybe I don't know something. When selecting this cable for the 0.1A 230V AC transmission cable, I suggested the experience mentioned earlier that 1mm square of cable is rated up to 8A (e.g. when installing sockets and lamps in flats). What's more - before installing these AWG28 wires permanently in the trays, I had them run loosely along the wall so that I could observe any heating of the wires or damage to the insulation, but this did not happen during the entire month of testing. So - factual justification?
    Raspberry - Single wire cable for temperature sensor - Raspberry
  • #17 15593959
    freebsd
    Level 42  
    masterpascaler wrote:
    I have not received an answer so I am already explaining why the question. The reason for the question is that I do not understand why such a cable must not be used for AC 230V according to my colleagues? Especially as I have been using it myself for X months and everything works as it should. In fact, below is the specification of the cable from the shop we all know. I would like to add that I have SEP E-1.2 and E-1.10 certificates, and I deal with electricity and electronics more than half of my life on a daily basis, I also work as a maintenance electrician, I am not writing this to boast, but to make my colleagues aware that since we are talking like electricians, let's talk as electricians, and let someone explain to me - rationally - why I cannot (or should not?) use AWG28 cable for such AC voltages/voltages. A man is a lifelong learner, so maybe I don't know something. When selecting this cable for the 0.1A 230V AC current transmission cable, I suggested the aforementioned experience that 1mm square of cable is rated up to 8A (e.g. when installing socket and lamp installations in flats). What's more - before permanently installing these AWG28 wires in the trays, I had them run loosely along the wall so that I could keep an eye on any heating of the wires or damage to the insulation, but this did not happen for a whole month of testing. So - factual justification?
    Raspberry - Single wire cable for temperature sensor - Raspberry
    Do you know what peak voltage 230 V AC corresponds to?
  • ADVERTISEMENT
  • #18 15593984
    Jacek Rutkowski
    Level 28  
    The maximum voltage of 300V means 300V DC so AC theoretically can be up to about 200VAC but in circuits separated from the mains. Mains voltage can be 230V +-10% so 253VAC is already outside the range of acceptable operation. The mains requires a test voltage of at least 2.5kVAC and an isolation of at least 500V of the conductors to the outside due to possible surges in the mains. You are not in a position to guarantee that an overvoltage will not penetrate through your ribbon into the device and injure anyone if, for example, the housing or other conductive parts are accessible and the device is not correctly earthed. In addition, overvoltages of several hundred volts are the norm in the event of local discharges, which is why a cable worse than H05 is not used for mains voltage (approx. 0.6mm on the conductor and approx. 0.7mm of external insulation).
  • #19 15594003
    retrofood
    VIP Meritorious for electroda.pl
    masterpascaler wrote:
    I would like to add that I hold an SEP E-1.2 and E-1.10 licence, and I deal with electrical and electronic engineering for the greater part of my life on a daily basis, I also work as a maintenance electrician,


    You don't have SEP qualifications because they don't exist, you can instead have a qualification certificate. It does, however, describe internally exactly what it authorises you to do and what it does not. Most electronics technicians only have them to legally operate mains power supplies and that is where their qualifications as well as their knowledge of installations ends. Therefore, our conversation, as between electricians, will not stick, but I will try.
    Already the technical specification you posted contains quantities that exclude such a cable from being used in electrical installations, as any middle school student who has only rubbed should know. So here's a question for junior high school gold. What is the maximum value of the phase voltage in the network? I remind you that 230 V is the effective value . Besides, the installation cables are obliged to withstand phase-to-phase values, as the appearance of phase-to-phase voltage on them is always possible, but I will even skip this, probably too complicated.
    The second question is, since when has the use of conductors with a cross-section of 0.09 mm² been allowed in installations, and what document says so? Because according to my knowledge, obtained among other things from the Regulation of the Minister of Infrastructure of 12 April 2002 on the technical conditions to which buildings and their location should conform, and from the standards referred to therein, a cross-section of 0.09 mm² is not allowed to be used in installations, nor even ten times larger yet!
    I am not going to write any more about those 8A per mm² of wire in circuits, which is nonsense, because that is what the tables of permissible long-term load capacity of wires depending on the methods and conditions of laying are for, but the conclusion is one. You listened to a poor self-educated person, who had no idea about the rules governing the proper execution of installations, and you adopted his views as your own, which was your mistake. I advise you to educate yourself with the relevant literature, from textbooks, and not from the god-forsaken videos on YT, because there is no shortage of morons on the web. Take a look here https://www.elektroda.pl/rtvforum/topic2362314-600.html
    and then go back to the beginning of that topic. There are definitely more morons.

    As it turns out, Fellows have overtaken me on the voltage issue, so I'll just add that this maximum voltage occurs in the wire quite often, as 100 times every second. 50 times it has positive values and 50 times negative values.
  • #20 15594098
    masterpascaler
    Level 11  
    [quote="retrofood"]
    masterpascaler wrote:
    I would like to add that I hold an SEP E-1.2 and E-1.10 licence, and I deal with electrical and electronic engineering for the greater part of my life on a daily basis, I also work as a maintenance electrician,


    retrofood wrote:
    You don't have SEP qualifications because they don't exist, you can instead have a qualification certificate.

    Right, due to the colloquiality of the term I used it myself, but of course you are right.
    retrofood wrote:

    It does, however, describe exactly inside what it entitles you to and what it does not. Most electronics engineers only have it to legally operate mains power supplies and that is where their qualifications as well as their knowledge of installations ends. Therefore, our conversation, as between electricians, will not stick, but I will try.
    Already the technical specification you posted contains quantities that exclude such a cable from being used in electrical installations, as any middle school student who has only rubbed should know. So here's a question for junior high school gold. What is the maximum value of the phase voltage in the network? I remind you that 230 V is the effective value . Besides, the installation cables are obliged to withstand the phase-to-phase values, as the appearance of phase-to-phase voltage on them is always possible, but I will even skip this, probably too complicated.
    The second question is, since when has the use of 0.09 mm² conductors been allowed in installations, and what document says so? Because according to my knowledge, obtained among other things from the Regulation of the Minister of Infrastructure of 12 April 2002 on the technical conditions to which buildings and their location should conform, and from the standards referred to therein, a cross-section of 0.09 mm² is not allowed to be used in installations, nor even ten times larger yet!
    I am not going to write any more about those 8A per mm² of wire in circuits, which is nonsense, because that is what the tables of permissible long-term load capacity of wires depending on the methods and conditions of laying are for, but the conclusion is one. You listened to a poor self-educated person, who had no idea about the rules governing the proper execution of installations, and you adopted his views as your own, which was your mistake. I would advise you to educate yourself with the relevant literature, from textbooks, and not from the god-forsaken videos on YT, because there is no shortage of morons on the web. Take a look here https://www.elektroda.pl/rtvforum/topic2362314-600.html
    and then go back to the beginning of that topic. There are definitely more morons.

    As it turns out, Fellows have overtaken me on the voltage issue, so I'll just add that this maximum voltage occurs in the wire quite often, as 100 times every second. 50 times it has positive values and 50 times negative values.

    OK, thanks for the comprehensive discussion, statements like this are appreciated. Really, sincerely, and without irony. So, in relation to the above, 2 issues arise for me:
    1. As I understand it, I should replace the wires I used with others of a thickness appropriate to the possible maximum voltage, is that correct?
    2. So let someone more theoretically and practically experienced answer the author of the question
    At this point, I understand that the fact that "my" relays have been working for so many months on the of these wires is a rather happy coincidence that they still work, or is it?
  • #21 15594169
    retrofood
    VIP Meritorious for electroda.pl
    masterpascaler wrote:

    1. As I understand it, I should replace the wires I used with other wires of a thickness appropriate to the possible maximum voltage, is that so?
    2. So let someone more theoretically and practically experienced answer the author of the question
    At this point I understand that the fact that "my" relays have been working for so many months on these wires is rather a happy coincidence that they are still working, is that so?

    Yes, definitely yes. For mains voltages we use installation cables for a minimum voltage of 300/500V, with a minimum conductor cross-section of 1 mm² Cu, irrespective of the fact that the load is low.
    This size is due to at least two factors, firstly the minimum mechanical strength required, but the second factor is more important. Well, low cross-sections raise excessively the magnitude of the impedance of the short-circuit loop of the circuit, which threatens the ineffectiveness of an incorrectly selected protection and the danger of paralysis in the event of a fault. I am even omitting the obligatory rule that at each point of change of the cross-section of the wire in the circuit there should be an appropriate protection.
    2. To the author, unfortunately I can't answer, because he asks rhetorical questions. Not enough technical data, and I like specifics.
  • #22 15594184
    masterpascaler
    Level 11  
    retrofood wrote:
    masterpascaler wrote:

    1. As I understand it, I should replace the wires I used with other wires of a thickness appropriate to the possible maximum voltage, is that correct?
    2. So let someone more theoretically and practically experienced answer the author of the question
    At this point I understand that the fact that "my" relays have been working for so many months on these wires is rather a happy coincidence that they are still working, is that so?

    Yes, definitely yes. For mains voltages we use installation cables for a minimum voltage of 300/500V, with a minimum conductor cross-section of 1 mm² Cu, irrespective of the fact that the load is low.
    This size is due to at least two factors, firstly the minimum mechanical strength required, but the second factor is more important. Well, low cross-sections increase excessively the magnitude of the impedance of the short-circuit loop of the circuit, which threatens with the failure of an incorrectly selected protection and the risk of paralysis in the event of a failure. I even omit the obligatory rule that at each point of change of the cross-section of the cable in the circuit there should be an appropriate protection.


    Ok, thank you for the comprehensive information, that is what I will do.
    So it remains to answer the question of the author of the topic. Assuming a sensor return signal of 5.0 or 3.3V DC / 10mA
  • #23 15602046
    Jacek Rutkowski
    Level 28  
    retrofood wrote:
    Yes, definitely yes. For mains voltages we use installation cables for a minimum voltage of 300/500V, with a minimum conductor cross-section of 1 mm² Cu, irrespective of the fact that the load is low.
    This size is due to at least two factors, firstly the minimum mechanical strength required, but the second factor is more important. Well, low cross-sections raise the magnitude of the short-circuit loop impedance of the circuit excessively, which risks the failure of an incorrectly selected protection and the risk of paralysis in the event of a fault. I am even ignoring the current rule that there should be adequate protection at every point where the cross-section of a conductor in a circuit changes.

    In my opinion the insulation should of course be suitable, but the cross-section does not have to be 1mm² if the circuit protection is smaller, e.g. circuit breaker CLS6-B4 or the circuit is protected with a fuse, e.g. 1A, then a wire of 0.5mm² or 0.75mm² Cu H05 Z-K can be used.
    Smaller cross-sections are not used at mains voltage, as mentioned by my colleague, for mechanical reasons.
    Furthermore, if mains and low-voltage cables are combined, it is good practice to physically separate them so that in the event of a mains surge the insulation does not penetrate the low-voltage part, where the insulation is thinner and the risk of penetration is greater than for example in a second cable under a different phase, which also has reinforced insulation.
  • #24 15605497
    retrofood
    VIP Meritorious for electroda.pl
    Jacek Rutkowski wrote:

    In my opinion the insulation should of course be suitable but the cross-section does not have to be 1mm² if the circuit protection is smaller e.g. circuit breaker CLS6-B4 or the circuit is protected with a fuse e.g. 1A then a wire of 0.5mm² or 0.75mm² Cu H05 Z-K can be used.


    If it is a portable device - yes. If it is a permanently laid cable - no.
  • #25 15605550
    Jacek Rutkowski
    Level 28  
    Is there a standard for this or is it just so-called good practice?
    I recently had the opportunity to attend a lecture and exam for the SPE E1 qualification certificate and the lecturer, who was rather lukewarm, was unable to answer me specifically why.
ADVERTISEMENT