Hello!
I'm trying to write a custom serial driver for the VESC but am having some trouble in using the VESC to control a servo motor for steering control. I've re-implemented the UART interface that the BLDC tool is based on, but the device does not respond to any values that I set with COMM_SET_SERVO_POS (from datatypes.h in Vedder's serial code). Is there any special in the firmware that needs to be enabled in order to use the PWM out on the VESC for controlling a servo? Thanks!
VESC Servo Control
Re: VESC Servo Control
In conf_general.h in the firmware you need to set SERVO_OUT_ENABLE to 1 and recompile. You may also have to replace the series resistor on the PCB for the servo input/output with a lower value in case the input impedance of the servo is too low.
When VESC Tool and the new firmware is released, there will be a pre-compiled firmware in VESC Tool with servo output enabled, and the VESC6 has a lower value resistor, so it should work out of the box then (hopefully).
When VESC Tool and the new firmware is released, there will be a pre-compiled firmware in VESC Tool with servo output enabled, and the VESC6 has a lower value resistor, so it should work out of the box then (hopefully).
-
- Posts: 9
- Joined: 18 Feb 2017, 21:28 [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
Re: VESC Servo Control
Benjamin! The man himself!
Thank you for the quick response. We have a demo for our primary sponsor coming up so we are hoping to have the robot operational by then. Getting the servo control down is one of the last steps.
1) When do you expect the VESC tool to be released? It sounds like this is a replacement for the BLDC_Tool?
2) To program the VESC, it seems that I need to get a hold of both a STM32 discovery board and stlinkv2 programmer? Or can I do it over USB with BLDC_Tool?
3) Is 100 Ohm the recommended resistance to replace R5 with (according to your diagram?).
Thank you!
Thank you for the quick response. We have a demo for our primary sponsor coming up so we are hoping to have the robot operational by then. Getting the servo control down is one of the last steps.
1) When do you expect the VESC tool to be released? It sounds like this is a replacement for the BLDC_Tool?
2) To program the VESC, it seems that I need to get a hold of both a STM32 discovery board and stlinkv2 programmer? Or can I do it over USB with BLDC_Tool?
3) Is 100 Ohm the recommended resistance to replace R5 with (according to your diagram?).
Thank you!
Re: VESC Servo Control
- Attachments
-
- VESC_servo_out.zip
- (90.63 KiB) Downloaded 325 times
-
- Posts: 9
- Joined: 18 Feb 2017, 21:28 [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
Re: VESC Servo Control
Vedder,
Thank you so much! This saves as a lot of trouble.
One last question before we attempt this: what size SMD resistors do you use? 0805? 0603? I'm not familiar enough to be able to eyeball it.
Thanks!
EDIT: I found your BOM, SMD-0603 it is!
Best,
Colin
Thank you so much! This saves as a lot of trouble.
One last question before we attempt this: what size SMD resistors do you use? 0805? 0603? I'm not familiar enough to be able to eyeball it.
Thanks!
EDIT: I found your BOM, SMD-0603 it is!
Best,
Colin
-
- Posts: 1
- Joined: 11 May 2017, 06:37
- Location: Ger [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
Re: VESC Servo Control
Hi,
what is the max. current the 5V-servo-output can provide?
I would like to power two servos, but each of them needs about 0,8A at full torque.
regards
8ball
what is the max. current the 5V-servo-output can provide?
I would like to power two servos, but each of them needs about 0,8A at full torque.
regards
8ball
-
- Posts: 234
- Joined: 26 Dec 2015, 14:38
- Location: Sweden, Stockholm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
Re: VESC Servo Control
According to , the 5 V can supply a maximum of 1 A. (The 5 V also supplies the microcontroller of the VESC, so if you overload it you will get brownouts/resets/maybe kill your VESC if you're unlucky.)
-
- Posts: 943
- Joined: 25 Mar 2016, 12:29
- Location: Delft, Netherlands. [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
Re: VESC Servo Control
The DRV chip that does the actual stepdown is specified to 1A. The microcontroller will use something like 50mA from that. So in theory it's 950mA. (but that "50mA" is not very accurate, it might be 40 or 70.) On the other hand, there is probably some margin on that "1A" too.
But small servos can use significant current. IIRC, I measured the blue 9 gram servos at 1A....
But small servos can use significant current. IIRC, I measured the blue 9 gram servos at 1A....
-
- Posts: 86
- Joined: 24 Dec 2015, 15:24
- Location: Germany [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
Re: VESC Servo Control
For me the data sheet of the DRV8302 says, that the integrated step-down is specified to 1,5A. So the consumption of the 3.3V LDO (for the micro controller / SN65HVD232 CAN IC) and a safety margin is already build into this 1A.
So I would definitely use an external step-down module when you need that much current for the two servos.
So I would definitely use an external step-down module when you need that much current for the two servos.
-
- Posts: 943
- Joined: 25 Mar 2016, 12:29
- Location: Delft, Netherlands. [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable
Re: VESC Servo Control
Oh, sorry. Bad memory. IIRC, there was a 1A limit in the DRV circuit. Even with the chip being able to do 1.5A, I seem to remember that Benjamin configured the components around it to satisfy the "1A max" spec.
But yes, even if you'd get pretty close wtih 1.5A if the 800mA is correct, I wouldn't risk losing power to the fast-spinning motor....
But yes, even if you'd get pretty close wtih 1.5A if the 800mA is correct, I wouldn't risk losing power to the fast-spinning motor....
Who is online
Users browsing this forum: No registered users and 7 guests