Go Down

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

flabombarda

Hello everyone,

I'm using a mosfet n-channel as switch to turn on/off a ESP8266-1 from my Arduino Nano.
Wiring is fine, it works fine, I see it turning on/off as expected, but the problem is the ESP8266-1 does not connect to my wifi network, I know it is tricky with power input so I was wondering if using the MOSFET N-channel as switch can be causing lower power than having the ESP connecting to the ground directly.

The reason I think this is happening is because if I connect it to the ground with no mosfet in the middle it works fine.

Leds are working ok, also so I can be sure mosfet is turning the ESP on properly.

Any clue ?

This is the mosfet I'm using: http://cdn.sparkfun.com/datasheets/Components/General/FQP30N06L.pdf

Thanks !

CrossRoads

#1
May 29, 2016, 05:01 am Last Edit: May 29, 2016, 05:01 am by CrossRoads
Looks like it should work okay. Decent Rds with 5V on the gate.
Are you sure it is wired up correctly?
https://www.fairchildsemi.com/datasheets/FQ/FQP30N06L.pdf
Left pin controlled by Arduino, middle pin to ESP8266 Gnd, right pin to Arduino 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.

flabombarda

YEs, I just think the middle and left are opposite: middle ground (source) and left to ESP GND (drain) correct ?
it turns on/off with no issues, just don't connect to the wifi ... my guess about the reduced power is because this wifi module is quite tricky with power ...

Thanks for your answer !

dlloyd

it turns on/off with no issues, just don't connect to the wifi ... my guess about the reduced power is because this wifi module is quite tricky with power ...
I'm thinking that with the RF being 2.4GHz, and current draw up to 215mA, the RF signal is getting picked up on the switched GND line which will have an extra 35mΩ impedance due to the MOSFET.

Grumpy_Mike

#4
May 29, 2016, 05:52 am Last Edit: May 29, 2016, 05:53 am by Grumpy_Mike
Tricky is not a very scientific term.
Any device powered off in this way must have any voltage input to it removed before it is powered down, otherwise it will latch up. Also I hope you are not feeding 5V from an Arduino output into any ESP input.

You need to post a schematic showing all your connections.

TomGeorge

#5
May 29, 2016, 12:49 pm Last Edit: May 29, 2016, 12:49 pm by TomGeorge
Hi,
Quote
The reason I think this is happening is because if I connect it to the ground with no mosfet in the middle it works fine.
You are low side switching, in this case you should be high side switching, using a P Ch MOSFET in the positive supply.

Disconnecting the gnd circuit causes currents that used to flow through gnd now try and flow through any I/O of the 8226.

Tom.... :)
As suggested previously, a circuit diagram will help.
Everything runs on smoke, let the smoke out, it stops running....

gpsmikey

+1 for what Tom said - low side switching is NOT what you typically want to do with stuff that has other connections to it (it is fine for a LED or something like that, but not stuff with other connections to it)

mikey
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

#7
May 30, 2016, 01:01 am Last Edit: May 30, 2016, 01:07 am by flabombarda
Here is a sample schematic, the same I"m using here.

I removed the resistors, because I'm not using since I don't have at this point the 10K recommended.

- Gate is one of my arduino digital ports (#3 on the image)
- D goes to the ESP8266 GND
- S goes to the GND of my power supply (3.3v)

I did some tests with the multimeter to see the power consumption using and not using the MOSFTET and I don't see any difference.

Like I said, the switch works but looks like the power received is lower when using the MOSFET, affecting the operation of the module.

Thanks

TomGeorge

#8
May 30, 2016, 01:08 am Last Edit: May 30, 2016, 01:09 am by TomGeorge
Hi,
The middle pin and the heatsink tab are the drain.
The gate is to the left of D, Sink is to the right.

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

flabombarda

Sorry Tom, I didn't get, did you see anything wrong on the way I'm wiring it ?

Thanks !

TomGeorge

#10
May 30, 2016, 04:29 am Last Edit: May 30, 2016, 04:30 am by TomGeorge
Hi,
You fritzy is fine for low side switching, but to properly power your 8266 you will need to use high side switching.
Instead of  switching the gnd of the 8266, you should have the gnd of the 8266 connected to gnd, and be using a P-CH MOSFET to switch the +ve supply to the 8266.
This called high side switching.

D2 has been removed as it is only used with inductive loads.
Tom.... :)
Everything runs on smoke, let the smoke out, it stops running....

Grumpy_Mike

Reply #4 still needs addressing in all aspects.

Please note a Fritzing bread board layout is not a schematic. That is given by the "schematic" tab in Fritzing. Note that the rats nest wires need routing to make it legible.

flabombarda

I'll work on this during the week Mike, I will keep this post updated.

Super thanks !

flabombarda

#13
May 31, 2016, 03:52 am Last Edit: May 31, 2016, 04:20 am by flabombarda Reason: fixing the attachments
Mike, please have a look,
Not sure if this is what you actually need, sorry but I'm new using Fritzing so let me know if further information is required.

The only difference to the reallity is that I'm not using a battery, I'm using regulated 3.3v instead, but could not find the part for fritzing

be80be

 Fritzing can make a good schematic the problem is most don't no how to use it this done with fritzing.


Go Up