Limiting current for 5V 1.5A motor - Page 1
Forum section: electronics / beginners

author: mribble
author_rank: Regular Contributor
timestamp: October 01, 2020, 05:34:04 pm
content: The attached circuit I use to drive a small brushed motor. It uses uses a 555 timer with a potentiometer to control the PWM signal. A 3pdt switch toggles motor direction. And an n channel mosfet drives the motor.I want to add a current limiting circuit to this. The power supply is only 5V and I want to limit the circuit to 1.5A. I found some circuits on Wikipedia, but they depend on resistor inline with the load large enough to trigger a transistor (around 0.6V), which is a lot for a 5V circuit.https://en.wikipedia.org/wiki/Current_limiting#:~:text=Current%20limiting%20is%20the%20practice,similar%20problem%20in%20the%20load.Does anyone have a suggestion for a simple circuit that would limit current with a smaller drop in voltage? I was thinking if I used that comparator then I could use one with a small sense resistor that only had around a 0.1V drop and compare that to 0.1V. Then compare add an 'and' gate for that output and the current signal I use to drive the mosfet. Only when both of those signals are high would I drive the mosfet.I'm not sure if this would work.Some specific questions I have are:1) Here is the comparator I'm using. Where in the data sheet do I look to see how sensitive it is (to see if my 0.1V idea will work)?https://www.ti.com/lit/ds/symlink/lm393.pdf?HQS=TI-null-null-mousermode-df-pf-null-wwe&ts=1601573180098&ref_url=https%253A%252F%252Fwww.mouser.com%252F2) This will result in mosfet turning on/off rapidly. I'm not sure if that will work or not. Ideally you just want it to stay off. Maybe I should add something that makes it stay off for a long time (say 0.1 seconds). Is there a best way do to something like that, or is there some better solution here?If you have better ways of doing this please let me know. Thanks in advance!

author: Doctorandus_P
author_rank: Super Contributor
timestamp: October 01, 2020, 09:50:40 pm
content: Well,you've got a LM393 left over.There are some limitations, but if you add an pull up resistor to it's output, you can mostly use it like a regular opamp, then lower the total voltage drop over your shunt resistor and use your "opamp" to amplify the voltage drop again.But the easiest way is to just use the comparator as a comparator.So make a reference voltage of around 100mV, and compare that with the voltage over the shunt resistor.A higher voltage drop over the shunt resistor sacrifices efficiency.A lower voltage drop over your shunt resistors will get you into other sorts of trouble, but it is good to experiment with it and learn from it.Problems that get increasingly more troublesome with low voltages over the shunt are the voltage drop added by the resistance of the copper tracks (use 4 point measurement), and the offset voltage of the opamp or comparator. Another potential problem is the "loop area" of the sense lines. The track of the motor current generates a magnetic field, and this field is picked up by the "loop area" between the sense lines.I had a peek at the datasheet, and was pleasantly surprised that the LM393 has a maximum offset voltage of 2mV (@25c) and 4mV over the full temperature range. Quite good for such an old part.[Edit:]I looked at a (very) old datasheet from Philips. Your datasheet from TI mentions offset voltages of up to 9mV.This confirms that around 100mV over your shunt resistor is a good goal. Low enough to not be a power hog, and high enough to give the comparator something to actually measure. This should indeed work.An important rating for you is in chapter 6.3 "Recommended Operating Conditions", and then look at: "Input voltage range,VIVR" It lists the voltage for the inputs from a minimum of 0V (Or -100mV for the "B" version) to a maximum of 2V lower then the supply voltage.So yes. This should work. Some PCB layout guidelines:Use a resistor with a 100mV voltage drop, and then tie the low end of that resistor to the same point as the low end of the shunt resistor. This ensures they low ends of both are at the same potential.If you've got a relatively stable voltage available, then a simple resistor to set the current through your 100mV reference resistor is enough. If it's not, then use some way to stabilze it. For example, a real current source from two transistors, or make 600mV from a resistor and diode, and two resistors to divide the 600mV further to 100mV. It does not have to be very accurate.Keep the wires between the "hot" ends of the sense resistor and the shunt resistor and the comparator short, and also route them close to each other to minimize inductive voltage pickup from the motor current.Maybe you want to add a RC time constant between the shunt resistor and the comparator input to filter out short current spikes. But be careful, as this may caouse more harm than it helps. High input impedance's to comparators may introduce oscillations because of shifting offset voltages when the comparator switches.GND planes are always good to have on a PCB...But most of all:Don't just follow advise. Design and build your own circuit, and tinker until it works.Making mistakes are good learning experiences.

author: mribble
author_rank: Regular Contributor
timestamp: October 02, 2020, 02:09:42 pm
content: Thanks Doctor! This was super helpful and I will use this information to build a new pcb that I can start experimenting with.

author: David Hess
author_rank: Super Contributor
timestamp: October 03, 2020, 04:22:15 am
content: Quote from: mribble on October 01, 2020, 05:34:04 pmThe common method is to use a differential pair instead of a single transistor which compensates for the 0.6 volt base-emitter voltage of the sensing transistor, and this is the first stage of a comparator or operational amplifier.