0
\$\begingroup\$

Using an AtTiny85, I'd like to drive an AlfaZeta C30NR flip-disc component to indicate dead batteries for a small project. It is a semi-permanent electromechanical indicator that uses two pins, SET and RESET, and depending on the direction of a current pulse, the state of the component toggles.

In order to accomplish bidirectional current, I could connect an output pin to SET, and another output pin to RESET, allowing current to be tugged in either direction by the microcontroller. It doesn't seem that there would be issues, as the voltage going between the pins would not exceed their specs, and outputting high on both would have a net 0 effect.

In this particular case, it is obviously a poor idea as the current draw required by the component is 250mA where the absolute maximum per I/O pin is 40mA. It actually doesn't seem possible here, as a current divider between the sink output and ground would require a resistor (preventing one output from driving the component with the minimum current while protecting the other), but I'm more interested in the theoretical aspects.

What drawbacks would there be to this configuration? What alternatives would be better design?

Naturally, one option is the C30ND, which uses a common ground for either input pin. I imagine another is to use transistors to convert the outputs into open collectors.

Schematic

Flipdisc Circuit

A pulse from PB2 turns the indicator on. A pulse from PB1 turns it off. The pulse must be [email protected] for 1.5ms, but PB2 and PB1 can only receive 40mA. Adding parallel ground, and a resistor on PB1 means that PB2 can safely use a 250mA current, but then PB1 cannot give 250mA of current (it is limited by a resistor and a direct path to ground).

\$\endgroup\$
7
  • 2
    \$\begingroup\$ What you have described is output pin contention and it is not a good idea to do it. electronics.stackexchange.com/questions/21351/…. That said, a simple gating arrangement may do what you need. \$\endgroup\$ Jul 7, 2016 at 11:24
  • \$\begingroup\$ You lost me at "a current divider between the sink output and ground would require a resistor". Also, what you mean by "tug of war" is not quite clear (but I'm not a native English speaker). Can you clarify? \$\endgroup\$
    – dim
    Jul 7, 2016 at 11:27
  • \$\begingroup\$ @dim A current divider is a circuit that uses resistors to control current in parallel connections. Connecting 250mA to an output pin & ground, but only letting 20mA into the output pin means that the output pin cannot put [email protected] in the opposite direction. So then the output pin can be a sink (ground), but not a source (5V logic). \$\endgroup\$
    – Aaron3468
    Jul 7, 2016 at 11:39
  • 1
    \$\begingroup\$ @dim, tug of war's the game where two teams pull on either end of a rope until one pulls the other over a centreline between them. Here the OP means the stronger of the two drivers overrides the weaker. \$\endgroup\$
    – TonyM
    Jul 7, 2016 at 11:41
  • 5
    \$\begingroup\$ Classical solution: H-bridge \$\endgroup\$
    – JimmyB
    Jul 7, 2016 at 12:17

1 Answer 1

0
\$\begingroup\$

There is no problem with your approach if you have a suitable load between the output pins. I have driven small transformers in this manner.

@Aaron has already pointed out that the load is too big for the processor to drive directly. He also asked for alternatives. I would suggest a couple of MOSFET gate drivers or a dual driver. They come in small packages and one ampere is not uncommon.

\$\endgroup\$
4
  • \$\begingroup\$ obviously the load is not suitable: 250mA required @ 40mA capability \$\endgroup\$
    – Curd
    Jul 7, 2016 at 13:44
  • \$\begingroup\$ @Curd, that's not the point John's making. He was validating the principle for similar applications. That is obvious. \$\endgroup\$
    – TonyM
    Jul 7, 2016 at 20:24
  • \$\begingroup\$ @Aaron has already pointed out that the load is too big for the processor to drive directly. He also asked for alternatives. I would suggest a couple of MOSFET gate drivers or a dual driver. They come in small packages and one amp is not uncommon. \$\endgroup\$ Jul 7, 2016 at 21:11
  • \$\begingroup\$ Thanks John, those definitely point me in the right direction. I also appreciate that you brought some experience to the table for similar, less demanding situations. It seems this is the best answer, so feel free to give it a quick edit to include this further information/format as you please. I'll choose it soon. Thanks to everybody else for your insights in the comments :) \$\endgroup\$
    – Aaron3468
    Jul 7, 2016 at 21:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.