Best way to abuse I/O port current spec?

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I want to drive the coils of a latching relay from an AVR. The spec on the relays is 45mA, nominal, during the switching pulse. These are dual-coil DPDT latching relays, so you pulse one coil to switch it to one state, pulse the other coil to switch to the other state, and in between pulses the relay mechanically latches so there is no current drain.

So... the handy AVR spec sheet says 20mA max per I/O pin guaranteed, "although they may drive more", and no more than 100mA for all ports together. I'm thinking I could abuse this specification thusly: tie two output pins together to get a low-impedance source of 40+ mA, and use the pair to drive a coil.

Of course, any software bug could toast the I/O drivers if it manages to put the output pins into two different states -- it would be nice to protect against that. I can't afford 0.6V drop for protection diodes, or the relays won't latch reliably.

Any better ideas out there?

-dave

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You could use diodes that drop about half that.

Which AVR? The Mega88 datasheet, for example, gives a chart of the mA typical. But if you can't afford the voltage drop, then you need to look at that chart--as mA go up, the V goes down.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Transistor T1 Uce sat is prox. 50mV, so it doesn,t really effect to voltage drop. Also this is more reliability setup then straight drive with the AVR pin.

EDIT: typo

Regards
heguli

Last Edited: Thu. Apr 19, 2007 - 12:20 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Lee,

The chip is a '325. The Voh is spec'ed for 4.5V at 20mA, and the relays are spec'ed for 4.5V, so that is why I think I am OK with parallelled output pins but not with a diode drop in addition.

Heguli,
I considered a driver transistor, but I am trying to cheap out :) Obviously, a driver solves my problem. But thanks for the reminder about the need for a snubber diode! I knew that... but it slipped my mind until you hit me across the forehead with a picture.

-dave

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Talking about snubber diodes: I would worry the two coils are somewhat magnetically coupled. Switching one coil might induce voltage in the second coil. This voltage added to the supply voltage would then probably violate maximum rating of the port pins driving the open coil. So are you sure this won't happen?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I am trying to cheap out
:D in that case... voltage drop in I/O pin is something like 1V and if the supply voltage is 5V, it leaves 4 volt to the coil.
Omron latching relay(nom. supply=4.5V) works with 70% which means that minimum working supply is 3.15V. It should work.
I don't know how it's going to affect the µC? Should these chips work on inductive load.

Check out Bingo's post:
Relays & Inductive loads
A neat little paper
https://www.avrfreaks.net/index.p...

Regards
heguli

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

heguli wrote:
Quote:
I am trying to cheap out
:D in that case... voltage drop in I/O pin is something like 1V and if the supply voltage is 5V, it leaves 4 volt to the coil. (...)

Drive the uC with 5.5V, it's still in-spec ;)

Embedded Dreams
One day, knowledge will replace money.