Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

l298 current measuring

Not open for further replies.


Newbie level 6
Jun 27, 2011
Reaction score
Trophy points
Activity points
i'm using l298 to drive my dc motor!
i want to measure sense pins current! how can i do so whit adc/avr?
i have used (rms) method but it wont give a specific number on lcd! it's not stable! and it has irregular changing
i want to use it for the time when motor draws a specific current , it turns off automaticly by microcont!


The L298 datasheet shows the current sense resistors and measuring points.
The values will depend on the load of your motor but typically are 0.25 or 0.5 ohms 2w to 5w.

You can read the developed voltage into your adc input, but as you already seem to have discovered the micro reads the voltage so fast it shows up all the 'noise' a dc motor develops.

You can either use a small cap, try 100nf upwards, from the sense output to ground to help smooth the voltage and / or use a software averaging routine after reading the adc voltage.

Any threshold cut off voltage/current will need to have a wide margin to avoid false triggering when the motor is running with its normal load.
will Shant resistor (as sense pin res) be usefull? for current measuring?
i 've added alot of cap in my circute! no more is needed! but i dont know!
how can i know that how much current is the motor drawing? whilst its working! whitout using ampremeter or multimeter! my project is that when the gripper , has done its work , it automaticly turns off ? just using an AVR Microcontroller & a l298 driver!

---------- Post added at 02:29 ---------- Previous post was at 02:24 ----------

the motor will close the gripper and when the gripper is closed , motor will kepp on presuring ! i want that when the motor is overcurrent ( due to the gripper is compeletly closed but motor is still on) the microcontroller will know that this , and turns the motor off


You should be able to use ohms law with the resistor value and the voltage developed to give you the current and so display it on your lcd, which you can also verify with a meter, though a digital meter reading might be like your micro, up and down quiet a lot.

However what the overload current of your dc motor is when the gripper is closed you will have to test and measure.
You will again need to build in a little averaging or repeat sampling to ensure it is a proper 'gripper closed' overload and not just an odd spike during normal run.

Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to