-2
\$\begingroup\$

I've been attempting to measure some stuff and trying to be careful about what I feed into my microcontrollers. I've had difficulty figuring out how to keep things within perfect limits, though.

For a project I'm working on currently, I drop down to nearly -1V for a short period of time (<1µS), but I might expect larger drops under some conditions.

This is the output of an op amp, so it's already buffered, and it does slightly better when I clamp it with a couple of zeners, but can still measure negative voltage where I don't want it.

(keep in mind, I'm a total noob, so many things I might be wrong about many things I'm saying)

\$\endgroup\$
  • 3
    \$\begingroup\$ Which microcontroller - all you need to do is read the datasheet under "Electrical Specifications" or similar \$\endgroup\$ – vicatcu Nov 27 '11 at 1:18
2
\$\begingroup\$

The limit will be given in the "Absolute Maximum Ratings" section of the datasheet for your uC. Exceeding the numbers in that section could damage the device, even if you only do so for a very short period of time. It's much preferable to stay within the limits given as normal operating conditions, also to be found in the datasheet for your IC.

A typical absolute maximum (minimum) rating is something like -0.3 or -0.7 V, unless the part is specially designed to withstand extreme over- and undervoltages. Often, a higher or lower voltage is acceptable, IF you can limit the current to some certain value, maybe 10 mA. You could do this current limiting with a series resistor. Again, the datasheet for your part will tell you if this is acceptable for your part.

But without knowing what part you are using, we can't say more than "read the datasheet for your part." And if you do tell us what part we're using, all we can do is help you find the right part of the datasheet to read.

\$\endgroup\$
  • \$\begingroup\$ Hmm... Looking at an Atmega 328, that sounds like -0.5V. I guess I need to work harder at shooing away the undervolts. \$\endgroup\$ – Dustin Nov 27 '11 at 1:21
  • 1
    \$\begingroup\$ Realistically, if you can get away with adding a series resistor of say 500 Ohm (to be really safe), you are unlikely to damage the part. If this is just for a one-off part, I'd go ahead and try that. If its for production, I'd contact an Atmel applications engineer and find out if they have a recommendation on a maximum current to maintain reliability in undervoltage conditions, and size my resistor according to their answer. Another option is to use a schottky diode with less than 0.5 V turn-on voltage as a protection device. \$\endgroup\$ – The Photon Nov 27 '11 at 1:52
  • \$\begingroup\$ I've tried applying a Schottky diode with the cathode on the output and the anode to ground (and the other way around since I'm doing a combination of reading the whole internet and guessing). I haven't seen much of an effect. \$\endgroup\$ – Dustin Nov 27 '11 at 2:02
3
\$\begingroup\$

I disagree with The Photon's reference to Absolute Maximum Ratings. "Absolute maximum" just screams "DON'T GO THERE!". Instead look at \$V_{IL}\$ (Input voltage, low) under DC characteristics. This will show you a range like -0.5V to 0.2 \$\times\$ \$V_{CC}\$ (for a typical AVR).

\$\endgroup\$
0
\$\begingroup\$

As mentioned around -0.3V is a common limit (or +0.3V for positive rail)
The datasheet will give specifics.

You could clamp the output of the opamp, but a better solution might be to remove the negative opamp supply (i.e use a positive supply for V+ and ground for V-) and level shift the signal.
This way no matter what the signal does the opamp cannot drive the input beyond it's limits (I'm assuming the opamp positive supply is the same as the uC, so it's can't go too high either)

\$\endgroup\$
  • \$\begingroup\$ I didn't draw it here, but the op amp has its Vcc and ground shared with the µC. That's what led to this question. \$\endgroup\$ – Dustin Nov 27 '11 at 5:05
  • \$\begingroup\$ @Dustin - it doesn't show the opamp supply voltages in the other question either though. What voltages are you using for the opamps V+ and V- ? (the power pins, not IN+ and IN-) The opamp output (generally) can't swing negative unless it has a negative supply or there is something pretty wrong with your circuit. \$\endgroup\$ – Oli Glaser Nov 27 '11 at 5:40
  • \$\begingroup\$ I've got a 5VDC power supply powering the op amp. The latest looks like this. \$\endgroup\$ – Dustin Nov 27 '11 at 6:12
  • \$\begingroup\$ I think the "RTFM" answer was a good pointer for this question and tells me that I have a problem, but my other question, though perhaps poorly phrased is more complete and hopefully taking me towards understanding how to solve or prevent my real problem. \$\endgroup\$ – Dustin Nov 27 '11 at 6:34

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.