This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Automation Control Services for Quasi Real Time applications using BLE 5

Dear Sirs,

I am evaluating the option of controlling a couple of motors (each with an independent controller based on a nRF52840 device) from a Smartphone App. Both controllers receive the same orders  from the smartphone and both motors should actuate near simultaneously. A first idea is using indications to Include acknowledge messages from each nRF52840 device, just to be sure of a right RF link between the smartphone and the two nRF52840. I understand that it's not possible to have a full synchronization between both motors and I think the full mechanical set would accept a maximum delay of 60ms-70ms between the time response of the two motors. 

Do you finf this application could be succesful? What kind of GATT service would you suggest to use or take as a example to be adapted?

Thank you very much in advance.

Best Regards,

Joel Invers

Parents
  • Hello Karl,

    Thank you for your answer.

    I cannot add much more at my explanation. One smartphone to control the movement of two motors at the same time. Associated to each motor ther is a controller based on the nRF52840. A particular case may be switching ON both motors at the same time, sending one command from the smartphone and receiving the ACK from each controller. During the movement the smartphone will receive and monitor the position of each motor. The user may send a switch off order from the smartphone in any moment. This order should stop both motors simultaneously.

    What example would you suggest to take as a starting point to develop the program of each nRF52840 controller?

    Thank you in advance.

    Best Regards,

    Joel

  • Hello Joel,

    jinvers said:
    Thank you for your answer.

    No problem at all, I am happy to help!

    jinvers said:
    I cannot add much more at my explanation.

    That is unfortunate, since the real-time communication between the devices will depend heavily on their working environment and relative placement.

    jinvers said:
    What example would you suggest to take as a starting point to develop the program of each nRF52840 controller?

    To quickly get a prototype up and running you could use the BLE Nordic UART examples as a starting ground for this application. The exam
    Are you previously familiar with developing for Nordic devices, either with the nRF5 SDK or the nRF Connect SDK? If you are not already familiar with the nRF5 SDK I would suggest that you begin with the nRF Connect SDK. You should then use the NUS peripheral sample as your starting ground.
    From there, you could add the necessary motor control signals, and then have it be controlled based on what is received through the NUS service that is already implemented in the sample - the only thing you will have to add is thus the motor control part.

    Best regards,
    Karl

Reply
  • Hello Joel,

    jinvers said:
    Thank you for your answer.

    No problem at all, I am happy to help!

    jinvers said:
    I cannot add much more at my explanation.

    That is unfortunate, since the real-time communication between the devices will depend heavily on their working environment and relative placement.

    jinvers said:
    What example would you suggest to take as a starting point to develop the program of each nRF52840 controller?

    To quickly get a prototype up and running you could use the BLE Nordic UART examples as a starting ground for this application. The exam
    Are you previously familiar with developing for Nordic devices, either with the nRF5 SDK or the nRF Connect SDK? If you are not already familiar with the nRF5 SDK I would suggest that you begin with the nRF Connect SDK. You should then use the NUS peripheral sample as your starting ground.
    From there, you could add the necessary motor control signals, and then have it be controlled based on what is received through the NUS service that is already implemented in the sample - the only thing you will have to add is thus the motor control part.

    Best regards,
    Karl

Children
  • Hello Karl,

    I thought that the NUS peripheral sample is based on using the nRF52840 like a UART-BLE converter. This is not my case. I will not have any UART connection to a main microcontroller. All the program (BLE+application) will run into the nRF52840 module selected. So, the smartphone may send a ON command to the nRF52840 module, this module would send an ACK and then this nRF52840 will manage the motor.

    Best Regards,

    Joel

  • Hello again, Joel

    jinvers said:
    I thought that the NUS peripheral sample is based on using the nRF52840 like a UART-BLE converter.

    This is correct, the sample is made to emulate an UART over BLE connection.
    You may however easily re-route the received data/command to another peripheral or the motor control directly, instead of having it output on the UART peripheral.
    This way, the BLE transfer and service is already configured and working, so you may focus on implementing the motor control.

    Best regards,
    Karl

  • Ok. I see. Thank you.

    I think we can close the ticket. Should I do it from my side and how?

    Regards,

    Joel

  • jinvers said:
    Thank you.

    No problem at all, Joel - I am happy to help you with this!

    jinvers said:
    I think we can close the ticket. Should I do it from my side and how?

    You could either do so by clicking 'verify answer' on the comment that best answered your initial ticket question, or I could close the ticket manually.

    Please do not hesitate to open another ticket if you should encounter any issues or questions in the future.

    Good luck with your development!

    Best regards,
    Karl

Related