add Fritzing Wiring authored by Marcus Rothhaupt's avatar Marcus Rothhaupt
...@@ -8,58 +8,44 @@ In order to display a functional asset administration shell, five different sens ...@@ -8,58 +8,44 @@ 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. In this following section, the data retrieved and additional information for each sensor are shown.
### Joy-It KY-015 Kombi Sensor ## Sensor Wiring with Raspberry Pi Nano
This Sensor is used to digitally measure the temperature and humidity in its environment. displayed on the left:
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: - Joy-It KY-023 Joystick
- Joy-It KY-038 Soundsensor
- Joy-It KY-028 Thermistor
- MCP3008 10-bit ADC
{ displayed on the right:
tempSensor:
{
model: Joy-It KY-015 Kombi Sensor,
type: digital,
sensor_pin: D17,
temperature_values:
{
celsius: 23 C,
fahrenheit: 77 F,
},
humidity: 25 %
}
}
### Joy-It KY-023 Joystick - Joy-It KY-015 Kombi Sensor
- Joy-It KY-018 Fotowiderstand
This Sensor is used to implement a joystick interface. ![5_Sensor_Setup_Steckplatine](uploads/60d6f0c5539387276fc9672ee9768686/5_Sensor_Setup_Steckplatine.png)
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.
The analog values will be interpreted and a joystick_state as string will be calculated. ### Joy-It KY-015 Kombi Sensor
When accessed through the Asset Administration Shell the following example json data will be sent as a response by the joystick: 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:
joystickSensor:
```
{
tempSensor:
{
model: Joy-It KY-015 Kombi Sensor,
type: digital,
sensor_pin: D17,
temperature_values:
{ {
model: Joy-It KY-023 Joystick, celsius: 23 C,
type: analog, fahrenheit: 77 F,
values: },
{ humidity: 25 %
x_value:
{
mcp3008_channel: 2,
raw_value: 2050
},
y_value:
{
mcp3008_channel: 3,
raw_value: 0
}
},
joystick_state: left
}
} }
}
```
### Joy-It KY-018 Fotowiderstand ### Joy-It KY-018 Fotowiderstand
...@@ -67,16 +53,50 @@ This Sensor is used as a light sensor. It can output solely a digital value. The ...@@ -67,16 +53,50 @@ This Sensor is used as a light sensor. It can output solely a digital value. The
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: 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:
{ {
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 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:
{
model: Joy-It KY-023 Joystick,
type: analog,
values:
{ {
model: Joy-It KY-023 Joystick, x_value:
type: digital, {
sensor_pin: 17, mcp3008_channel: 2,
isBright: False, raw_value: 2050
isDark: True, },
} y_value:
{
mcp3008_channel: 3,
raw_value: 0
}
},
joystick_state: left
} }
}
```
### Joy-It KY-038 Soundsensor ### Joy-It KY-038 Soundsensor
...@@ -88,15 +108,17 @@ If the intensity of a sound has crossed the threshold within three seconds after ...@@ -88,15 +108,17 @@ If the intensity of a sound has crossed the threshold within three seconds after
Here is an example output of the json: Here is an example output of the json:
```
{
soundSensor:
{ {
soundSensor: model: Joy-It KY-038 Soundsensor,
{ type: digital,
model: Joy-It KY-038 Soundsensor, sensor_pin: 17,
type: digital, sound_detected: True
sensor_pin: 17,
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. 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,17 +126,19 @@ The analog values will be interpreted and a loud_sound_detected state will be de ...@@ -104,17 +126,19 @@ 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: Here is an example output of the json for the analog value:
```
{
soundSensor:
{ {
soundSensor: model: Joy-It KY-038 Soundsensor,
{ type: analog,
model: Joy-It KY-038 Soundsensor, mcp3008_channel: 1,
type: analog, raw_value: 1780,
mcp3008_channel: 1, gain: 8.7,
raw_value: 1780, loud_sound_detected: True
gain: 8.7,
loud_sound_detected: True
}
} }
}
```
### Joy-It KY-028 Thermistor ### Joy-It KY-028 Thermistor
...@@ -126,15 +150,17 @@ If the value of the temperature has crossed the threshold_reached value from the ...@@ -126,15 +150,17 @@ If the value of the temperature has crossed the threshold_reached value from the
Here is an example output of the json: Here is an example output of the json:
```
{
tempSensor:
{ {
tempSensor: model: Joy-It KY-028 Thermistor,
{ type: digital,
model: Joy-It KY-028 Thermistor, sensor_pin: 17,
type: digital, threshold_reached: True
sensor_pin: 17,
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. 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,17 +168,16 @@ The analog values will be interpreted and a hand_detected state will be determin ...@@ -142,17 +168,16 @@ 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: Here is an example output of the json for the analog value:
```
{
tempSensor:
{ {
tempSensor: model: Joy-It KY-028 Thermistor,
{ type: analog,
model: Joy-It KY-028 Thermistor, mcp3008_channel: 0,
type: analog, raw_value: 2005,
mcp3008_channel: 0, gain: 9.8,
raw_value: 2005, hand_detected: True
gain: 9.8,
hand_detected: True
}
} }
}
```
\ No newline at end of file