12V OUTPUT in Arduino
NO, it is not possible to get 12V directly from the Arduino. And there is no code to get 12V OUTPUT from any of the input/output pins in Arduino. Though Arduino are designed to run in 5V only. The Vin pin of the Arduino supports a input voltage of between 20V to 24V, because that Vin has the inbuild voltage regulator which regulates the input voltage to the operable voltage that is 5V of the Arduino.

But we can OUTPUT a PWM signal from any one of the digital pins of the Arduino to switch a 5V relay or to switch a MOSFET or a Transistor which handles a nominal voltage of 12V or above. The code to get HIGH OUTPUT in a digital pin of the Arduino is given below.
PROGRAM CODE
void setup(){
pinMode(10,OUTPUT);
}
void loop(){
digitalWrite(10,HIGH);
}
The above code outputs the digital pin 10 of the Arduino microcontroller to HIGH (5V).We can switch two things by this digital OUTPUT from the Arduino.
1) Connect this pin to the gate of a MOSFET which switches the 12V supply.
2) Connect this pin to the transistor of the relay which the relay ON and OFF which in turn switches the 12V supply.
Have fun :)
Hope you guys learnt something New !!!!!
See you again in the Next Articles Bye.....!!!!!!!!
0 Comments