Skip to content

CraftBeerPi3 plugin that connects via serial console to an arduino and reads out NTC (or any) temperature cable probes

License

Notifications You must be signed in to change notification settings

graetz23/craftbeerpi3ArduinoTempProbes

Repository files navigation

CraftBeerPi3 Arduino Temperature Probes

Introduction

The CraftBeerPi3 Arduino Temperature Probes (CBP3ATP) plugin connects via serial to an arduino microcontroller board and reads out temperature probes periodically.

Hardware Setup

For the current setup a usual arduino UNO or leonardo board with six analog inputs, and up to six Negative Temperature Coefficient (NTC) cable probes are used. The arduino project: Arduino Serial State Temperature Probes can be flashed out of the box.

In CraftBeerPi3 you place this plugin to ~/craftbeerpi3/modules/plugins/ by:

git clone https://github.com/graetz23/craftbeerpi3ArduinoTempProbes

or download / unzip it from the release page.

Connect the arduino via an USB cable to the raspberry running CBP3. It should create a device called_ ttyACM0, ttyACM1, .., ttyACMX; you can check by bash command: ls /dev or ls /dev | grep ACM.

Software Setup

After restarting your CraftBeerPi3 (that's important; sudo /etc/init.d/craftbeerpiboot restart), reload your browser (CTRL+SHIFT+R for chrome, e.g.), select at the top bar Hardware Settings, and add a Sensor, select as sensor: ArduinoTempProbes.

ArduinoTempProbes config menu

You can configure the following:

  • set own name; here I took arduino_ttyACM0_ANLG0,
  • select the baud rate the arduino runnig; default is 9600,
  • select the analog port: A0,A1,..,A5 of your arduino; I took ANLG0, which is A0,
  • select the serial device arduino has created by plugin it into the raspberry pi.

That's all.

Afterwards the sensor inits with a zero value, and the NTC probe, connected to arduino, is read out cyclic. You can see the builtin LEDs TX & RX flickering periodically.

Preview

Here is a preview on the resolution of the temperature values for a change of around 3° celsius over a time period of 90 minutes (NTC probe was on the table):

ArduinoTempProbes config menu

Another preview is about 10 hours of temperature values, where the NTC probe was on the table on some black ground. At around 15 pm direct sunlight was heating up the probe until aroung 17 pm:

ArduinoTempProbes config menu

Trouble shooting

.. will be written / extended by reported user problems.

Remarks

If you do not have some NTC around, you can try this project even without, due to the fact that an open analog input is floating; you will get random temperature values.

I created this plugin (and the arduino project), while I hope to have several advantages:

  • independent and parallel monitoring temperatures without CBP3:
    • connecting a 20x4 LCD to arduino, allows to drive the brewing process manually,
    • the updating rates of the temperatures are much faster than in CBP3.
  • more stability on reading temperature, while driving the most simple sensors (resistors) possible,
  • extending the arduino project:
    • adding any other sensor (or actor) to arduino,
    • having electronics on a 5 V basis with more milliamps out of the box.

CBP3ATP is written in python 2.7 and strongly dependent on: cool Python Serial State Machine (coolPSSM), which is included in this repository for simplification; coolPSSM.py.

Everything was coded using:

have fun :-)

ChangeLog

20200411