Welcome! Log In Create A New Profile

Advanced

R/C servo operation working

Posted by PRZ 
PRZ
R/C servo operation working
September 01, 2016 05:12PM
Out of curiosity, I tested R/C servo operation with a controlled fan output. Good news, it works !
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 command 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). I did not tested on wired Duet, but this shall work similarly. The advantage of Duet Wifi is there is 3 controlled fan outputs (vs 2 on Duet 0.8.5 and 1 on Duet 0.6), so more chances to have one spare.
1.15 firmware is supposed to have more precise timing than former revisions.

The fan output drain current through a resistor (# to 470 ohm) supplied in 5V.
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 : [otocoup.com]
Note that instead of what I had written in another thread, PWM frequency is 50Hz, not 500.

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

Edited 2 time(s). Last edit at 09/02/2016 05:04AM by PRZ.


Pierre

- Safety [reprap.org]
- Embedded help system for Duet and RepRap Firmware [forums.reprap.org]
- Enclosed delta printers Lily [rouzeau.net] and Lily Big [rouzeau.net]
- OpenScad delta printer simulator [github.com]
- 3D printing on my site [www.rouzeau.net]
Re: R/C servo operation working
September 01, 2016 05:43PM
Nice work. I 'll have to try it out this weekend on a spare 9g servo and then a BLTouch.
PRZ
Re: R/C servo operation working
September 01, 2016 07:18PM
For BL touch, beware that it output a 5V signal, fairly dangerous for a Duet, but there is instructions for 3.3V boards.


Pierre

- Safety [reprap.org]
- Embedded help system for Duet and RepRap Firmware [forums.reprap.org]
- Enclosed delta printers Lily [rouzeau.net] and Lily Big [rouzeau.net]
- OpenScad delta printer simulator [github.com]
- 3D printing on my site [www.rouzeau.net]
Re: R/C servo operation working
October 07, 2016 08:05AM
Successfully implemented this and it's working like a charm! I always wanted a "touch" probe, as I am using different bed materials and with different optical characteristics, so an infrared sensor is out of question.

One thing to add, maybe others will experience this as well: The servo would rattle and jump positions after the extruder stepper was enabled and running, having all the wires in the same bundle from the X carriage. One solution would be to shield the servo wires and use twisted pairs for the stepper, but I found that if the control line was pulled high after the position change, it would just disable the servo control and leave it in the last position. Now, without any position control, the servo won't actively hold it's position, and it's easier to move by hand or if the pulling force is high. In my case, just a pin hold down by a weak spring is not even close to change the position of the servo on it's own, so it's safe to "turn off" the servo during the print. I just added M106 P1 I0 S0 after every M106 P1 I1 F50 S0.xx in my probe deploy / retract scripts.
Re: R/C servo operation working
October 10, 2016 12:17AM
Quote
unromeo21
Successfully implemented this and it's working like a charm! I always wanted a "touch" probe, as I am using different bed materials and with different optical characteristics, so an infrared sensor is out of question.

One thing to add, maybe others will experience this as well: The servo would rattle and jump positions after the extruder stepper was enabled and running, having all the wires in the same bundle from the X carriage. One solution would be to shield the servo wires and use twisted pairs for the stepper, but I found that if the control line was pulled high after the position change, it would just disable the servo control and leave it in the last position. Now, without any position control, the servo won't actively hold it's position, and it's easier to move by hand or if the pulling force is high. In my case, just a pin hold down by a weak spring is not even close to change the position of the servo on it's own, so it's safe to "turn off" the servo during the print. I just added M106 P1 I0 S0 after every M106 P1 I1 F50 S0.xx in my probe deploy / retract scripts.


Could you post pics of the wiring you had to do too get this running?
Re: R/C servo operation working
October 10, 2016 03:58AM
Quote
Eddygara
Could you post pics of the wiring you had to do too get this running?

The answer is right at the beginning of this thread ...

Re: R/C servo operation working
October 10, 2016 02:57PM
Quote
unromeo21
Quote
Eddygara
Could you post pics of the wiring you had to do too get this running?

The answer is right at the beginning of this thread ...

Thats cool and all but i asked to see a image of his wiring not a schematic..

Edited 1 time(s). Last edit at 10/10/2016 02:57PM by Eddygara.
Sorry, only registered users may post in this forum.

Click here to login