0
\$\begingroup\$

I am currently prototyping a custom intravenous medication delivery system. An AtTiny85 microcontroller is being used to control two L293D drivers, with 4 pins programmed to send a pulse train to both drivers and an additional pin being used to enable/disable each driver by way of an NPN/PNP logic system.

This leaves no remaining pins on my setup (the AtTiny85 is built into a 5V Trinket). I need to be able to externally control when this program is executed, and I have been doing so by shorting the Rst pin to ground, thus calling the setup() routine in which my algorithm is nested.

This is where problems arise: I have attempted to short to ground the following circuit, from which external feedback is provided from an NI I/O device:

schematic

simulate this circuit – Schematic created using CircuitLab

However I have found this method to be unreliable - a 150 ms NI TTL pulse properly forces a reset on the AtTiny85 about 75% of the time, yielding the proper series of events. A proper reset fails to occur about 25% of the time, indicated by the lack of red light on the unit. Suggestions?

\$\endgroup\$
  • \$\begingroup\$ NI= National Instruments? \$\endgroup\$ – JRE Dec 22 '17 at 12:15
  • 4
    \$\begingroup\$ What are you using for the power supply? How are the grounds connected between the "Trinket" and the "NI"? I have to say, you don't seem like the sort of person who is ready to develop medical devices... \$\endgroup\$ – Dave Tweed Dec 22 '17 at 12:31
  • \$\begingroup\$ @JRE Yes, National Instruments. \$\endgroup\$ – David Dec 22 '17 at 12:46
  • \$\begingroup\$ @DaveTweed It's an experimental medical device that is not going to be placed on the market. We obviously wouldn't be using "Trinkets" and "NI devices" in our final product. This should be evidenced by the fact that we are using a standalone I/O device for this work. \$\endgroup\$ – David Dec 22 '17 at 12:49
  • \$\begingroup\$ OK, but are you going to answer my questions? \$\endgroup\$ – Dave Tweed Dec 22 '17 at 12:51
2
\$\begingroup\$

333 Ω base resistor!?

I haven't really read all the rest of the question, but that's ridiculous for what you are trying to do. The transistor is driving a 10 kΩ load, which is reasonable. Even with a 10 kΩ base resistor you're barely asking the transistor for any gain.

Change R2 to 10 kΩ and see what happens. This may have nothing to do with your symptom, but it should be fixed anyway. You haven't specified what this "NI" thing is (did you get that from Monty Python?), but maybe it isn't reacting well when one of its outputs is held low by 333 Ω to a 700 mV source.

\$\endgroup\$
  • \$\begingroup\$ It had no effect. I tried 1 k, 2.2 k but not 10k. I will give that a try! \$\endgroup\$ – David Dec 22 '17 at 12:52
  • \$\begingroup\$ @Dav: Like I said, this may have nothing to do with the symptom you are asking about. It was something that jumped out at me from your schematic, and that should be fixed regardless, though. \$\endgroup\$ – Olin Lathrop Dec 22 '17 at 13:31
  • \$\begingroup\$ I put in a 14.7 k and it seems my issue is solved, for now. So it appears it was a simple gain issue. \$\endgroup\$ – David Dec 22 '17 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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