Resetting Arduino from 3.3V Source

Hi, I have Adafruit Feather Huzzah that I use to communicate with Arduino from Serial ports by using Blynk.

I want to add feature to reset Arduino from Huzzah. As Huzzah is 3.3V device I decided to use transistor for this purpose. However I'm not good at transistors and it resets even when I got 0V from Huzzah.

I used PN2222A transistor as it is the only one I have on hand right now.

Please check attached drawing. When I send 0V to base through 10k resistor, I expect Arduino to do nothing. When I send 3.3V to base through 10k resistor, I expect Arduino to reset.

However Arduino is resetted even when Base voltage is 0V. During this, I measured the collector voltage and saw 0.6V But I was expecting that at this instant collector and emittor to be open circuit and collector voltage to be 5V.

What am I missing? I appreciate your support.

Untitled.jpg

photo won't open

I've changed the photo format, can you check it again from my first post?

OP's Photo:

Untitled.jpg

Yup! That should work. In fact, I would try it without RC. The Arduino UNO already has a 10k pull-up resistor on that pin.

So, here's a list of what might be going wrong:

  • The transistor is bad.
  • You have the transistor connected incorrectly.
  • The Transistor is not really an NPN, but is a PNP.
  • It's not really a BiPolar Transistor [like maybe it's a MOSFET with a gate threshold voltage higher than 3.3V, or an SCR, or something else -- the CL520N current regulator looks like a TO92 transistor, for instance, as does a 78L05 voltage regulator ;)].
  • You have 5V connected incorrectly.
  • You don't actually have a connection between Ground on the Huzzah, Ground on the Arduino, and the Transistor's Emitter.
  • The "3.3V Output" is not really reaching a high enough voltage to turn the transistor on.
  • RB is not really 10K, but is some insanely high value, like 10Meg, or something.
  • There's an open circuit, or short, somewhere. If you're doing this on a breadboard, they are notorious for bad contact opens. Try wiggling the wires.
  • Hmmm...what did I not think of...?

You don't say which transistor you are using but .6V on the base may turn it on enough to pull the RST pin below 2.5V. Try a 10K pulldown resistor from the Base to ground (0V) and a smaller base resistor, 3K3 or 4K7.

The transistor is an analog device- I would use a Mosfet which acts more like a switch. Here is an excellent tutorial on using Mosfets with the Arduino.

Guys, re read op's problem description. It is resetting (transistor on) when 0v is applied to base, not refusing to reset the 5v device when a voltage is applied to base.

6, 7, and 8 would produce the opposite symptom, as would a mosfet that wasnt turning on, unless 6 was also the case. 7 also cannot be the case if it is an NPN.

Dollars to donuts, its 1 or 2. Maybe 3.

It's really easy to get the pins wrong on a transistor, the pinout is not standard. If base and collector were swapped, it would produce the behavior you describe. I have worked with datasheet that do a truly terrible job of communicating the pinout. Bad transistors also often fail to "always on"

ReverseEMF:
OP's Photo:

Untitled.jpg

Yup! That should work. In fact, I would try it without RC. The Arduino UNO already has a 10k pull-up resistor on that pin.

So, here's a list of what might be going wrong:

  • The transistor is bad.
  • You have the transistor connected incorrectly.
  • The Transistor is not really an NPN, but is a PNP.
  • It's not really a BiPolar Transistor [like maybe it's a MOSFET with a gate threshold voltage higher than 3.3V, or an SCR, or something else -- the CL520N current regulator looks like a TO92 transistor, for instance, as does a 78L05 voltage regulator ;)].
  • You have 5V connected incorrectly.
  • You don't actually have a connection between Ground on the Huzzah, Ground on the Arduino, and the Transistor's Emitter.
  • The "3.3V Output" is not really reaching a high enough voltage to turn the transistor on.
  • RB is not really 10K, but is some insanely high value, like 10Meg, or something.
  • There's an open circuit, or short, somewhere. If you're doing this on a breadboard, they are notorious for bad contact opens. Try wiggling the wires.
  • Hmmm...what did I not think of...?

Transistor is new, looks like undamaged, I dont believe it is damaged.

I connected transistor based on below datasheet. It is an npn transistor.http://users.ece.utexas.edu/~valvano/Datasheets/PN2222-D.pdf

Huzzah and Arduino grounds are connected. Both resistor values are correct, measured via multimeter and confirmed.

gunaygurer:
Transistor is new, looks like undamaged, I dont believe it is damaged.

A Transistor can be bad, and look just fine. Also, are you sure you have the pins in the right places. Not all Transistor pin-outs are the same.

DrAzzy:
Guys, re read op's problem description. It is resetting (transistor on) when 0v is applied to base, not refusing to reset the 5v device when a voltage is applied to base.

gunaygurer:
When I send 0V to base through 10k resistor, I expect Arduino to do nothing. When I send 3.3V to base through 10k resistor, I expect Arduino to reset.

