Avatar for user129301

user129301

Member since May 2021 • Last active Aug 2021
  • 1 conversations
  • 4 comments

Most recent activity

  • in General
    Avatar for user129301

    Thank you very much for your reply. My first plan is to communicate the data with the PC from the Espruino. I have ordered the MDBT42Q and keep you posted of my progress. I am still a novice using this device so please don't mind me asking a lot of question in the future.

    Thank you again.

    ZJ

  • in General
    Avatar for user129301

    Thank you very much for your reply.

    I should have mentioned the Master side in my previous message. Yes, at this point I intend to use an MDBT42Q at the Master side too and in order to check the result of the transmission, I wanted to print the result.

    I would be grateful for your feedback on the Master side (RX) pseudocode as well.

    I am grateful for your event based transmission comment in your previous message, and the code seems simple enough to modify and test.

    Additional question: Is the process of receiving and handling data different when using a phone/PC.

    I would be grateful for your response.

    ZJ

  • in General
    Avatar for user129301

    Thank you very much for your reply and it certainly helps!

    We are of course designing our own board which is why the dimensions are important.

    I am still getting around Bluetooth 5.0 and Java (I am more used to C). I found out that BLE 5.0 is capable of sending a max. of 244 bytes in a packet. I had been pondering on a pseudocode for a fast transmission of a 500 Hz biosignal. Suppose we receive the data from an ADC in INT or UNSIGNED INT format. In that case, I want to send 200 bytes (containing 100 sample values). These 100 values are sampled at 1 ms. These 100 samples (which would take roughly 0.1 s to record) would be placed in a TX buffer and would be sent to the Master device. I would be grateful if you could check my (rough and simple) pseudocodes below to see if my concepts are right.

    TX (Peripheral Side)

    START:
    Global Variable Buffer;

    setup()
    {
    BLE initialization // (incl. Peripheral setting, advertising)
    Establish connection with Master
    }

    Loop()
    {
    Buffer = Samples of ADC values using Waveform Class @ 1 kHz
    Transmit Buffer to Master // transmitting 200 bytes (100 samples) in 0.1 sec
    }

    END:

    RX (Master Side)

    START:

    Global Var flag; // flag for receiving new values in buffer
    Global Var Samples_ADC; //contains 100 received ADC values
    Global Var count = 0; // counter for Samples_ADC

    setup()
    {
    Initialize Serial
    Initialize Timer Interrupt
    BLE initialization // (incl. Master setting, Receive advertisements)
    Establish connection with Master // (Including min. and max. connection interval setting)

    }

    Loop1()
    {

    Buffer = Receive Values
    Samples_ADC = Parsed Buffer values // Contains transmitted values and parse

    Flag = 0;
    Timer Interrupt en = 1;
    while(Flag == 0); // wait until Flag is 1
    }

    Timer Interrupt ISR (called after 1 ms)
    {
    if (count == size(Samples_ADC)) --> count = 0, Flag = 1; //reinitialize count and flag
    Print(buffer(count)); // prints each value in buffer after 1 ms
    count++;

    }
    END:

    I have written down this rough C based pseudocode off the top of my head. I request you to kindly critique on it and comment if I have to worry about timing issues i.e data back log or loss etc.

    Please understand my lack of knowledge of BLE. I would be grateful for any replies.

    Thank you
    ZJ

  • in General
    Avatar for user129301

    Dear Administrator,

    I hope that you are in good health.

    I am working on an application for transmitting a 500 Hz biosignal from an external signal acquisition device wirelessly to a computer or another remote device. For this design, I require a board with an in-built ADC along with a wireless transceiver (preferably Bluetooth for stable connection). While searching the internet, I stumbled upon the Espruino MDBT42Q module.

    I have some experience with Bluetooth 4.0 Low Energy using Red Bear Nano modules; however, as far as I remember, they could only provide 125 Hz using the Arduino IDE.

    My main requirements are as follows:

    1) Sample transmission and receive at at least 2 kHz to overcome the signal of 500 Hz at its highest frequency.
    2) A module compact in size which can be fitted in a rectangular space of 18 mm x 30 mm.
    3) Must have an ADC module to input analogue signals.

    To the best of my understanding, I found Espruino MDBT42Q which uses the Nordic Semiconductor nRF52832 the most appropriate to my application. I would be grateful if you can let me know if my understanding is correct. I would also be grateful if you could provide me with other options with improved features i.e. smaller size, higher resolution ADC, faster transmit/receive.

    I have an additional question regarding programming the Espruino MDBT420 board. I was reading the "Getting Started" page and I found out that the device can programmed wirelessly using a Web IDE provided we have a compatible in built Bluetooth module and Web Bluetooth. Have I understood that correctly?

    I would be grateful for any replies.

    Thank you.

    ZJ

Actions