Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Dc motor stall state, Over-current protection

Status
Not open for further replies.

Mnik1

New Member
Hello everybody, this is my first post, until now I was quiet follower of this forum ;)
I’m working on a project where I need to use brush dc motor (3v) battery operated to turn CW/CCW by ~80 degree until it hits mechanical limit and motor get stall. Limit switches are not a option, I have to limit over-current, motor have to switch off upon it get stall and reach 120mA for 0.1ms.
What I need is simple driver IC that can do the job, controlled by appropriate PIC microcontroller.
Motor should run wirelessly via 2 buttons remote, one for CW, one for CCW, so IC driver/PIC will be connected with signals from RF receiver. I was searching for driver IC for hours and hours and come up to this one, it seems to be good for purpose: LB1843V. I also come up to this https://www.romanblack.com/current.htm circuit which look perfect but it is for one direction of rotation?

My electronic experience is pretty basic(not my field) and I need to somehow figure this out, so if anyone have suggestion/circuit diagram,design etc. Also it needs to fit on small space. IF you ppl can help me I will be thankful for eternity! Best regards
 
I have done something similar for controlling curtains. It just detected overcurrent by comparing the voltage drop across a low value resistor in series with the motor supply with a reference voltage. This was controlling two motors for opening and closing curtains. This is the schematic for the unit.
CurtainSch.PNG


If you need to time that the overcurrent has occurred for 0.1 mS then you would have to measure the time with software in the micro controller. You would have to remove the capacitor from the comparator input for your requirements. (I fitted it to prevent the starting current of the motor from giving an indication of overcurrent.) I did not need to measure the time of the overcurrent precisely in my application. An alternative way would be to use the ADC in the micro controller to monitor the voltage across the current sense resistor.

Les.
 
Thanx for answer and suggestion. I studied your schematics(with my limited knowledge) and read datasheet of LM339.
So for my project, I suppose i need to connect out1,out2 of pic, to h-bridge(alegro A3901, A3903 ..) and h-bridge IC to LM339, next back to PIC to read values?
Also what is need is that, when button on remote is pressed for short period(lets say 1 sec), rotation of motor continue (which last ~3sec) until it get stall. I suppose its done by pic program,time, right?
I'm sorry if I'm looking for a lot, but can you help me with this, some quick schmetacis in paint or so will do. Input is 3,6v battery, motor is 3v 60mA geared. Pic programming comes in the end, its not important for now as im finishing enclosure(solidworks) to match with electronic.Thanx in advance!
 
I have done something similar for controlling curtains. It just detected overcurrent by comparing the voltage drop across a low value resistor in series with the motor supply with a reference voltage. This was controlling two motors for opening and closing curtains. This is the schematic for the unit.
View attachment 98995

If you need to time that the overcurrent has occurred for 0.1 mS then you would have to measure the time with software in the micro controller. You would have to remove the capacitor from the comparator input for your requirements. (I fitted it to prevent the starting current of the motor from giving an indication of overcurrent.) I did not need to measure the time of the overcurrent precisely in my application. An alternative way would be to use the ADC in the micro controller to monitor the voltage across the current sense resistor.

Les.

Electric curtains- now that's what I call decadence. You will be telling us next that you have got an electric starter on your car. :p

spec
 
Last edited:
Hi Mnik1,
The LM339 is a quad comparator. You will only need one comparator (I only needed a dual comparator but I had the LM339 in stock so I used that.) I would suggest an LM393 (Dual comparator.) These comparators are open collector so you need to use a pull up resistor. I configured the pic to use it's internal pull ups which is why you don't see any on my circuit. I would suggest using a more modern PIC. The one I used was old when I built the unit about 10 years but I had it in stock. In my circuit the pair of single pole changeover relays effectively for an H bridge. I think the difficult part of your requirement is the need to detect the motor stall in 0.1 mS. You will need to think of a way to prevent the motor starting current from triggering the comparator. Is there one or two buttons to control it ? If it wasn't for the 0.1mS timing requirement then I think I would build it without using a PIC. Can you disclose the function of the item you are building in case this influences design decisions ?

