Adruino Uno + DRV8302 + hoverboard 36v 360 w

It is, it has much more IOs, and more PWMs I believe. But it also is only a 16MHz 8bit MCU…

I would recommend taking the “big step” to 32bit MCUs. If you like the Arduino environment and don’t want to mess with custom board manager settings etc… then there are several 32bit MCUs from Arduino themselves. The MKR series or Nano 33 series have 32 bit MCUs that are supported by SimpleFOC, and using them is not so complicated, it works more or less the same in Arduino IDE, the boards should even be auto-detected.

Going to ESP32 or STM32F4 or STM32G4 will be an even bigger performance boost, and these are not so hard to use either. You can even get ESP32 Arduino or STM32 Nucleo 64 type boards which have the same form-factor as the original Arduino. Or Adafruit or Sparkfun brand boards (like an Adafruit Feather or Adafruit Metro Express, Sparkfun “Thing Plus”, etc) come with good instructions and lots of different boards and processors to choose from.
Using such a board is a little more difficult because you have to install custom board manager URLs, and there can be some differences in the way of working to the normal Arduino products.

Yes, if this is a custom board design for motor control, then I believe you really do need an oscilloscope to be able to debug it… the good news is that it does not have to be a 2GHz $30000 model from Keysight, because motor control signals happen at low frequencies/bandwidths, so an inexpensive 50MHz or 20MHz oscilloscope will be more than enough. :slight_smile: often such things can be bought used at lower prices.

It’s not a custom board. Its the same one as from one of the example projects. I think the driver is fine but it wouldn’t be a bad idea to check.

I see i have lots of different options to play with :grin:. I’ll keep on working on it. Eventually i hope to be able to have a closed loop positioning control with foc current as torque control type. taking a bit of a longer route, but i’m learning a lot of new stuff :grin:

1 Like

Hoverboard Wheel use 3.3 volts insted 5 volts(even for intermedie controler), Arduino DUE is the choice…for me…at least. With 5 volts they go to sleep “in eternum”.

are you using your adruino to provide power to the hoverboard motor?

Shoarmabor the stuff you are a saying is kind of all over the map and I think there appears to be some disconnect here, and I recommend you budget some serious time to step carefully and make sure you learn as you go. If you want rapid results, you should be taking a different strategy, if you want to learn then I would also argue that your strategy does not appear to be ideal.

I’m no expert, but I did try the uno with closed loop, and it did struggle a lot for sure. Even openloop it could not achieve a very high rads/s, I forget how much but I think it was like 20 rads per second or less.

Hi me again,
I got myself a nucleo-64 and started over trying to get the open_loop position work and got myself struggling again.

The open_loop positioning seems to work fine with the adruino uno but when i try it on the nucleo-64 it seems does not work at all. both boards are using the exact same code and pins. The only difference i see is that the nucleo outputs 3.3 volts to the pins and the uno 5v. I don’t think this should be a problem because according to the datasheet the drv8302 should 3.3v and 5v interface support. did anyone else struggle with this as well?

Is it a NUCLEO-F401RE, you have to be a bit more selective with pin choice with stm32. What pins did you go for? PA8, PA9 and PA10 seem sensible for 3xPWM.

Thank you! The open loops works now for me. im indeed using the NUCLEO-F401RE.

Hi me again again :grin:,

I wanted to show you guys what i’ve been working on.
I’ve been wanting to make a force trim cyclic (joystick, flightstick) for a year now that is fairly low cost using hoverboard motors and this set up below is the proof of concept for it.

So a force trim is specifically for helicopters for pilots to improve control over the aircraft. it gives a counterforce which allows the pilot to create small adjustments. Something that is especially handy during hover. It also allows you to turn off the counterforce by using a button. This allows the pilot to reposition the cyclic to adjust for a constant rotation.

The force trim in action is what your seeing in the video. it definitely still has its bugs and glitches but it works and im very happy with that :grin:

Thank you guys for answering questions and giving suggestions.

3 Likes