Yup. A LOW to the Base of the transistor, should turn it off, thus open the EC junction, and allow the internal Reset Pull-up resistor to keep the Arduino running. A HIGH on the Base should turn the transistor on, pull the Reset pin low, and Reset the Arduino. So, DrAzzy, I think you're reversed :wink:

ReverseEMF:
Yup. A LOW to the Base of the transistor, should turn it off, thus open the EC junction, and allow the internal Reset Pull-up resistor to keep the Arduino running. A HIGH on the Base should turn the transistor on, pull the Reset pin low, and Reset the Arduino. So, DrAzzy, I think you're reversed :wink:

Huh? That's what I'm saying too.

Two of the other responses seem to be talking about possible problems which would cause the arduino to not be reset, even if a voltage was applied to base, ie, they are suggesting solutions to a problem that is not the one that the OP has.

I wasnt saying the OP was confused on this - his expectations are correct. I'm saying that the other people trying to help seem to be confused.

Something is wrong with his wiring or the transistor is bad. I think wrong pinout is most likely the cause here.

However Arduino is resetted even when Base voltage is 0V. During this, I measured the collector voltage and saw 0.6V But I was expecting that at this instant collector and emittor to be open circuit and collector voltage to be 5V.

This is impossible.
Post a photo of a DMM measuring the INPUT to the BASE resistor (showing what you CLAIM) is 0V and
a photo of the same measurement of the BASE of the transistor. (where you CLAIM you read 0.6V)

If one statement is true the other must be false. You can't have 0.6V on the base if the base resistor
input is 0V.

Point being, basic physics/Electronics 101. If the base resistor has 0V on an NPN , the BASE CANNOT
read 0.6V !

Do you have a 10k PULLUP on the RESET pin AND a 1uF cap ?

I used PN2222A transistor as it is the only one I have on hand right now.

FYI , that transistor is NOT EBC (LEFT to RIGHT) looking at the flat face of the transistor,
it is CBE. (the reverse)
whereas the 2N2222A is EBC (L to R)

How do we know you know you wired it correctly if there are no pin numbers in your schematic ?

raschemmel:
This is impossible.
If one statement is true the other must be false. You can't have 0.6V on the base if the base resistor
input is 0V.

Uh, where did he say 0.6v at the base? All I'm seeing is 0.6v at the collector. Which happens to be the spec'ed minimum V(BEsat). So if what he thinks is is the collector and connected to the reset pin was actually the base, it's doing exactly what one would expect (and he'd find that if he put 3.3v on one side of the "base" resistor, the other side would still be very close to 0v)

My father (a retired career electrical engineer who's very comfortable with BJTs (I started doing electronics when MOSFETs had largely displaced BJTs for typical hobby applications) and I both looked at the datasheet and agree that if the transistor is working, you have the base connected to reset and the collector connected via the 10k resistor to the 3.3v microcontroller.

If collector and emitter are reversed, it would "work", but just be a crappy transistor with low beta, and might even still work in that circuit (according to my father - I don't personally have the confidence to assert this on my own, as I hardly ever use BJTs)

Dr. Azzy,

I think the confusion (if there is any) is not about what the transistor should be doing, since that
is common knowledge and well documented, but rather what the OP is actually trying to say.
So far we are getting bits and pieces but no comprehensive list of measurements (even without
photos) of all the relevant points in the circuit. You say the transistor is doing what it is supposed
to but obviously that is only true if the input to the base resistor is 3.3V and the OP has clearly
stated the problem occurs when there is 0V going to the transistor, (at which time the collector
voltage should be 5V, not 0.6V)

Please check attached drawing. When I send 0V to base through 10k resistor, I expect Arduino to do nothing. When I send 3.3V to base through 10k resistor, I expect Arduino to reset.

However Arduino is resetted even when Base voltage is 0V. During this, I measured the collector voltage and saw 0.6V But I was expecting that at this instant collector and emittor to be open circuit and collector voltage to be 5V.

What I am reading is the OP saying he reads 0.6V on the collector with 0V on the base, which , again is
impossible because with the transistor OFF the collector is pulled up to 5V is it not ?

With 3.3V on the base , it should (as you say ) be saturated to 0.6 volts on the collector.
He is also saying that the arduino is resetting with 0V on the base but has yet to give us any measurements of the voltage on the INPUT of the base resistor OR on the RESET pin of the arduino.

So , based on the OP's observations, nothing he is saying coincides with what the rest of the world
would see under those conditions. This could be easily settled by the OP providing the following information:

1- a close up photo of the face of the transistor showing the part number.
2. a photo of the transistor in the circuit.
3. List of (and/or photos) of voltage measurements of :
a. the RESET pin
b. the input of the base resistor of the transistor (same as the output of the digital output pin)
c. the voltage on the base of the transistor
d. the voltage drop across the collector pullup resistor.

  1. An answer to the question asked previously ("Is there a pullup and cap on the reset pin ?")

There must be an obfuscation field around this post :wink: