Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

ANT AP2 Current consumption

Rank

Total Posts: 5

Joined 0

PM

Hi, could you tell me AP2 Current consumption.

- ANTAP281M5IB (AP2,(8ch) )
- module controlled by MCU(MSP430G2553) using UART mode(4800bps)
- RF connection is successful.

configuration is...
reset,
ANT network : b9-a5-21-fb-bd-72-c3-45
assign channel : CH=0, CH Type=10(TX), Net#=0
RF frequency : 57
channel Power : 0dBm
channel period 0x8182
channel ID : Device Type=11
OPEN channel,

but now, MCU current is 0.5mA, and ANT module spends 4.5mA!
It seems too match current.

Then, when using AP1(4ch) module, It spends 2.5mA.
Is it necessary to configure other channel that no use?
How to configure the module?

regards.

     
Rank

Total Posts: 15

Joined 2013-09-03

PM

Hi goloveski,

what kind of communication are you using (TX Type)? If you are using cont. burst a few mA are normal.

The guideline for power consumption can be found at chapter 3 in the "AP2_RF_Transceiver_Module_Datasheet".

For UART 4800 the average current for a tx msg is 180 uA. But the peak could be higher.

- Holger      
Rank

Total Posts: 5

Joined 0

PM

Hi Holger, thx reply.
I use Broadcast Data (0x4E) type. and massage period is 4Hz.
So, expected average current would be 800uA* or so @UART4800.

*Power Estimator said...
http://www.thisisant.com/developer/components/power-estimator/
>Results
>Total Average Current: 807.00 uA
>Base Current: 87 uA
>Channel 1: Transmit Channel
>Fwd. Data Type: Broadcast
>Fwd. Message Rate: 4 Hz
>Fwd. Avg: 720.00 uA
>Average Current: 720.00 uA

regards.
     
Rank

Total Posts: 15

Joined 2013-09-03

PM

Okay, so we got an unusual behavior.

Lets try narrowing it down:

Do you have any other parts connected to your MCU besides the AP2?

How do you measure the consumption? (multimeter, oszilloscop?)
Would you be so kind and upload some pics of your setup and your measurement?

Do you use any low power modes?

Do you get the UART reply "tx event"?

There are few general steps to save power consumption like setting all unused ports to output.
But they are optional and should create that much difference.

Hope I can help smile

- Holger      
Rank

Total Posts: 5

Joined 0

PM

Thx Holger,

>Do you have any other parts connected to your MCU besides the AP2?

NO, MCU and the AP2 only.

>How do you measure the consumption? (multimeter, oszilloscop?)
multimeter, and oscilloscope.
(put res: BATT(3.6V)-50ohm-VDD, then drop 250mV.)

>Would you be so kind and upload some pics of your setup and your measurement?
I'll uplode later.

>Do you use any low power modes?
at first I use it , I canceled it now. but no changes.

>Do you get the UART reply "tx event"?
yes, I check UART reply by oscilloscope. the events can see 4times/sec.

>There are few general steps to save power consumption like setting all unused ports to output.
But they are optional and should create that much difference.

MCU spend 500uA when disconnect AP2.
then AP2 also spend 4mA when connect VDD&VSS; only...
I have 3 pcs AP2 , and some another module made by 3ed party.
all module seems to same behavior.

Would you see the code?
https://github.com/goloveski/msp430-launchpad-WiredSRM-ANTpuls-Converter/blob/master/UnQo_TX_20131127_github_main.c
* that is little bit of old one. I'll uplode new rev.
regards.      
Rank

Total Posts: 15

Joined 2013-09-03

PM

Your welcome goloveski.

Setup and code seem allright but i can't check it myself on hardware.