Hi spec,
I built the unit for when we go on holiday. I was lazy. It is just plugged into a plug in timer which powers the unit for 2 minutes in the morning and 2 minutes in the evening. It sets or resets a bit in eeprom so it knows weather to open or close when it is powered up. (If there was a power cut when it was due to open or close it would get out of step and close during the day and open at night.)

Les
 
There is some change, i need 100mA stall current, no requirements on time untill motor stop, so its flexible. There is two buttons, one for CW,one for CCW. Its a lock mechanism, forgot to mention. How to go without pic, what is your recomendation? I need something simple, for my level of knowledge :) Respec man for answer and advice. Cheers!
 
I assume you require the stall current to be cut off to avoid overheating. If that is the reason, then why not measure the normal (not stalled) current that the motor draws and use a constant current source with a change over relay to reverse direction. This is not a good suggestion if you are relying on batteries.

Mike.
 
You can use something like the latching relay used for automotive power windows with current sensing or a fold-back current limiter common to some voltage regulators.

Are you using a SPDT with center-off?
 
Hi Mnik1,
I think this circuit should do what you want. It uses 2 3 volt DPDT relays such as these.


Motor_control01.jpg

This is how it works. When the push switch is pressed it provides a current pulse to close the relay. This also provides power to the comparator via one of the 2 diodes. As the current will be below the stall current the output of the comparator will be low turning on the PNP transistor . The relay latches on via the transistor and one of it's NO contacts. When the motor stalls it causes the comparator output to go high turning off the transistor. This causes the relay to drop out. One thing I have just noticed is that the reference voltage potential divider will still be taking current when no relay is actuated. It would be better to supply the reference voltage from pin 8 of the comparator via a resistor and zener diode or precision voltage reference IC

Edit.
I have noticed an error in the circuit. The NO contacts of the set of contacts on the relay that drive the motor should be connected to the + 3 volt supply line.

Les.
 
Last edited:
Tnx Les for your effort, you really cleared me much of things! This looks good but relays need much curent, and its not that easy for me to build as i thought.
I come up to most simple solution, without need for over curent protection. I calculated time need for geared motor turn 60deg, and its ~0.5sec. So the simples solution will be, H bridge IC with curent limit to 100ma, to drive motor in duration of ~1sec. So when it get stall, it will be only for ~0.5sec. Is that good idea? Suppose that hbridge ic and pic to control (time duration) will be enough? I have mechanical solution for posible problems, so everything will fit and motor operation will be smooth. Best regards!
 
If it operates every 10 seconds then a bad idea. It it operates every 3 minutes then problem solved.

Mike.
 
60° in 0.5 seconds? That is very fast. It must be a very low load. Can you give us a clue?

Mike.
 
Actually it takes 2 second to move 60 degree, sorry i was in a hurry, bad calc! It locks/unlocks, without special time between, so lets say minimum ~15 min before next operation.
 
How hard on the gears is slamming into the end stop?
Do you prefer active breaking when end stop occurs...err Freudian slip, I mean braking...

Start current and stop current will be the same peak, but stop current does not decay, so the time it takes to get in motion would be the shortest time one can an choose by current sensing to shutoff, which could be be < 100ms.

This can be achieved with logic to break under any desired condition.

E.g. Locked rotor for 100ms then stop with 0V across motor or alternatively floating ( with inertial force duration extended on gears ) . This can also be accomplished without end stops simply using optical interrupters and a magnetic brake (0V across active bridge ) and thus no locked rotor gear stress on moving rotor. It also extends battery life reducing this duration., which may be of particular importance.

I recommend the DRV8837 , which I recall is an 8 pin SOIC with some switch logic and a current sense Reset using a 50mV current sense R during locked rotor and comparator to stop bridge. IN1=IN2=0 . cost=$1.38 ea.
  • 280 mΩ

The board would occupy less area than the side of 1 LiPo cell with a connector.

