9 Replies Latest reply on Nov 13, 2018 5:39 PM by sjmill01

    Unexpected voltage at base of transistor?

    sjmill01

      I have a situation I hadn't encountered before that is really bringing out my inner "noob".  Below is a circuit I'm developing for one of my 4D Game Engine IoT devices (future Element14 Presents video).

       

      The simple question is - would one expect to see a voltage at an open base of a transistor?

       

      Here's the details:

      The SV1 is a 2x4 female header to plug in a ESP8266.  JP1 receives a 9V battery.  IC1 and IC2 are regulating down to 5Vs and then to 3.3V.

       

      With the ESP8266 not installed, I probe pin three (the transistor base) to ground, I get 1.5 volts.  For that pin, if the ESP8266 sees voltage on power on, it will enter its bootloader mode.  In turn, its made the pin not an option to trigger the transistor because the voltage is instantly there when powered on and the circuit will be "bricked".

       

      Is it normal to see a voltage on an base?  I rebuilt the board from scratch and breadboarded it just to ensure it wasn't a short, but the problem persisted.  I also added a 10K at the base hoping to "pull it down", but it did nothing for it.

       

      ESP8266 Circuit Trouble

       

       

      My solution, of course, was to use another pin, but I sure would like to have that one for other projects in the future.

       

      Thanks,

      Sean

        • Re: Unexpected voltage at base of transistor?
          jw0752

          Hi Sean,

          You will have to repost your illustration or schematic as it did not come through. Try using the icon for pictures in the header.

          John

            • Re: Unexpected voltage at base of transistor?
              sjmill01

              That is strange the picture isn't coming through.  I had used the icon and it shows on my end.

               

              However, I believe I figured it out.  I'm mistaking what I'm seeing.  The transistor base is instead acting as a resistance to ground.  So it's like I'm probing a voltage divider circuit.

               

              So, the transistor is pulling the pin down.  The ESP8266 pins need to be pulled high to keep them out of boot mode when powered up.  So, the transistor in this circuit will always give me fits.  One document online talked about using an optocoupler which would simply be driving an LED inside the package which should work in theory.  I'll try that next. 

               

              Never thought I'd spend have >8 hours of probing & researching on one pin!!!  I guess that's what bakes it into the noodle, though.

               

              See ya',

              Sean

              • Re: Unexpected voltage at base of transistor?
                sjmill01

                After a couple more hours of research, I found that other's come to the conclusion that the ESP8266 just isn't transistor friendly - this includes using an optocoupler because its LED circuit is still enough to pull down the pin taking it to boot mode on powerup.  So, I put in a switch for now between the pin and transistor that allows me to at least get it going.

                 

                -Sean

                2 of 2 people found this helpful
              • Re: Unexpected voltage at base of transistor?
                dougw

                If I'm reading it right, the 10K base resistor you tried should have pulled the base right to ground.

                If there is 1.5V on the base there is something very wrong - as in blown transistor - the base should not be able to exceed about 0.7V because the base-emitter diode will conduct above that voltage.

                If pin3 on SV1 is an output, the base can only be driven up to 0.7V so it needs a current limiting resistor between pin 3 and the base.

                I would use a FET like a BSS138 or a 2N7000 instead of the  2N22222N2222 where a high value resistor would be sufficient to pull the gate down

                A series base resistor will work with the  2N22222N2222 but you probably also want a pull down on the base to make sure the transistor is off when the base is floating

                2 of 2 people found this helpful
                  • Re: Unexpected voltage at base of transistor?
                    sjmill01

                    I realized my original sketch didn't show the resistor to the base, but had a 1K there.  However, I didn't have a flyback diode on the relay.  That could have been eating transistors on me.

                     

                    My 10K pull down resistor was totally backwards thinking for my problem.  What I needed was a pull up which a lot of people have said have worked for the ESP8266.  However, I could not get it to work.  The pull up resistor would simply trigger the transistor and keep it there despite what the code was doing.

                     

                    So here is the circuit now, but I will loop back to try your FET suggestion at some point as the switch solution is goofy.

                     

                    Thanks for the help!

                    Sean

                    1 of 1 people found this helpful
                    • Re: Unexpected voltage at base of transistor?
                      sjmill01

                      Ok...Got the FET installed and now all is well!

                       

                      I needed at least 5V to get the relay to pull in so I used the FET at 3.3V to switch a  2N22222N2222 transistor This arrangement isolated pin 3 from being pulled down at boot up allowing an added 10K pull up resistor to keep the pin high allowing it to boot to my flashed code So now this IoT circuit can switch on AC or DC appliances over the web running on a battery or power source anywhere from 5V-15V DC

                       

                       

                       

                      The board turned out pretty sleek:

                       

                      With ESP8266:

                      ESP8266 Circuit by Sean Miller 1

                       

                      With ESP8266 removed:

                      ESP8266 Circuit by Sean Miller 2

                       

                      See ya',

                      Sean

                      2 of 2 people found this helpful