*** THE DOJO ~ Where Sensors Become Masters *** LESSON 1: What is a Sensor? *** LESSON 2: Analog vs Digital *** LESSON 3: Reading Sensors *** The Dojo is ALWAYS OPEN to hungry learners! ***

๐Ÿฏ The Dojo

"Enter the Dojo. Leave with Knowledge."
๐Ÿฅ‹ ๐Ÿ“š ๐Ÿฅ‹

๐Ÿ“‹ Dojo Curriculum

Follow Sensei's curriculum in order for best results. Do NOT skip warm-up exercises!

Lesson Title Status
Lesson 0 What is a Sensor? โœ… Complete
Lesson 1 Analog vs Digital Sensors โœ… Complete
Lesson 2 Reading Analog Values with Arduino โœ… Complete
Lesson 3 I2C Sensors โ€” The Two-Wire Path ๐Ÿ”ฅ NEW!
Lesson 4 SPI Sensors โ€” The Fast Lane โณ Coming Soon
Lesson 5 Building Your First Sensor Circuit โณ Coming Soon
Lesson 6 Calibration Techniques โณ Coming Soon
Lesson 7 Advanced: Sensor Fusion โณ Coming Soon
* . * . * . * . * . * . * . *

๐ŸŒก๏ธ Temperature Sensors

๐Ÿ“– Lesson Overview

Temperature is the most fundamental physical quantity humans measure. From the ancient thermometers of Galileo to modern digital sensors, measuring heat has shaped human civilization. In this lesson, Sensei will introduce you to three paths of temperature sensing: analog IC sensors, digital sensors, and thermocouples.

๐Ÿฅท Sensei's Recommended Sensors

Sensor Type Range Difficulty Price
LM35 Analog IC -55ยฐC to 150ยฐC โญ Easy $2
DS18B20 Digital (1-Wire) -55ยฐC to 125ยฐC โญ Easy $3
TMP36 Analog IC -40ยฐC to 125ยฐC โญ Easy $2
NTC Thermistor Analog (Resistive) Varies โญโญ Medium $1
MAX31855 + K-Type Digital -270ยฐC to 1372ยฐC โญโญโญ Hard $8

โšก Quick Code Example (Arduino โ€” LM35)

// SensorSensei.net - LM35 Temperature Sensor
// "The first step on the temperature path..."

int sensorPin = A0;        // Connect LM35 output to A0
int sensorValue = 0;
float temperature = 0.0;

void setup() {
  Serial.begin(9600);
  Serial.println("Temperature Dojo - SensorSensei.net");
}

void loop() {
  sensorValue = analogRead(sensorPin);
  temperature = sensorValue * (5.0 / 1024.0 * 100.0);
  
  Serial.print("Temperature: ");
  Serial.print(temperature);
  Serial.println(" ยฐC");
  
  delay(1000);  // Wait 1 second (patience, grasshopper!)
}
                

"The LM35 outputs 10mV per degree Celsius. Simple. Elegant. Beautiful." โ€” SensorSensei

+ ~ + ~ + ~ + ~ + ~ + ~ + ~ +

๐Ÿ’ง Humidity Sensors

๐Ÿ“– Lesson Overview

Humidity affects everything from agriculture to electronics storage. Measuring moisture in the air requires special sensors that can detect water vapor molecules. Sensei will teach you about capacitive and resistive humidity sensing technologies.

๐Ÿฅท Sensei's Recommended Sensors

Sensor Type Accuracy Protocol Price
DHT11 Capacitive ยฑ5% RH Single Wire $1
DHT22 Capacitive ยฑ2% RH Single Wire $4
HTU21D Capacitive ยฑ0.3% RH I2C $5
SHT31 Capacitive ยฑ2% RH I2C $7

โšก Quick Code Example (Arduino โ€” DHT11)

// SensorSensei.net - DHT11 Humidity Sensor
// "The air has moisture. We measure it."

#include 

#define DHTPIN 2     // Pin connected to DHT11 data
#define DHTTYPE DHT11  // Type of sensor

DHT dht(DHTPIN, DHTTYPE);

void setup() {
  Serial.begin(9600);
  dht.begin();
  Serial.println("Humidity Dojo - SensorSensei.net");
}

