So, I have my 48v3kw 3 phase sensored hub motor that I'm looking at getting a controller for. I want to be able to control the movement as precisely as possible. Because of this, almost every motor driver I've seen so far won't really work. (They're almost entirely go forward, go back. None allow me to say go forward 1 step.)

I'm familiar with soldering and I'm pretty sure I could print my own circuit board and wire it up given a schematic. I know, however, that I'm not skilled enough to create this schematic. Since some of you have probably been here before, how did you handle it? I was told a system like this is easy for any EE grad, and a simple craigslist post would find me lots of people willing to help, but I'm not sure where the line is drawn between pay and trusting that some rookies design won't fry my expensive motors.

If I did hire someone, I would want to try to get advice on the whole system. (The powerful drive motor controller, a dual controller to power 2 24v side motors, and a powerful chip to read input from various sensors and trigger the 3 motors as well as accept input from another chip that will control user interaction via bluetooth.)

If I did hire someone, I would want to try to get advice on the whole system.

I assume you are doing this as a commercial enterprise.You absolutely should hire someone, but not to design a motor driver for you.You need someone with experience to design a system that incorporates off the shelf components that can be replaced if they fail.

Because, I wouldn't be hiring someone to do the work for me. I would have them explain every step. And it's just to make the schematics and be around to answer my questions, not to do the work.

And it's mainly because i really want to be able to step my motor, and I don't know where to get schematics for something similar. A controller like that is well beyond my ability in electronics, and I know it, but I still want to try.

I'll copy my response to someone responding to the same question asked on reddit

Quote

So, if I wanted to, I could step the poles one step and get a specific movement distance. (Of course, it all depends on the amount of poles, tire diameter, etc. I understand all of that.) My problem is every controller I've found lets me say "Go forward/Go Backwards" at some 2.5-5v mapped range of speeds. I can't say, jump forward one step.

As I mentioned, I want to build a self balancing robot. With a motor this big, simply saying "forward/backwards" would make it jerk around. However, if I can control the steps, I can simply say "When the gyro/accelerometer that is mounted on the top of the robot shows a certain angle. [ tangent = (opposite/adjacent) or tan(robot height/distance the robot can move in one step) ] Then jump forward one step. (Maybe a little less so it slow starts falling backwards and you have a little dance forward/backwards that is mostly controlled instead of some random result.

OK, this is DC brushless outrunner motor, meaning that it is not a stepper motor, hence You cannot step it, hence You did not find any controllers of that sort as that is simply not possible with this type of motor. Don't be disappointed, as for self balancing robot stepper motor is not something that is used.

To drive Your motor You need three man enough transistors (maybe Darlington ones) paired with man enough diodes. Every time hall sensor signals, uC has to power respective transistor and power off the other two. To go one way uC repeats sequence of phase 1 -> phase 2 -> phase 3, to go the other way You reverse the sequence and go phase 1 -> phase 3 -> phase 2. To control RPM, You simple send PWMed signal to transistors instead of a continuous one.

Motor You have is suitable to what You want to achieve, although it would be a bit easier to achieve if You used regular brushed DC motor.

Also, gyro should be mounted as close to pivot line (line perpendicular to the wheel and going through the center of it) as possible to get best stability.

Logged

"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Thanks. So I'm wrong in thinking you can just power one phase and have it 'lock' or break there, and then power phase 2 to have it step forward one step? I understand everything you've said so far, but it seems that knowing the diameter and radius of the wheel you should be able to tell it to go exactly n (unit of measurement) here. (For example, if going from Phase 1 to phase 2 goes 2cm, then if I wanted to move 8cm forward, I would just cycle through 4 times (phase1 -> phase2 -> phase3 -> phase1 -- Hold here)

By using pwm, it just makes it so the magnets don't pull as strongly so it doesn't step as quickly (which is something I was planning to use to adjust how quick the jerks forward and back are to maintain balance) but I thought it would make more sense to keep track of the distance so I can use more precise math to move it vs telling it to go forward 1/3*5v for 20ns or even go forward at 1/3 speed. check gyro.. check gyro.. gyro balanced stop. I know the latter way is most common and I've seen the fuzzy logic that makes it work nicely, but I wanted to see if knowing the angle and the exact distance I would have to move would make it 'cleaner.'

That make sense or is it really just better off getting a normal controller and just go the forward/backward path?

So I'm wrong in thinking you can just power one phase and have it 'lock' or break there, and then power phase 2 to have it step forward one step?

You are right, however due to internal assembly of Your motor (3 coils set at 120° from one another), the smallest step You can take is 120° when full-stepping and 60° when half-stepping (alternately powering 2 and 1 coil at given time). So the smallest distance You can achieve when half-stepping is wheel circumference / 6, which is well below precision needed to smoothly balance the robot.

