Stații de lucru

OS - Windows 8790 Solutii

Reguli si plangeri 9 Solutii

OS - OS X 409 Solutii

Reguli de configurare 11 Solutii

Licentiere 18 Solutii

Securitate 179 Solutii

Copie de rezerva (Backup) 68 Solutii

Antivirus 71 Solutii

Aplicatii specifice 4993 Solutii

Hardware 290 Solutii

Arduino Motion Sensor Guide (Using a PIR Sensor)

A PIR (Passive Infrared) sensor detects motion by measuring changes in infrared radiation emitted by objects (like humans or animals) within its field of view.

PIR sensors are commonly used for:

Component Quantity Notes
Arduino Uno (or Nano, Mega, etc.) 1 Any compatible board
PIR Motion Sensor (HC-SR501 or similar) 1 Adjustable sensitivity and delay
Breadboard 1 For easy connections
Jumper wires ~5 Male-to-male recommended
LED 1 Optional for visual indication
220Ω resistor 1 For LED current limiting
USB cable 1 For programming and power

 Understanding the PIR Sensor

Typical PIR module (e.g., HC-SR501) has 3 pins:

Pin Label Function
1 VCC Power (connect to +5V)
2 OUT Sends HIGH when motion is detected
3 GND Connects to Ground

Adjustable knobs (optional):

  • Sensitivity: changes detection range (typically 3–7 meters)
  • Time delay: how long output stays HIGH after motion (usually 0.3s–5min)

Wiring Diagram

PIR Sensor Arduino Notes
VCC 5V Power supply
OUT D2 Digital input pin
GND GND Common ground
LED (+) D13 Visual output (optional)
LED (–) GND (via 220Ω resistor) Current limit

Connect VCC → 5V, GND → GND, OUT → D2, LED → D13 (optional)

Arduino Code Example


// PIR Motion Sensor with LED Example

int pirPin = 2; // PIR sensor output pin
int ledPin = 13; // LED pin

int pirState = LOW; // Default state
int val = 0; // Variable for reading the pin status

