I have a question about the hardware.
For sure the atmega16 8bit is not the best option for hardware capabilities nowadays. Nevertheless, simplefoc shield is based on Arduino Uno.
What is your suggestions for hardware?
Microcontroller + Shield + Encoder.
Premisses are: Simple and fast start-up and didaidactic purposes.
STM32 microcontroller, such as any nucleo board
Shield: if you are not looking for the direct nucleo hat you may try the PowerShield-D (the new discrete component shield).
Encoder: This is a rather complex topic. Generally SPI magnetic absolute encoder such as AS5047P would work, however this really depends on the motor and use case.
If you are looking for a fully integrated board then you need to be a lot more specific about you use cases. I’m not sure what
I think it is a fair question what is most compatible. I had exactly the same question, but with different requirements.
What’s best for teaching is a question that will be a matter of some opinion. In my opinion the best thing to teach with is the actual thing, not some toy imitation. The reason we tend to use toy imitations is that the real thing is more expensive. However the applicability of what you learn is far better, thus learning is more rapid, generally imo, as long as the documentation is good and so on, if you have the actual thing. It’s also way more fun.
If I had known about the B-G431B-ESC1 board and that it is supported under Arduino I would have made a beeline for that. However it is far from perfect, it was very hard to solder the wires to the little pads and it has some issues, it spontaneously overheats and stops responding sometimes. Also there is no SPI. Also I don’t know if current sense is worked out yet. It has the hardware but harnessing it into the arduino system appears to be in the early stages or not rolling yet, I can’t actually tell from the thread on the subject.
Hi @Valentine , thanks for your suggestion. In fact, I have a bunch of chinese stm32. However, they are not arduino uno shield compatible. I also have two Nucleo boards, but they are F334. Those, last time I’ve checked, are not compatible with Arduino framework. Do you know if there is any shield that can adapt? If not, and I have to invest in another nucleo board, which one do you suggest?
Hi @Anthony_Douglas, you took the word out of my mouth. Unfortunately, I’m doing this with my own investment. The school will not help, which leads me to aliexpress. Cheaper as possible, less toy as possible. Who knows, maybe in the future, I can upgrade it.
As you can see it gets complicated quickly… if you are budget-limited I think a good option is to get some Lepton 2.0 boards made.
In my experience, the power stage is the problem. There are no good options for a 6 pin pwm power stage alone. There are for 3 pin, however that has some serious downsides regarding wasted current and noise that I could not have.
Thus, to get a good triple half h bridge with gate driver you need to make your own board. If you are going to do that you might as well just get a Lepton V2.0 made.
Imo this is exactly the sort of thing we need to hurry up and do the lepton 3.0 to help with. I’ve got it on my list of things to do, in the meantime the Lepton 2.0 can do basic things. However beware that the size of the flash memory is a bit small. See the thread on programming the lepton. Don’t let it scare you away, most of the issues are now solved. There are board files for it and everything works. It has the 6 pin PWM power stage integrated so you don’t need to worry about a shield. However it doesn’t have current sense. It depends on exactly what you are trying to teach.
My plan is to use it as a waveform generator module, you can find code to do that. Then an uno or other board could be used as the master to check the sensor and so on. The master doesn’t have to be very fast with this approach . However this requires hacking the library some. Not much, though. I think all it really takes is a single print statement in the set electrical angle function which outputs the electrical angle to the waveform generator every time the function is called. My waveform generator module will get that info and use it. Thus I think everything should work.
The B-G431B-ESC1 boards are $25 each at mouser last I checked, and a little more at digikey. I think the leptons are about $17 each if you order 20 at once or something.
Thanks. I do use ESP a lot, but I had those feelings that I can’t set priority over wifi and other background stuffs. But, since it is a really cheap board. I will give it a try.