Control of SG90 hobby servos - which mainboard
-
Hello everyone,
I would like to try something out and need the following functionality:
- Heating up to temperature xxx° of Hotend_1
- Activate extruder_1
- Cool down all hotends to temperature xxx° except Hotend_1
- Move the SG90-Servo_1 for mechanical positioning
Until
- Heat up to temperature xxx° of Hotend_n
- Activate the extruder_n
- Cool down all hotends to temperature xxx° except Hotend_n
- Moving the SG90-Servo_n for mechanical positioning
During my research I found out that the RepRapFirmware is suitable for this, with which I can control/activate the hotends and extruders.
Now I am looking for a suitable Duet3D mainboard with which I can control several (max. 8 ) SG90 servos.The board should support the connection of up to 8 SG90 servos.
Which board would be recommended? 6 servos would also be sufficient if 8 are too many.
Many thanks in advance for your help.
-
@U-Friedrich your post implies that there will be multiple hot ends, but doesn't say how many. Will there be up to 8, the same as the number of hot ends?
Also, will the servos be physically located close to the hot ends, or somewhere else? If they will be close to the hot ends and you need up to 8 hot ends, then one solution would be to use a TOOL1LC tool board to control each hot end and the corresponding servo. The IO0_OUT pin on the tool board can provide a control signal for the servo. Depending on the current draw of the servo and how often you operate it, you might need to run a 5V power wire to the tool board because the built-in 5V regulator is not designed to supply large currents to other devices.
Otherwise, any IOx_out pin on a Duet 3 main board that has PWM capability can control a servo, provided that the servo can accept a 3.3V control signal, which is true for almost all hobby servos. The product info pages linked from https://docs.duet3d.com/en/Duet3D_hardware/Duet_3_family will tell you how many PWM-capable ports each main board provides.
If you need to drive more servos than you may be able to use spare heater or fan outputs to drive them. Alternatively you could connect one or more SAMMYC21 development boards to the Duet 3 main board using CAN bus and drive servos from them. Our standard firmware build for the SAMMYC21 provides 4 PWM-capable outputs.
-
@dc42 First of all, thank you for the detailed answer.
There will always be a trio - a hotend always has an associated extruder and an associated servo. The extruder and the servo will be placed relatively close to each other, as both have a Bowden system.
With regard to the voltage for the servo, the scenario is as follows: one servo is moved to the home position, the next servo is moved to the working position, so two servos are controlled one after the other per process, not simultaneously. However, it is not a problem to provide an additional voltage source for the servos.
I think a Duet3 main board should be the right choice. As I can read in the specs, the 6XD would have enough capacity for 6 servos, is that correct?I am relatively new to the subject of printer control hardware, i.e. mainboard, wiring, firmware etc., I have only assembled and tuned kit printers so far. I now want to try out an idea and upgrade a used, but mechanically well-functioning printer with a new mainboard and my own extensions.
I'm sure I'll have questions during the project, I think I've come to the right place.
Thanks in advance for your help.
-
@U-Friedrich the 6XD board has no built-in stepper motor drivers, so by itself it cannot drive any axes or extruders. It is aimed at large machines that use external stepper drivers, or more commonly AC servos.
As you have said that hot ends, extruders ands servos will always come together, my recommendation would be to use either a Duet3 Mini or Duet 3 MB6HC to drive the axis motors and bed heater, handle the endstops and control the whole machine, and to use a TOOL1LC tool board to drive each hot end heater/thermistor/extruder/servo combination. That way you can easily increase the number of hot ends from 1 to 8 or even higher just by adding additional tool boards. The tool boards communicate with the main board over CAN-FD bus.
Unless your axis stepper motors require a lot of current (for example, if they use Nema 23 or Nema 34 stepper motors), the lower cost Duet 3 Mini would be a suitable main board.
We also make a Tool Distribution Board that makes distributing CAN bus and power to the tool boards easier.
-
Thanks for the answer.
One more question about the Duet 3 Toolboard 1LC: If I want to operate 6 toolheads (extruder + hotend + servo), then I need
- 1 Duet 3 Mini 5+
- 6 Duet 3 Toolboard 1LC
Have I understood this correctly?
Another question in advance: if you control the servo via the G-code commands M280, can I influence the speed at which the servo moves to the end position?
If this does not work directly, are there any workarounds or components to achieve this?
The servo is to drive/move a mechanism and the speed should be such that the mechanism is accelerated or moved normally and not jerkily. For the complete movement 1 - 3 seconds would be sufficient.
-
@U-Friedrich said in Control of SG90 hobby servos - which mainboard:
Have I understood this correctly?
Yes; although if you are looking to reduce cost then if you wish you could drive the first two hot ends/extruders/servos directly from the Duet 3 Mini. This would leave you with 3 drivers to control the axis motors, or 5 with the optional 2-driver daughter board.
@U-Friedrich said in Control of SG90 hobby servos - which mainboard:
Another question in advance: if you control the servo via the G-code commands M280, can I influence the speed at which the servo moves to the end position?
Analog hobby servos don't provide that degree of control. You might be able to achieve lower speeds by using M280 in a loop that gradually changes the commanded position between the initial and final required positions. You can also reduce the speed of a hobby servo by reducing the supply voltage, For example, if using a 5V supply then you could put 1 or 2 silicon diodes in series with the 5V wire to the servo. If you reduce the voltage too much then the servo will stop working, or may work but not provide as much force as you need.
-
@dc42 thanks for your answer.
Regarding the servo speed control, I have found a small additional module (CTI Servo Actuator Travel-Tip-Delay) with which you can set the running time between start and end position in 8 steps between 0 and 8 seconds. Could I use this in conjunction with the Duet hardware? This would give me a simple way of regulating the positioning speed.
-
@U-Friedrich said in Control of SG90 hobby servos - which mainboard:
CTI Servo Actuator Travel-Tip-Delay
I've used this macro code to try and slow down my servo movement - but it is still a bit jumpy with probeSpeed 1
while global.probeAngle > global.probeOut G4 P{global.probeSpeed} M280 P5 S{global.probeAngle} set global.probeAngle = global.probeAngle - 0.1
See this video for a demo of the slow movement
https://www.youtube.com/watch?v=kpVAuKwoTiQ&t=4sThe biggest problem I always have with servos is that at powerOn they sometimes jump quite quickly to their home position if not already there, or jump to a random position if I disable them when not needed.
I'm planning on moving all of my Servo's over to stepper motors - some of which might need to be geared - mainly to avoid the fast moves issue, and also to give better control over the speed.