icon

Temperature Measuring Without Any Sensors In NRF52832

0 41867 Easy
projectImage

Hey, what's up, Guys! Akarsh here from CETech.

 

When you want to measure the temperature of the surroundings while developing Bluetooth low-energy projects you require an external temperature sensor. implementing external sensors increases the BOM Cost and requires a bit more space. you can avoid these problems by using NRF52832 for your BLE Projects.

in this project, I am measuring the temperature using NRF52DK And displaying the temperature on the LCD Display. for developing the firmware I have used the Arm Mbed.

 

Get PCBs for Your Projects Manufactured

projectImage

You must check out PCBWAY for ordering PCBs online for cheap!

You get 10 good-quality PCBs manufactured and shipped to your doorstep for cheap. You will also get a discount on shipping on your first order. Upload your Gerber files onto PCBWAY to get them manufactured with good quality and quick turnaround time. PCBWay now could provide a complete product solution, from design to enclosure production. Check out their online Gerber viewer function. With reward points, you can get free stuff from their gift shop.

 

Introduction to Nordic nRF52-DK

The nRF52 Development Kit is a single-board development kit for Bluetooth Smart, ANT, and 2.4GHz proprietary applications using the nRF52 Series SoC. This kit supports both developments for nRF52832 SoCs.

projectImage

The kit is compatible with the Arduino Uno Revision 3 standard, making it possible to use third-party shields that are compatible with this standard with the kit.

The kit supports the standard Nordic Software Development Toolchain using Keil, IAR, and GCC. The kit also supports ARM mbed tool-chain for rapid prototyping and development using mbed’s cloud-based IDE and tool-chain with an extensive range of open-source software libraries. Program/Debug options on the kit are Segger J-Link Lite for the standard toolchain and CMSIS-DAP for mbed. The kit gives access to all I/O and interfaces via connectors and has 4 LEDs and 4 buttons which are user-programmable. A range of software examples is available from the nRF5 SDK to support Bluetooth Smart, ANT, and 2.4GHz applications.

 

Pinouts of NRF52DK

projectImage

NRF52DK Features

Nordic nRF52 System-on-Chip combining Bluetooth v4.2 compliant 2.4GHz multiprotocol radio, On-chip NFC tag, and ARM® Cortex®-M4F processor on a single chip optimized for ultra-low power operationArduino Uno Rev. 3 compatible connector for use with 3rd party shieldsAll I/O and interfaces available via connectors USB drag and drop programming and USB Virtual COM port for serial terminalSegger J-Link and CMSIS-DAP interface for programming and debugging from offline tools and pyOCDpluggable NFC antenna connector for RF measurementsPins for power consumption measurements

Accepts power through:

USB external source (1.8V-3.6V)Single 2032 coin-cell battery, onboard battery holder accepts power through USBExternal source (1.8V-3.6V)Single 2032 coin-cell battery, onboard battery holder

 

nRF52 Series software architecture

The nRF52 Series software architecture offers a clean separation between application code and Nordic’s embedded protocol stacks (called SoftDevices). There are no compile, link, or run-time dependencies. Application code can be developed and compiled independently of the protocol stack. This simplifies overall development efforts and reduces the possibility and complexity of bugs during development.

projectImage

SoftDevices

The nRF52 DK is supported by a range of protocol stacks. These protocol stacks are known as SoftDevices and complement the nRF52 Series SoCs. SoftDevices can support Bluetooth Low Energy, ANT, or Bluetooth Low Energy/ANT combinations. This brings maximum flexibility to application development and allows the latest stack version and associated features to be programmed into the nRF52 Series SoC.

 

Interface MCU

The interface MCU on the nRF52 DK runs SEGGER J-Link OB or Mbed™ OB interface firmware and is used to program and debug the firmware of the nRF52832 System on Chip (SoC).

projectImage

IF Boot/Reset button

The nRF52 DK has an IF Boot/Reset button (SW5).

