![]() The fan then runs for a predetermined time, and switches itself off.Įverything seems fine to me on paper, except that the fan doesn’t switch on when I press the button! I’ve read in another post that the 2N2222A transistor is rated for more than 5V on the base, so on that basis I haven’t put in a resistor. ![]() My arduino code is listening for a button press on digital pin 3, and when the button press is detected, pin 6 is switched to HIGH in order to activate the transistor switch. It’s essentially a low-side switch, with the fan’s black wire connected to the transistor’s collector pin and the emitter pin tied to ground. I’ve wired the fan as shown in the uploaded diagram. I want to avoid a bulky relay, hence the transistor as switch. But if I connect it to Arduino’s VIN pin, I get a very satisfying whir, which leaves me with the switching problem. I can’t power the fan directly through the Arduino’s digital output pins, because it doesn’t supply enough power. The transistor’s datasheet is here ( ), but I confess that most of the information goes over my head! For the prototype, I got a small 5V cooling fan that draws about 220mA (according to the reading I took with my DMM), which I want to switch on and off through a 2N2222A transistor. I’m working on a DIY gas sensor project and want to be able to ventilate a cavity with a fan in between taking readings.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |