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

Need help to go with nrf52840

I'm a newby in bluethoth communication.
To control model cars and model trains in scale 1:87 I built a decoder with an ATMEL chip.
The communication based on digital infrared data frames.
The decoder helds the startup information within the EEPROM.
Now I want to use bluetooth to communicate with.
My considerations are:
Master and slave communication (may be mesh)
Master sends and reads information to/from slave (polling ?)
Each slave controls the function of the car or train dependend of the received data from master.
Besides communication every slave must be able to analize or built:
Analog input
Digital output
Set lights on or off
Create servo pulse
PWM to lights
Send serial data to a Atmel controller
PWM for motor control
And more to do...
Which examples do I need to have the basics running on the development board?
I've got working the blinky example.
But i dont know which example i have to use to get master and slave communication?
I bought 4 development boards for testing from mouser.
BR
Claus
Parents
  • Hi Claus

    Are you replacing the IR communication with BLE?

    If yes, what is the role of the Atmel chip after you introduce the Nordic BLE solution?

    The master in your network is some kind of remote control I assume? 
    Will there just be one master, or could there be many masters?

    I believe the ble_app_blinky or ble_app_uart examples are good starting points (UART more than blinky possibly, as it allows you to send arbitrary strings between the master and slave). Then you will get the BLE link running quickly, and can then add the various peripherals and additional features on top of this. 

    Best regards
    Torbjørn

  • Hi Torbjom,

    Yes, I want to replace the IR Com by BLE.
    The Atmel chip and all of it's functions has to be replaced by the nordic chip mounted in the cars (slave).

    Just one master and many slaves. At the moment we have customers with more than 100 cars running (> 100 slaves)

    The master controls all those slaves !

    As I understand the "ble_app_uart examples" requires a terminal like programm at PC to send the data to the master.

    In my case the cars with the slave programm running by them selve. Communication from master to slave or backwards is only needed if eg. the Speed or Lights have to be changed.

    At start of the master  all slaves are asked if they are online.
    How can the master be informed if a slave has powered on later.
    The master polls the slave via addresses ? The slaves has to send data like Batterie voltage, actual Speed eg.

    The function of the slave depends on Setup parameters which must be Held after power off like EEPROM at Atmel chip.

    The master must be able to Change those data by request. An Firmware  update of the slave via the master  will be helpfull.

    I know this is a big Business for a newby. But I want to do it.

    Best regards

    Claus

  • Hi Torbjorn,
    Sorry, I misspelled your Name.

    Claus 

  • "ble_app_uart examples" requires a terminal like programm

    No, it doesn't require it - the example just uses that for the purposes of illustration.

    You can feed data into the NUS BLE Service from wherever you like.

    > 100 slaves

    As noted, the SoftDevice has a max 20 simultaneous connections.

    A Mesh can have more (32K?) - but you'd need to check if throughput & latency are going to be OK for your application ...

Reply Children
Related