The MSP430G2553 should 'only' use around 330 to 400 uA at 3,3V and 1 MHz. So we also have a difference here. (According to TI's datasheet)

I can't find a circuit layout of the AP2 so we don't know what the idle state of an uninitialized AP2 module is.
You could try to reset it via command and then disconnect it and try measuring it then but I don't expect much difference.

Please try one more thing:
Set the AP2 to open and transmit state (like you did) and then set it to idle / ineffective (ANT Close Channel). There should be a difference between these two modes.

For UART ASYNC there is also the possiblity to set the Sleep and Suspend (look for chapter 5.2.4 in the nRF24AP2_Product_Specification). This would be the correct state for saving power when in idle.

Hope that helps

- Holger      
Rank

Total Posts: 5

Joined 0

PM

Hi Holger,

This is new code updated.
https://github.com/goloveski/msp430-launchpad-WiredSRM-ANTpuls-Converter/blob/c2b130cbd7af2d81b8b9150a770aa1d40bbeeb10/UnQo_TX_20140305_github_main.c

Using COMPARATOR with MCU, so there is additional current about 50-100uA.

Here is the document of circuit and picture .
https://www.dropbox.com/s/ul3ii4lfsdpwqsh/MSP430Launchpad_with_ANTAP2.pdf


regards.      
Rank

Total Posts: 15

Joined 2013-09-03

PM

Hi goloveski,

a few ideas to your pdf sketch:

- the TEST pin should be tied to ground (as mentioned to in the ANTAT281M51B detasheet Table Line 1)
same goes for the RESERVED pins
-> I'm guessing you just did a copy-paste-mistake here

- SLEEP and SUSPEND (sourface mount pin 6 and 7) are not connected

For ASYNC Communication they give you the opportunity to control the sleep mode of the AP2 which you can use to save power. You could try using it.


Set the AP2 to open and transmit state (like you did) and then set it to idle / ineffective (ANT Close Channel). There should be a difference between these two modes.


I would like to know if the current has a significant difference between ANT Open Channel and Closed Channel.

I also did a few power consumption tests and got a few peaks above 1mA at the transmitting timewindow.

You could also try changing the msg period to see if thats the source of your consumption.

And one general question to your code:

You are using UART via Timer. I think the MSP also has a hardware UART which can be used with UART interrupt. If it's not to much effort you could try using it and save power that way?

But in generall i think 4,5mA are way to much.
     
Rank

Total Posts: 5

Joined 0

PM

Hi Holger,

I found my mistake.
I think that I must control sleep pin using UART mode.
When sleep pin changes H, AP2 spends 800uA, nearly estimated. ->(TX event period 4Hz, 4800 uart.)

Document "ANT AN13 Power States" said that...
http://www.thisisant.com/resources/an13-power-states/‎
SLEEP mode keeps channel open, but uart disable.
SUSPEND mode is closing channel and reset AP2.

Now, I'll trying change the code.
Because AP2 stop at SLEEP pin change to L when RTS L.
so I need check RTS H, and then release sleep.
Do you know example code of MSP430 UART with RTS/CTS ?
There are few MSP430 example uart with RTS/CTS.
Or, I had better to use SPI?

>And one general question to your code:
>You are using UART via Timer. I think the MSP also has a hardware UART which can be used with UART
>interrupt. If it's not to much effort you could try using it and save power that way?

This is my first coding with MCU. so I refers some example code.
I'll try to use hardware UART too. but It seems that there is no RTS/CTS controll.

regards.      
Rank

Total Posts: 15

Joined 2013-09-03

PM

Hi goloveski,
I hope you had a nice weekend.

Example code for hardware UART can be found in the download section here. I used the weightscale application but it took me quite some time to get it running on a different msp than the one they used.

Here are the basic code segments you need to use:

static const UART_BAUD_CONTROL asBaudControl[2] =
{
   
//   { 0x06, 0x00, 0x0C },       // 4800  baud using 32768 Hz clock
   //   { 0xD0, 0x00, 0x00 },        // 38400 baud using 8 MHz clock
   //   { 0xA0, 0x01, 0x00 },       // 19200 baud using 8 MHz clock
   //   { 0xA0, 0x00, 0x00 },        // 50000 baud using 8 MHz clock
   //   { 0x1B, 0x00, 0x04 },        // 1200  baud using 32768 Hz clock
   //   { 0x03, 0x00, 0x06 },      // 9600  baud using 32768 Hz clock
   //   { 0x0D, 0x00, 0x0A },       // 2400  baud using 32768 Hz clock
     
{ 0x0D0x000x6B },       // 2400  baud using 32768 Hz clock
     
{ 0x8A0x000x00 }         // 57600 baud using 8 MHz clock
}


See the MSP Fam.Guide for the correct setting!

The Async Init sets the pins and configures the UART!

void Asynchronous_Init(UCHAR ucBaudRate_)
{
#if defined (PIN_RESET)
   // Go int RESET
   
SYSTEM_RST_SEL &= ~SYSTEM_RST_BIT;           // Set as output
   
SYSTEM_RST_DIR |= SYSTEM_RST_BIT;            // Set as output
   
SYSTEM_RST_OUT &= ~SYSTEM_RST_BIT;           // Set low to reset module
#endif
   // Set configuration pin

   
ASYNC_RTS_SEL &= ~ASYNC_RTS_BIT;                // Set as gpio
   
ASYNC_RTS_DIR &= ~ASYNC_RTS_BIT;                // Set as input

   
ASYNC_SUSPEND_SEL &= ~ASYNC_SUSPEND_BIT;        // Set as gpio
   
ASYNC_SUSPEND_DIR |= ASYNC_SUSPEND_BIT;         // Set as output
   
ASYNC_SUSPEND_OUT |= ASYNC_SUSPEND_BIT;         // Set high

   
ASYNC_SLEEP_SEL &= ~ASYNC_SLEEP_BIT;            // Set as output
   
ASYNC_SLEEP_DIR |= ASYNC_SLEEP_BIT;             // Set as output
   
ASYNC_SLEEP_OUT |= ASYNC_SLEEP_BIT;            // Set high

   
UART_ASYNC_UCI_CTL0 CHAR;       // Configure UART no parity, LSB first, 8-bit, one stop bit
   
UTCTL0 |= SSEL0;                          // UCLK = ACLK

   
UART_ASYNC_UCI_BR0 asBaudControl[ucBaudRate_].ucBR0;    // Baud rate
   
UART_ASYNC_UCI_BR1 asBaudControl[ucBaudRate_].ucBR1;
   
UART_ASYNC_UCI_MCTL asBaudControl[ucBaudRate_].ucMCTL;

   
ASYNC_RX_SEL |= ASYNC_RX_BIT;                   // Enable pin as UART RX
   
ASYNC_RX_DIR &= ~ASYNC_RX_BIT;                  // Enable pin as input

   
ASYNC_TX_SEL |= ASYNC_TX_BIT;                   // Enable pin as UART TX
   
ASYNC_TX_DIR |= ASYNC_TX_BIT;                   // Enable pin as output

   
ME2 |= UTXE0 URXE0;                       // Enabled USART0 TXD/RXD

   
UART_ASYNC_UCI_CTL0 &= ~SWRST;                 // Enable UART

   
UART_ASYNC_UCI_IFR &= ~UART_ASYNC_RX_INT;       // Clear the RX interrupt
   
UART_ASYNC_UCI_IER |= UART_ASYNC_RX_INT;        // Enable the RX interrupt

#if defined (PIN_RESET)
   
SYSTEM_RST_OUT |= SYSTEM_RST_BIT;               // ** Take ANT out of RESET **
   
Timer_DelayTime(50000);                         // Delay for 500ms

#elif defined (SUSPEND_MODE_RESET)
   
ASYNC_SUSPEND_OUT |= ASYNC_SUSPEND_BIT;         // Set high
   
Timer_DelayTime(25);
   
ASYNC_SLEEP_OUT &= ~ASYNC_SLEEP_BIT;            // Set low to exit SUSPEND mode and finish the reset
   
while(IS_RTS_ASSERTED());                       // Wait until ANT wakes up out of SUSPEND
   
ASYNC_SLEEP_OUT |= ASYNC_SLEEP_BIT;             // Set high to allow ANT to sleep until we need it
   
while(!IS_RTS_ASSERTED());                      // Wait until ANT goes to SLEEP
#endif


Each Transaction follows the same procedure. Here you can see the right order for SLEEP.

void Asynchronous_Transaction()
{
   
if(sqTxMessages.ucMessageCount 0)  // if we have a message to send
   
{
      ASYNC_SLEEP_DEASSERT
();       // keep ANT from sleeping

      //Timer_DelayTime(5000);
      //Wait until RTS drops
      
while(IS_RTS_ASSERTED());

      
UCHAR ucCheckSum MESG_TX_SYNC;
      
UCHARpucTxBuffer;
      
UCHAR ucMesgLen;
      
UCHAR ucIndex;

      
pucTxBuffer sqTxMessages.aucMessages[sqTxMessages.ucTail].aucBuffer;

      
Asynchronous_WriteByte(MESG_TX_SYNC);

      
ucMesgLen pucTxBuffer[0] MESG_SAVED_FRAME_SIZE;                           // read the message length of the message to send and adjust for frame size
      
ucIndex   0;

      do
      
{
      Timer_DelayTime
(10);
         
Asynchronous_WriteByte(pucTxBuffer[ucIndex]);                              // write out message byte
         
ucCheckSum ^= pucTxBuffer[ucIndex];                                        // update the checksum

      
while (++ucIndex ucMesgLen);                                              // loop through message


      
Asynchronous_WriteByte(ucCheckSum);                                           // write out the checksum byte

      //Wait until RTS is high to signal that ANT has begun toggling RTS to show that it has begun processing the message
      
while(!IS_RTS_ASSERTED());

      
//Wait until RTS drops
      
while(IS_RTS_ASSERTED());

      
// Wait until tx flag is enabled.
      
while(!(UART_ASYNC_UCI_IFR UART_ASYNC_TX_INT));

      
//Check if we can allow ANT to go to sleep after having sent this message
      
if(sqTxMessages.aucMessages[sqTxMessages.ucTail].bGoToSleep)
         
ASYNC_SLEEP_ASSERT();      // let ANT sleep

      
sqTxMessages.ucMessageCount--;
      
sqTxMessages.ucTail = (sqTxMessages.ucTail 1) & (SERIAL_QUEUE_TX_SIZE-1);   // Update queue
   
}


This is a lot of code for an forum post. Perhaps its easier if you try to understand the example code.
One last information: The code above works fine for my setup (MSP430F1232 and nRF24AP2)


Source of the attached image:
nRF24AP2_Product_Specification Chapter 5.2.4

Keep me posted on your progress

- Holger      

Image Attachments

Sleep.PNG

Click thumbnail to see full-size image