Who is here? 1 guest(s)
 Print Thread
Connecting a raspberry pi to artists scope: no readings...
I installed the lastest version of Artisan on a Raspberry Pi 4, my device is a Voltcraft 125-4 for reading temperatures.
When I connect the same device to my Mac, the temps are shown within the Artisan I installed there.

However, on the pi, I do no see any temp, the portconnection to the serial port is ok (/dev/ttyAMA0), at least no connection errors but the ET and BT within Artisan .

Any ideas why?

Please let me know.

Thanks and regards,
Any chance to check errors dialog in the Help menu ?
Hello renatoa,

Thanks for your reply, however, Help>Errors says: "Number of errors found 0"
Which version of Artisan are you running and distribution of PI software?

One of the developers, Marko, is a member here and often helps with Artisan questions.

KKTO Roaster.
Hello JackH,

This is the version info:

version = 2.4.4 (0)
Architecture = ('32bit', 'ELF')
Machine = armv7l
Platform name = Linux-5.10.17-v7l+-armv7l-with-debian-10.9
Processor =
Python Branch =
Python Build = ('default', 'Dec 20 2019 18:57:59')
Python Compiler = GCC 8.3.0
Python Implementation = CPython
Python Revision =
Python version = 3.7.3
Release = 5.10.17-v7l+
System = Linux
Version = #1421 SMP Thu May 27 14:00:13 BST 2021

Thanks and regards
When you type 'groups' in the terminal, do you see the word 'dialout'?

Are you sure it's /dev/ttyAMA0 and not e.g. /dev/ttyUSB0? (you can use the command 'ls /dev/tty*' to see all /tty serial ports)
Hello sebiiksbcs

Thanks for your reply...

Yes, that group exists:
pi@roastberry:~ $ groups
pi adm dialout cdrom sudo audio video plugdev games users input netdev lpadmin gpio i2c spi
pi@roastberry:~ $ id
uid=1000(pi) gid=1000(pi) groups=1000(pi),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),60(games),100(users),105(input),
pi@roastberry:~ $

If I use /dev/ttyAMA0 I do not get a serial port error, anything else (like "/dev/ttyUSB0") gives me a serial connection error...

So the port should be ok, however, I am lost why I do not see the temp readings within Artisan.

Thanks and regards,
Edited by JackH on 06/16/2021 3:31 AM
What about speed/baud rate... do they match ?
Is this a serial over usb connection, or pure usb ?
Hello renatoa,

This is USB-to-USB...
How do I know/check if speed/baud rate match?

Thanks and regards,
Baud rate is for serial lines, I guess USB negotiate the link with the counterpart.

Was curious to test in a serial monitor if TC4 reply to some simple commands.
Or at least to have a low level connection error message, that Artisan is not able to catch.
Thanks again...

So far, /dev/ttyAMA0 is the only port which does not give a connection error.

Since Artisan expects per default a baud rate of 9600, I tried with:

sudo stty -F /dev/ttyAMA0 9600

...but that did make any difference.

So I am a bit stuck.

I am using a Raspberry 4, could that be a cause since I noticed that Rasp 4 has undergone some changes with regards to the serial port:

However, this is just guessing...

Thanks and regards,
Is TC4 source compiled for 9600 then ?
Because default is 115200, as I know...

I am using as device the Voltcraft 125-4, why is it that your asking for TC-4?

Ah... oups... senior... Grin
Finally, I got succes!

It turned out that under the tab "modbus" I had to set the port /dev/ttyAMA0 and under the tab ET/BT the CP2102 controller.
With raspi-config I have enabled the use of the serial port on beforehand.

Thanks for all the support!
zamunda attached the following images:
screenshot_2021-06-18_at_080442.png screenshot_2021-06-18_at_080356.png screenshot_2021-06-18_at_080341.png screenshot_2021-06-18_at_080324.png


zamunda wrote:

Finally, I got succes!

It turned out that under the tab "modbus" I had to set the port /dev/ttyAMA0 and under the tab ET/BT the CP2102 controller.
With raspi-config I have enabled the use of the serial port on beforehand.

Thanks for all the support!

I am glad to hear it is working. Thanks for the follow up and fix for the problem.
Sorry we did not have the answer. I don't work with Linux very much.

