Shop OBEX P1 Docs P2 Docs Learn Events
P2 universal motor driver question — Parallax Forums

P2 universal motor driver question

mwrobertsmwroberts Posts: 75
edited 2024-08-23 19:18 in Propeller 2

I've been playing with a p2 universal driver board for a couple weeks now.
What are the sense_u, sense_v, sense_w and sense_x pins for?
I've looked at the schematic and they look like a 12:1 voltage dividers.
This is what I think...
If the high side mosfet to v is on, sense_v voltage would be line voltage/12
If the low side mosfet to v is on, sense_v voltage would be zero
If neither are on, sense_v is the back emf of that motor leg, the v leg, indicating rotational speed...
I don't think you can get the phase current from them...
Am I missing something?
Thanks,
Mike

Comments

  • evanhevanh Posts: 15,782

    I wouldn't use that. It'll be failure prone without current sense, especially at higher currents. Also is missing snubbers on the gate drive, those 0 ohm links are asking for trouble.
    And that's without ever designing a drive.

  • I was able to use the voltage sensing pins on a sensorless brushless motor driver. It's not that complicated to run a BLDC motor. https://simple-circuit.com/arduino-sensorless-bldc-motor-controller-esc/ What is tricky is starting a BLDC motor. Which is why I haven't posted the code yet.

    With a BLDC motor, only 2 wires are driven at a time. The third wire can be used to measure the back EMF. To prevent the PWM from affecting the ADC measurements too much, I used a trapezoidal window filter and locked it to the PWM period. I think the P2 does have comparators that could be used like in the Arduino project but the UMD board is not wired for that.

    I've never heard of measuring the speed of a brushed DC motor from the back EMF. You would have to turn off both switches on one leg. Then wait long enough for the inductive kickback to subside. I don't know how long that might take.

    You're right, there is no phase current measurement. The UMD board does have supply current sensing. It's on another schematic sheet. Not ideal for 3 phase motors, but better than nothing. But on the rev A boards the measurement accuracy is low because it doesn't have a current sense amplifier. Which is why I think we all got rev A motor driver boards in our mystery boxes a while back.

    I used a UCC27211DR before and it caused me grief. Something was causing one of the fets to switch on-off-on. Which was bad for efficiency and heat buildup. It could have been my board layout. For reference it's here: https://forums.parallax.com/discussion/175004/p2-powers-solar-car Maybe adding a resistor stopped the on-off-on bounce but it didn't improve the temperature by much. The rev A uses a MIC4604 which I also used and found to behave nicely. It does have less switching current.

  • @evanh and @SaucySoliton
    Thanks for the feedback.
    I have a spin2 program using this parallax UMD board running a 2212 3 phase brushless quadcopter motor with a mt6701 magnetic encoder outputting 1024 lines giving 4096 positions/rev resolution.
    It runs in a position loop mode or in a torque mode.
    I plan to make a post on it soon and wanted to make sure I wasn't missing something as far as current sensing goes...
    Mike

  • ErNaErNa Posts: 1,751

    I want to point to this pointless video:
    This shows, how complex motor control is, if you try to create a "perfect" system. It shows all the steps needed to create a motor model from mechanical dimensions, material constants, then simulation using FOC, .... and so on.
    This is not what is available to the common user. So there is just hope, all of this is not needed. If this is the case, then the hardware proposed has all the means, needed to control a motor using the propeller.
    Just to show, why current measurement is nice to have, but not a must: If you control a BLDC motor using Hall sensors, you know, that the commutation is correct, current applied will create torque. It is a good idea to know the resistance of the winding, the DC-Link voltage and the BEMF-constant. You know the rotational speed from watching the Hall sensors. So to run the current wanted, you just apply a PWM duty cycle that represents the voltage I * R + BEMF constant * rotational speed. This will result in rotational speed, and if there is a deviation, adjust the PWM-Cycle in a control loop. No information about current is needed. If for some reason, the torque created is less then expected, most likely the resistance of the winding is increased due to temperature. This allows to judge even motor temperature and overload conditions.

  • evanhevanh Posts: 15,782

    But current sensing is the easy and cheap part to do. And it is protective as well.

  • ErNaErNa Posts: 1,751

    Current sensing not really cheap, as you need hardware and if you measure current using a shunt, this shunt contributes to losses and is a hot spot, so reliability in high volume, high MTBF applications is an issue. And not current measurement is protective, but shutting down the voltage. And if you just limit voltage according to the rule proposed, you are always fine. If there is a hardware failure, knowing current will not help, then a fuse is the solution ;-)

  • evanhevanh Posts: 15,782

    I can assure you it is effective. I may not have designed my own drives but I certainly have used them. And there is many much hotter spots in power delivery. Shunts are hardly significant.

  • evanhevanh Posts: 15,782

    Another important feature drives should be fielding is electrical isolation between control and power. This is primarily a common mode protection solution but also improves noise immunity as well. In the case of over 100 volts this becomes a safety requirement.

Sign In or Register to comment.