... | ... | @@ -8,13 +8,29 @@ In order to display a functional asset administration shell, five different sens |
|
|
|
|
|
In this following section, the data retrieved and additional information for each sensor are shown.
|
|
|
|
|
|
## Sensor Wiring with Raspberry Pi Nano
|
|
|
|
|
|
displayed on the left:
|
|
|
|
|
|
- Joy-It KY-023 Joystick
|
|
|
- Joy-It KY-038 Soundsensor
|
|
|
- Joy-It KY-028 Thermistor
|
|
|
- MCP3008 10-bit ADC
|
|
|
|
|
|
displayed on the right:
|
|
|
|
|
|
- Joy-It KY-015 Kombi Sensor
|
|
|
- Joy-It KY-018 Fotowiderstand
|
|
|
|
|
|
![5_Sensor_Setup_Steckplatine](uploads/60d6f0c5539387276fc9672ee9768686/5_Sensor_Setup_Steckplatine.png)
|
|
|
|
|
|
### Joy-It KY-015 Kombi Sensor
|
|
|
|
|
|
This Sensor is used to digitally measure the temperature and humidity in its environment.
|
|
|
It is very similar to a DHT11 Sensor. The adafruit.DHT library is used to get the values from the sensor.
|
|
|
This Sensor is used to digitally measure the temperature and humidity in its environment. It is very similar to a DHT11 Sensor. The adafruit.DHT library is used to get the values from the sensor.
|
|
|
|
|
|
When accessed through the Asset Administration Shell the following example json data will be sent as a response:
|
|
|
|
|
|
```
|
|
|
{
|
|
|
tempSensor:
|
|
|
{
|
... | ... | @@ -29,16 +45,36 @@ When accessed through the Asset Administration Shell the following example json |
|
|
humidity: 25 %
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
### Joy-It KY-018 Fotowiderstand
|
|
|
|
|
|
This Sensor is used as a light sensor. It can output solely a digital value. The value can only determine if a threshold value is crossed or not. The light sensor therefore outputs whether its surrounding environment is bright or dark.
|
|
|
|
|
|
When the digital output of the light sensor is accessed through the Asset Administration Shell the following example json data will be sent as a response:
|
|
|
|
|
|
```
|
|
|
{
|
|
|
lightSensor:
|
|
|
{
|
|
|
model: Joy-It KY-023 Joystick,
|
|
|
type: digital,
|
|
|
sensor_pin: 17,
|
|
|
isBright: False,
|
|
|
isDark: True,
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
### Joy-It KY-023 Joystick
|
|
|
|
|
|
This Sensor is used to implement a joystick interface.
|
|
|
This sensor is solely returning analog values which will be fed into a MCP3008 microchip. The MCP3008 then generates an output signal and sends it to the raspberry pi zero. The adafruit.DHT library is used to get the values from the sensor.
|
|
|
This Sensor is used to implement a joystick interface. This sensor is solely returning analog values which will be fed into a MCP3008 10-bit ADC. The MCP3008 then generates an output signal and sends it to the raspberry pi zero. The adafruit.DHT library is used to get the values from the sensor.
|
|
|
|
|
|
The analog values will be interpreted and a joystick_state as string will be calculated.
|
|
|
|
|
|
When accessed through the Asset Administration Shell the following example json data will be sent as a response by the joystick:
|
|
|
|
|
|
```
|
|
|
{
|
|
|
joystickSensor:
|
|
|
{
|
... | ... | @@ -60,23 +96,7 @@ When accessed through the Asset Administration Shell the following example json |
|
|
joystick_state: left
|
|
|
}
|
|
|
}
|
|
|
|
|
|
### Joy-It KY-018 Fotowiderstand
|
|
|
|
|
|
This Sensor is used as a light sensor. It can output solely a digital value. The value can only determine if a threshold value is crossed or not. The light sensor therefore outputs whether its surrounding environment is bright or dark.
|
|
|
|
|
|
When the digital output of the light sensor is accessed through the Asset Administration Shell the following example json data will be sent as a response:
|
|
|
|
|
|
{
|
|
|
lightSensor:
|
|
|
{
|
|
|
model: Joy-It KY-023 Joystick,
|
|
|
type: digital,
|
|
|
sensor_pin: 17,
|
|
|
isBright: False,
|
|
|
isDark: True,
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
### Joy-It KY-038 Soundsensor
|
|
|
|
... | ... | @@ -88,6 +108,7 @@ If the intensity of a sound has crossed the threshold within three seconds after |
|
|
|
|
|
Here is an example output of the json:
|
|
|
|
|
|
```
|
|
|
{
|
|
|
soundSensor:
|
|
|
{
|
... | ... | @@ -97,6 +118,7 @@ Here is an example output of the json: |
|
|
sound_detected: True
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
The analog value will be fed into a MCP3008 microchip. The MCP3008 then generates an output signal and sends it to the raspberry pi zero.
|
|
|
|
... | ... | @@ -104,6 +126,7 @@ The analog values will be interpreted and a loud_sound_detected state will be de |
|
|
|
|
|
Here is an example output of the json for the analog value:
|
|
|
|
|
|
```
|
|
|
{
|
|
|
soundSensor:
|
|
|
{
|
... | ... | @@ -115,6 +138,7 @@ Here is an example output of the json for the analog value: |
|
|
loud_sound_detected: True
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
### Joy-It KY-028 Thermistor
|
|
|
|
... | ... | @@ -126,6 +150,7 @@ If the value of the temperature has crossed the threshold_reached value from the |
|
|
|
|
|
Here is an example output of the json:
|
|
|
|
|
|
```
|
|
|
{
|
|
|
tempSensor:
|
|
|
{
|
... | ... | @@ -135,6 +160,7 @@ Here is an example output of the json: |
|
|
threshold_reached: True
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
The analog value will be fed into a MCP3008 microchip. The MCP3008 then generates an output signal and sends it to the raspberry pi zero.
|
|
|
|
... | ... | @@ -142,6 +168,7 @@ The analog values will be interpreted and a hand_detected state will be determin |
|
|
|
|
|
Here is an example output of the json for the analog value:
|
|
|
|
|
|
```
|
|
|
{
|
|
|
tempSensor:
|
|
|
{
|
... | ... | @@ -153,6 +180,4 @@ Here is an example output of the json for the analog value: |
|
|
hand_detected: True
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
``` |
|
|
\ No newline at end of file |