Control hub motor with Arduino for self balanced electric unicycle

Hello,

I am trying to build a self balanced electric unicycle from a "Crystalite HS 3540" electric motor,
(description could be found here Crystalyte Europe :: Motoren :: HT-HS-UFO Crystalyte motor :: HS UFO 3540 achterwiel motor).
To control the motor, I saw several videos on youtube with people using Sysgen H-bridge or L298N to control low voltage motors but couldn't find much information for high voltage like motors with arduino.

So the question is quite forward, is it possible to build a controller with Arduino (MPU6050 for balancing) with the following properties to control the motor :

Output range : 250-2000 Watt
Voltage range : 24-48 Volt
Max Amp : 45 Amp

I'm quite new with Arduino products and projects so please feel free to give as detailed information as possible to help me proceed.

I added a full motor description, please refer to the attached file.

Thanks for your help

HS3540_ENG.pdf (834 KB)

It is not possible for an inexperienced person to build a controller with those capabilities.

Pick a commercial controller that meets your needs, making sure that it can accept digital signals.

You will need to identify a suitable motor driver for your motor. Assuming you have that the Arduino should be able to control it as you want. Arduinos are frequently used in self-balancing devices.

...R

Sikilaxx01:
I'm quite new with Arduino products and projects so please feel free to give as detailed information as possible to help me proceed.

You are going to hurt yourself. A motor strong enough to move a human is also strong enough to break a human.

Start small. Instead of a self-balancing unicycle, build a self-balancing RC car. Then realize that balancing a "dead load" like an RC car is much much more easy than balancing a "live load" like a human that can squirm and move around. The delay caused by our reaction time can cause us to overcompensate, which creates oscillations that will make the device lose control.

Design everything with a safety first mindset. Everything should be chosen while keeping in mind the objective "How can I prevent this from hurting me?". A "dead-man's switch" in the seat is one such idea. If you fall off the seat, it cuts power to the logic circuits so that there's no chance of the motor going out of control. Helmet, elbow pads, knee pads, steel-toe boots and a cup (if applicable) should be the minimum dress code for any test run.

I won't say you shouldn't do this, just realize that what you are building will be a very dangerous device that could break bones if you are careless with it. You can't just slap some PID into your sketch and make it work, translating the signal from the IMU into the correct motor drive signals will be a very significant signal processing problem for you to work out.

You are going to hurt yourself.

Excellent point! A 2 kW motor is extremely dangerous.

Thank you all for your replies, I forgot to mention that I already own an 12inch electric unicycle
that I've been using for over 4 years now; I decided to upgrade it so I've dismantled the wheel to
see what I need and I guess when I saw the controller I though with professional/enthousiasts
guidance, I could build a custom one meeting the new motor requirements.

@jremington
You're right I'm inexperienced, but willing to learn.
I could not find any commercial controller that fit my need and I think
there is a challenge building my own (it's more gratifying).

@Jiggy-Ninja, you're absolutely right I need to go through the system problems to
measure the process difficulty.
Obviously I will start/test the software implementation by building a 2 wheels small self balancing
robots before moving to a big device.
Once it's done, is it enough to build a definitive controller ?
The inputs, the motors power, reactivity won't be the same, will I need extra components, that are
the questions that bother me and let me submit this request.

Sikilaxx01:
Obviously I will start/test the software implementation by building a 2 wheels small self balancing
robots before moving to a big device.
Once it's done, is it enough to build a definitive controller ?
The inputs, the motors power, reactivity won't be the same, will I need extra components, that are
the questions that bother me and let me submit this request.

No, they won't be remotely the same. A large motor like that will require acquainting yourself with some beefy MOSFETs and bootstrap drivers for the H-bridge. The FETs might require some heatsinking at those power levels. Safety will requiring monitoring the operation of the motor. It should monitor current to detect a stall, monitor speed to detect if the motor's running too fast, and perform sanity checks on the IMU readings so that the motor doesn't operate in a dangerous orientation (like when the bike is horizontal).

Hardware is the easy part here, though.

As for the code challenges, it looks like someone has already written something like this: Ovaltine's Segway Clone. Definitely, definitely check that out.