I am using the source code from this website as a reference
Attached file is my wiring diagram.
When I am uploading the code, fan voltage is too low. Its only showing approx 1.9V which I am expecting same as battery voltage. Can someone help me where I am doing wrong. In the attached file, it shows where my voltage is low.
The BC547 is rated for 100mA absolute max. Only good for a walnut-sized fan.
If your fan draws more than 50mA (and less than 500mA), use something like a BC337 or 2N2222.
Or a logic level mosfet.
A 1k base resistor assumes a collector (fan) current of <75mA.
Base current (for switching) should be between 1/10 and 1/20 of collector current for a small transisor.
If your fan draws e.g. 100-300mA, then a 220ohm base resistor is needed.
Leo..
Hi @Wawa yeah you were right. It was transistor issue. I am just wondering that if I use 12V power supply instead of 3.9V then is that 2N2222 transistor is right one?