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. Hardware
  3. Water Sensor

Water Sensor

Scheduled Pinned Locked Moved Hardware
18 Posts 5 Posters 3.4k Views 4 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.
  • dbemowskD dbemowsk

    @moskovskiy82 See if you can feed an optocoupler off of the LED.

    M Offline
    M Offline
    moskovskiy82
    wrote on last edited by
    #8

    @dbemowsk

    Ok took the measurements once again on the led. This time measuriong only LED pins and not the live neutral wire. Between 1 and 3 gave me 0,1AC and 1,8DC when red and 0,1AC and 0,1DC when green. So just connected the anlogue pin of arduino to pin3 of LED and it works. Readings 19-70 when red led turned on. And 0-3 when off.
    Just wonder how this led works from AC and is it still a good advice to put optocoupler into it?

    dbemowskD 1 Reply Last reply
    1
    • H Offline
      H Offline
      hard-shovel
      wrote on last edited by
      #9

      The Led is not actualy runing on AC. Part of the IC generates an low voltage AC signal (Nothing to do Mains Power) then other parts of the IC detect changes to this signal via the pair of diodes at the bottom, and then generate the two signals for the red and green leds.

      The bicolor color led has a common terminal in the center and the two outer pins control the two outer pins power the red and green leds.

      Utilizing a optocoupler has a safety advantage, as it isolates the power on the sensed unit from the mysensor node. It also allows systems using different control signal voltages to be interconnected.

      If you have the arduino analogue pin connected to Pin3, where do you have the arduino GND connected?

      As there is a relay that is connected in parallel to the the Upper LED drive transistor,
      I recommend using a optocoupler and resistor connected to the relay terminals shown, as these connections are easy to solder wires to.
      The resistor will need to be sized to match the voltage on the relay to limit current through the optocoupler led. 0_1516034196873_Electrolux Control Board 213.jpg

      M 1 Reply Last reply
      2
      • M moskovskiy82

        @dbemowsk

        Ok took the measurements once again on the led. This time measuriong only LED pins and not the live neutral wire. Between 1 and 3 gave me 0,1AC and 1,8DC when red and 0,1AC and 0,1DC when green. So just connected the anlogue pin of arduino to pin3 of LED and it works. Readings 19-70 when red led turned on. And 0-3 when off.
        Just wonder how this led works from AC and is it still a good advice to put optocoupler into it?

        dbemowskD Offline
        dbemowskD Offline
        dbemowsk
        wrote on last edited by
        #10

        @moskovskiy82 that LED is a bicolored LED. The center pin is common, and then one outer pin controls red, and the other controls green.

        Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
        Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

        1 Reply Last reply
        0
        • H hard-shovel

          The Led is not actualy runing on AC. Part of the IC generates an low voltage AC signal (Nothing to do Mains Power) then other parts of the IC detect changes to this signal via the pair of diodes at the bottom, and then generate the two signals for the red and green leds.

          The bicolor color led has a common terminal in the center and the two outer pins control the two outer pins power the red and green leds.

          Utilizing a optocoupler has a safety advantage, as it isolates the power on the sensed unit from the mysensor node. It also allows systems using different control signal voltages to be interconnected.

          If you have the arduino analogue pin connected to Pin3, where do you have the arduino GND connected?

          As there is a relay that is connected in parallel to the the Upper LED drive transistor,
          I recommend using a optocoupler and resistor connected to the relay terminals shown, as these connections are easy to solder wires to.
          The resistor will need to be sized to match the voltage on the relay to limit current through the optocoupler led. 0_1516034196873_Electrolux Control Board 213.jpg

          M Offline
          M Offline
          moskovskiy82
          wrote on last edited by moskovskiy82
          #11

          @hard-shovel said in Water Sensor:

          If you have the arduino analogue pin connected to Pin3, where do you have the arduino GND connected?

          Well actually nowhere :) Thought that as the analogue pin is pulled to ground that will suffice.
          Was happy at first but still seems the readings are erratic. So will follow your great advice with the optocoupler.
          Do i get the connection scheme correctly?

          alt text

          1 Reply Last reply
          0
          • NeverDieN Offline
            NeverDieN Offline
            NeverDie
            Hero Member
            wrote on last edited by
            #12

            https://www.aliexpress.com/item/TLP222A-light-coupling-patch-SOP4-optoisolator-photoelectric-coupling-10PCS-LOT/32826357728.html?spm=a2g0s.9042311.0.0.QhRigb

            1 Reply Last reply
            0
            • M Offline
              M Offline
              moskovskiy82
              wrote on last edited by
              #13

              @neverdie Do o really need the TLP222A as i already have 4N35 lying around

              1 Reply Last reply
              0
              • NeverDieN Offline
                NeverDieN Offline
                NeverDie
                Hero Member
                wrote on last edited by
                #14

                I'll withdraw the suggestion. I don't know what's right for you.

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  hard-shovel
                  wrote on last edited by
                  #15

                  The TLP222A are opto-Mosfet devices so ideal for powering LEDs and small Relays etc as they have a 500mA rating, and the price listed is good value.

                  However for your application, use the 4N35 that you already have.
                  Your diagram is reversed as you need to drive the led in the optocoupler from the relay coil connections.

                  Use the existing 10K as a pullup resistor at the input to the arduino,
                  On the relay side use a series resistor R1 of about 1Kohm for 12Vdc (expected from a 9Vac supply).0_1516275929555_Water Sensor 213-B.jpg

                  1 Reply Last reply
                  2
                  • M Offline
                    M Offline
                    moskovskiy82
                    wrote on last edited by
                    #16

                    @hard-shovel said in Water Sensor:

                    Your diagram is reversed as you need to drive the led in the optocoupler from the relay coil connections.

                    Your ingenious scheme worked like a charm. Thank you!
                    Don't want to push but in such a rare possibility when you have access to such a marvelous help...

                    The fan is of asynchronous type with 3 wires (neutral and 2 speeds). Currently i have just connected the output for speed1 to relay NC contact and speed2 to fan to NO contact. So it looks like this.

                    alt text

                    With such connection i still have the manual switch to off - 1st speed. But with such connection i cannot use manual switch on humidifier to choose the second switch. I have already use a multi meter to find out contacts

                    i was thinking of making my sensors node completely parallel to the board and use 4n35 to sense 220V AC on different rotary switch positions and drive relays appropriately. All the schematics i found on the web use bridge rectifier. Wonder if there is any way to go without one - and if not - what to order from aliexpress?

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      hard-shovel
                      wrote on last edited by
                      #17

                      To sense the 220V without a bridge rectifer use an ac version of the opto-isolator, The optocoupler will still need the rest of the components ie resistors and/or capacitors.
                      typical types are H11AA1 or LTV814 etc

                      0_1516572230867_Opto-Couplers.png

                      link text

                      M 1 Reply Last reply
                      1
                      • H hard-shovel

                        To sense the 220V without a bridge rectifer use an ac version of the opto-isolator, The optocoupler will still need the rest of the components ie resistors and/or capacitors.
                        typical types are H11AA1 or LTV814 etc

                        0_1516572230867_Opto-Couplers.png

                        link text

                        M Offline
                        M Offline
                        moskovskiy82
                        wrote on last edited by
                        #18

                        @hard-shovel said in Water Sensor:

                        typical types are H11AA1 or LTV814 etc

                        Thank you! Seems like the best way to for me than. Will order and wait for them to arrive

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


                        21

                        Online

                        11.7k

                        Users

                        11.2k

                        Topics

                        113.1k

                        Posts


                        Copyright 2025 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