Pn2222 transistor6/19/2023 The only weird this is a buzzing sound as sound as I plugged the external source. I thought maybe it's because I'm doing analogWrite on a digital pin (I also wondered why in the tutorial that's what they were doing for the motor?). nothing happened int motorPin = 3 ĭigitalWrite(motorPin, HIGH) // sets the digital pin 3 onĭigitalWrite(motorPin, LOW) // sets the digital pin 3 off The code of the motor on the tutorial : int motorPin = 3 Īnd then in the COM interface I have type 0,100,255 etc. The thing I'm afraid of is frying my arduino (I don't think that's possible cause it's no where near the fan nor the power source and to protect the motor I added a reverse diode).įor the code, I tried two things. The only output of the arduino is the control pin (3 in my case on the digital side). DC Motors | Adafruit Learning System), replaced the motor by my fan (that shouldn't be an issue right?) and added an external power source. Then I follow this tutorial ( Breadboard Layout | Arduino Lesson 13. I connected them to my external 12V source (fan is a 12V) and it works perfectly. My goal : I have a fan with a 3-pin and I want to control it with an arduino. I have spent a lot of time reading and improving on the different components I use and why (transitor instead of relay in my case etc.) but I'm kinda stuck and I need your help as I'm sure it will be trivial for you :). I'm more of a developper background so the electronic part is quite tricky for me :). First of all I'm kinda new to the microcontroller environnement.
0 Comments
Leave a Reply. |