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. Using optocoupler as actuator in node

Using optocoupler as actuator in node

Scheduled Pinned Locked Moved Hardware
22 Posts 9 Posters 12.2k Views 1 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.
  • ferpandoF ferpando

    Hi,
    If I use some optocoupler like the 4N35, will the actuator sketch work as if it was a relay?
    Thanks in advance

    ferpandoF Offline
    ferpandoF Offline
    ferpando
    Hero Member
    wrote on last edited by
    #13

    I have now the hardware part working with 9 optocuoplers driven by an Arduino micro, using a couple shift registers.
    The problem now is from the software point of view.
    How to address the optos.
    When using relays or opts directly, the sketch uses digitalWrite to have the pin HIGH or LOW.
    When I set the number of relays, VERA creates that number of light switches.

    Now with the shit registers, I use only pins 4, 6 and 7 of the arduino.
    I don't know if this will work just by telling the sketch I have now 9 relays, and then change a bit the program to address the shift register correctly.
    Will the pins I use (4,6,7) conflict with the ones used by the sketch for the relays? (3, 4, 5, 6, 7, 8,.... 9,10,11 for the 9 relays) The mini only has 3-8 free pins.
    I don't know how to start with this.

    BulldogLowellB 1 Reply Last reply
    0
    • ferpandoF ferpando

      I have now the hardware part working with 9 optocuoplers driven by an Arduino micro, using a couple shift registers.
      The problem now is from the software point of view.
      How to address the optos.
      When using relays or opts directly, the sketch uses digitalWrite to have the pin HIGH or LOW.
      When I set the number of relays, VERA creates that number of light switches.

      Now with the shit registers, I use only pins 4, 6 and 7 of the arduino.
      I don't know if this will work just by telling the sketch I have now 9 relays, and then change a bit the program to address the shift register correctly.
      Will the pins I use (4,6,7) conflict with the ones used by the sketch for the relays? (3, 4, 5, 6, 7, 8,.... 9,10,11 for the 9 relays) The mini only has 3-8 free pins.
      I don't know how to start with this.

      BulldogLowellB Offline
      BulldogLowellB Offline
      BulldogLowell
      Contest Winner
      wrote on last edited by
      #14

      @ferpando

      the key is mapping the bit in your register to a device you create.

      you can use your bitwise operators to determine if you should toggle a device's status.

      which shift register are u using?

      ferpandoF 1 Reply Last reply
      0
      • BulldogLowellB BulldogLowell

        @ferpando

        the key is mapping the bit in your register to a device you create.

        you can use your bitwise operators to determine if you should toggle a device's status.

        which shift register are u using?

        ferpandoF Offline
        ferpandoF Offline
        ferpando
        Hero Member
        wrote on last edited by
        #15

        @BulldogLowell
        I'm using 74HC595.
        I solved it changing the sketch from relay to servo, and them making some modifications to it.
        It works very nice now.

        BulldogLowellB 1 Reply Last reply
        1
        • ferpandoF ferpando

          @BulldogLowell
          I'm using 74HC595.
          I solved it changing the sketch from relay to servo, and them making some modifications to it.
          It works very nice now.

          BulldogLowellB Offline
          BulldogLowellB Offline
          BulldogLowell
          Contest Winner
          wrote on last edited by
          #16

          @ferpando said:

          @BulldogLowell
          I'm using 74HC595.
          I solved it changing the sketch from relay to servo, and them making some modifications to it.
          It works very nice now.

          so, pulsing the optocoupler with 'pushbutton' front end on vera's UI, good idea.

          ferpandoF 1 Reply Last reply
          0
          • BulldogLowellB BulldogLowell

            @ferpando said:

            @BulldogLowell
            I'm using 74HC595.
            I solved it changing the sketch from relay to servo, and them making some modifications to it.
            It works very nice now.

            so, pulsing the optocoupler with 'pushbutton' front end on vera's UI, good idea.

            ferpandoF Offline
            ferpandoF Offline
            ferpando
            Hero Member
            wrote on last edited by
            #17

            @BulldogLowell
            Works pretty well.
            The servo sketch installs a blind control device on vera with allows me to control stop, up and down buttons with one device per blind.

            1 Reply Last reply
            0
            • HoffanH Offline
              HoffanH Offline
              Hoffan
              wrote on last edited by
              #18

              Please show us some photo of the Servo into the Blinds :)

              ferpandoF 1 Reply Last reply
              0
              • HoffanH Hoffan

                Please show us some photo of the Servo into the Blinds :)

                ferpandoF Offline
                ferpandoF Offline
                ferpando
                Hero Member
                wrote on last edited by
                #19

                @Hoffan
                No servo in the blinds.
                The blinds have somfi motors.
                I just use the sketch of a servo to control it.

                1 Reply Last reply
                0
                • daulagariD Offline
                  daulagariD Offline
                  daulagari
                  Hero Member
                  wrote on last edited by
                  #20

                  Had this problem myself, controlling Somfy blinds using my computer/smartphone.

                  Did read in a forum on a Somfy RS-485 solution (way to expensive) and about somebody that took his remote control and replaced the buttons by relays and had those relays controlled by a zWave (dual) binary switch. Also quite expensive solution to my opinion and not that supported.

                  Recently, but before I knew mysensors, RFXCOM came with the RFXtrx433E so I went for that. Quite nice, you can pair the Somfy blinds with the RFXtrx433E and control everything.

                  Knowing mysensors, taking the remote control and replacing the buttons using relays controlled by an Arduino Pro Mini would also be a good option.

                  Z 1 Reply Last reply
                  0
                  • daulagariD daulagari

                    Had this problem myself, controlling Somfy blinds using my computer/smartphone.

                    Did read in a forum on a Somfy RS-485 solution (way to expensive) and about somebody that took his remote control and replaced the buttons by relays and had those relays controlled by a zWave (dual) binary switch. Also quite expensive solution to my opinion and not that supported.

                    Recently, but before I knew mysensors, RFXCOM came with the RFXtrx433E so I went for that. Quite nice, you can pair the Somfy blinds with the RFXtrx433E and control everything.

                    Knowing mysensors, taking the remote control and replacing the buttons using relays controlled by an Arduino Pro Mini would also be a good option.

                    Z Offline
                    Z Offline
                    Zeph
                    Hero Member
                    wrote on last edited by
                    #21

                    @daulagari said:

                    Knowing mysensors, taking the remote control and replacing the buttons using relays controlled by an Arduino Pro Mini would also be a good option.

                    Or better still, optocouplers or an analog switch as described above...

                    daulagariD 1 Reply Last reply
                    0
                    • Z Zeph

                      @daulagari said:

                      Knowing mysensors, taking the remote control and replacing the buttons using relays controlled by an Arduino Pro Mini would also be a good option.

                      Or better still, optocouplers or an analog switch as described above...

                      daulagariD Offline
                      daulagariD Offline
                      daulagari
                      Hero Member
                      wrote on last edited by
                      #22

                      @Zeph said:

                      Or better still, optocouplers or an analog switch as described above...

                      Yes, that's a better option as relays are quite power hungry and bulky.

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


                      11

                      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