which is probably yet another driver.
I haven’t answers my questions so I cannot help.
which is probably yet another driver.
I haven’t answers my questions so I cannot help.
I can post the sketch tomorrow as I need to get it from my studio. It’s a simple open loop with
Pole pairs:
11
(Phase resistance):
21
(Kv rating):
90
Max amp .2
There should be practically no variation in RPM if you are using open loop. I know someone was talking about making a diy turntable and put a victory post up recently, you should check that out, unless you are the same person?
If there is variation in open loop with avery simple sketch surely that is due to a clock frequency issue, but even internal RC oscillators don’t just flutter around randomly, they change with temperature and are not accurate from the factory but…
Don’t despair at your nucleo purchase, they are good stuff and you will probably get there.
I would bet that what’s happening is that variations in friction as the table turns is what is responsible for brief rpm variations. The motor can go faster or slower for a small fraction of a rotation as there is some springiness, esp with openloop commutation.
I was able to get very smooth motion out of a stepper motor using a tmc2209 driver.
Howdy, I am indeed that person. This is actually a consistent variation. The Old Uno got on average 0.1% and the Nucleo is even worse than the R4 as it consistently logged 1.4% which puts it out of contention.
I purchased the 2 Nucleos based on the recommendation of the SimpleFOC guidelines. These are not warm up quirks but a huge, consistent difference in speed accuracy.
The 2209 is very interesting as I use those in my 3D printers. Did you buy/design a module for one? This could be excellent.
Ok, so the 401re is lacking the same crystal as the Arduino R4. Pretty sure the mystery is solved. It has a location to solder one. Anyone know if the drivers would have to be modded if a crystal was added?
STM website suggest that it has the crystal.
You might need to include a System_ClockConfig file in order to use the external crystal (HSE).
You can generate this in CubeMX software, there should be a preset for the nucleo board.
Edit:
https://stackoverflow.com/questions/42063295/stm32f104re-nucleo-how-to-install-configure-an-external-clock-for-the-board
there is no crystal? what is going on here? the documentation of this is a mess…
Sorry for the bum advice. I would have expected a nucleo board to have and xtal, esp for the price.
Sometimes crystals need other circuitry etc to make sure they get started. It might be easier to get a can oscillator, which is a device that simply outputs a reliable clock signal, all calibrated and everything.
Using a tmc2209 won’t help if the clock is the problem, only if it’s an elasticity issue. Well, actually they do have a mode for continuous motion, but they would use an internal rc oscillator anyway so you’d be back where you started.
The crystal is on the programmer portion and has to assigned to the main board. Ugh.
Turns out it has to be assigned. No fun haha! Working on it now.
So after many attempts, it looks like the main board will need its own crystal. So much for plug and play haha! have a couple old boards for now.
That’s interesting! The Arduino board definition for this board does indeed use the internal oscillator.
You could solder on an oscillator, or reconfigure the board to use the 8MHz one from the daughter board…
Either way it would need a new clock configuration on the software side, which probably means creating a board definition.
But why not go for one of the STM32G4 based Nucleos? They have the external oscillator on-board…
Thanks for the tip,
Hey wait you didn’t buy the one I suggested, I take back my apology for bum advice ;). If you use a different MCU like that you can’t be sure that various details are going to work, it could be a long road to get them working. I did not check to see if the one I suggested had a crystal, I just assumed.
They were purchased before your advice…
Hmmm… lets slow this down a little to make sure you wind up with a useable board:
[Edit]
Just found the board files for the G474…
So easiest is the G474RE
Many, many thanks. I think for now i will just use stick with Unos. Trying to keep this as much plug’n’play as possible. Got an Eligoo R3 coming today to test. I realize they are discontinued, but a few should be floating around for a while haha!
I am stuck with two F401re units. Not sure if they will be useable for something else i might need.
So the G474re could be the one! Might order in a bit then.
The old uno is profoundly underpowered, but might be enough for your case, indeed it sounds like probably. I like the raspberry pi picos, and yes they definitely have a crystal. Some people have gotten simplefoc working in a basic way on it.
OK, so after a brain melting afternoon learning about 1% of the STM Cube apps, I think I actually got the mcu to see the crystal on the programmer. The main speed is superb but have higher flutter…so a bit of cypherin’ left haha!
Well the 401re is working now but the Uno still edged it out. For a vinyl turntable all that is needed is stability.