Skip to content
Javier Sanchez edited this page Jan 18, 2017 · 1 revision

HP206C barometric sensor

Breakout boards and sensors can be purchased at the following places:

Technical details

  • Digital two wire (I2C) interface
  • 20-bit Measurements Pascals, Meters and ºCelsius
  • Flexible supply voltage range
  • Full data compensation
  • High accurancy of 0.01mbar for preassure measurement
  • Altitude resolution down to 0.01 meter
  • -40 to +85°C operating temperature

Available documentation (manufacturer)

Libraries and examples

Soon available

To test the HP206C sensor follow the next steps

  1. Grab Contiki and prepare the development setup (skip if you already have it)

  2. Connect the sensor to the RE-Mote using the 5-pin cable as shown in the photo above. This is a 5-pin connector with 2.54 mm pitch spacing, if you are to connect using a different cable than the one provided, check out the RE-Mote pin-out and the connector information.

  3. Compile the test example and program the RE-Mote:

cd examples/zolertia/zoul
 /examples/zolertia/zoul$ make BOARD=remote-revb test-hp206c.upload PORT=/dev/ttyUSB0 && serialdump0

You should see on your screen something similar to this:

(...)
      ../../../cpu/cc2538/./startup-gcc.c
  CC        test-hp206c.c
  LD        test-hp206c.elf
arm-none-eabi-objcopy -O binary --gap-fill 0xff test-hp206c.elf test-hp206c.bin
Flashing /dev/ttyUSB0
Opening port /dev/ttyUSB0, baud 500000
Reading data from test-hp206c.bin
Firmware file: Raw Binary
Connecting to target...
CC2538 PG2.0: 512KB Flash, 32KB SRAM, CCFG at 0x0027FFD4
Primary IEEE Address: 00:12:4B:00:06:0D:B3:3C
Erasing 524288 bytes starting at address 0x00200000
    Erase done
Writing 516096 bytes starting at address 0x00202000
Write 8 bytes at 0x0027FFF8F00
    Write done                                
Verifying by comparing CRC32 calculations.
    Verified (match: 0xe154ea95)
rm obj_zoul/startup-gcc.o test-hp206c.co
connecting to /dev/ttyUSB0 (115200) [OK]
Contiki-2.6-4130-g9fe1369
Zolertia RE-Mote revision A platform
CC2538: ID: 0xb964, rev.: PG2.0, Flash: 512 KiB, SRAM: 32 KiB, AES/SHA: 1, ECC/RSA: 1
System clock: 16000000 Hz
I/O clock: 16000000 Hz
Reset cause: CLD or software reset
Rime configured with address b3:3c
 Net: Rime
 MAC: CSMA
 RDC: nullrdc
Altitude 12.40 m
Pressure 1011.76 hPa 
Temperature 23.23 ºC 

Altitude 12.98 m
Pressure 1011.69 hPa 
Temperature 23.23 ºC 

Altitude 12.23 m
Pressure 1011.78 hPa 
Temperature 23.23 ºC 

If the above doesn't work Check the wiring and connections, this error is likely due to a bad connection. Try also enabling the DEBUG flag in platforms/zoul/dev/hp260c.c by changing the current value to #define DEBUG 1, this will print more information on screen useful for debugging.

Clone this wiki locally