After AT Command Module, MDBT42Q-PAT, released, Raytac has received several feedback from developers about “How to read battery status through AT command?

In order to help developers quickly set up the environment, the tutorial hereby is using a AT command DK board which deployed MDBT42Q-AT, to demonstrate how to work out this function.

First of all, the DK board schematic is provided in below for reference.

MDBT42Q-AT-UART- How to read battery-1 .jpg

To use AT command module to get the battery status, we can use ADC (Analog Digital Converter) hardware with AT “Read” command to implement the application.

The Read Command refers to  “AT?ADCVALUE” which stated in Page 6 in spec sheet.

Regarding to the hardware setting, ADC hardware equipped in the circuit and DK Board is the one developers need to use.

There are 3 input voltage options refer to different user scenes which mostly been used.

1.5V is designated for the application powered in by 1 battery

3.3V is designated for the application powered in by 2 batteries

3.9V is designated for the application powered in by Li-On battery.


The default value of the DK board is set as 3.3V option.

For those applications need to use 1.5V or 3.9V, developers can take off the resistor 

equipped in R30, and apply on R27 (for 1.5V) or R33 (for 3.9V) to complete the hardware setting.

MDBT42Q-AT-UART- How to read battery capacity-4.jpg

MDBT42Q-AT-UART- How to read battery-3

Regarding to how to obtain the information of battery status, developers can use the AT Read Command “AT?ADCVALUE” to retrieve the battery status information.

(For more detail of Write, Read, Response command table, please to the spec sheet)

PS. AT Command can only be committed under the modules is “No-Bonded” (not paired). Strongly suggests carrying out the Reset function first and then implement the required command to get the information.

 

Above hardware and software setting can be used for Raytac AT Command module and DK.

Module Part No.: MDBT42Q-PAT (PCB Antenna) & MDBT42Q-AT (Chip Antenna)

DK Board Part No.: MDBT42Q-UART-AT

MDBT42Q-AT-UART- How to read battery-2.png

Raytac Corporation
A BT4.1 & BT4.2 & BT5 module maker based on Nordic nRF51 & nRF52 solution 
(nRF51822 & nRF51422 & nRF52832 & nR52810 & nRF52840)
www.raytac.com            Tel: +886.2.3234.0208
email: service@raytac.com

About the Author Raytac Corporation

Raytac Corporation was established in year 2004 by a group of engineer's expertise in the Radio Frequency (RF) technology and a team of experienced multinational senior marketing and production personnel. The core technology know-how in RF Module, BLE Module, Manufacturing of the wireless electronic products, Raytac has committed to the customers a more convenient wireless choice. Our mission, "Making our life more convenient through innovation and application of wireless technology"; we will constantly evolve and adapt from our RF technology, to provide all our customers the best solutions in the wireless world. And, will devote ourselves to be one of the wireless technology leader in the world and have more contribution to the human beings.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s