Announcement

Collapse
No announcement yet.

Servo Control

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Servo Control

    How would you rotate something and rotate it back? I guess I need a servo. A controller to rotate the servo to a stop and then rotate back. Then I would need a relay controlled by HS. are there servo that can return automatically? If so, I would only need to supply power momentarily or something. Ideas?

  • #2
    If a stand alone servo such as the one you described existed (not sure if it does) it would probably be pricey.

    You could roll your own with a standard servo and an MCU (Arduino, Pi, 8266.) There are drivers for Arduino and Pi as well as MQTT to integrate with an 8266 available for HomeSeer.

    Comment


    • #3
      Sometimes you would have a limit switch to tell the controller that you have reached the desired position and then to turn back, whether it by opto switch/hall effect/microswitch or other means, that said I usually see them with stepper motors rather than servo motors as servo motors do usually know where they are by virtue of their in built feedback mechanism. It might still be worth including some sort of limit switch to kill the motor if it went too far.

      What is your application? A servo motor with a controller just to bounce one side to another could be built (along with using an input or two for high/low limits) with something like these boards https://www.electromaker.io/blog/art...he-attiny85-19 if size was an issue.
      My Plugins:

      Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
      Yeelight 3P | Nanoleaf 3P

      Comment


      • #4
        Originally posted by tome10 View Post
        How would you rotate something and rotate it back? ...
        It would depend if 'something' were a paper cup, or a battleship ...

        Comment


        • #5
          Well obviously you start small with a model battle ship, and work your way up. ‘Proof of concept’. ;-)

          Comment


          • #6
            Originally posted by tome10 View Post
            Well obviously you start small with a model battle ship, and work your way up. ‘Proof of concept’. ;-)
            What about a simple servo from a Hobby Shop?


            Sent from my iPhone using Tapatalk
            HS3 3.0.0.548 &HSTouch Designer 3.0.71 with 996 Devices, 547 Events
            Plugin's:
            BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee, Nest, AK Bond
            EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
            weatherXML, Jon00 Alexa Helper, Network Monitor, MyQ, Z-Wave 3.0.1.252

            Comment


            • #7
              Yes that’s what I’m thinking. Then I think I need a controller to adjust the stops. And that’s where I get fuzzy, the controller has channel in’s that voltage applied moves the servo in the two directions. The channels need supplied by a zwave relay and a power supply. Or get into the McSharry MQTT Sonoff device route.
              But wait I only need one channel. Spin half rotation and back servos usually return to a neutral position.

              Comment


              • #8
                An electromagnet/solenoid on a lever and a spring is another approach.

                The servo used for robotics seems more suited in the general case for a model battleship. The ones I am familiar with use PWM as the source control. The duty cycle determines the position such as 0% is 0 degrees and 100% is 180 degrees for a servo that has a design range of 180 degrees. I am pretty certain Tasmota will provide the MQTT interface for PWM control. I know the ESP8266 provides the hardware level PWM waveform. I may give it a try this weekend with a servo in my junk box if I have a chance.

                Comment


                • #9
                  I have a Sunfounder 5VDC servo that has a range of 180 degrees. The spec sheet http://wiki.sunfounder.cc/images/7/7..._datasheet.pdf gives it a control range of 0.5 ms (-90 degrees) to 2.5 ms (+90 degrees) which corresponds to 24 to 132 on the Tasmota PWM MQTT command. (e.g. Servo/cmnd/pwm 24). I confirmed that it does work as expected. I needed to compile the Tasmota source to change the minimum frequency to 50, that the servo was expecting, vs. 100 that is the minimum for lighting.

                  Any ESP8266 will work with Tasmota and only one GPIO pin is needed. I used the GPIO 14 on the pin header of the Sonoff basic for testing.

                  Click image for larger version  Name:	Capture.PNG Views:	0 Size:	21.1 KB ID:	1323331

                  I did not try, but I suspect that one could turn on the HUE emulation in Tasmota and give Alexa commands like "Alexa, Set Servo to 10%". For this servo it would be 2% to 12% for the 180% range of this servo.

                  Comment


                  • #10
                    I have a couple of esp8266s, I never got around to attempting to provision or do the project I initially bought them for which was a battery powered latching relay for a string of fairy lights in a hurricane lamp on the dining table.
                    Do you know of a step by step to get started with the esp8266? Your mqtt plug-in is the control I would need right? I don’t understand all the brokers/mosquito stuff. Is mosquito and whatever installed with the plugin?

                    Comment


                    • #11
                      At the sticky post of the mcsMQTT https://forums.homeseer.com/forum/li...mcsmqtt-plugin there are three attachments. The first is a step-by-step to install what is needed to run mcsMQTT. The mcsMQTT manual http://mcsSprinklers.com/mcsMQTT.pdf also contains much information as to how to use mcsMQTT. There are many YouTube videos, blogs, etc on how to flash an ESP8266. If you go this route then you will want mcsTasmota641Servo.bin from http://mcsSprinkers.com/mcsTasmota.zip which has the PMW frequency minimum changed from 100 to 50. It is not the latest version of Tasmota, but has everything you need for this purpose. With Tasmota you can also use HTTP commands rather than MQTT, but this approach is not as conveniently integrated into HS as is MQTT.

                      Comment


                      • #12
                        I think my hangup was that I didn't know what to flash the ESP with. What about the Broker? Is that in the plugin, or I need to install that on the Hometroller as well?

                        Comment


                        • #13
                          Your network needs a MQTT service somewhere, just like you usually have a DHCP as well as other network services somewhere. The plugin does not provide the service. The plugin is a client. Mosquito is a widely used provider of the MQTT service.

                          Comment

                          Working...
                          X