Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. How to connect a kwh meter using S0 and which sketch to use

How to connect a kwh meter using S0 and which sketch to use

Scheduled Pinned Locked Moved Troubleshooting
11 Posts 4 Posters 12.7k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Slorf
    wrote on last edited by
    #1

    Hi there,

    I want to connect 2 kwh meters using their S0 bus ( instead of using a light sensor ).

    Each kwh meter is going to be connected to their own sensor, which should send the data to a Domoticz gateway.

    Used the wiring diagram used in http://forum.mysensors.org/topic/1013/contest-my-12-input-high-precision-pulse-counter-kwh-w/6 and the energymeter sketch.

    I do get a reading, but it's totally off :unamused:

    Is there someone out there who has a working mysensors sketch using a S0 kwh meter ?

    Thanks !!!

    Alex

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Mediacj
      wrote on last edited by Mediacj
      #2

      I have combined and changed the default Mysensors pulsecounter sketches for two S0 pulsecounters (water/solar)sketch

      Connect the S0 wires to ground and the digital inputs mentioned in the sketch. The internal pull up resistors are enabled.

      F 1 Reply Last reply
      0
      • S Offline
        S Offline
        Slorf
        wrote on last edited by
        #3

        Hi Mediacj,

        Are you using the S0 bus of the lightsensor to messure your solar panels ?

        If using the S0 bus, how did you wire it up ?

        Thanks

        Alex

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Mediacj
          wrote on last edited by Mediacj
          #4

          I am using the S0 busses of the kwh meters directly, and connect one wire to the ground and the other one to a digital input as mentioned in the sketch(D3 and D5) that's all :)

          The internal pull up's of the Arduino nano are enabled in the sketch. I understand your misunderstanding the comments in the sketch are from the original and mention the light sensor, I removed those comments now.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Slorf
            wrote on last edited by
            #5

            Cool !

            I will try it lateron ( at work now )

            Building 3 separate sensors ( in order to get rid of the piface-2 in Domoticz )

            • Water meter
            • Energy ( solarpanels on the house )
            • Energy ( solarpanels on the gardenshed )

            Next challenge would be to get a battery level in the sketch :-)

            Alex

            1 Reply Last reply
            0
            • M Offline
              M Offline
              Mediacj
              wrote on last edited by
              #6

              Nice challenge:) I am using it also with Domoticz.

              Take care of the poles, plus on the digital in and ground to ground.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Slorf
                wrote on last edited by
                #7

                Which poles do you mean ?

                Btw, which sensor do you use for your water meter ?

                Right now i use a metal detector connected to a piface ( see https://www.domoticz.com/wiki/PiFace )

                I tested this sensor with the watercounter sketch and it worked perfectly, so i only have to move the wires from the senor from the piface to the mysensor arduino.

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  Mediacj
                  wrote on last edited by Mediacj
                  #8

                  The S0 bus has a + and - pole But it is not really critical I think, it won't harm the port the pulses are to short but maybe it doesn't count correctly when connected wrong.

                  I am using a dedicated water pulsecounter.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    Slorf
                    wrote on last edited by
                    #9

                    @Mediacj

                    I am still working on the S0 sketch, the problem I have is how to set the starting value, how did you solve this ?

                    grauG 1 Reply Last reply
                    1
                    • S Slorf

                      @Mediacj

                      I am still working on the S0 sketch, the problem I have is how to set the starting value, how did you solve this ?

                      grauG Offline
                      grauG Offline
                      grau
                      wrote on last edited by
                      #10

                      @Slorf said:

                      @Mediacj

                      I am still working on the S0 sketch, the problem I have is how to set the starting value, how did you solve this ?

                      Looking forward how to set a "starting value" (via domotics)

                      1 Reply Last reply
                      0
                      • M Mediacj

                        I have combined and changed the default Mysensors pulsecounter sketches for two S0 pulsecounters (water/solar)sketch

                        Connect the S0 wires to ground and the digital inputs mentioned in the sketch. The internal pull up resistors are enabled.

                        F Offline
                        F Offline
                        Fay Candiliari
                        wrote on last edited by
                        #11

                        Hi @Mediacj ! This is Fay from codebender. I just wanted to let you know that the sketch you are using here has been deleted and so it is not available for users to view it. You could replace it or create a new one! Let me know if you have any questions!

                        1 Reply Last reply
                        1
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        10

                        Online

                        11.7k

                        Users

                        11.2k

                        Topics

                        113.0k

                        Posts


                        Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • MySensors
                        • OpenHardware.io
                        • Categories
                        • Recent
                        • Tags
                        • Popular