Posts

School Project: Temperature Controlled fan using Arduino in Proteus

Image
 Temperature Controlled fan using Arduino in Proteus  Below is an Arduino code for a temperature-controlled fan using an analog temperature sensor (e.g., LM35) connected to an analog pin. The fan speed is controlled using PWM output. This code is suitable for simulation in Proteus. Arduino Code: Copy the code and Paste: // Temperature-Controlled Fan Using Arduino // Components: LM35 (Temperature Sensor), DC Fan, Arduino UNO, and NPN Transistor // Pin configuration const int tempPin = A0;       // Analog pin connected to LM35 const int fanPin = 9;         // PWM pin connected to the fan (via transistor) // Temperature thresholds const float tempMin = 25.0;   // Minimum temperature (in Celsius) for the fan to start const float tempMax = 40.0;   // Maximum temperature (in Celsius) for full fan speed void setup() {   pinMode(fanPin, OUTPUT);    // Set the fan pin as an output   Serial.begin(9600);...

Tutorial on Simulation of Servo Motor on proteus

Image
  A tutorial on simulating a servo motor with an Arduino in Proteus: Step 1: Setting up the Circuit Open Proteus Design Suite and create a new project. Place an Arduino board (like Arduino Uno) from the Components Library onto the workspace In proteus. Add a servo motor (usually found in the Motors category) onto the workspace. Connect the control pin (usually denoted as "S" or "Signal") of the servo motor to one of the PWM pins of the Arduino (e.g., pin 9). Connect the VCC and GND pins of the servo motor to the corresponding VCC and GND pins of the Arduino. Step 3: Simulating in Proteus Go to the "Debug" menu and select "Compile" to compile your Arduino code. Once compiled successfully, click on the "Run Simulation" button to start the simulation. You should see the servo motor in Proteus start sweeping back and forth between 0 and 180 degrees. Step 4: Observing the Simulation You can observe the behavior of the servo motor in the s...