measuring the current of the Dc motor

hi
is there any way to measure the current of the dc motor, actually I want to give the periodic voltage to the dc motor and I need the periodic values of the current which flow in the motor

Some DC motor drivers have a current output. To help find one we need to know the rated voltage and stall current of your motor.

Place a shunt (low value resistor) in series with the motor. The voltage dropped by the resistor is proportional to motor current (see Ohm's law). Depending on the setup, amplification of the output may be necessary.

Use a current sensor .

groundFungus:
Some DC motor drivers have a current output. To help find one we need to know the rated voltage and stall current of your motor.

Place a shunt (low value resistor) in series with the motor. The voltage dropped by the resistor is proportional to motor current (see Ohm's law). Depending on the setup, amplification of the output may be necessary.

Use a current sensor .

thank you so much

please help to wire the dc motor with ACS712 current sense module, I know how to connect the ACS712 with power supply but I don't know how to connect the dc motor to the circuit, actually, I want to give the voltage to the dc motor and read the current with ACS712

What are you using to drive the motor? A transistor? Relay? H-bridge? Part number or link to the driver?

What is the stall current of your motor?

I want to give the periodic voltage to the dc motor

If you are talking about PWM, you may not be able to measure the pulsating current without heavy filtering.

groundFungus:
What are you using to drive the motor? A transistor? Relay? H-bridge? Part number or link to the driver?

What is the stall current of your motor?

I'm using L293D shield and the stall current is 11.96 A

outsider:
If you are talking about PWM, you may not be able to measure the pulsating current without heavy filtering.

yes I want to use PWM, "FILTERING" what did you mean?

koronus:
I'm using L293D shield and the stall current is 11.96 A

That's ten times the absolute maximum peak current that the L293D can handle.
Leo..

Wawa:
That's ten times the absolute maximum peak current that the L293D can handle.
Leo..

so what should I do?

so what should I do?

Get a proper motor driver.

Pololu carries many DC brushed motor drivers. Some have current sense outputs.

koronus:
hi
is there any way to measure the current of the dc motor, actually I want to give the periodic voltage to the dc motor and I need the periodic values of the current which flow in the motor

If you mean you are using PWM to drive the motor, you may find the current is varying much less
than you think, motors are inductive, smoothing out the current waveform.

MarkT:
If you mean you are using PWM to drive the motor, you may find the current is varying much less
than you think, motors are inductive, smoothing out the current waveform.

you mean that I could give the smaller values of the voltage and not the maximum range?

No, I don't mean that at all.

I mean the current is varying less than you might think if you thought it followed the voltage waveform.
You might not need to work about timing the reads to match the PWM.

MarkT:
No, I don't mean that at all.

I mean the current is varying less than you might think if you thought it followed the voltage waveform.
You might not need to work about timing the reads to match the PWM.

so is it possible to use this method for reading current values with the L293D shield and ACS712 30A and the 12V DC motor and the difference between the stall current and the maximum current of the motor driver isn't important? If yes, please help about the circuit (actually wiring)

The ACS712 30A current sensor will not be useful for measuring small currents (the L293D can only
handle small currents).

For small currents a simple shunt resistor in the ground-return from the motor driver is all you need
to measure current.

MarkT:
The ACS712 30A current sensor will not be useful for measuring small currents (the L293D can only
handle small currents).

For small currents a simple shunt resistor in the ground-return from the motor driver is all you need
to measure current.

ok thank you so much

and how much(ohms) must be the value of the resistor?

What current maximum? How much voltage do you mind losing? How much heat can you afford to dissipate?
From such considerations use Ohm's law to calculate the shunt resistor value that works for you.