Shop OBEX P1 Docs P2 Docs Learn Events
BLDC drive for electric bike — Parallax Forums

BLDC drive for electric bike

A friend of mine is working for a manufacturer of electric bikes. They are searching for a developper who can design a controller for a BLDC motor with several new features. I can't talk about the details of the vehicle (it's actually not a bicycle but something similar), here. But I do know that the P2 would be a good candidate for the controller because of its excellent analogue and DSP features (keyword "Goetzel"!).

The requirements for the power electronics are completely different from what I've done so far (see industrial servo controller project). It matches more the universal motor driver board from Parallax: low voltage, high current, hall sensors...

So here are my question:
1. Is it possible to run the BLDC driver in current/torque mode instead of speed/voltage mode? The speed of my vehicle is mainly determined externally (by muscle power, terrain slope or inertia) and I need some sort of "throttle" to control the torque of the motor and therefore acceleration or braking. A speed control algorithm would do the wrong things and result in an irritating behaviour. For example pushing "full throttle" at low speeds or standstill would cause the drive to fault out due to over-current instead of accelerating at max. torque. Or pushing the throttle only a little bit at high speed would decellerate instead of accelerate because the actual speed is above the nominal command.

  1. I've heared of some problems with the hardware. It's said the boards tend to blow up especially with high power and high-inertia motors. I think Chip said this is caused by some negative voltage problem in the MOSFET drivers but I believe it also could be caused by the somewhat minimalistic current measurement ability. The single shunt resistor in the DC link cannot detect over-current while the windings are free-wheeling. Anyway... is this problem solved?

What is the currect state of the software for the Parallax BLDC board? Can I run it with different motors without risking to burn it? Or should I try it only with the original Hoverboard hub motors?

Comments

  • If it's a commercial endeavour, I'd be looking at the VESC project (open source)

    Craig

  • @ManAtWork said:
    What is the current state of the software for the Parallax BLDC board? Can I run it with different motors without risking to burn it? Or should I try it only with the original Hoverboard hub motors?

    Software - you should be able to use it without burn up. Stephen included the appropriate deadtime and ramping to avoid the sudden large negative discharge spikes with those larger motors. I've not managed to burn up a board yet during a lot of testing- not until I tried something crazy on purpose.

    In other news... The new rev of that board is in transit as of today; I'd expect testing will be finished during next week.

    Main changes are:
    1. New MOSFET driver that can handle -15V negative spikes (instead of just -5V on the previous driver). -5V is fine for most DC,CNC and smaller 3-phase motors, but not (as we learned the hard way) for the larger hub motors (aka. mega coil), which sometimes punch the rail down to -8V or so when ramping is disabled and a sudden change occurs for them to dump the stored energy uncontrollably.

    1. Added a current sense amplifier to the shunt resistor. It's still in the same place, but will provide more useful information at low current.
  • @VonSzarvas said:
    In other news... The new rev of that board is in transit as of today; I'd expect testing will be finished during next week.

    That is good news!

    1. New MOSFET driver that can handle -15V negative spikes (instead of just -5V on the previous driver). -5V is fine for most DC,CNC and smaller 3-phase motors, but not (as we learned the hard way) for the larger hub motors (aka. mega coil), which sometimes punch the rail down to -8V or so when ramping is disabled and a sudden change occurs for them to dump the stored energy uncontrollably.

    This is strange. I've done many experiments with all sorts of high voltage and high current power electronics and I've never seen any voltage spikes or ground bounce below -2V at the drivers. I've tested the short circuit protection of my stepper motor drivers and have measured peak currents of up to 300A for several ten nanoseconds before the driver switches the transistors off. A friend developed a driver for an electroplating bath that can handle up to 500A continous current and uses PWM with 500kHz. We had lots of other problems with that but never encountered any damages due to negative voltage spikes.

    I believe that the actual cause of those problems come from the parasitic inductances of the PCB layout. Is the universal motor driver board a two-layer PCB? I can't tell for sure because of the opaque purple solder stop mask. A two-layer layout means that the currents flow in large loops (or rectangles or whatever shape the traces have). When the MOSFETs switch the enclosed area of the current flow changes and so does the energy stored in the magnetic field. Non-continous changes in energy cause large induction voltage spikes.

    From my experience it is much better to use a 4-layer PCB. You can then use large parallel copper pour areas in the two inner layers for the DC bus. These form a plate capacitor with a little bit of capacitance and VERY little inductance. When the current switches over from one MOSFET to another there is very little change in the current path loop area as it does only jump from one layer to the other which is only tenths of a millimeter away. This almost completely avoids ground bounce and negative voltage spikes.

    1. Added a current sense amplifier to the shunt resistor. It's still in the same place, but will provide more useful information at low current.

    Very good! This was one of the weak points. I hope I can do a patch/update to my older board. I don't want to wait months again for the shipment of a new board. (I know, UPS can ship faster but costs more athan the board itself...)

  • @ManAtWork said:
    I believe that the actual cause of those problems come from the parasitic inductances of the PCB layout. Is the universal motor driver board a two-layer PCB?

    To that end, the new rev includes an improved layout too. It's still two layer, but parts were moved to tighten the high current loops including return paths. Fortunately the target current and PWM freq. is much lower here than for your bath. Interestingly the initial prototype of this board was 4-layer, but we had to go to 2-layes for supply reasons and just figure out a way to make it work for this add-on.
    In the future a 6-channel standalone version is being considered and that would certainly be multi-layer, and also be free of some compromises that the add-on form factor imposes.

    I suspect you would enjoy experimenting with the hub wheels. Based on the year of release of the beefier MOSFET drivers, I would propose they were only developed in response to the hub wheel market. I found that such protection is not needed for any other DC or 3/4 phase motor I've tried.

Sign In or Register to comment.