why do you use optocouple
Help
Ya i decide to use uC to control. So, the DC output current draw is depent our P type MOSFET support is it? Why we dont use normal transistor... to drive it, what the advantage for MOSFET and what the disadvatage for transistor?
* i need to comfirm again, we are using N or P type because your drawing is N-type?
If you really need to have electrical isolation and using separate power rails (say 5V on one side, 25V on another side) between your microcontroller and the high-power load such as a 25V motor, use an opto-coupler, but the opto-coupler might (not always, depending on the opto-coupler you use) need another transistor or darlington pair to drive your load.
If you do not need to have any electrical isolation and sharing the same rail voltage (5V on the same PCB), just driving a 5V, 1A DC motor, the methods (below) would do.
Power BJT and Power MOSFET are different in limitations and applications.
Differences only appear between BJT and MOS when used in the area in of RF, Analog, Digital and High Power Electronics. For low power and low speed electronics, not much difference.
For your application, no difference between to use BJT or MOS. In fact the probably difference is perhaps cost and additional component, some circuit calculation to find the values of components to use.
BJT
In the case of NPN, you use a small base current Ib and forward current gain β to yield the large collector current Ic, then Ib+Ic = emitter current Ie that drives the power hungry load at the emitter.
You need to use a microcontroller output port pin TTL/CMOS to drive a output logic high or '1' to source a small current, typically 50µA, then via a base limiting resistor of about 220Ω to the base. This BJT is a low-power or most commonly called signal BJT, with β about 100 to 200 at most, thus driving load current of 1A at most.
In the case of PNP, your microcontroller has its port pin set to serve as input to sink current from the base of PNP via a limiting resistor. The load current is Ic=Ie-Ib It is just opposite of the NPN.
Most people uses NPN because of Ie=Ib+Ic instead of PNP's Ic=Ie-Ib. Another reason is because it discouraged to sink current through a microcontroller's input port pin. It's not so much about danger since your limiting resistor is there to protect your microcontroller port pin, it's just a preferred way of doing things.
BTW, it is confusing to say normal transistor. In engineering practices, we either call it signal or low-power BJT (less than 1A) or Power BJT (more than 1A).
Since the signal BJT has low load current driving capability, you can replace it with either:
1. Darlington Pair or Superbeta (super β) BJT, with β above 800, yet using low voltage and yielding large load current.
2. Power BJT, with larger load current (not using Darlington Pair. It is a transistor designed to handle high current and high voltage)
If your design doesn't handle more than 5V or 9V, I don't advise you to use Power BJT.
MOSFET
No β needed to calculate. No gate resistor needed.
You only need to use a microcontroller to have it's output port pin to switch logic high '1' or low '0' above or below the MOSFET's threshold voltage Vth to turn it on or off respectively.
If the MOSFET is turned on, it will pass current from the supply rail down to the load.
You can use a PMOS or NMOS, -ve Vth (-1V) and +Vth (+1V) respectively, in many MOSFETs sold in the market. Some comes with Vth above 5V or even 20V but those are high power Power MOSFETs.
All MOSFETs work the same way. Use an input voltage Vgs switching > or < Vth to turn the MOSFET on or off.
WARNING!
Always check if you need to place heatsink, protection diode and limiting resistor specified in the datasheets.
All datasheets usually come with recommended application reference. Read them carefully if you are not sure.