0
\$\begingroup\$

I m trying to trigger an Arduino Mega interrupt pin from a 3.3V sensor.

This voltage doesn't seem to be enough, since Arduino recognizes the interrupt only when I move the wire (probably since it causes the voltage to spike).

Can I use a transistor or any other solution to send 5V to the interrupt from a 3.3V source?

asked Jul 14, 2013 at 23:04
\$\endgroup\$

3 Answers 3

9
\$\begingroup\$

Can be done with a simple transistor and two resistors. When the 3.3v pin is pulled high, the arduino's interupt pin is pulled low.

schematic

simulate this circuit – Schematic created using CircuitLab

answered Jul 14, 2013 at 23:27
\$\endgroup\$
4
\$\begingroup\$

In addition to the discrete circuits the other answers have shown, you can use a integrated inverter or gate. (more useful if you have spare gates in your circuit already, or for a higher speed circuit).

You'll need to use one of the 74 series that has TTL level inputs, but is CMOS based, so that it has CMOS level outputs. These types generally have a 'T' in the type number, eg. 74HCTxx, 74ACTxx. When running on a 5V supply, they will accept anything over 2V as a high input, and output a near 5V signal... Making them quite handy for interfacing 3V logic to 5V logic.

For an inverter, something like 74HCT14 is nice, as it has a Schmitt trigger input and will tolerate more noise (especially nice when your interrupt is something mechanical, or in high noise environment with long cable).

Most any gate will work if it doesn't need to be cleaned up, though. A non inverting type (buffer, AND or OR gate with inputs tied together, etc) works fine too, and won't invert your signal if you prefer this. There are also single gates available now, but only in SMT it seems. 74HCT1G14 is a single gate variant of 74HCT14, for example. These are handy for translating a single line between logic types, or debouncing a single mechanical input, if you have no spare gates in the circuit.

answered Jul 15, 2013 at 1:06
\$\endgroup\$
2
\$\begingroup\$

It can be done with a 2N7000 and a few resistors.

enter image description here

answered Jul 14, 2013 at 23:07
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.