Do you want each switch to function when both depressed? Just in case...
Do you prefer when either 1st button depressed or when either button is released?

This affects the logic interface to IN1,IN2 used for Either CW and CCW which are active low inputs.

https://www.digikey.com/product-detail/en/texas-instruments/DRV8838DSGR/296-40081-1-ND/5177958

Also did you want fault detection indicators? Overtemp, under voltage? SOC indication?

Also what is the motor coil resistance? ~1 ohm? 3 Ohm's? RdsOn will affect speed and. Current.
Is speed important?
 
Last edited:
For more clear view what i want, let me explain in details.
Im pretty wiser of all your help,advices, but still confused as im not that much familiar with electronics, particulary this field.
There is many posible way of controlling motor via battery (long life is in need), I can also go with limit switches(really small ones, D3SK) i made a quick sw example, attached, to show you what i mean. In case of over-current limit, instead of limit sw, there is 'groove' in motor housing for limiting movement.
Motor is rated 3v 60mA (no load).
As for rf button function: key1 - cw , key2 - cc2, when both pressed nothing, just normal operation, u know what i mean.
Thanx guys
 

Attachments

  • example.bmp
    1.1 MB · Views: 472
Let me be clear . if you cannot understand my questions and answer them, I cannot help you.
 
Mnik1,
You need to answer Tony's questions so he can help you with the design of the H bridge circuit. (The picture of the motor had nothing to do with the questions asked. ) One way to avoid having to think about how you want it to behave if both buttons are pressed would be to use a three position toggle switch with a centre biased off position.
You are right that the relay solution would take more current (About 50 mA) than an H bridge. As my impression was that you had a limited knowledge of electronics I thought that you would find it easier to understand relays than an H bridge.
Another way to use limit switches would be to have the motor body mounted so it could rotate slightly. it would be retained at the centre of its travel by two springs. When the lock reached it's limit of travel there would be more force on the springs so the motor body would rotate slightly one way or the other. this movement could operate limit switches.

Les.
 
Last edited:
How hard on the gears is slamming into the end stop?
Do you prefer active breaking when end stop occurs...err Freudian slip, I mean braking...

Start current and stop current will be the same peak, but stop current does not decay, so the time it takes to get in motion would be the shortest time one can an choose by current sensing to shutoff, which could be be < 100ms.

This can be achieved with logic to break under any desired condition.

E.g. Locked rotor for 100ms then stop with 0V across motor or alternatively floating ( with inertial force duration extended on gears ) . This can also be accomplished without end stops simply using optical interrupters and a magnetic brake (0V across active bridge ) and thus no locked rotor gear stress on moving rotor. It also extends battery life reducing this duration., which may be of particular importance.

I recommend the DRV8837 , which I recall is an 8 pin SOIC with some switch logic and a current sense Reset using a 50mV current sense R during locked rotor and comparator to stop bridge. IN1=IN2=0 . cost=$1.38 ea.
  • 280 mΩ

The board would occupy less area than the side of 1 LiPo cell with a connector.

Do you want each switch to function when both depressed? Just in case...
Do you prefer when either 1st button depressed or when either button is released?

This affects the logic interface to IN1,IN2 used for Either CW and CCW which are active low inputs.

https://www.digikey.com/product-detail/en/texas-instruments/DRV8838DSGR/296-40081-1-ND/5177958

Also did you want fault detection indicators? Overtemp, under voltage? SOC indication?

Also what is the motor coil resistance? ~1 ohm? 3 Ohm's? RdsOn will affect speed and. Current.
Is speed important?

Initial idea was, I want 0 v across motor when phisical stop occurs, when current go up to 100mA for ~100ms or so. Start current is also of importance, so if i understand correcly, it takes a little more time, lets say ~200ms on same current peak to start motor? I will study DRV8837 datasheet, so far it looks as good solutuion, with coresponding pic or so.
Les, you'r solution looks promising and i took it in consideration.
Sorry guys for my level, I'm giving my best and try hard :)
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top