Trail Guiders
Made by Yogesh Narayan Vaithiyanathan, Harshine Varuna Visvanathan and Jonathan Fortis
Made by Yogesh Narayan Vaithiyanathan, Harshine Varuna Visvanathan and Jonathan Fortis
An ambient interactive trail lighting system that guides the trail runners, cyclists, and other users of the Schenley Park Sportsplex.
Created: December 6th, 2019
The Sportsplex is a multi-sport activity center where people come to spend time playing and engaging themselves in daily exercise.
On talking to daily users, the sportsplex was commonly used by tennis players and runners. There exists a track, where the runners do their daily practice. But when the tracks are crowded, the runners choose to use the various trails surrounding the sportsplex. These trails have little or no information about them. The sportsplex also has poor connectivity and light systems. Thus, a need for change for such a heavily engaged place was required and what better than a technologically advanced solution which made people’s lives’ easier.
•This color variable y has color range RED – GREEN.
•GREEN indicates the most favorable factors : Dry path and well lighted.
•RED indicates the least favorable factors: Wet Path and not well lighted.
Color:
•Humans have this inane nature to distinguish between red and green.
•They understand red to indicate a sign of danger, while green to be safe.
•The use of the color range from red to green is about this human quality to naturally decode that the path is safe or dangerous.
Pattern:
•Strobing of light is indicative of calming of the human brain.
•A slow strobing light indicates calmness in a human and peace, whereas a fast strobing light indicates panic and frenzy.
•By using light strobes, we try and guide people into the paths of calm (safe, used a lot) and frenzy (less used, uncertain path).
1. Counter System:
Using an IR detector to count the number of people passing by a certain route, and updating the trail path guiders accordingly.
2. Environmental Factors:
Temperature/Humidity: Using a DHT 11 sensor.
Soil Moisture Sensor
Ambient Light: Using a TEMT6000 sensor.
3. Path lighting system: Neopixels
S. No | Component | Quantity | Price |
1 | Particle Argon | 1 | 27.50 |
2 | DHT 11 | 1 | 7.00 |
3 | Soil Moisture Sensor | 1 | 9.50 |
4 | Ambient Light Sensor | 1 | 5.00 |
5 | IR Sensor | 1 | 10.00 |
6 | Neopixel Strips | 2 | 21.00 |
7 | Acrylic Enclosure | 1 | 10.00 |
8 | Frensel Lens | 1 | 5.00 |
1. DHT Sensor:
The DHT sensor has three pins, VCC Ground and Digital Pin. We connect VCC and ground to that of the particle Argon and connect the digital pin to the digital pin D2.
2. Soil Moisture Sensor:
The Soil Moisture sensor has three pins, VCC Ground and Analog Pin. We connect VCC and ground to that of the particle Argon and connect the digital pin to the analog pin A4.
3. Ambient Light Sensor:
The Ambient Light sensor has three pins, VCC Ground and Analog Pin. We connect VCC and ground to that of the particle Argon and connect the digital pin to the analog pin A1.
4. IR Sensor:
The IR sensor has three pins, VCC Ground and Analog Pin. We connect VCC and ground to that of the particle Argon and connect the digital pin to the analog pin A0.
5. NeoPixel Strips:
The NeoPixel Strips has three pins, VCC Ground and Digital Pin. We connect VCC and ground to that of the particle Argon and connect the digital pin to the digital pin D4.
The sensor data are obtained from the appropriate pins. Once we obtain the individual sensor data, we normalize them.
Humidity = humidity/100;
Temperature = temp/75 (optimal temperature);
Soil Moisture = moisture/100;
Ambient Light = light/1024;
After normalizing the values, we map them to our color variable y.
The mapping weights are decided by the survey and we obtain our color variable y.
Y ranges from 0 to 1, we map it to the color range from 0-255.
Thus, we obtain a color range by varying the red and green parameters of the LED strip.
The IR detector detects a person in front of it.
Everytime it spots some, we increment our counter variable and change our blinking variable.
The blinking variable changes the speed at which the lights blink and thus we range from 10ms to 1s.
As more number of people pass by, the speed decreases and becomes a near constant.
All the variable data is uploaded onto the particle cloud, and is subscribed by thingspeak.
The data from thingspeak is downloaded onto the mobile application where users can obtain raw data.
// This #include statement was automatically added by the Particle IDE.
#include <Adafruit_DHT.h>
// This #include statement was automatically added by the Particle IDE.
#include <SharpIR.h>
// This #include statement was automatically added by the Particle IDE.
#include <neopixel.h>
#include <math.h>
#define PIXEL_PIN D3
#define PIXEL_COUNT 41
#define PIXEL_TYPE WS2812B
#define LEDCOUNT 41
// air condition
#define DHTPIN 2 // what pin we're connected to
#define DHTTYPE DHT22 // DHT 22 (AM2302)
DHT dht(DHTPIN, DHTTYPE);
// light sensor
int temt6000Pin = A0;
//soil sensor
int soil_moisture_pin = A4;
Adafruit_NeoPixel strip(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);
float light=0;
float humidity = 0;
float temp_F = 0;
float moisture = 0;
float distance_value = 0.0;
bool seeingPerson = false;
long lastCount = millis();
int passCount = 0;
int totalCount = 0;
int IR = A1;
int fade=0;
int max_delay_ON = 1000;
int delayON = 10;
void setup() {
pinMode(IR, INPUT);
Serial.begin(9600);
strip.begin();
strip.show();
Serial.begin(9600);
Serial.println("ready");
pinMode(soil_moisture_pin, INPUT);
pinMode(temt6000Pin, INPUT);
dht.begin();
}
void loop() {
light = ambient_light();
humidity = air_condition2();
temp_F = air_condition1();
moisture = soil_moisture();
bool x = person_detected();
Particle.publish("Moisture", String(moisture));
Particle.publish("Light", String(light));
Particle.publish("Total people crossing this point", String(totalCount));
float light_mod = light/1024;
float temp_F_mod = (temp_F-20)/70;
float humidity_mod = humidity/100;
float moisture_mod = 1-(moisture/100);
float y;
y = (light_mod*0.40) + (moisture_mod*0.55) + (temp_F_mod*0.025) + (humidity_mod*0.025);
fade = map(y, 0.0, 1.0, 0.0, 255.0);
fade = int(fade);
seeingPerson = false;
if (x == true){
//fade = max(passCount * 30, 0);
delayON = delayON + 10;
if (delayON > max_delay_ON){
delayON = max_delay_ON;
}
} // ON
for(int j = 0; j<LEDCOUNT;j++){
strip.setPixelColor(j, 255 - fade, fade, 0);
}
strip.show();
delay(delayON);
//OFF
for(int j = 0; j<LEDCOUNT;j++){
strip.setPixelColor(j, 0,0,0);
}
strip.show();
delay(delayON);
}
bool person_detected(){
// Determine IR sensor distance
float volts = float(analogRead(IR))*0.0048828125;
int distance = 13 * pow(volts, -1);
distance_value = (distance_value * 0.7) + (distance * 0.3);
if (distance_value <= 5){
if(!seeingPerson && (millis() - lastCount > 2000)){
lastCount = millis();
if (passCount < 40) {
totalCount++;
passCount++;
}
else{
totalCount++;
}
}
seeingPerson = true;
return true;
}
else{
return false;
}
}
float ambient_light(){
float light;
// Read sensor
int light_value = analogRead(temt6000Pin);
light = light_value * 0.0976;// percentage calculation
return light;
}
float air_condition1(){
float temp_F = dht.getTempFarenheit();
return temp_F;
}
float air_condition2(){
float humidity = dht.getHumidity();
return humidity;
}
float soil_moisture(){
float moisture_percentage;
int sensor_analog;
// Read sensor
sensor_analog = analogRead(soil_moisture_pin);
moisture_percentage = (100 - ( (sensor_analog/4095.00) * 100 ));
return moisture_percentage;
}
Click to Expand
1. Scott is an active runner. He uses the trails to run in the evenings. To challenge himself, Scott would love to take on longer and harder trails. Thus, the lighting system indicates which trail to pursue to achieve maximum efficiency and happiness.
2. Anne is a middle-aged woman who wants a safe path to walk daily. The trail lights show her the least rugged and highly used path to show her that she will have a safe and energetic walk.
3. Micheal is an 11-year-old who uses the trail to cycle every day. He needs to know the moisture and temperature before embarking on a particular trail in order to protect himself from slipping and dirt marks.
4. Sarah has just moved into the city. She finds the trails to be an exciting part of her daily exercise but isn’t sure about how to use them properly. The routing system of the trail lights guide her to a proper destination and Sarah can now feel at home
Thermostats, locks, power sockets, and lights are all being imbued with smarts making them increasingly aware and responsive to their environment and users. This course will chart the emergence of ...more
An ambient interactive trail lighting system that guides the trail runners, cyclists, and other users of the Schenley Park Sportsplex.