# Node sensor documentation

## How does it work?

The nodes are used to collect data about the environment. They are connected to the database using post requests, every node sends a post request to the database with the sensordata it has collected. The database then stores this data in the right table. Every node is also connected to a websocket server, this server is used to send the data to the frontend. The frontend then uses this data to display the current situation in the environment.

Every node has the same sensors, this makes it easy to create more and ensures that you get as many equal measurements as possible everywhere. There is 1 node that will be different. This is the one with the screen. This will have some other functions.

The goal is to put every node on a populated area or in every room, this way we can get a good overview of the environment and react on it to make it more comfortable for everyone.

## What sensors will we use?

We will use the following sensors in the nodes:
* SGP30 for eCO2 and TVOC
* DHT11 for temperature and humidity
* Sound sensor for sound level

We chose these sensors because they are cheap to buy and don't require a lot of power to run. This makes it easy to create more nodes and to put them everywhere. These sensors aren't the most accurate, but they are good enough for our use case. Since we will only use them to get an overview of the environment and not for scientific research.

## Appearance of the nodes

Every node has the sensors listed above. The also have a little oled screen to display the current situation in the environment. This is used to show the current temperature, humidity, eCO2, TVOC. Next to it is also a little led matrix which will show the current sound level.

## Power

The nodes are powered by 2 lithium batteries. They will be removable to charge them. We might consider using double A batteries, but we are not sure yet, since lithium batteries are more powerful, last longer and AA batteries are not rechargeable, and we want to make the nodes as sustainable as possible.