This button is connected to the interface MCU on the Development Kit (DK) and has two functions:

Resetting the nRF52832 SoCEntering the bootloader mode of the interface MCU

During normal operation the button functions as a reset button for the nRF52832 System on Chip (SoC). For this to work, a pin reset on P0.21 needs to be enabled in the embedded firmware.

The button is also used to enter the bootloader mode of the interface MCU. To enter the bootloader mode, keep the reset button pressed while powering up the DK until LD5 starts to blink. You can power up the DK either by disconnecting and reconnecting the USB cable or by toggling the power switch (SW6).

 

Interface MCU firmware

The onboard interface MCU is factory programmed with a Mbed™-compliant bootloader. This feature makes it possible to swap interface firmware between the factory-preloaded SEGGER J-Link OB and the Mbed interface firmware.

See the IF Boot/Reset button for instructions on how to enter the bootloader mode.

To swap interface MCU firmware, drag the Interface image (.bin) into the mounted bootloader drive on the connected computer and power cycle the DK.

 

nRF52832 Block diagram

projectImage

NRF52832 CPU

The ARM® Cortex®-M4 processor with the floating-point unit (FPU) has a 32-bit instruction set (Thumb®-2 technology) that implements a superset of 16 and 32-bit instructions to maximize code density and performance.

This processor implements several features that enable energy-efficient arithmetic and high-performance signal processing including:

Digital signal processing (DSP) instructions single-cycle multiply and accumulate (MAC) instructions hardware divide8 and 16-bit single instruction multiple data (SIMD) instructions single-precision floating-point unit (FPU)

The ARM Cortex Microcontroller Software Interface Standard (CMSIS) hardware abstraction layer for the ARM Cortex processor series is implemented and available for the M4 CPU.

Real-time execution is highly deterministic in thread mode, to and from sleep modes, and when handling events at configurable priority levels via the Nested Vectored Interrupt Controller (NVIC).

Executing code from flash will have a wait state penalty on the nRF52 Series. An instruction cache can be enabled to minimize flash wait states when fetching instructions. For more information on cache, see Cache. The section Electrical specification shows CPU performance parameters including wait states in different modes, CPU current and efficiency, and processing power and efficiency based on the CoreMark® benchmark.

The code and other related files for this project can be taken from the GitHub repository of this project which can be accessed from here

 

Floating point interrupt

The floating point unit (FPU) may generate exceptions when used due to e.g. overflow or underflow. These exceptions will trigger the FPU interrupt (see Instantiation). To clear the IRQ line when an exception has occurred, the relevant exception bit within the FPSCR register needs to be cleared. For more information about the FPSCR or other FPU registers, see Cortex-M4 Devices Generic User Guide.

 

TEMP — Temperature sensor

NRF52832 Contains an internal temperature sensor with 0.25 °Celcius Resolution. it can measure the die temperature over the temperature range of the device. Linearity compensation can be implemented if required by the application.

 

Main Features of the temperature sensor

The temperature range is greater than or equal to the device's operating temperature. The resolution is 0.25 degrees

TEMP register stores measured temperature values, the following steps need to be used while developing firmware.

1. Enable the TASKS_START Register to Start temperature measurement.

2. Check EVENTS_DATARDY Register Temperature measurement complete, data ready

3. Collect the Temperature details from theTEMP register.

The temperature is °C (0.25° steps).Result of temperature measurement. Die temperature in °C, 2's complement format, 0.25 °C steps. Decision point: DATARDY

4. Enable TASKS_STOP Register to Stop temperature measurement.

Follow the Link For NRF52832 Datasheet https://infocenter.nordicsemi.com/pdf/nRF52832_PS_v1.4.pdf

To compile the code you need to external libraries

LCD interfacing With NRF52832( NRFLCD.h)Serial Port Interfacing (pretty_printer.h)

projectImage

Schematic Diagram

projectImage
License
All Rights
Reserved
licensBg
0