Portable temperature data logger

This project started because I bought a commercial data logger product, whilst looking at  reviews online I saw some comments that the 40 pounds or so charged was expensive compared to doing it yourself.

Well that seemed like a challenge and as it turned out I would get to learn a lot more about microcontrollers and python. This project took around 2 years on and off at evenings and weekends with long periods of it sitting in the lab so my advise to the original comment would be pay the money if you value for your time but if you want to learn a lot about electronics then by all means give it a go…..your certainly getting a good deal buying it.

Lets start with the specifications, I wanted to build a data logger that would run off batteries for a least a week and log temperature, then I also wanted to be able to read out the data logger with some kind of GUI

Portable Data Logger
Portable Data Logger Schematic

The Processor

At the heart of the portable data logger is a PIC16F628A microcontroller clocked by a 1.8432MHz signal, chosen to make the divider easier for generating the software uart. The serial transmit works at 1200 baud but it should be easy to modify the code to go faster if needed. The processor reads from LM75 once every 30 seconds and stores the result in the 24AA256 EEPROM. Results can be read out via the RS232 port by MAX3223, this is an auto shutdown part so when not connected to the PC it places itself in a shutdown mode.

The Power Supply

 

Portable data logger in enclosure
Portable data logger in enclosure

The data logger fits into an enclosure from the Serpac A series which provides an end panel with a cut out for the RS232 DB9 connector.

Inside the enclosure
Inside the enclosure

Power is supplied from a PP9 type of battery that is  also fit’s into the case this is then regulated down using an LM2936, in the schematic I also allowed for the possibility to use an ICL7660 as a divide by 2 pre-regulator for the LDO, but in the end project I just used the LDO, I get around 3 weeks of battery life from that solution.

Software

The software for the microcontroller  is written in c, and the software for the computer is available in python, although originally developed for the raspberry pi, by the magic of python it has also been tested on a PC and works fine.

Software for both can be downloaded from my github page at

https://github.com/hobbyelectronic/datalogger

Layout

The board is laid out on a two layer pcb as shown below

PCB Layout for portable data logger
PCB Layout for portable data logger

 

The parts list for the project is listed below

QTY                  PART-REFS           VALUE
—                      ———                     —–
Resistors
———
4                         R1,R3-R5               10k
1                         R2                          220
1                         R6                          1M

Capacitors
———-
5                          C1-C5                    100nF
2                          C6,C7                    47pF
2                          C8,C9                    10u
3                          C10-C12               100u
1                          C13                       100n

Integrated Circuits
——————-
1                          U1                         MAX3223
1                          U2                         PIC16F628A
1                          U3                         LM2936
1                          U4                         LM75
1                          U5                        24AA256
1                          U6                        ICL7660

Diodes
——
1                           D1                        DIODE-LED
1                           D2                        1N4004

Miscellaneous
————-
1                            J1                         RXD
6                            J2,J4-J8               CONN-SIL2
1                            J3                        TXD
1                            X1                       1.8432 Mhz