void setup() {
pinMode(pirPin, INPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
Serial.println("PIR Motion Sensor Active");
}

void loop() {
val = digitalRead(pirPin); // Read input value from PIR

if (val == HIGH) {
digitalWrite(ledPin, HIGH); // Turn LED ON
if (pirState == LOW) {
Serial.println("Motion detected!");
pirState = HIGH;
}
} else {
digitalWrite(ledPin, LOW); // Turn LED OFF
if (pirState == HIGH) {
Serial.println("Motion ended!");
pirState = LOW;
}
}
}

Explanation: The PIR output goes HIGH when motion is detected. The LED turns on and a message is printed to the Serial Monitor.

How It works

  1. Warm-up time: After powering up, the PIR sensor takes ~30–60 seconds to stabilize.
  2. Detection: When an object moves, the sensor’s output pin goes HIGH.
  3. Reset: After the set delay, the output returns LOW until new motion is detected.

1. Control a Relay

Use motion detection to control a light or appliance:


int relayPin = 8; // connect to relay module IN pin
// Replace ledPin with relayPin in code

2. Buzzer Alarm

Add a buzzer that sounds when motion is detected:


int buzzerPin = 9;
digitalWrite(buzzerPin, HIGH);

3. Serial Logging

Send motion logs to a computer or IoT platform for analysis.

4. Automation

Combine PIR with an LDR (light sensor) so it only triggers lights at night.


[mai mult...]

Windows 10 Support is Ending — Here’s how to keep getting Security Updates

On October 14, 2025, Microsoft will officially stop supporting Windows 10. That means no more feature updates, bug fixes, or security patches — unless you enroll in the Extended Security Updates (ESU) program. The ESU gives you one extra year of security updates, extending protection until October 13, 2026.

If you’re not ready to move to Windows 11 yet, here’s how to qualify and sign up.

[mai mult...]

Rezolvare: Excel error initialization of the Data source failed

Excel Error: Initialization of the Data Source Failed” apare de obicei când încerci să importezi date dintr-o sursă externă (Access, SQL Server, Text/CSV, Web etc.) și Excel nu reușește să inițializeze conexiunea OLE DB / ODBC.

1. Verifică sursa datelor

Mesajul apare frecvent când:

  • fișierul sursă a fost mutat sau șters;

  • conexiunea din Excel (în „Data → Queries & Connections”) indică un path greșit;

  • lipsesc drepturile de acces la acel fișier.

2. Reinstalează / repară providerul de date

Dacă sursa e un fișier Access sau un alt tip de bază de date, trebuie să existe driverul potrivit:

Pentru Access / Excel:

Instalează (sau reinstalează) Microsoft Access Database Engine:

Alege varianta potrivită:

  • AccessDatabaseEngine_X64.exe – pentru Excel pe 64-bit

  • AccessDatabaseEngine.exe – pentru Excel pe 32-bit

După instalare, repornește Excel și reîncarcă datele.

3. Verifică Trust Center Settings

Excel poate bloca fișierele externe din motive de securitate.

  1. Mergi la File → Options → Trust Center → Trust Center Settings…

  2. Intră la External Content și Data Connections.

  3. Asigură-te că opțiunea „Enable all Data Connections” este selectată.

4. Verifică modul de lansare Excel

Dacă deschizi fișierul de pe o rețea sau partajare:

  • Deschide-l local (copie pe Desktop)

  • Asigură-te că nu e blocat: click dreapta → Properties → dacă vezi „Unblock”, apasă-l.

6. Dacă nicio varianta nu functioneaza:

  • Închide Excel complet.

  • Rulează comanda în CMD (ca Administrator):

    regsvr32 msado15.dll

    (Reînregistrează biblioteca ADO pentru conexiuni OLE DB.)

  • Repornește sistemul.

[mai mult...]

RFID Door Lock with Arduino

In this detailed guide, you’ll learn how to build an RFID door lock system using an Arduino Uno and an MFRC522 RFID reader. The system reads RFID cards or keyfobs, checks authorization, and controls a solenoid lock or servo latch to grant access. It’s perfect for home automation, maker projects, or educational demonstrations.

Solenoid Lock Wiring

Arduino D7 → Gate of MOSFET (via 100Ω resistor)
MOSFET Source → GND (common)
MOSFET Drain → Solenoid negative terminal
Solenoid positive → +12V
12V supply GND → Arduino GND
Flyback diode across solenoid (1N4007, cathode to +12V)

Optional Servo Connection

Servo Signal → D7 (PWM)
Servo V+ → 5V external supply
Servo GND → Common GND

Arduino Code — Basic Version

This version uses a hard-coded list of authorized RFID tags.

/* RFID Door Lock - Basic Version */
#include <SPI.h>
#include <MFRC522.h>
#include <Servo.h>

#define RST_PIN 9
#define SDA_PIN 10
MFRC522 rfid(SDA_PIN, RST_PIN);

#define ACTUATOR_TYPE 0  // 0=Solenoid/Relay, 1=Servo
const int RELAY_PIN = 7;
const int LED_PIN = 4;
const int BUZZER_PIN = 5;
const int SERVO_PIN = 7;
const unsigned long UNLOCK_MS = 3000;
Servo lockServo;

void setup() {
  Serial.begin(115200);
  SPI.begin();
  rfid.PCD_Init();
  pinMode(LED_PIN, OUTPUT);
  pinMode(BUZZER_PIN, OUTPUT);
  if (ACTUATOR_TYPE == 0) {
    pinMode(RELAY_PIN, OUTPUT);
    digitalWrite(RELAY_PIN, LOW);
  } else {
    lockServo.attach(SERVO_PIN);
    lockServo.write(0);
  }
  Serial.println("RFID door lock ready");
}

// Replace these with your own card UIDs
byte allowedUIDs[][4] = {
  {0xDE, 0xAD, 0xBE, 0xEF},
  {0x11, 0x22, 0x33, 0x44}
};
const int allowedCount = sizeof(allowedUIDs)/4;

bool uidAllowed(byte *uid, byte uidSize) {
  if (uidSize != 4) return false;
  for (int i=0;i<allowedCount;i++) {
    bool match = true;
    for (int j=0;j<4;j++) if (allowedUIDs[i][j] != uid[j]) { match = false; break; }
    if (match) return true;
  }
  return false;
}

void unlockAction() {
  Serial.println("UNLOCK!");
  digitalWrite(LED_PIN, HIGH);
  tone(BUZZER_PIN, 1000, 150);
  if (ACTUATOR_TYPE == 0) {
    digitalWrite(RELAY_PIN, HIGH);
    delay(UNLOCK_MS);
    digitalWrite(RELAY_PIN, LOW);
  } else {
    lockServo.write(90);
    delay(UNLOCK_MS);
    lockServo.write(0);
  }
  digitalWrite(LED_PIN, LOW);
}

void loop() {
  if (!rfid.PICC_IsNewCardPresent()) return;
  if (!rfid.PICC_ReadCardSerial()) return;

  Serial.print("Card UID:");
  for (byte i=0;i<rfid.uid.size;i++) {
    Serial.print(" ");
    Serial.print(rfid.uid.uidByte[i], HEX);
  }
  Serial.println();

  if (uidAllowed(rfid.uid.uidByte, rfid.uid.size)) {
    Serial.println("Access granted");
    unlockAction();
  } else {
    Serial.println("Access denied");
    for (int i=0;i<2;i++) {
      tone(BUZZER_PIN, 600, 150);
      digitalWrite(LED_PIN, HIGH);
      delay(200);
      digitalWrite(LED_PIN, LOW);
      delay(100);
    }
  }

  rfid.PICC_HaltA();
  rfid.PCD_StopCrypto1();
}

Advanced Version — Store Tags in EEPROM

This version allows adding and removing authorized cards dynamically through the Serial Monitor.

/* RFID Door Lock - EEPROM Version */
#include <SPI.h>
#include <MFRC522.h>
#include <EEPROM.h>

#define RST_PIN 9
#define SDA_PIN 10
MFRC522 rfid(SDA_PIN, RST_PIN);

#define RELAY_PIN 7
#define LED_PIN 4
#define BUZZER_PIN 5
#define UNLOCK_MS 3000
#define MAX_TAGS 20
#define UID_SIZE 4
#define EEPROM_START 0

void setup() {
  Serial.begin(115200);
  SPI.begin();
  rfid.PCD_Init();
  pinMode(RELAY_PIN, OUTPUT);
  digitalWrite(RELAY_PIN, LOW);
  pinMode(LED_PIN, OUTPUT);
  pinMode(BUZZER_PIN, OUTPUT);
  Serial.println("RFID lock with EEPROM ready");
}

/* Helper functions omitted for brevity in this preview — see full code in guide */

Serial commands:

  • l — List stored tags
  • a — Add a new tag (scan after command)
  • r — Remove a tag
  • c — Clear all stored tags

Power Considerations

  • Use a separate 12V supply for the solenoid; common the grounds.
  • Add a large capacitor (470µF–2200µF) across the solenoid supply.
  • Always include a flyback diode to protect electronics.
  • If using a servo, power it from an external 5V supply.

Mechanical Installation

  • Ensure alignment between lock and strike plate.
  • Provide a manual override or emergency key.
  • Mount RFID reader within 5–10 cm of tag presentation area.
  • Keep metal objects away from the RC522 antenna.

Testing Steps

  1. Upload code and open Serial Monitor (115200 baud).
  2. Scan a card — its UID should appear.
  3. Add card to allowed list or EEPROM memory.
  4. Test actuator operation and timing.
  5. Confirm power supply stability under load.

Troubleshooting

Issue Possible Cause Fix
No response from reader Wrong wiring or 5V used Use 3.3V and correct SPI pins
Actuator not moving Power supply too weak or wrong driver Use proper MOSFET/relay and check GND
UIDs print gibberish Wrong Serial baud rate Match Serial.begin(115200)
Unstable lock Power noise Add capacitor or separate supply

Security Enhancements

  • Use MIFARE DESFire or NTAG cards for better encryption.
  • Add a keypad for two-factor access (RFID + PIN).
  • Implement attempt-limit lockout for brute-force protection.
  • Use metal enclosure and tamper switch for extra security.

Optional Upgrades

  • OLED/LCD display for user feedback
  • Wi-Fi / MQTT integration (ESP8266 or ESP32)
  • RTC + SD card logging for audit trail
  • Battery backup for power loss protection
  • Cloud dashboard or mobile control app.
[mai mult...]

Arduino Temperature Sensor

You’ll build a simple digital thermometer that measures ambient temperature using a temperature sensor (like the LM35, TMP36, or DHT11) and displays the reading via the Serial Monitor or LCD screen.

We’ll cover two main versions:

  1. Basic Version — Using an analog temperature sensor (LM35 or TMP36).

  2. Advanced Version — Using a digital sensor (DHT11 or DHT22) with humidity support.

Materials Needed

Component Quantity Description
Arduino Uno (or Nano/Mega) 1 The main microcontroller board
LM35 or TMP36 sensor 1 Analog temperature sensor
Breadboard 1 For easy circuit assembly
Jumper wires ~6 Male-to-male wires
USB cable 1 To connect Arduino to your computer
(Optional) 16×2 LCD Display 1 For local display
(Optional) 10kΩ Potentiometer 1 LCD contrast control

Step 1: Understand the Sensor

 LM35 Pinout

Pin Label Function
1 VCC +5V from Arduino
2 VOUT Analog output (connect to Arduino analog input)
3 GND Ground

The LM35 outputs 10 mV per °C.
So if the output voltage = 250 mV → temperature = 25°C.

Step 2: Wiring the LM35 to Arduino

Connections

LM35 Pin Connects To
VCC 5V on Arduino
GND GND on Arduino
VOUT A0 on Arduino

Circuit Diagram (Text Form)

[Arduino 5V] ---- [LM35 VCC]
[Arduino GND] ---- [LM35 GND]
[Arduino A0] ---- [LM35 OUT]

Step 3: Arduino Code (LM35 Version)

// Simple Temperature Sensor with LM35

const int sensorPin = A0; // LM35 connected to A0
float temperatureC;

void setup() {
Serial.begin(9600);
Serial.println(“LM35 Temperature Sensor”);
}

void loop() {
int sensorValue = analogRead(sensorPin); // Read analog value
float voltage = sensorValue * (5.0 / 1023.0); // Convert to voltage
temperatureC = voltage * 100; // 10mV per degree C (LM35)

Serial.print(“Temperature: “);
Serial.print(temperatureC);
Serial.println(” °C”);

delay(1000); // Update every second
}

Explanation

  • analogRead(A0): reads 0–1023 corresponding to 0–5V.

  • Voltage calculation: (value * 5.0) / 1023.0.

  • LM35 output scaling: 10 mV = 1°C → multiply voltage by 100.

Step 4: Viewing Data

  • Open Arduino IDE → Tools → Serial Monitor.

  • Set baud rate = 9600.

  • You’ll see continuous readings like:

    Temperature: 24.87 °C
    Temperature: 25.02 °C

Step 5: Calibration (Optional)

Real sensors may have small offsets.
You can adjust the output manually:

temperatureC = (voltage * 100) - 0.5; // Adjust by small offset

Compare readings with a known thermometer and tweak the offset until accurate.

Advanced: Using DHT11 / DHT22 (Digital Sensor)

Required Library

  • Install “DHT sensor library” by Adafruit from Arduino Library Manager.

Wiring (DHT11)

DHT11 Pin Connects To
VCC 5V
GND GND
DATA Digital Pin 2

Code (DHT11)

#include "DHT.h"

#define DHTPIN 2 // Data pin connected to digital pin 2
#define DHTTYPE DHT11 // or DHT22

DHT dht(DHTPIN, DHTTYPE);

void setup() {
Serial.begin(9600);
dht.begin();
}

void loop() {
float tempC = dht.readTemperature();
float humidity = dht.readHumidity();

if (isnan(tempC) || isnan(humidity)) {
Serial.println(“Failed to read from DHT sensor!”);
return;
}

Serial.print(“Temperature: “);
Serial.print(tempC);
Serial.print(” °C, Humidity: “);
Serial.print(humidity);
Serial.println(” %”);

delay(2000);
}

Step 6: (Optional) Display on LCD

If using a 16×2 LCD (I2C):

  1. Install “LiquidCrystal_I2C” library.

  2. Connect SDA → A4, SCL → A5.

  3. Example snippet:

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup() {
lcd.init();
lcd.backlight();
}

void loop() {
lcd.setCursor(0, 0);
lcd.print(“Temp: “);
lcd.print(temperatureC);
lcd.print(“C”);
}

Troubleshooting Guide

Issue Possible Cause Solution
No readings / 0°C Wrong wiring or pin Check sensor pins
Negative readings Wrong sensor type (TMP36 needs offset) Adjust formula
Unstable readings Noisy analog signal Add capacitor (0.1 µF) between VOUT & GND
“nan” or “Failed to read” DHT library issue Check sensor type & connections

Next Steps & Enhancements

  • Add OLED / LCD display for portable thermometer

  • Store data using SD card module

  • Upload readings to the cloud via ESP8266 / WiFi module

  • Use RGB LED to indicate temperature range (blue/cool, red/hot)

  • Build an IoT dashboard (ThingSpeak, Blynk, etc.).

[mai mult...]