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

Switching operation between two sensors in nrf51 from Android

Hello NorDev. community,

I have two sensors operating on nrf51822. I control them manually by mechanical switches at the moment. I would like to change this sensor control(on/off/switch between) from Android by sending a command from application through BLE 4.1 and make it more flexible. I would like to add, I'm using my own application on Android for data transferring from nrf51822 and logging. I would appreciate any comment to make me clarified.

Parents
  • What kind of sensor are you using?

    I guess you either have some sort of Enable pin on the sensor that you can use to turn it on and off. Otherwise you will have to use some kind of circuit (maybe a MOSFET transistor is enough) to turn off the supply voltage to the sensor. Either way, you will probably want to do it by toggling a GPIO pin high and low to control either the MOSFET circuit or the Enable pin. If you need examples to look at I suppose the BLE Blinky Application is the best place to start. It shows how to control a GPIO using BLE.

    Some digital sensors have low power modes, as well, that you can enter and exit via software. That should be described in their datasheet.

Reply
  • What kind of sensor are you using?

    I guess you either have some sort of Enable pin on the sensor that you can use to turn it on and off. Otherwise you will have to use some kind of circuit (maybe a MOSFET transistor is enough) to turn off the supply voltage to the sensor. Either way, you will probably want to do it by toggling a GPIO pin high and low to control either the MOSFET circuit or the Enable pin. If you need examples to look at I suppose the BLE Blinky Application is the best place to start. It shows how to control a GPIO using BLE.

    Some digital sensors have low power modes, as well, that you can enter and exit via software. That should be described in their datasheet.

Children
No Data
Related