Forums » Support

Back To Topics

SBrick+ input characteristics

    • 178 posts
    March 29, 2019 2:32 PM CET

    Hello,

    yes, the input is analog. The SBrick's C1 and C2 pins on each port can be used to measure voltage. By default, these are tied to the battery voltage (Vcc) / 2 with a resistive divider.

    You can apply any voltage on these pins between 0V and Vcc.

    To take measurements, use commands "2C Set up periodic voltage measurement", and "2E Set up periodic voltage notifications" or "0F Query ADC".

    https://social.sbrick.com/wiki/view/pageId/11/slug/the-sbrick-ble-protocol

    The input voltage is dropped through a 1:10 voltage divider. The reference voltage is 1.24V, and the resolution is 12 bits, but you'll get a 16 bit number back.

    Basically, you have to take the number you get from the SBrick, multiply it by 1.24 (the reference voltage), and again with 11 (because of the voltage divider), and divide the the result with 2^15 (12 bit resolution, stored in MSB, first bit is essentially a sign), to get a voltage value.

     

  • S M
    • 1 posts
    March 26, 2019 9:14 AM CET

    Hey Guys,

    I want to build my own sensor, but I can't find any input characteristics of the sbrick+.

    From API I guess its analogue input, but which resolution and max voltage has it? 

    Are there other stuff to mention?

     

    thx in advance :-)