Maker Pro
Maker Pro

pwm to control a dc motor

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
You're still not answering my questions.

At low frequencies you should see a square wave varying between 0 and some voltage. That voltage should not vary with the mark/space ratio.

What is that voltage?

Do you see the mark/space ratio changing?

I fear that you're changing frequency and not mark/space ratio.
 

mariomoskis

Mar 13, 2012
82
Joined
Mar 13, 2012
Messages
82
yes,that voltage don´t change with the duty cycle,only the time of the signal in high state and low state
but i saw this voltage changes with the frequency and this is way i have this problem about i have a average voltage across the motor higher when i do the frequency higher too, because the inductance of the motor is L=2*pi*f and when f is higher,the influence of the inductance is more important

for example in this circuit: http://imageshack.us/photo/my-images/401/dudaq.jpg/

when i use a frequency of 1Hz,the wave at the output of the amplifier changes between 0 and 3V,but when the frequency is 100Hz,i saw in the oscilloscope a wave which changes between 1V and 3V. BOTH CASES FOR THE SAME DUTY CYCLE! so that´s why the voltage across the motor is going higher,
because the average between 0 and 3 for 50% duty is 1.5V
and the average between 1 and 3 for 50% duty is 2V(the value which i am measuring)
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Does it change from "0 to 3" to "1 to 3", or "-1 to 3"?

At the higher frequency I'd be expecting to see more of the inductive kick which is chopped off by the diode.

A picture tells 1000 words. If you can take a picture of the display of the scope it would be fantastic.
 

jackorocko

Apr 4, 2010
1,284
Joined
Apr 4, 2010
Messages
1,284
Does it change from "0 to 3" to "1 to 3", or "-1 to 3"?

At the higher frequency I'd be expecting to see more of the inductive kick which is chopped off by the diode.

A picture tells 1000 words. If you can take a picture of the display of the scope it would be fantastic.

I been watching this thread now for a while waiting for an explanation. Light bulb just went off in my head, I understand where you're going with this now.
 

mariomoskis

Mar 13, 2012
82
Joined
Mar 13, 2012
Messages
82
where i am going is to now if i am doing this well or not
and ok,later i will upload the pictures that i took,but i can´t do it now
the results that i got are these:
when i will say in this post that the square wave has values between two numbers,the higher number is when the wave is in high state, and the low number is when the wave is in low state.
frequencies will be 50hz

i have 2 possibles ways to do this:

1)WITH A POWER OPERATIONAL AMPLIFIER
http://imageshack.us/photo/my-images/401/dudaq.jpg/
first that i did was put a R=10ohm(because motor has max current no load=0.3A and max voltage 3V) instead of the motor, and the results with the oscilloscope at the output of the AO are a square wave with voltages between 0.4 and 3.2V(same wave at the input)
``It look work weel because with these values the average voltage across the motor will be 1.5V for 50% and 2.3V for 75%``

but when i set the motor instead that resistor,i saw with the oscilloscope at the output of the AO a wave with values between 3.2V and 1V(at the input this wave has values between 3V and 0V)

then, here is the problem that: if we calculate the average voltage across the motor,it will be 2V for 50% and almost 3V for 75%, and this is caused about the inductance of the motor,which increases the voltage at the output because now i have 1V when the signal is in low state

so i need to reduce this current consumed for the motor,which is 0.4A for this case,but it can be only 0.3A!! so the only way that i find to do this is put a power resistor in series with the motor


2)WITH 2 TRANSISTORS
http://imageshack.us/photo/my-images/717/darl2.jpg/
i did the same,i put the oscilloscope at the catode of the diode parallel with the motor,becase the value at the anode will be always between 3V or 2.8V
first set a resistor and measure the voltage, the square wave has values between 0.2V and 2.8V
``It look work weel because with these values the average voltage across the motor will be 1.5V for 50% and 2.3V for 75%``

but when i set the motor instead of the resistor,i saw the next squares waves at the catode of the diode:
for duty cycle 50% i see a square wave with values between 1V and 0.2V
for duty cycle 75% i see a square wave with values between 0.8V and 0.2V
for duty cycle 25% i see a square wave with values between 1.4 and 0.2V
then if i subtract the value at the anodo and at the catode,i will have 3-1=2V 3-0.8=2.2 3-1.4=1.6V across the motor
so again the values changed,and they are similar that i saw for the case of the amplifier



i hope that all is clear now,so as you can see with a resistor instead of the motor i have the results which i should have,but when i set the motor, the average voltage in the motor is higher than in the case where i have only the resistor
i think that is normal because of the inductance of the motor,but i thought that it shouldn´t change alot,but it does!! and i don´t know if it is correct
 
Last edited:

mariomoskis

Mar 13, 2012
82
Joined
Mar 13, 2012
Messages
82
i don´t know if you need the images too,but i will upload later,but i think that i explain it clearly :)
 

mariomoskis

Mar 13, 2012
82
Joined
Mar 13, 2012
Messages
82
images transistor with motor(0.5V/div) and ref ground is the second line of the image

then as i said between the anode of the diode and ground i have a square wave between 3 and 2.8 V, and between the catode of the diode and ground i have the next waves:
for duty cycle 50%: http://imageshack.us/photo/my-images/853/004wd.jpg/
(wave between 0.2 and 1V)


images AO with motor(0.5V/div) and ref ground is the second line of the image
at the outpout the wave is like this:
http://imageshack.us/photo/my-images/72/008ont.jpg/
(wave between 1V and 3V) ,at the input the wave is similar but between 0 and 3V
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
It is almost impossible to help you because you do so many things at once that I really can't follow you.

You also don't listen to what you're told and keep asking the same questions even after they've been answered.

Do you want to do this step by step, or shall we just give up?
 

mariomoskis

Mar 13, 2012
82
Joined
Mar 13, 2012
Messages
82
i would like to know,why in the case that i have the motor,the average voltage is higer than when i don´t use the motor,
i just think that it is because when i have the motor,the diode parallel with the motor is biased because of the inductance of the motor when it doesn´t recieve energy, and this doesn´t happen when i have a resistor instead the motor
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
It's because the motor has inductance which acts (in a way) like a resistance that increases with increasing frequency.

You should also see negative transients (limited to under a volt) each time the current switches off.
 

mariomoskis

Mar 13, 2012
82
Joined
Mar 13, 2012
Messages
82
ok,and when i was using the cine555 instead crio,i had a capacitor in parallel with the supply voltage, should i use that capacitor when i generate the pwm signal with crio and i don´t have the cine555?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
A capacitor across the supply is a good idea. What size did you use?
 

mariomoskis

Mar 13, 2012
82
Joined
Mar 13, 2012
Messages
82
470microF 25V

i want to use two capacitors,on for higher frequency about (1Khz and 10khz) and another for lower frequency about (10Hz and 500Hz)

whcih vaues should i take?

and when i use the gearbox i saw that the average voltage is lower than when i don´t use the gearbox, it is normal,but why is that happening?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
There is a point about using different capacitors (that has to do with frequency). But you can use them all at once.

It all depends on your power supply (what is it?) but there may be some advantages in using a capacitor across the supply rail -- just don't put it across the motor. Also, make sure you don't have any resistors in series with your power supply (I know you've insisted you need them).

The capacitors are probably more necessary for the power supply to your logic, and this should be decoupled from the power to the motor. In this case, a diode should be sufficient.

If the voltage is doping under load then you've probably got some series resistance. Either you have a resistor in there or your transistor is not saturating. Looking at the voltage across the transistor with a scope would be interesting. The voltage should drop to some fraction of a volt, and not change a great deal with load on the motor (although it will change a little)
 
Top