KKTO Roaster.
Now I can get the readings of the temp probes within Artisan, next step would be to get these data into a Python-script in order to trigger an action of GPIO-connected external hardware fe "slow-down fan if BT < 150 C"...

Any ideas how to get access the readings within Python?

Came up with this script sofar but does not give me any data:

#!/usr/bin/env python
import time
import serial

ser = serial.Serial(
baudrate = 115200,

print "Starting here"

while 1:
print x

print "Ending here"

Sorry if this is the wrong place to ask these question, if it is, please let me know.

Thanks and regards,
Edited by zamunda on 06/18/2021 10:32 AM
Serial port being already opened by Artisan... you can't share same data with other application.

I became beware of that, using

So I guess my approach is wrong, is there another way to receive the temperature-data directly from Artisan?
I guess Artisan writes these data somewhere in a (temporarily)-file?

I noticed that a TC4 can be connected to Python-scripts, isn't this possible for commercial devices?

Thanks again and regards,
Yes, you have the Events dialog.
You can have there several types of events that can trigger actions, like a command line program/script launch.
The notation {} means an actual value passed as argument to that action.
For example to send to TC4 a fan control command from artisan, I am selecting the Air slider, then a Serial Command Action, with the "DCFAN;{}" as the action command sent to TC4. At runtime the {} symbols will be replaced with the slider actual value, and TC4 will control the fan speed accordingly.
Hello renatoa,

Thank you very much, this helps me a lot!

So if I understand you right, I could do something like this (see screenshot):
- Once the "ON"-button is clicked, the script "passBT.sh" is triggered and receives the BT value?

How should I pass the BT-value (dynamically) to the script?

Thanks again!
zamunda attached the following image:
Hmmm... the ON button is pressed only once, do you want to receive BT value every second ?

Did you read here the whole story on this Events subject?
Hello renatoa,

Thanks for that!

I'll definitively have to study that since Artisan might have solutions ready under the hood I was not aware of.
Let you know how it goes!

Thanks again and regards,

I made some progress with the RP4 set-up with Artisan running on it:

1) First of all, I connected a AC-solid-state relay to my RP in order to be able to control external devices like fan and heater from my Pie. I used the scheme I found here: https://coffeehacks.blogspot.com/2016/02/electric-lights-and-fire-elf-raspberry.html for the relay part. Then I connected a bulb to the relay for testing and this worked. I could set the bulb to "on" with a Python script from the shell.

2) Next step was to trigger this script from within Artisan and trigger it fe with an "Alarm" if the BT arrives above a certain temperature. This also works: during "roast" when the probe gets hotter then 26C, the bulb lights up

3) Then the following step would be that the same script could pick up the BT at a certain moment with fe:
/home/pi/serial/bulb-on.py {~Y1}
where "bulb-on.py" is the script which gets triggered as soon BT >26 and "{~Y1}" would be the argument holding the actual BT (which should be close to 26C).

The last step does not work yet, "{~Y1}" seems to be empty, isn't this the prober way of passing BT to a script?
What do I miss here?

Please find attached images of the diagram and scripts I used...

Thanks in advance!



ACPin = 19

# importeer de GPIO bibliotheek.
import RPi.GPIO as GPIO
import sys

# Zet de pinmode op Broadcom SOC.
# Zet waarschuwingen uit.

# Zet de GPIO pin als uitgang.

# Zet de LED uit.

# To test the value of a pin use the .input method
channel_is_on = GPIO.input(ACPin) # Returns 0 if OFF or 1 if ON

if channel_is_on==1:
print("Bulb is on")
elif channel_is_on==0:
print("Bulb is off ")

# total arguments
n = len(sys.argv)
print("Total arguments passed:", n)

# Arguments passed
print("\nName of Python script:", sys.argv[0])

#Write BT to a file
a_bt = sys.argv[1]
file = open("BT.txt", "w")
str_bt = repr(a_bt)
file.write("BT = " + str_bt + "\n")
zamunda attached the following images:
roaster_schematic.png bbb.jpeg

Edited by zamunda on 06/25/2021 12:17 PM
Could not add this image to the previous post somehow:
Edited by zamunda on 06/25/2021 9:47 AM
Jump to Forum: