over current protection

Your source for all things Atmel.
Locked
wireless102
Posts: 3
Joined: Mon Jul 03, 2006 7:45 pm

over current protection

Post by wireless102 » Mon Jul 03, 2006 7:51 pm

hello all,

i am working on a project that uses an avr and 74hct573 to activate a couple of relays. the motor that is activated on these relays will have a spike in current and level out at about 2 amps. what would be the best way to stop the motor if current goes over 2.5 - 3 amps. i have wrote all the code with bascom avr and everything works great just need a way to stop this thing if the current goes to high.

it is basically a protection if something is in the way of the part that is moving if the optical sensors dont see it

thanks

wiml
Posts: 473
Joined: Tue Feb 08, 2005 11:45 pm
Location: Seattle, WA, USA
Contact:

Post by wiml » Mon Jul 03, 2006 8:32 pm

you could do this in hardware with a "slow-blow" fuse or a self-resetting "polyfuse" (I think polyfuse is a trademark, there are many makers). In software, you could put a (small) series resistance on the return line, and measure the voltage drop across it with an ADC input. If it's above a threshold for more than a certain number of consecutive samples, shut off the motor.

If this is a safety issue (device might catch fire, or crush somebody, etc.) I'd go with the fuse...

wireless102
Posts: 3
Joined: Mon Jul 03, 2006 7:45 pm

Post by wireless102 » Mon Jul 03, 2006 9:13 pm

if it hits something i want it to stop and backup so the fuse probably wouldnt work but the voltage drop method

thanks

wireless102
Posts: 3
Joined: Mon Jul 03, 2006 7:45 pm

Post by wireless102 » Mon Jul 03, 2006 10:45 pm

hi wiml,

do you have a link to some sample code for doing this?

i was using 8515's for the project but will move to the atmega for the adc inputs

wiml
Posts: 473
Joined: Tue Feb 08, 2005 11:45 pm
Location: Seattle, WA, USA
Contact:

Post by wiml » Tue Jul 04, 2006 12:10 am

does the 8515 have a comparator input? you could use that instead of an ADC since all you really want to know is whether the voltage is higher than a certain value. you'd need some way to generate a reference voltage for the comparator's other input ... maybe something as simple as a trimpot would work?

I don't have any sample code, I'm really just thinking out loud here :)

Locked

Return to “Code”