Arduino BLE Temperature/Humidity Logger With DHT11 and IOS Display

by yanc in Circuits > Arduino

11469 Views, 35 Favorites, 0 Comments

Arduino BLE Temperature/Humidity Logger With DHT11 and IOS Display

d1.jpg

In this project we will build a simple temperature/humidity data logger based on BlueDuino R2 and display on iOS. It's easy to build and keep small size.

Materials

blueduino_2.jpg
d2.jpg

The BlueDuino Rev2 is an Arduino compatible microcontroller development board based on the ATmega32U4 IC with BLE module CC2540 built in.

  • 1 x BlueDuino Rev2
  • 1 x DHT-11 sensor, bought from eBay or Taobao
  • 1 x LED power casing XS-621 56mm x 31mm x 20mm, bought from Taobao
  • 1 x lithium battery, bought from eBay or Taobao
  • A Soldering iron
  • Some male pins

Wires Together

d4.jpg
d5.jpg
DHT11_pinout.jpeg

Pinouts for DHT-11

  • Pin 1 VDD Power supply 3 - 5.5 V DC
  • Pin 2 DATA Serial data output
  • Pin 3 NC Not connected
  • Pin4 GND Ground

Wiring:

  • DHT11 BlueDuino
  • Pin 1 -> Vcc
  • Pin 2 -> 21
  • Pin 4 -> Gnd

I also soldering a male pins for plug the battery.

Wire battery red pin -> BlueDuino pin raw, battery black pin -> BlueDuino pin GND.

Note: Please check the battery wires.

Arduino Setup and Sketch

The BlueDuino built-in a BLE module. The module can advertising as a iBeacon device. The below sketch will do these things.

  1. Make the BLE module work as peripheral mode and keep advertising.
  2. Set the proximity UUID to 06742A694C2C4359BBFE122D05B6DCBF in normal mode, set the major as the sensor id. We can monitor multiple sensor in same times without BLE connection.
  3. Set the proximity UUID to E2C56DB5DFFB48D2B060D0F5A71096E1 when advertising temperature/humidity sensor data.

The Arduino setup:

  1. Plug the BlueDuino R2 to PC
  2. Open Arduino IDE, choose the board LilyPad USB and right port
  3. Install the AB_BLE library to Arduino
  4. Upload the dht11Logger sketch

The IPhone App Example Code

67A13234863B9CA57AA884779DB0A3A7.png

We have add an example code BLETemperatureLogger-iOS to get the sensor datas. It can read multiple sensor in same time.

You should compile it with Xcode and install to you iPhone.

Put All in the Casing

thumb_IMG_4061_1024.jpg
d3.jpg

Put all components in the casing.