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
- Raspberry Pi B or Raspberry Pi B+ or Raspberry Pi A+
- RGB 16x2 LED display
- DS1820 (specifically this one)
- MCP23017 I2C GPIO expander
- I2C RTC clock (optional)
The idea is to use a traditional LCD display instead a more sophisticate touch screen display.
Mainly the reasons :
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 |
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 |
|
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
- 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.
Hi Steve, why use a so complex interface when a simple 2" SPI RGB TFT seem to cost less than an 16x2 and expander???
ReplyDeleteRoberto
Simply because:
Deletea) the most precious thing I have, is TIME. Developing a graphic interface for the TFT would require me a lot of time I don't have
b) I don't have to display anyway tons of information, a classic LCD is more than enough
c) is a base design for many other things
d) can be easily adapted to other boards
f) I like it
Enough ? :)
Graphic interface is ready to use, just require grasp how to use, also LCD driver is ready to use and still a simple MSP you plan to use just power on/off RasPIan was more than enough to solve this.. All key can be read from same interface of LCD so no more than few pin are required, ADC is not required due to Digital sensor so a 14 pin can do all... And if you require USB or other still can be done by two spare I/O pin on 1.1 speed (overkill too on temperature reading)
ReplyDeletePoint F is unquestionable and get my point to useless ;)
See you RR.