void loop() {
  float humidity = dht.readHumidity();
  float temperature = dht.readTemperature();
  
  Serial.print("Humidity: ");
  Serial.print(humidity);
  Serial.print("%  Temp: ");
  Serial.print(temperature);
  Serial.println(" ยฐC");
  
  delay(2000);  // DHT11 needs time (like all sensors, be patient!)
}
                

"Humidity sensor tip: Always wait the recommended delay between readings. Rushing gives bad data!" โ€” SensorSensei

* . * . * . * . * . * . * . *

๐Ÿ’ก Light Sensors

๐Ÿ“– Lesson Overview

Light sensing is one of the simplest and most rewarding sensor journeys. From the ancient gnomon to modern photometers, humans have always measured light. You will learn about photoresistors (LDRs), photodiodes, and digital light sensors.

๐Ÿฅท Sensei's Recommended Sensors

Sensor Type Range Protocol Price
LDR (Photoresistor) Resistive 10 - 100,000 lux Analog $0.10
Photodiode Semiconductor Varies Analog $0.50
BH1750 Digital 1 - 65535 lux I2C $3
TCS34725 Digital RGB RGB + Light I2C $5

โšก Quick Code Example (Arduino โ€” LDR)

// SensorSensei.net - LDR Light Sensor
// "Light becomes numbers. Magic, yes?"

int ldrPin = A0;    // LDR circuit connected to A0
int lightLevel = 0;

void setup() {
  Serial.begin(9600);
  Serial.println("Light Dojo - SensorSensei.net");
  Serial.println("Darkness is just low numbers.");
}

void loop() {
  lightLevel = analogRead(ldrPin);
  
  Serial.print("Light: ");
  Serial.print(lightLevel);
  Serial.print(" / 1024");
  
  if (lightLevel < 200) {
    Serial.print("  -> DARK!");
  } else if (lightLevel < 600) {
    Serial.print("  -> Normal");
  } else {
    Serial.print("  -> BRIGHT!");
  }
  
  Serial.println();
  delay(500);
}
                

"An LDR costs 10 cents and teaches more than most $100 sensors. Wisdom is simple." โ€” SensorSensei

+ ~ + ~ + ~ + ~ + ~ + ~ + ~ +

๐Ÿ“ณ Motion Sensors

๐Ÿ“– Lesson Overview

Motion sensors open the door to the exciting world of acceleration, rotation, and detection. From detecting if a box has been dropped to building a self-balancing robot, motion sensing is essential. You will explore accelerometers, gyroscopes, PIR sensors, and ultrasonic distance sensors.

๐Ÿฅท Sensei's Recommended Sensors

Sensor Type Axis Protocol Price
PIR (HC-SR501) Infrared 1 (detect) Digital $2
HC-SR04 Ultrasonic Distance Pulse $2
MPU6050 Accelerometer+Gyro 6 axes I2C $3
ADXL345 Accelerometer 3 axes I2C/SPI $4
* . * . * . * . * . * . * . *

๐Ÿ’จ Gas Sensors

๐Ÿ“– Lesson Overview

Gas sensors give your projects the power of smell! Yes, you read that right. Your microcontroller will be able to detect smoke, CO2, propane, and volatile organic compounds. This is one of the most practical and life-saving sensor skills you can learn.

๐Ÿฅท Sensei's Recommended Sensors

Sensor Detects Protocol Warmup Price
MQ-2 Smoke, LPG, propane Analog 15-30s $2
MQ-7 Carbon Monoxide Analog 20-30s $3
MQ-135 Air quality (NH3, NOx) Analog 20-30s $3
MH-Z19 CO2 UART 60s $15
SGP30 VOC index I2C 10s $8

"Never trust a gas sensor reading taken immediately after power-on. Even Sensei has been fooled by this." โ€” SensorSensei, humbled

* . * . * . * . * . * . * . *
๐Ÿšงโš ๏ธ๐Ÿšง
More lessons coming every moon cycle! Check back often, young apprentice!
(Sensei promises to update sooner. He's been busy.)
๐Ÿšงโš ๏ธ๐Ÿšง
๐Ÿ–ฅ๏ธ Best viewed at 1024x768 resolution
With Netscape Navigator 4.0+ or Internet Explorer 5.0+
Questions? Comments? Want to swap links? Email the Webmaster