🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Controlling 12v solenoid

    Modules
    3
    4
    3.7k
    Loading More Posts
    • 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.
    • R
      richm
      last edited by

      I want to use an M5 to switch a 12v DC solenoid valve. I was hoping the GoPlus2 which takes a 12v input, but only outputs the motor voltage at 5v.
      Is there an 'off the shelf' solution?

      1 Reply Last reply Reply Quote 0
      • K
        ksprayberry
        last edited by

        I don't know that the Goplus2 module would work. Could you maybe not use a relay module triggered from one of the GPIO on the M5 to operate the relay and then feed 12 volts to the solenoid valve that way? If you're using the goplus2 module in addition, you could just maybe split the 12 volt power off and route one leg through the relay so that when you make and break that relay you energize your solenoid valve.

        R 1 Reply Last reply Reply Quote 0
        • R
          richm @ksprayberry
          last edited by

          @ksprayberry That's a good suggestion, bit I should have mentioned that I may need to 'pwm' the output at 20-30Hz so a relay won't last long.

          1 Reply Last reply Reply Quote 0
          • D
            Dario
            last edited by

            If you need to PWM the output, you can use a mosfet module. You can find a cheap one on eBay or AliExpress.

            0_1610017280844_4cf5d38c-ba95-4ae3-886d-db7c5321ab59-image.png

            1 Reply Last reply Reply Quote 0
            • First post
              Last post