This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Gas sensor reading and passing over ble to Android

Hello,

I'm a beginner in Nordic ble.

I explain my question as following:

Currently, I'm using a platform integrating several ambient and motion sensors(Temperature, Air pressure, Humidity, Acc, Mag. and Gyres.) these sensors are already integrated and communicating through I2C to the Nrf51. I have to add some gas sensors(CO,CO2and...) which output is a voltage and analogue and has to be connected to ADC pin in Nrf518122 and then passing the data over ble to Android to be monitored.

can I use Ble_proximity sample code in examples which also sounds is a connected to ADC?

If so, how and where to change the code?

How can I make match the data transferring from ADC and other already integrated sensors over the BLe to not interfere.

Please, maybe this question does not make sense for many of you, but I'm a beginner:)

Any further tips and guidance are welcomed.

Best regards, Mostafa.

Parents
  • MyZip (1).zipHi Bung,

    Thanks for the answer. Please allow me to redefine my question in this way because I think my previous one was incomplete. -I'm supposed to use 4 gas sensors(or maybe 5 sensors), but not simultaneously. Fortunately, each sensor has a enable pin which can be set up independently. Now, I explain the procedure, then will ask the point. I'm going to divide every 1 minute to 4 parts each 15 seconds, it means, enable each sensor for 15 seconds. In this way I always have only one sensor running and one input in ADC pin to be read.(right?) Therefore I need to configure the ADC pin to read only one input and I think it does not mind which sensor it would be.(all sensor'S output all analog voltage-but I'm not sure how large the range of variation is, but all are from the same family) not the point is that, as there are different conversions for each sensor to dedicate the measurement according to ppm(gas measurement) for each reading, can I do this in the main function? For instance, I assign, if the pin 2 is enabled then this type of conversion is applied? And would you think this conversion is better to be done in µcontroller side and then pass the value over the ble-uart or Android application side(sending the raw data over ble and then conversion is performed in Android part-is it possible)?

    and please, if possible address me to a full complete example with all library. Best regards, thanks for being patient. Mostafa.

  • You need to make sure the sensor switch its output to high impedance when it's not active. This way you can connect their output together to single pin. It's better to separate them to avoid interference.

    I don't see any problem with your set-up.

    What do you mean by "full complete example with all library" ? I don't think we have something exactly the same as what you want. What we have is BLE example with ADC code. And you should start from there.

Reply
  • You need to make sure the sensor switch its output to high impedance when it's not active. This way you can connect their output together to single pin. It's better to separate them to avoid interference.

    I don't see any problem with your set-up.

    What do you mean by "full complete example with all library" ? I don't think we have something exactly the same as what you want. What we have is BLE example with ADC code. And you should start from there.

Children
No Data
Related