Fantastic work!
Me, instead, I’m stuck… and I have made a stupid mistake and broke the encoder. This is what happens when I should rest and instead I insist in working…
I’m waiting for the replacement now.
I was planning to try the TMC4671. I saw that the protoboard I have got has the TMC6100 as driver, which also has to be programmed. Which driver did you use in your design?
I still can’t imagine how you soldered the TMC4671 by hand. What kind of solder did you use??
For soldering, I was using the supplied Solder Paste Stencils that came with the PCB, generic solder Paste and a hot air rework station JSD 858D I just recently bought for a wopping price of 27€.
It works now with automatic alignment.
The encoder currently has 2048 PPR. I tried to reprogram it using an USB to UART connector, however it seems that there is some secret sauce missing. I can read it perfectly but can not change any values (-2 error message) so I assume there is some kind of additional communication going on when you use their genuine USB Programmer Tool (like you have). Looks like I have to buy it to see if the higher resolution makes any difference
Also, while typing I discovered a possible reason why my overcurrent circuit does not work: I put in a N-Mosfet instead of a P-Mosfet… Looks like I had an error in my numbers when transfer the design from LTspice to Multisim that (how are the chances?) made me order and solder an N-Mosfet. This also explains while it was getting so hot. Only having 2 Volt of Gate voltage increasing the Rdson by a lot
For the Board I have mostly sticked to the OpenFFB implementation. Here a STM32F407VGT6 is used.
I love it.
If I may ask, where do you find these OpenFFB implementations? I have been searching around, but I can’t find any real schematics/PCB/code…
Guys,
after some time I returned to your topic and read all perfect posts about your projects. Good luck and hope for more perfect (sometimes not lucky for you but knowledge about problems is welcome) posts to see how your fantastic work with electronics and physics is continue to end
If I can maybe recommend, some web from developers of comercial simulators is also good to see what HW they used, especially servos and other things. From last video I can probably confirm very similar used on some products I saw but specification is required of course…
I’m still here… still with no progress on my side. I have received the new encoder, after it got stuck two weeks with the courier in the customs. I hope to be able to mount somewhere the Trinamic module and give it a try.
I’m still interested to know if those OpenFFB implementations are available somewhere…
I’m testing the Trinamic demo board.
At the moment, the communication with the two ICs works, but the documentation is extremely poor.
The datasheet doesn’t clarify much on the actual use and setup of those >100 registers and just points to a C code available online, which is also completely undocumented.
I’m trying some reverse engineering on the initialization, but there are many parameters that is not clear at all what they are…
Hey!
Sorry for the late reply. Things are currently busy around here
My Board stopped working because of some weird issue with the Mosfet buffers and I didnt have the time to order new ones.
Information about OpenFFB can be found on the Github page, including the Firmware. I already modified it a little bit and I think its structured quite good.
When using the STMF04 there is also a mode where you can use the Trinamic Software for it. In case you did not see yet. There is a TMCL IDE for these Board where you can see each and every register with some explenation to it.
Hey @tsaG13374551 , nice to read you!
I was going to write that yesterday night I went to sleep really happy because I managed to make the first movements of the motor with the TMC breadboard. Still just open loop, but it’s a progress
I am indeed using TMCL-IDE to get the configuration of the registers, there were many things that I could not figure out from the documentation.
Unfortunately in one week I will have to stop again until September… let’s see what I can get done in the next days.
Are you using the torque mode with the TMC?
Thanks for the link for the OpenFFB, for some reason the github link I found was containing only the code…
So, I have managed to get the motor running, I have bought the TMC real time interface to be able to do all the settings from the PC, the TMCL-IDE is really fantastic.
@tsaG13374551 , since you are using the same controller, I would like to exchange a couple of opinions, see what you think…
Let’s start from the idea that the motor will almost always be stalling or moving a very low speeds.
- the motor still seems to be “jumpy” between phases, at low torque or speed you can still feel distinctly the phase change. It wasn´t me being completely useless with my discrete control them
- the motor requires a significant torque before starting to move, then once it starts to move, I need to reduce the torque quickly. I have noticed that until it starts spinning, the current from the power supply is really low. For example, now I have set 200mA in the controller, the motor isn´t moving, power supply indicates 18mA of consumption. I start moving the motor with the current set to 400mA, consumption is 250mA, go back to the setting of 200mA with the motor moving and it’s up to 50mA, slowly going down until it stops again. I have been looking in the settings to see if there is any limitation for stall current, but I can’t see it. This is quite an issue, as the motor would be used mostly in torque mode in stall conditions, and it’s difficult to control. Did you see the same?
- slighly academic issue, as it won’t be used, but speed control isn´t working at low speeds due to the jumpy movement of the motor. Depending on the PI setting, it will either start and stop, or move up and down.
- do you plan to implement all the effects using torque mode? Position mode is great for spring effect, but it won’t be too useful for other effects, unless you convert them to a moving central point. You could change control mode from torque to position depending on the effect, but for mix of effects it would be impossible. I was thinking that the best way should be using only torque mode and implementing the effects as I made previously, passing only the torque value to the controller.
So, very first quick impression from the tests today… I’m not really satisfied with the brushless. The phases are still clearly present, there seems to be a significant holding torque that is preventing smooth movements and feeling in the most common use conditions. It might be the motor I have that is not particularly good, but I don’t think it’s the controller itself, as I’m getting the same feeling that I had with the driver I implemented with discrete components -I thought it was me doing something wrong either with the driver or with the code, but apparently it wasn’t.
I have not tried a big, simple, straight DC motor, so direct comparison is not possible, but on small scale the behaviour of a small DC motor was a lot better: the moment you give current, you get torque, and once it starts pushing, it´s smooth and constant.
Maybe the moment you go big in size and current there are other issues with the DC motor, but at the moment, for this application, I am not sure that the hassle of the control of a BLDC is worth the result.
We have similar motor and similar driver, what do you think?
A few images.
This is the plot of the speed (with the encoder) with a low speed setting:
I can actually see the motor not going smooth, it’s not a measurement issue.
Torque mode with low current setting:
The motor is not moving (see the speed plot). When I increase to 400mA the torque nothing happens, then to 500mA:
the speed jumps up very quickly and I need to reduce immediately the torque.
And this is the setup, on an increasingly messy table
The blue thing is the real time interface. I have made a new support plate for the encoder that made me gain a few more millimeters on the motor axis.
A question for those who knows more about motors than me…
I did some last test yesterday night, trying to understand what the flux setting was. From what I understood, the current is divided in torque current and flux current, where the torque current is the one that gives you the rotation, so it’s the useful one, while the flux current is the one pulling the rotor outside, not producing any moment and basically wasted.
If I set a significant flux current, the motor movement becomes more smooth and I don’t feel the poles any more.
I have been trying to search what is the use of this flux current, but at the moment I haven’t found anything useful. I mean, the way it’s described would make you think that you never want to have flux current, as it’s just warming up the motor, but if the controller has a setting for it, I would imagine that it does have some use.
Anyone knows what it the correct use of this setting?
This is my experience so far too. It seems motors with hard cogging (the feelings of detents while mowing the shaft manually) are useless unless a special cogging elimination procedure is applied (not an easy task). This is why my first attempts with gimbal motors were successful. These motors have got effectively non-existant cogging effect.
But while trying two different much bigger motors, the same effect appeared. These motors need a lot of current to start. Then they rotate, but not smoothly. The shaft is “attracted” to the next cogging position. This effect prevents using these motors with relatively low torque, which is needed when the yoke axis is close to the reference position.
I’m thinking about doing some tests with stepper motors, but the cogging effect is present there too. The difference is the stepper motor poles are much closer one to another.
New day, new result. I may have had something wrong with my testbench during last days. Today the motor is spinning gracefully and the torque can be adjusted in quite a big range.
I have applied FOC (field orientation control) with SVM PWM (space vector modulation). Here are the 3 winding waves when the motor is spinning at 1 electric revolution per second:
@MikeSierra2030 are you also using the TMC controller?
I’ll give it a try to the SVM PWM. I wish the datasheet were explaining better what-does-what.
I have also been doing more tests, as I was mentioning yesterday in my last message, setting a flux current higher than zero creates a fixed consumption but it seems to remove the cogging effect up to a certain point. Still, moving it with a low torque applied still gives this “rough” feeling.
But let me try this new setting…
It’s so nice to have other people doing the same thing and being able to exchange opinions and experience
No, I’m implementing all the stuff in my STM32 microcontroller writing my own software. So I had to get familiar with SVM on my own. I’m glad it works. But to run it smoothly in a close loop may be another story. We’ll see.
Oh, that is quite a work.
So I have checked the SVM option, it does run a bit smoother.
But the problem is that making them run smoother is “easy”, what is difficult is to make them feel smooth when they are stalled. Here setting a flux current, for me, is what is giving the best result.
I wish I had a current probe to check what’s really going on on those phases, the power supply meter isn´t telling me the whole story. It reads 300mA and the 2A protection flashes. I don’t want to try it with the 10A supply beast… yet.
By the way, you mentioned the stepper motors… I tried them, I had your same thought and got a servo to try it. Even in microsteps, at low speed they are not smooth, and moving them manually is really hard. They have a huge holding torque, and you feel it all when they are in idle. So, I would say not good for this work.
I can answer now to this question now: yes it can.
I have a question about this.
I can see how to implement a hard stop against external forces: you read the encoder and when it reaches a certain position you apply a torque.
But what about the situation where you are applying a torque to the motor and this moves freely and you want to avoid that it goes beyond a certain angle? In that case, if you apply a torque to stop it or just remove the torque it will start oscillating back and forth around the stop position.
I’m asking because I was thinking yesterday how to implement a limited rotation for the yoke without using mechanical stops but I can’t see how to do it…