First of all, congratulations for the work accomplished, simplefoc is realy helpfull to understand bldc motor.
I have a DRV8302 driver and i would like use the low-side current sense for torque control. I try on a blackpill STMF411 but the result is strange and I saw that the low-side was not yet available on the stm32 but that it is on the stm32 B_G431B_ESC1 (impossible to buy, out of stock everywhere). To precise, my setup works in voltage torque mode but I want to drive an 8110 motor and voltage torque is not suitable for high currents.
So my question is :
Has anyone tried to implement low-side current for torque control on a stm32 ?
This is very much work in progress at the moment, and will probably be part of the next release of the library. As you noted there is a STM32G4 implementation a bit specific to the B_G431B_ESC1 board, which could probably be adapted to your purposes.
Thank you for this! The schematic picture is fine, you don’t need to send more. The implementation of low side current sensing will not be strongly affected by the way the analog signals reach the MCU, although obviously the gain or V to A ratio of the solution is an important parameter.
It will be interesting to see if the gd32e103c8t6 supports the analog in functionality in exactly the same way as the STM32F103 does.
I have a strange issue, in TorqueControlType::voltage the motor goes faster in one direction than in the other and it s not the same current consumption. The slower rotation corresponds to the higher current.
When I look the PWM signal of INH_A, INH_B and INH_C, they are not perfectly centered. Can this explain the different speed and current?
if not what are the other possibility?
It s an homemade winding, maybe i made a mistake.
A photo of my actuator, its a 1/10 cyloidal gear box
The STM32 code tries to sync the timers used, so the PWMs should be centred… but I would not expect this to lead to different performance in one direction than the other.
This type of behaviour can be due to a mechanical unbalance/problem, the motor simply has more friction one way than the other… or, maybe more likely, it can be due to an alignment problem during the sensor alignment.
May I ask, is the motor loaded during alignment? If the alignment does not find the electrical zero precisely, but is only a little bit off, it can lead to this problem. It is more likely to happen if the motor is loaded during alignment, as the open-loop control during alignment may not have the torque to move the motor as well as it should.
What voltage_limit are you using during alignment? If possible, you could try increasing it to see if it helps.
The difference in speed could be the windings, however, unlikely because the error would be symmetrical. Also asymmetric windings would cause errors in parts of the circle, not in one direction only.
Perhaps the cyclo has different resistance in one direction ? The cyclo is notoriously inefficient so it could be you are losing efficiency in one direction vs the other?
There is an excellent paper on cyclo efficiency. Looking at your design, you probably are experiencing asymmetrical cyclo efficiency. A cyclo like yours has between 40% and 70% efficiency so even some machining and mechanical asymmetry would drastically impact one direction unfavorably.
This is hypothetical. Without examining the real gears we are mostly guessing here.
Thank you guys, I have more mechanical skills than programming (and English)
I noted the speed difference with and without gearbox. I will try to increase the alignment tension.
The cylo is also a custom made, it is the most compact that I can make while keeping the ball bearings for a better performance. I have not finished the development, especially the bldc electronics and programming. I measured the stall torque of the motor without reducer at 2.2N.m and with cyclo at 19.3 N.m without breakage, but these are preliminary tests. I think the efficiency is not so bad
You need to be careful because at stall the efficiency is just the theoretical cycloidal reduction ratio efficiency, which is 88.6% in your case, and falls directly where average theoretical cyclo efficiency is, check the paper I sent you.
The reason is, there is no dynamic friction. It’s all holding torque.
Problem is, real life you won’t be operating at stall, you will be operating at some rotational friction and that’s where your cyclo gets killed and loses all the power into heat through friction.
Watch out and double check your assumptions.
PS You need a torque dynamometer which is a really expensive piece of equipment to measure the dynamic efficiency. The efficiency is also dependent on the speed and load and lubricant and finishing of your lobes, pins and holes.
You’re totally right, that’s why I developed a measuring benches for dynamic measurement. My test with the reducer was just to reassure me. I’m already looking to improve the bldc controller. I’m sure I can do better. I will test several windings and choose the most suitable for my application.
Thx, I mill my own parts with my CNC, 3d printer (foldarap like and Ultimaker like) and laser cutter (90w). All these machines are homemade. An CNC is a router like full homemade (100kg) and an another based on Producmill F30 (high school machine) from which I recovered only the frame (around 450kg). I spent 10 years building my hobbyist workshop and now I can play with it
The AS5048A is a good sensor, and you should get good accuracy. If the system is still, the position should be more or less stable. If the system is moving/vibrating, it might be less so. Are you getting stable readings?
For a BLDC, this sensor is definately sufficiently precise to get good FOC. I think as for any magnetic sensor, the faster the motor turns, the less precision you ultimately have due to filtering and latency.