BOSCH XDK - virtual sensors
16. 7. 10 오후 4:18

Hello - we have made a very good mqtt solution to connect the XDK in a very easy way to our smarthome application, also transmitting sensor data to my IPhone via my particle photons.

Next milestone is to connect external sensors, actors to the XDK gateway - also the easy way and controll and call them the same way as already - via mqtt calls and answers.

Idea is to implement virtual sensors - digital and analog - which provide only their status in the mqtt answer. We have made first test with a bunch of sensors (see picture) - looks fine and works.
(Hall Sensor, Flammen Sensor, Gas Sensor, Quecksilber Schalter, Gabellichtschranke, Fotowiderstand, Reedschalter, Neigungsschalter, IR Hindernis Vermeidungssensor, Regentropfen Erkennungssensor, Moisture Sensor etc.)

  • The raw ADC Values will go from 0 to 4095 corresponding to 0V – 2.5V.
  • The MCU is powered by 2.5V.  So the max voltage on an input pin should be 2.8V (VDD+0.3).  
    We would recommend using a voltage divider on the sensor we are using so the input to the MCU isn’t 3.3V.  A voltage divider with Rt = 3.24K and Rb = 10k should work, where Rt is the top resistor and Rb is the bottom resistor in the voltage divider.  This should give you 2.49V input into the MCU when the sensor outputs a high of 3.3V.

On the picture you see first trials without  a voltage divider and a mercury sensor  - but this may damage the xdk over time. Some sensors work perfekt with only the 2.5V supply.

Which problem are you solving with your solution?
XDK can publish now 2 virtual analog sensor and 2 virtual digital sensor data via MQTT.
(The inbuild sensors also ...)
No extra software needed on the XDK - only wire up and run...

How does your idea work on the software side?
The XDK sends his sensor data via MQTT to the broker only if he gets an request.
Pressing the button on the XDK will start sending data automaticly.
Any other software application can now work with this data.

How does your idea work on the hardware side?
XDK is a stand alone sensor node, can be placed where ever you want - must be in reach of your wifi network. Up to 4 sensors (2 analog, 2 digital) can wired to the xdk gateway. We have an mqtt broker (raspberrypi) who receives the messages.

Here a snapshot of an mqtt message - external sensor data last entries

Device: XDK110
Name: 20C38FF5ECD7
Timestamp: 456
acc (mG):
     x = +14 
     y = +26 
     z = +1014
gyro (mdeg/s):
     x = -5249
     y = +2197
     z = +4150
mag (uT):
     x = +3  
     y = +28 
     z = +18 
light (mLux) = 43200
temp (mCelsius) = 28320
pressure (Pascal) = 98458
humidity (%rh) = 46
PA1 Input = 0
PE2 Input = 1
ADC Ch5 = 4008
ADC Ch6 = 3884



+3 (3 투표)
RE: BOSCH XDK - virtual sensors
16. 8. 3 오전 5:43 as a reply to Achim Kern.

- actually testing with some nice garden sensors
- see XDK powered by Solar LiPo
- connected with gateway
- gateway connected with 3 external sensors
- data transfer via mqtt to SmartSensor Application or SmartHome Application

+1 (1 투표)
RE: BOSCH XDK - virtual sensors
16. 8. 3 오후 2:30 as a reply to Achim Kern.

Hello Achim,

thank you for submitting your XDK use case!

You accepted the BCDS terms and conditions correctly and your idea Virtual sensors will participate in the Ideation Jam.

Kind regards,

+1 (1 투표)