tictac
Full Member level 5
Hi
I want to measure the current of a motor dc.I use l298 and
atmega16 and one 1 ohm resistor for that,and also one opamp
for measuring the voltage of the resistor and produce single-
end voltage.the output of the opamp is connected to ADC of
micro.also I connect Enable pin of l298 to the PWM pin of
micro.when I use pwm with maximum number(OCR1A=0x3ff),there is
no problem ,and I can see the current of motor in lcd with
fix value,but when I use pwm in lower value(like
OCR1A=0xff),the value of current doesnt fix,and change very
abnormal.
I use diffrent power supply for motor and l298.
please help me
by regards.
I want to measure the current of a motor dc.I use l298 and
atmega16 and one 1 ohm resistor for that,and also one opamp
for measuring the voltage of the resistor and produce single-
end voltage.the output of the opamp is connected to ADC of
micro.also I connect Enable pin of l298 to the PWM pin of
micro.when I use pwm with maximum number(OCR1A=0x3ff),there is
no problem ,and I can see the current of motor in lcd with
fix value,but when I use pwm in lower value(like
OCR1A=0xff),the value of current doesnt fix,and change very
abnormal.
I use diffrent power supply for motor and l298.
please help me
by regards.