Servo Support… Eventually?



  • I realize, that in the shootout for things to choose to add to the firmware that servo support was not high on the list, and thats OK, but it is something that should probably be implemented eventually.

    For people that want to upgrade to a 32-bit option, but already have something like a BLTouch or the original servo and switch bed compensation solution, it immediately removes the duet as an option for use as many will want a plug in solution initially that they can continue to upgrade over time.

    BLTouch has become quite popular with many(they have had 2 possibly 3 successful indiegogo campaigns,) as it is a simple solution that doesnt have a lot of moving parts, just a hall effect sensor and an electromagnet, with a tiny micro controller to send trigger pulses. It is controlled, from marlin at least, with 4 distinct PWM pulses that are for 10(store,) 90(extend,) 120(self test,) and 160(reset error state) degrees, and have 1 3-pin(5V, G, Sig), and 1 2-pin (endstop switch) connectors. It looks like they have also managed to figure out how to get it setup on repetier as well, here is a link to the pic for setting it up.
    https://lh3.googleusercontent.com/BYiq1hLsn-fcWHPxBIUWt5clL9qidYD2PW97LajWC26JZ0gGiI_hrFppYvtTr_0doGMFMQ1VQg=w1280-h1024-rw-no

    Even if you dont give full servo support for some time, I definitely think figuring out some way of running the BLTouch would be a great idea. I personally have them on 2 of my 4 printers, and would add them to my corexy(IR Probe) and delta(FSR) but they are both running duet.

    Just my thoughts
    Sniffle

    P.S. no I dont work for ANTCLabs. I live in the states, not Korea. Its just a popular option I would like to see you support.



  • Use this: https://www.sparkfun.com/products/13118 and then all you need is a pin on the Duet to trigger it.



  • Just out of curiosity, what does the BL Touch give you that DC42's probe doesn't?



  • I think the BL touch is a physical contact style probe, so it will work on any surface material, whereas the differential IR probe works best on surfaces that are opaque under IR light.


  • administrators

    Your first problem is interfacing the Duet to the BLTouch electrically. Last time I looked, the documentation didn't say whether a 3.3V control signal is sufficient, or it needs a 5V signal. The BLTouch is closed source, so there is no schematic that I could work it out from.

    Not only is BLTouch closed source (unlike my own IR sensor), it also has patents pending. This is completely against the spirit of RepRap, and is why I have no desire to add support for it. But unlike the BLTouch, RepRapFirmware is open source and so is the Duet WiFi hardware design; so you and everyone else are at liberty to add the firmware support yourselves.



  • Out of curiosity, I tested R/C servo operation with a controlled fan output. Good news, it works !
    That will allow allow any servo controlled sensor to work, including BL touch.
    The command M106 exists and allow frequency control, so everything was available.
    For operation from a pin on the expansion connector other than the fan control pin, we will need some G-code extension.
    I tested on a naked Duet WiFi prototype, only supplied by USB, with 1.15 firmware and a very small servo (metal gears, preferable for this kind of experience).
    The fan output drain current through a resistor (# to 470 ohm) supplied in 5V, so signal is 5V minus diode forward voltage.
    Servo power is also 5V. I selected 5V for the fan voltage, but if you use Vin as fan voltage, you may add a diode to protect from voltage return through the fan LED (at least for Duet 0.8.5 and Duet 0.6, I did not checked the Duet WiFi schematic). Note my test was done without protecting diode (no need when only 5V on board).
    You will find details, schematics and G-code command here : http://otocoup.com/aql/#hlp/connecting_servo

    I made a small film of the test here : http://otocoup.com/aql/h/duet_servo_control.mp4 (size 11 Mb). The image is not stable, but this was more explicit than other films I done with a supporting tripod.



  • Hello All,

    I plan on using servos to pick filaments…

    basically i want to know if i can use the extra heater pins that are PWM to activate the servos? on the expansion...
    I see PRZ's code. Will this work with the heater pins or do i need something extra? i need more than the fan Pins will give me.
    I know here https://www.duet3d.com/forum/thread.php?id=93#p955 stated to use M305 or M42 but the heater's will time out or something.

    what is my best option here ?

    also i will be using this simple circuit to get my 5V Sig.

    Thanks!!

    ~Russ


  • administrators

    The DueX5 expansion board design allows unused heater channels to be used to drive servos and provides 5V drive for them. So this will be supported in firmware. The circuit you show should work if the 2k2 pull up resistor provides sufficient drive for the servo control input. Alternatively, use one of the 6 inverters in a 74HCT04 chip powered from 5V to invert and level shift each heater signal.



  • Thank you David,

    I plan on making my own brake out board currently that will interface theses pins as well as others. i have wiring that come down the rails so i will already need to interface those.

    I'm i able to use the pins directly correct? aka with out the DueX5 ? using the heater pins from the header?

    I presume there will be a new firmware version for theses options? or is the Duex5 part of the why it will work?

    using a 74HCT04 chip was on my list. i may do up to 4 so that would be the best option.

    also, can you please show me a snip it of code you would use fort This? it will save me a lot of guess work and frustration, you know your stuff 🙂 I'm still learning !

    also THANK you for your hard work, and others as well!

    ~Russ



  • @dc42:

    Not only is BLTouch closed source (unlike my own IR sensor), it also has patents pending. This is completely against the spirit of RepRap, and is why I have no desire to add support for it.

    In my previous printer, I used an inductive proximity sensor made by SICK (one of their IME Series). It is closed source and I suspect subject to patents. Is it against the open source principle to use it? Of course not. We just accept that it's a component and we don't need to know exactly what goes on inside, like the countless other components used.

    Is this really that different? Can you not treat it just like any of the other components? I'll bet for example, the microcontroller on the Duet board is patented and you don't have the internal schematic for it. However, you have chosen it as being the best tool for the job - and that overrides the lack of open-sourceness!

    I have one of your differential sensors - and have had problems with it. It works perfectly on new BuildTak but after a few prints, because the surface reflectivity changes, it reads differently in one place compared to another. I've tried using it with 6mm thick BS Glass with the underside painted black. That's a no-go as it's too thick and by the time it detects, the probe is touching the glass surface.

    Don't get me wrong, your board is superb - but it's not universal. Some situations will demand a different solution - and it seems crazy not to support one of the current decent options.

    Si

    P.S. Although I've not tried one of these, most RC servos are happy with the PPM signal at 3.3v. Anything above 2.5v seems to work. Where they have not, you can buy a 'Servo Pulse Booster' similar to this: https://www.amazon.co.uk/HobbyKing-Turnigy-Rx-Servo-Booster-2-7v%7E5v/dp/B01EE0V6UO/ref=sr_1_fkmr0_2?ie=UTF8&qid=1479990820&sr=8-2-fkmr0&keywords=servo+pulse+booster which will boost 2.7v up to 5v. I used one to drive a BIG semi industrial servo.



  • @StephenRC:

    Use this: https://www.sparkfun.com/products/13118 and then all you need is a pin on the Duet to trigger it.

    Using this, you could attach a physical toggle switch to the board and use the print head to move the toggle switch from one state to the other - then just add the G Code for the movement to the Home / bed level macros. Then it doesn't require any further integration or firmware updating.



  • BLTouch works perfectly with Duet now, no need for the SparkFun board. And just as you suspected, it works fine with the 3.3v servo signal without any external buffering or inverting. See my post about it here:

    https://www.duet3d.com/forum/thread.php?id=459



  • @SimonRafferty:

    @StephenRC:

    Use this: https://www.sparkfun.com/products/13118 and then all you need is a pin on the Duet to trigger it.

    Using this, you could attach a physical toggle switch to the board and use the print head to move the toggle switch from one state to the other - then just add the G Code for the movement to the Home / bed level macros. Then it doesn't require any further integration or firmware updating.

    I did get one. hooked it up to my Duet085, and it works fine, but you only get two positions with it. You can't reset the bltouch via a servo gcode, it would require a separate circuit to power cycle it. It's a bit moot now, since the firmware can now do servos.


  • administrators

    Servos are fully supported form firmware version 1.16 onwards, so I am marking this as answered.


Log in to reply