cancel
Showing results for 
Search instead for 
Did you mean: 

Driving_motor_using_pwm

sanjib
Associate III
Posted on April 25, 2014 at 08:44

The original post was too long to process during our migration. Please click on the attachment to read the original post.
7 REPLIES 7
Posted on April 25, 2014 at 13:48

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/Stepper%20motor%20%28half%20step%20and%20micro%20step%20%29%20in%20stm32f030&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F&currentviews=86]Prior Thread

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sanjib
Associate III
Posted on April 28, 2014 at 08:12

Hi All

Can anybody solve my problem pasted above ..... Please help me
sanjib
Associate III
Posted on April 28, 2014 at 10:43

how to use pwm concept t avoid excess heat in my present code so that the mptpr can run for several hours....I have pasted my above code

frankmeyer9
Associate II
Posted on April 28, 2014 at 12:45

 - use bigger transistors (larger Ptot)

 - use more effective means of cooling

 - make sure you don't switch on both sides of the bridge at the same time;

   for all common transistors, toff is significantly bigger than ton

  ( add dead time)

chen
Associate II
Posted on April 29, 2014 at 17:38

Check the Transistors are being fully switched on.

I got the feeling the circuit is 5V based but the STM32 IO is only capable of 3.3V max

sanjib
Associate III
Posted on April 30, 2014 at 07:42

Yes the circuit is 5 v based as it is done for speed ramping of the motor .....so the question is how to control this  excessive heat ........whether it can be done by using pwm in my present code or the code is ok , i have to look for the hardware.....I am confused here.

chen
Associate II
Posted on April 30, 2014 at 11:16

Hi

''Yes the circuit is 5 v based''

But the STM32 IO only outputs 3V to 3.3V (Well I guess it outputs Vdd - ie what ever the supply voltage is)

In a H bridge - the transistor as suppose to be use as switches (turn on or off).

To turn on a transistor - the base current must be greater than Ibias.

This is normally controlled by 1) voltage to base pin 2) base resistor

The design must size the base resistor correctly or the transistor will not be FULLY TURNED ON.

When the transistor is not fully turned on - it will dissipate power ie get hot.

Before you start fiddling with PWM code - check if the transistors are fully turned on.

Try disconnecting the STM32 and wire the H-Bridge so that the motor is on in one direction, then wait and see how hot the transistors get.

If they get as hot (as when the STM32 is controlling it) then yes, you need to apply PWM