Translate

Wednesday, December 3, 2014

TeirmiLab - Raspberry Pi prototype



This article describes the building of a TeirmiLab prototype based on a Raspberry Pi B board.
The goal using a Raspberry Pi is to have a machine that can be expanded later.




Shopping list


The idea is to use a traditional LCD display instead a more sophisticate touch screen display.
Mainly the reasons :
  • is not expensive
  • doesn't require to develop a graphic interface for it
  • allows to focus on the purpose - to show a temperature
  • can be easily placed inside a protective container (no touch capabilities)

Hardware


Here a initial schematic for the TeirmiLab-Pi.



The RTC clock module is actually necessary only for the enhanced version, for the data-log feature, however it will be tested also on the base version.
The idea is to use as much as possible "ready to use" modules, like the RGB display, the GPIO I2C expander and so on, in order to use already made code (see the Software section).

The encoder will be connected directly to the Raspberry GPIO as well as the interrupt signal from the MCP23017 (optional for now), in order to be able to detect faster changes from the keyboard.
The internal pullup resistors for the encoder will be enabled.

First tests on a breadboard
The second prototype on perforated board

The second prototype on perforated board
The second prototype with the keyboard and RPOf cable connected
The keyboard is working fine, however it would be better to have an easiest way to select an alarm or set up the offset.
A new version of the hardware will include a digital encoder to be used instead the keyboard (see below).

The prototype installed on a wooden platform for a more mechanical stability.
A monochromatic LCD is used instead an RGB one

The prototype installed on a wooden platform for a more mechanical stability.
The round PCB is hosting the RPOf to be piggy-bagged on a MSP430 Launchpad
The used board for the prototype is a Raspberry Pi B, however the final installation will use a Raspberry Pi A+ because the reduced dimensions and power usage.
A new interface board is under development.

GPIO Use

Here a table for the GPIO use :

Raspberry GPIO MCP GPIO Direction Description

GPA0 Output LCD

GPA1 Output LCD

GPA2 Output LCD

GPA3 Output LCD

GPA4 Output LCD

GPA5 Output LCD

GPA6 Output LCD

GPA7 Output LCD





GPB0 Output LCD

GPB1


GPB2


GPB3


GPB4 Input Keyboard 1

GPB5 Input Keyboard 2

GPB6 Input Keyboard 3

GPB7 Input Keyboard 4




GPIO4
Input/Output 1Wire protocol
GPIO17
Input Shutdown input
GPIO18
Output Shutdown feedback
GPIO22
Output Buzzer
GPIO23
Input Encoder A
GPIO24
Input Encoder B
GPIO25
Input Encoder switch


Sensor


With the sensor used (DS18B20) the TeirmiLab has these basic characteristics:

  • Range -55 to 125°C (-67°F to +257°F)
  • ±0.5°C Accuracy from -10°C to +85°C

Keyboard


The TeirmiLab-Pi needs to have at least 3 push buttons in order to do some settings.
  • a Mode button
    Allows to select different modes, like "display temperature" or "Set alarm" or "Set offset"
  • two + and - buttons
    Allows to increase or decrease a value, like the alarm temperature or the offset

Encoder


Instead of the keyboard, it is more easy to use a mechanical digital encoder with an embedded pushbutton for the selection.
The pushbutton acts as Mode button and rotating the encoder cause the values to change.

The video is showing the encoder operations

Power Supply


The instrument must be powered.
An USB wall wart, with at least 1 A, will be the power source for the Teirmilab.

A main switch will be necessary in order to correctly power up and power down  the instrument (see RPOf project)

Container


All the electronic will be placed in a transparent plastic box.
This will allow to reduce the drilling to the minimum, basically for the main power switch and eventually for some push buttons if not other means are used.
The display will remain totally protected but visible behind the clear plastic.