Go Down

Topic: Mosfet n channel issue with ESP8266 (Read 11889 times) previous topic - next topic

CrossRoads

Good example of using 74HC595 to drive common cathode 7-segment display. Extremely rare to see a decent schematic come from fritzing.
However, it Should Not have a cap on the D8 output, that is an error from the Learning section we can't seem to get rid of.
There Should be a 0.1uF on the '595 VCC pin to Gnd.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

be80be

I didn't look at it it's in the samples I just exported it. But it can draw  a good one.


Wawa

I assume the ESP8266 has a sleep mode.
If so, there is no need to turn off the power.
Leo..

Grumpy_Mike

Note that the rats nest wires need routing to make it legible.
You ignored that didn't you?
Can you read that schematic? Let me tell you, you can't.

The parts need dragging into a more sensible place. Then the dotted wires which are called rat's nest wires need routing so they are composed of horizontal and vertical sections. Diagonal wires are not acceptable in a schematic.

The thing about Fritzing and it is why it is hated on this forum is that to use it you require far more skill than you have when you use it, which happens when you feel you need a physical layout diagram. So you make substitutions and render it all useless. By you I mean one, not you personally.

Where is the 5V coming from?

The problem with this is the connections to the Arduino. When the output is high you feed 5V into a 3V3 system, this is very bad. When the output is low the Arduino is feeding a negitave voltage into the ESP, due to the voltage drop across the FET.
Either of these can be enough to latch up the ESP and stop it working.

The use of power switching from the top like in reply #10 will solve the negitave voltage situation. A potential divider of 510R and 1K will cut down the 5V output signal from the Arduino to the ESP to 3V3. Finally you need to make that output signal into an input before removing the power, and make it an output again once the power has been restored.

flabombarda

I assume the ESP8266 has a sleep mode.
If so, there is no need to turn off the power.
Leo..
Only the most advanced ones, and they can't be turned on back based on an external interruption, ESP8266-1 is pretty basic, can't put it to sleep, doesn't have the necessary pins for setting this :-)

flabombarda


flabombarda

#22
May 31, 2016, 03:20 pm Last Edit: May 31, 2016, 03:45 pm by flabombarda
You ignored that didn't you?
Can you read that schematic? Let me tell you, you can't.

The parts need dragging into a more sensible place. Then the dotted wires which are called rat's nest wires need routing so they are composed of horizontal and vertical sections. Diagonal wires are not acceptable in a schematic.

The thing about Fritzing and it is why it is hated on this forum is that to use it you require far more skill than you have when you use it, which happens when you feel you need a physical layout diagram. So you make substitutions and render it all useless. By you I mean one, not you personally.

Where is the 5V coming from?

The problem with this is the connections to the Arduino. When the output is high you feed 5V into a 3V3 system, this is very bad. When the output is low the Arduino is feeding a negitave voltage into the ESP, due to the voltage drop across the FET.
Either of these can be enough to latch up the ESP and stop it working.

The use of power switching from the top like in reply #10 will solve the negitave voltage situation. A potential divider of 510R and 1K will cut down the 5V output signal from the Arduino to the ESP to 3V3. Finally you need to make that output signal into an input before removing the power, and make it an output again once the power has been restored.

Mike, I wouldn't say that I ignored, I just did not understand how to do that. I'm not an engineer just an enthusiast who is trying to make something functional.

Regarding your question about 5v, I don't have any 5v here, if you see the breadboard you will see 3.7v battery, my actual input is based on this:

The reason why I don't have this in the breadbard/schematic from fritzing is because I didn't find the components to do it.

But I can ensure you that ESP is receiving 3v only and not 5 :-) I know it is not tolerant and you can burn the whole thing if you insist on that.

I reviewed your schematic from #10 reply, looks very good, but there is something I need to ask considering my limited knowledge on this: Is there an easier way to make it work even if is not the best way ? If not then I'll try to implement it. I ordered already the 2n3904 that should get home in few days.

Many thanks for your patience !

gpsmikey

The 2N3904 transistor is a general purpose switch type.  It is one of those things you should just have a bag of on hand (another I often use is the 2N4401).  Places like Jameco.com carry them all the time - buy a bunch just to have on hand.  Less than 10 cents each - no point in paying shipping for one when you can buy 100 of them and just have them on hand.  You will find you often use that sort of transistor for turning things on etc. (the 2n4401 is rated 600ma @40v, the 2n3904 is 200ma at 40v - typically, you are going to be using them more in the 20-100ma range so either is fine - the best one is the one you have in your "parts bins"  :)  )
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3

flabombarda

Mikey,

Regarding these transistors, can they be used to switch on/off the (+) instead of (-) is there any limitation for this ?


Thanks

gpsmikey

They are standard switching transistors.  You need to look at how they work to determine how they fit your needs - the answer to your question is yes, either could switch it - you need to look at how they work so you understand how to switch stuff with them.  A bipolar transistor like that is simply controlled by the base current - you need to look at how to provide that current correctly to make it do what you want.
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3

dlloyd

#26
May 31, 2016, 05:14 pm Last Edit: May 31, 2016, 05:17 pm by dlloyd
Quote
Regarding these transistors, can they be used to switch on/off the (+) instead of (-) is there any limitation for this ?
If you're considering using the 2N3904 as a high side switch (emitter follower), then there will be a considerable voltage drop from the collector to emitter. It won't work for this application. However, it could be combined with a P-channel MOSFET to create a high side switch as in replies 5 and 8.

flabombarda

If you're considering using the 2N3904 as a high side switch (emitter follower), then there will be a considerable voltage drop from the collector to emitter. It won't work for this application. However, it could be combined with a P-channel MOSFET to create a high side switch as in replies 5 and 8.
I'm actually trying to figure out how to implement this:


I have the components but I'm struggling to understand the schematic, especially what are the pins that go out from 2n3904 to p channel mosfet.

Thanks,

Grumpy_Mike

Do you know the symbol for a transistor? The connection to R3 is called the base, the one with the arrow is called the emitter and the one with no arrow is called the collector.

flabombarda

Do you know the symbol for a transistor? The connection to R3 is called the base, the one with the arrow is called the emitter and the one with no arrow is called the collector.
Thanks Mike, Yes, I'm familiar with the resistor, what I don't know is where should I connect the emitter, the one with the arrow that "goes down" on the schematic, should it go to the circuit GND ?

Thanks

Go Up