Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

Portable Datalogger for Temperature, Humidity & Ambient Light

Portable Datalogger for Temperature, Humidity & Ambient Light

 

A battery-powered small datalogger based on a PIC18F2620 microcontroller project from Jesus Echavarria:

The idea comes a few months ago, talking with a friend. He needs something to  monitoring temperature and humidity inside a sea container, for a three weeks travel from Spain to China. Low consumption is important, in order to have maximum autonomy with a small battery. I use a HDC1050 temperature and humidity sensor, and a TEMT6000X01 ambient light sensor. The collected data is stored on a micro SD card. Also the board has a RTC for timestamp, a Li-Ion battery charger, user pushbuttons and leds, and a MCP2221 USB bridge to communicate with the board and configure some parameters through software.

  • HARDWARE

First of all, here’s a view of the board with the main components. After I’ll talk about the case 😉
pic-Componentes-600

The schematic of the board is available here: EEL_PIC_DATALOG_V1.0. It’s  divided in the following parts:

  1. Main diagram: Includes the mini-B USB connector, TVS diode for protecting the USB line and the rest of the connections.
  2. Power supply stage: The board can be powered using a 3.7V Li-Ion battery or through USB port. I use a 3.7V/1100mAh battery for this first prototype (LP603450). USB port is also used to charge the battery. I use the MCP73832-2ACI/OT regulator from Microchip with a Rset of 4K7 (not 10K as appear in the schematic). This allows a current charge of around 220mA/h. D4 (red) and D5 (green) leds indicate the status of the charge. Also, D1 (green) lights when USB power is present:
    1. The hot point is the battery manager, when charging the battery. Although is a high temperature, is not critic and with this setup, the battery is fully charged in around 5 hours.

      System voltage is 3.0V, so I use a TPS76930DBVR LDO regulator. with a maximum output current of 100mA and a typical dropout voltage of 115mV at 100mA output. Also, there’s another LDO regulator, U10. This one is used to power the USB – serial converter. The input of this regulator comes from the USB port, so when there’s no connection with the USB, the regulator and also the USB converter are not powered, increasing the battery life.

      Battery voltage is measured with the RA3 analog input of the microcontroller. I just set a voltage divider to adjust the maximum battery value (4.2V at the end of the charge) to the 3.0V maximum voltage on the PIC pins.

      At this time, duration of the battery is around 10 days. With the actual software, there isn’t any low power implemented yet. The consumption is around 5-6 mA, including the DS18B20 sensor that I don’t use. I think that unassembly this sensor and forces SW to low power consumption, the goal of three weeks of autonomy is easy to reach.

    2. PIC18F2620 microcontroller: The brain of the board!. 64KB Flash, 3968 RAM bytes, 1KB EEPROM, 25I/O, I2C, UART,…all condensed on a 28-pin soic package. Enough for this project! Of course, the board has the ICSP connector and also J4 and J5 connectors with accesible VCC, GND and three not used pins. I also let in the board the footprint for a DS18B20 temperature sensor. Originally, it’s on the board because I’m not sure if I’ll be able to solder the HDC1050 sensor, so if I can’t, at least I can obtain the temperature from this sensor.
    3. I2C bus: On the 3.0V I2C bus are the HDC1050 temperature and humidity sensor and also the M41T00SM6 RTC. The RTC has a CR1220 battery for backup date and time. Also there’s a connector available with these signals for future uses. The I2C bus is implemented by software, because the I2C lines are shared with the SPI port, and I need it for the micro-SD card.
    4. Micro-SD Socket: I use this one from Molex because is easy to solder by hand. Not much to say here, just and SD card connected to the SPI port. You can check here the SD card specs.
    5.  User interface: Two pushbuttons (active low) and two led’s (D2 Green / D3 Red) for what user wants!.
    6. LDR: A TEMT6000X01 ambient light sensor. It reads with the analog RA0 input. Because the internal ADC of the PIC has 10-bit resolution, maximum value will be 1023 that corresponds with maximum level of illumination.
    7. USB-Serial bridge: Based on the MCP2221 chip that I use before.

     

  3. I design the board with components only on top layer, it’s easy to assemble. I use the DP5050 sick of beige PCB format from DangerousPrototypes. The gerber files of the board can downloaded here: GBR_PIC_DATALOG_V1.0. And here’re a couple of 3D-previews images from Altium:
  4. …..

Project info at Jesus Echavarria blog.

Read more Here







 

More Articles to Read

The Sandwich-o-Matic will make your lunch automatically
The Sandwich-o-Matic will make your lunch automatically
Scalar Network Analyser Jr
Scalar Network Analyser Jr
An Arduino-controlled automated whiskey distillery
An Arduino-controlled automated whiskey distillery
The Rex800 looks like a dinosaur Terminator
The Rex800 looks like a dinosaur Terminator
Home Environment Monitor
Home Environment Monitor
Understanding the Operation of the Frequency Synthesizer in Maxim’s RF Transceivers
Understanding the Operation of the Frequency Synthesizer in Maxim’s RF Transceivers
App note: EPIC: Electro-Pyrotechnic Initiator Chip Resistor
App note: EPIC: Electro-Pyrotechnic Initiator Chip Resistor
Noisy ESP8266
Noisy ESP8266
Noisy ESP8266
Noisy ESP8266
App note: Noise analysis for high-speed op amps
App note: Noise analysis for high-speed op amps
Skill Sunday: Arrays
Skill Sunday: Arrays
App note: Infrared remote control implementation with MSP430FR4xx
App note: Infrared remote control implementation with MSP430FR4xx
Gesture Controlled Smart Home
Gesture Controlled Smart Home
Design for a Wideband, Differential Transimpedance DAC Output
Design for a Wideband, Differential Transimpedance DAC Output
Wrist thrusters let you fly through the water effortlessly
Wrist thrusters let you fly through the water effortlessly
Bertan/Spellman 225-20R HV power supply teardown
Bertan/Spellman 225-20R HV power supply teardown
Blinking Christmas Lights
Blinking Christmas Lights
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adding an “extra sense” with rangefinders
Adding an “extra sense” with rangefinders
This wireless game controller looks like a rug
This wireless game controller looks like a rug

Top


Shares