Gyro does not show angle (balance/imbalance), what it does show is angular velocity (degrees per second) at which something is rotating. In self-balancing robot, there is no static balance point (if system is built well, only to human eye it looks like robot is standing still), as all the time system is making tiny adjustments to motor power. Locking motor at specific angle will only cause Your robot to fall over.

Logged

"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

You are right, however due to internal assembly of Your motor (3 coils set at 120° from one another), the smallest step You can take is 120° when full-stepping and 60° when half-stepping (alternately powering 2 and 1 coil at given time).

Right, but can I half-step with most normal commercial controllers? I guess my ultimate question is, should I spend the extra $200 on a controller or should I take the time to get a circuit diagram and build my own?

So I'm wrong in thinking you can just power one phase and have it 'lock' or break there, and then power phase 2 to have it step forward one step?

You are right, however due to internal assembly of Your motor (3 coils set at 120° from one another), the smallest step You can take is 120° when full-stepping and 60° when half-stepping (alternately powering 2 and 1 coil at given time). So the smallest distance You can achieve when half-stepping is wheel circumference / 6, which is well below precision needed to smoothly balance the robot.

Ahemmm...I'm sure this photo of an inrunner makes a good prompt for a little correction

If not, here's an outrunner with even more poles (slanted to make it run smoother)...

Apart from this, a BLDC motor is not a stepper and is not made to "lock" (which it shouldn't in a balancing vehicle anyway).

Logged

Regards,Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?Please remember...Engineering is based on numbers - not adjectives

Apart from this, a BLDC motor is not a stepper and is not made to "lock" (which it shouldn't in a balancing vehicle anyway).

Yeah, I don't really mean to lock it. A good balancing robot is constantly correcting.

I'll change my question. Can you guys suggest a good controller that could handle the 3 phase sensored 48v 3kw peak power handling that accepts either serial communication or some non-analog input so I can have some precise control over how the movement? If not, do you know a place where I can get schematics for such a system or hire someone to build it?

I'll change my question. Can you guys suggest a good controller that could handle the 3 phase sensored 48v 3kw peak power handling that accepts either serial communication or some non-analog input so I can have some precise control over how the movement? If not, do you know a place where I can get schematics for such a system or hire someone to build it?

I told you that this motor is way overkill and a smaller one will be easier to control, as it won't have that much inertia to overcome.

What's wrong with analog?!Any digitial representation will, due to its quantization, have a limited amount of voltage steps, while an analog signal is continous.

Don't think about hiring someone to build it. It will need to be built the same way as a commercial product, but in the latter, the development costs will be divided out on lots of units - One off will cost you probably ten times the motor for even a semi-matured controller.

I am not available for such a project, as I believe the motor is wrong for your project and so will be impossible to get good results from - and the contractor is always blamed for the customers bad decisions Further, you want your very own "personal trainer" to tag along on your project, which you'll not be happy to pay for, as you probably will need say 50 hours of guidance added to the development costs, so the bottom line will quickly reach, or even surpass, the $10k mark.

The conpany that sold you the motor does have a controller for the 3kW motor. I don't know how fast it can reverse the motor (as fast reversing isn't a priority on a regular bike), but shoot them an email - $200 will buy you a 3kW controller (or two hours of my time on X-mas sale )

Logged

Regards,Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?Please remember...Engineering is based on numbers - not adjectives

What's wrong with analog?!Any digitial representation will, due to its quantization, have a limited amount of voltage steps, while an analog signal is continous.

Nothing, it just means I'll have to get a DAC, no big deal I guess. I'm just used to things like the sabertooth where I can control it via serial commands. I honestly don't know what's more precise. I figured the digital would be better to avoid the uC -> DAC ->[controller] ADC -> uC -> [motor]

I am not available for such a project, as I believe the motor is wrong for your project and so will be impossible to get good results from - and the contractor is always blamed for the customers bad decisions Further, you want your very own "personal trainer" to tag along on your project, which you'll not be happy to pay for, as you probably will need say 50 hours of guidance added to the development costs, so the bottom line will quickly reach, or even surpass, the $10k mark.

Well, if I had a 'personal trainer' to help me, I wouldn't have gotten this motor. I just couldn't find another hub motor with high torque. I probably don't know what I'm looking for, but I have a high paying job (Not quite what you make, but I'm salary so I don't mind), I'm single, and I figure I might as well buy stuff and actually start building stuff. (Sure, spending all the time trying to figure out the numbers is probably better and safer, but this is more fun.) I know what I want to build (claptrap from borderlands) and I know why (to show off at conventions and play around with)... so why not.

The company that sold you the motor does have a controller for the 3kW motor. I don't know how fast it can reverse the motor (as fast reversing isn't a priority on a regular bike), but shoot them an email - $200 will buy you a 3kW controller (or two hours of my time on X-mas sale )

It can reverse at 1/2 speed, which should be fine. I got the controller. If nothing else, it'll make a fun trike to play around with. Now I just need to get a good IMU and figure out what uC I want to control this with.