<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Creating a load on a battery using the radio</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114986/creating-a-load-on-a-battery-using-the-radio</link><description>I am in a need to measure a battery level under a constant load. Rather than adding a custom electronics, I am considering using the radio. I believe there is a way of doing that (see https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/peripheral</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 02 Oct 2024 22:37:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114986/creating-a-load-on-a-battery-using-the-radio" /><item><title>RE: Creating a load on a battery using the radio</title><link>https://devzone.nordicsemi.com/thread/504764?ContentTypeID=1</link><pubDate>Wed, 02 Oct 2024 22:37:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:429326df-b638-41d1-ba4e-4b3372c01ba4</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Excellent suggestion. There is no +8dBm option on the nrf52832 (which I ran this test on) and I see these results&amp;nbsp;&lt;span&gt;@3V on nRF52832 with cpu awake, no DC-DC, no hardware attached to io pins and no peripherals enabled.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;23mA at +4dBm is most useful for a faster battery test.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;  NRF_RADIO-&amp;gt;TXPOWER = 0x08; // +8dBm 11.35mA
  NRF_RADIO-&amp;gt;TXPOWER = 0x04; // +4dBm 23.17mA
  NRF_RADIO-&amp;gt;TXPOWER = 0x00; //  0dBm 17.42mA&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating a load on a battery using the radio</title><link>https://devzone.nordicsemi.com/thread/504760?ContentTypeID=1</link><pubDate>Wed, 02 Oct 2024 20:02:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4863ae71-9b9b-4909-b1b7-ea4e0a6c8b40</guid><dc:creator>JZone</dc:creator><description>&lt;p&gt;Thanks for the suggestions. The following solution seems to work&lt;/p&gt;
&lt;p&gt;NRF_RADIO-&amp;gt;MODE = 0; // 1 Mbps Nordic proprietary radio mode&lt;br /&gt; NRF_RADIO-&amp;gt;TXPOWER = 0x08; // +8dBm&lt;br /&gt; NRF_RADIO-&amp;gt;TASKS_TXEN = 1;&lt;/p&gt;
&lt;p&gt;test_battery();&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt; NRF_RADIO-&amp;gt;TXPOWER = &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt; // Set back to default&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;NRF_RADIO-&amp;gt;TASKS_DISABLE = 1;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating a load on a battery using the radio</title><link>https://devzone.nordicsemi.com/thread/504071?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2024 23:54:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62488ff7-155d-46d7-a980-93f39511bd37</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Continuous Rx until advertising packet received (then restart Rx) with HFCLK crystal enabled I see 8.8mA @3V on nRF52832 with no DC-DC, no hardware attached to io pins and no peripherals enabled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating a load on a battery using the radio</title><link>https://devzone.nordicsemi.com/thread/504038?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2024 16:31:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14b769a5-7cfc-497d-946f-710cb085f1ef</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;I do something similar for measuring coin cell capacity by monitoring voltage decay under a known load via&amp;nbsp;Bare-metal Radio Transmit.&amp;nbsp;Similar to &lt;em&gt;solar_sensor_beacon&lt;/em&gt; sample on the Nordic GitHub repo. The code can be run before nRFConnect stuff if using nRFConnect environment.&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://github.com/NordicPlayground/solar_sensor_beacon/blob/master/src/sensor_beacon.c"&gt;solar_sensor_beacon&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicPlayground/solar_sensor_beacon/blob/master/src/sensor_beacon.c"&gt;&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/107076/advertising-using-raw-radio-registers-with-nrf52832-without-softdevice"&gt;advertising-using-raw-radio-registers&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Edit: I wrote these notes, might be useful if you want to actually have detectable advertising packets. Note also that you can get a fixed load by using Rx instead of Tx if you want to keep the environment cleaner.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// BLE Advertising Packet
// ======================
// Every packet begins with an 8 bit preamble, an alternating binary sequence. This is followed by a 32 bit access
// address (AA) which can be thought of as a unique identifier which defines a particular connection. When a
// device (master or slave) transmits on an advertising channel it uses a fixed value of 0x8e89bed6 as the access
// address.
// Following the 32 bit access address are optional S0, LENGTH and S1 fields then a variable length Protocol Data
// Unit (PDU) which contains the message data payload. Finally all packets end with a 24 bit CRC.
// By default, the Nordic BLE address is derived from the NRF_FICR-&amp;gt;DEVICEADDR[] and is 48 bits in length (6 bytes)
// If S0, LENGTH or S1 are specified with zero length their fields will be omitted in memory, otherwise each
// field will be represented as a separate byte, regardless of the number of bits in their on-air counterpart
// For the field sizes defined in bits, the occupation in RAM will always be rounded up to the next full byte size
// (for instance 3 bit length will allocate 1 byte in RAM, 9 bit length will allocate 2 bytes, etc.).
// On-air packet layout (Note Header in RAM is 3 bytes if S0INC is &amp;#39;1&amp;#39;)
// +-------------------------------------------------------------------------------------------------------------------------+
// |                                         BLE Advertising Packet - Legacy                                                 |
// +-------------------------------------------------------------------------------------------------------------------------+
// |                                         1MHz: 47 octets max total length                                                |
// +--------+-------+------------------------------------------------------------------------------------------+------+------+
// |        |Access |                                                                                          | Add  |      |
// |Preamble|Address|                   Protocol Data Unit PDU                                                 | On   | CRCC | Tone Ext
// +--------+-------+------------------------------------------------------------------------------------------+------+------+
// |   1(2) |   4   |                                    2 - 39                                                | (0)  |  3   | 16 - 160uSec
// |        |       +-----------------+------------------------------------------------------------------------+      |      |
// |        |       |    Header       |                  Payload                                               |      |      |
// |        |       +-----------------+------------------------------------------------------------------------+      |      |
// |        |       |       2         |                  0 - 37                                                |      |      |
// |        |       +-----+-----+-----+------------------------------------------------------------------------+      |      |
// |        |       | Opt | Opt | Opt |  MAC Addr  |     AdvData List (example 3 fields)                       |      |      |
// |        |       | S0  | Len | S1  +------------+-----------------------------------------------------------+      |      |
// |        |       |-----+-----+-----|    6       |     0 - 31                                                |      |      |
// |        |       | (1) | (1) | (1) |            +-------------------+-------------------+-------------------+      |      |
// |        |       |     |     |     |            |    AdvData Flags  |    AdvData Name   |   (AdvData Data)  |      |      |
// |        |       |     |     |     |            +-------------------+-------------------+-------------------+      |      |
// |        |       |     |     |     |            |        3          |          6        |       0 - 22      |      |      |
// |        |       |     |     |     |            +-----+------+------+-----+------+------+-----+------+------+      |      |
// |        |       |     |     |     |            | Len | Type | Data | Len | Type | Data | Len | Type | Data |      |      |
// |        |       |     |     |     |            +-----+------+------+-----+------+------+-----+------+------+      |      |
// |        |       |     |     |     |            |  1  |  1   |  1   |  1  |  1   |  4   |  1  |  1   |  20  |      |      |
// |        |       |     |     |     |            |     |      |      |     |      |      |     |      |      |      |      |
// |  1(2)  |  4    | (1) | (1) | (1) |   6        |  1  |  1   |  1   |  1  |  1   |  4   |  1  |  1   |  20  | (0)  |  3   |
// +--------+-------+-----+-----+-----+------------+-----+------+------+-----+------+------+-----+------+------+------+------+
//         0x8E89BED6     |     |      \
//                /       |     |       \
//               /  RAM uses 2+ bytes    \
//              / 1 byte | 2 bit | 6 bit  \
//             /                           \
//            /  OTA only 2 bytes for BLE   \
//           |                         |     |
//           Type RFU ChSet TxAdd RxAdd Length
//    bits:    4   1    1     1     1     8
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating a load on a battery using the radio</title><link>https://devzone.nordicsemi.com/thread/504036?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2024 16:10:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d182965c-7477-4cd0-b93b-6b4d582912d9</guid><dc:creator>JZone</dc:creator><description>&lt;p&gt;The test is intended too be executed only during a power-on of the&amp;nbsp;normal application&lt;/p&gt;
&lt;p&gt;1. Normal application starts&lt;/p&gt;
&lt;p&gt;2. Put radio in TX by a direct configuration of radio registers&lt;/p&gt;
&lt;p&gt;3. Measure battery voltage for 1 to 2s&lt;/p&gt;
&lt;p&gt;4. Disable radio&lt;/p&gt;
&lt;p&gt;4. If battery&amp;nbsp;ok, continue with initialization of the app, start the Soft Device.......&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating a load on a battery using the radio</title><link>https://devzone.nordicsemi.com/thread/503898?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2024 08:29:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14483396-e5ce-4e03-ad18-ec0d5788a8d5</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Then putting the radio in TX is likely the option.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you&amp;nbsp;&lt;/span&gt;&lt;span&gt;elaborate on how this should work in practice?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Would it be something used in your normal application hex?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Would it be some test-mode you put the chip into, instead of booting the normal application?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Or something that you would need to do every x amount of time while running the normal application?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating a load on a battery using the radio</title><link>https://devzone.nordicsemi.com/thread/503817?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2024 16:30:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b60bc5a-0794-46a7-9e05-eeea895b6526</guid><dc:creator>JZone</dc:creator><description>&lt;p&gt;Thanks for the response. I need more than that. 10 to 20mA would be&amp;nbsp;ideal.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating a load on a battery using the radio</title><link>https://devzone.nordicsemi.com/thread/503702?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2024 09:31:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d490c876-0417-49db-be5b-c61cd9b3c05b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;What level of load is needed? if ~3mA is okay, then the easiest is just to let the CPU run, and not put it into idle mode.&lt;/p&gt;
&lt;p&gt;Snippet:&lt;/p&gt;
&lt;p&gt;While(true)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;__NOP&lt;/span&gt;&lt;span&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf52833/page/_tmp/nrf52833/autodita/CURRENT/parameters.i_cpu.html"&gt;https://docs.nordicsemi.com/bundle/ps_nrf52833/page/_tmp/nrf52833/autodita/CURRENT/parameters.i_cpu.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>