robogaia.com
  • Products
    • 3 Axis Encoder Conter Arduino Shield
    • 6 Channel Encoder Counter Arduino Shield
    • 8 Channel Encoder Counter Arduino Shield
    • Raspberry Pi 6 Channel Encoder Hat
    • Raspberry Temperature Controller Plate
    • 4 Relays Raspberry Pi Plate/Shield
    • C2N-UNI8IO To Terminal Block Board
    • Arduino Solid State Relay
    • Encoder Shield Connector
    • Mechanical Encoder Board with Connector
    • Raspberry Pi Dual Thermocouple Plate
    • Raspberry Pi 3 Channel Encoder Hat
    • HC-SR04 Ultrasonic Distance Sensor
  • Blog
  • Contact
  • Tutorials
    • How to Add a Web Interface to the Raspberry Pi 4 Relay Board
    • How to add a simple web server on Raspberry Pi with Flask Framework
    • How To Calculate Resistor Wattage
    • How To Start With Robotics
    • How To Start With Artificial Intelligence
    • How to start with CNC 6040 machine
    • How to calibrate Robogaia accelerometer/gyro shield
    • How to build Balancino (the balancing robot)
  • Distributors
  • Services
  • About

Raspberry Pi Temperature Controller

Picture
Description:

This is a board(plate in Raspberry Pi language) that allows reading the temperature through a thermocouple sensor and controlling 2 external loads such as fans , Peltier coolers or others. it comes with the thermocouple sensor.



WARNING ! High voltages are dangerous and can be deadly . Even though the relays are rated for 250 VAC the relay traces are not isolated .
                         We do not recommend using the board to command voltages more than 24 volts.

WARNING ! ESD(
electrostatic-sensitive device)     .



Temperature Range:
Maximum temperature allowed range is : 0 to   819 degrees Celsius (1500 degrees Fahrenheit)

Maximum temperature using the present sensor is 350 degrees Celsius (662 degrees Fahrenheit)

Connecting the temperature sensor (thermocouple )
Connect the  sensor + terminal to the board + terminal (the connector on the board that has a big K on it ) 

Compatibility :
Models A,B, B+ ,2,+2,3
Connections:

This is how the connections with the loads could be done.

















Setting up the environment:
These instructions are for Raspbian.
Because it uses the  I2C Protocol , we need to enable it .
First install those packages

sudo apt-get install python-smbus
sudo apt-get install i2c-tools






Installation:

1.Please download robogaia_temperature_controller_filtered.tar.gz   (it is on the bottom of the page)
There is an older version of the code that does not filter the input temperature

2.Unzip the file:
sudo tar xzvf robogaia_temperature_controller_filtered.tar.gz

3. Go to the uncompressed folder 

cd  robogaia_temperature_controller_filtered

4.Install the scripts :

sudo ./temperature_controller_install   (don't forget the dot and the forward slash )


Usage:
It comes  with some example scripts that will allow to read the temperature and control temperature using the relays.

temperature_controller_init   #Will initialize the relays . Run this before you use the other scripts.

temp_relay_on  cold       #Will turn on the cold relay
temp_relay_on  hot         #Will turn on the hot relay       

temp_relay_off  cold       #Will turn off the cold relay
temp_relay_off  hot         #Will turn off the hot relay        

sudo read_temperature_fahrenheit  #Will output the temperature in Fahrenheit
sudo read_temperature_celsius    #Will output the temperature in Celsius

temperature_hold   #it will read the temperature and try to hold the temperature to the one indicated by the user
                            #it works in Fahrenheit but by changing a line will work in Celsius 

Example:

sudo temperature_hold 80   #it 
will try to hold the temperature to 80 degrees Fahrenheit


Changing the  
temperature_hold  script to work in Celsius

Open temperature_hold script:

sudo nano /usr/bin/temperature_hold

Change:

#get the temperature form sensor
 temperature =get_fahrenheit_val()
 #uncomment this for celsius
  #temperature = get_celsius_val()

to:

#get the temperature form sensor
#temperature =get_fahrenheit_val()
#uncomment this for celsius
temperature = get_celsius_val()
 



Board Customization:
If you might need any board customization, leave us a message here .


Picture
Also you might like the Raspberry Pi Dual Thermocouple Plate
​



​Code and datasheets :
raspberry_pi_temperature_controller_plate_schematics.pdf
File Size: 12 kb
File Type: pdf
Download File

Source code and example code:
robogaia_temperature_controller_filtered.tar.gz
File Size: 1 kb
File Type: gz
Download File

robogaia_temperature_controller.tar.gz
File Size: 1 kb
File Type: gz
Download File

@Robogaia 2021