As Oli says - you need the gate to be more positive that the source by a certain amount to turn the device on. (The level varies with current - for this IC 2 volts is usually enough - see datasheet). It's a very nice part, just not suited to how you are using it.
If your circuit will allow it you can use this part as a "low side driver" which is what the datasheet says it is used for.
Connect source to ground.
Connect drain to load -ve.
Connect Load positive to V+.
Drive gate high to turn on.
This circuit has the advantage of allowing the load to be operated from up to 36 Volts while activating it with eg a 3 Volt supply powered device.
It has the disadvantage that the load is at V+ supply potential when turned off (rather than at ground potential.)
Shown above with a lamp as a load but this can be whatever you are powering. The diode is needed only if the load has an inductive component (to provide a path for the "flyback" reactive energy when the FET is switched off. )
As Oli also notes - IF you can drive the gate to several volts above V+ then your circuit will work.
As Oli also also notes, a P Channel FET will work for you (source to V+, drain to load, load ngative to ground,) with gate high (= V+) to turn off and low (= ground) to turn on. Maximum V+ is supply voltage of driver if you do not use an extra driver stage (1 extra transistor usually).
This is probably the best choice overall:
Using one extra transistor allows you to use a low voltage control signal to drive a load at up to near the FET rated Vmax.
This very nice device may meet your need well - depending on current and voltage requirements. Only 3.6V max Vin :-(. It's an intelligent high side driver with low side logic level control $1.22/1 at Digikey in stock.
The 8 pin dip version of this IC, an ST TDE1898, also a logic level driven high side driver costs $%3.10/1 at Digikey but allows 18-35V supplies. There will be others with weird supply voltage ranges - BUT a P channel FET and single transistor as above probably do what you'd need.
Level shifting:
You MAY be able to switch a 5V high side P channel MOSFET with a 3.3V mcu but the design would either be marginal or tricky. If you swing the drive signal 0/3.3V and have a 5V high side supply the FET sees 5V/1.7V relative to +5V. A MOSFET with a Vth of >= 2V would notionally work. Better Vth > 2.5V or > 3V. As Vth gets higher the on margin decreases. Data sheet max and min values need to be considered. Doable but tricky.
In 2 transistor circuit above use a "logic transistor" (internal R1) to eliminate one resistor. Extra is then one, e.g., 0402 :-) Resistor and one eg SOT23 transistor pkg. // Using a zener in output from MCU can reduce Vmax to safe levels and allow a high side 5V P FET to be driven. "Mickey Mouse" :-).
Use of a resistor divider from output of MCU to high reduces the minimum voltage from high side gate to V+ but also reduces the maximum drive. this may be acceptable.
Example only:
8k2 V+ to P Channel gate
10k P channel gate to mcu pin.
33k mcu pin to ground.
mcu pin is pulled high when OC to 33/(33 + 10 + 8.3) x 5 = 3.2V.
When mcu is at 3.2V, gate is at 3.2 + 1.8 x (10/(10+8.2)) = 4.2V.
When mcu pin is at ground gate is at (10)/(10 + 8.2) x 5 = 2.75V
So relative to V+ gate swings from 0.8V to 2.25V.
This would be OK for some FETS but max and min gate values need to be OK.
Very tricky to get right.
2 transistor circuit is much preferred.
Low side N Channel drive is better still if acceptable.
Both the ICs referred to do the whole task in one IC with no extra components. In both cases the voltage used are limited (<= 3.6BV in one case and 18-35V in the other) but there are certainly ICs that handle a wider range of voltages. www.digikey.com and www.findchips.com are both good places to look.
so my question is can I use n-channel mosfet to pass positive voltage
from source to drain?
An N channel device as shown in your diagram will pass current from source (the positive input voltage) to drain (the 1N5822) quite naturally because an N channel device has an internal parasitic diode that always allows this: -
The symbol for the N channel device in the picture (left) has a diode that connects between source and drain so it will naturally allow a flow of current from source to drain when the source is a little bit more positive than the drain. This diode is present internally in all regular MOSFETs.
So, that's the good news. The bad news is that you can't disable that diode and it will always conduct current to the load from the supply. In other words, the circuit is no longer effective as a switch and that is why the original (and correct) diagram used a P channel MOSFET.
However, if you were to switch source and drain around and used a more complicated drive circuit that could apply a gate voltage higher than the incoming supply (maybe up to 10 volts higher), then an N channel device could be used but, to be honest, and for simplicity, I'd try and find a suitable P channel device and stick with the original idea.
Best Answer
Measure the MOSFET source (connected to scanner) when the MOSFET is ON.
You'll find it does not pull down to ground as the MOSFET needs a voltage of about Vgsth to just start to turn on. You are probably getting 1+ Volts source to ground. source-
Driving an NChannel MOSFET , source to ground, drain to scanner should work. The drive sense will be inverted. This can be fixed if needs be.
If you wish to use the P Channel FET try a 100k scanner in to ground to see if it turns on. If not try lower R till it works. Then pull scanner input UP with MOSFET, source to V+, drain to scanner in. Again, polarity reversed.
Magic :-):
This circuit converts
into
The external input voltage swing and current sinking ability has not been specified.
The circuit below will convert a 0 to V1 signal to 0 to V2 where V2 > V1, OR to a 0 /Open circuit output.
In this case when Vin is high, when (Vdd-Vin) < Vgsth_FET the FET will be off.
When Vin = 0, if Vgsth_FET < Vdd then FET will be on.
The input line needs to be able to sink the current from S1 - which is said to be low show it should work.
N Channel FET.
Switching polarity as original. Input low = on. Gate to V+, drain to scanner, source to external input.
simulate this circuit – Schematic created using CircuitLab