topbanner.gif
Login
Username

Password




Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Shoutbox
You must login to post a message.

07/24/2021 2:58 AM
welcome cup Danny

07/21/2021 3:00 AM
Welcome RoastedRight

07/18/2021 3:06 AM
Welcome to darkbrew, carl1961 and vitor !

07/17/2021 4:30 PM
Welcome Skin Destination AND Timberline

07/16/2021 3:10 AM
Welcome to callmejohn and axissolutions !

In Memory Of Ginny
Donations

Latest Donations
JackH - 25.00
snwcmpr - 10.00
Anonymous - 2.00
Anonymous - 5.00
Anonymous - 5.00
Users Online
Guests Online: 15

Members Online: 0

Total Members: 7,257
Newest Member: Danny

View Thread

Who is here? 1 guest(s)
 Print Thread
Connecting a raspberry pi to artists scope: no readings...
zamunda
Hello,
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,
renatoa
Any chance to check errors dialog in the Help menu ?
zamunda
Hello renatoa,

Thanks for your reply, however, Help>Errors says: "Number of errors found 0"
JackH
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.
---Jack

KKTO Roaster.
zamunda
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
sebiiksbcs
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)
zamunda
Hello sebiiksbcs

Thanks for your reply...

Yes, that group exists:
[email protected]roastberry:~ $ groups
pi adm dialout cdrom sudo audio video plugdev games users input netdev lpadmin gpio i2c spi
[email protected]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),
109(netdev),117(lpadmin),997(gpio),998(i2c),999(spi)
[email protected]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,
Bert
Edited by JackH on 06/16/2021 3:31 AM
renatoa
What about speed/baud rate... do they match ?
Is this a serial over usb connection, or pure usb ?
zamunda
Hello renatoa,

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

Thanks and regards,
Bert
renatoa
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.
zamunda
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:
https://www.raspberrypi.org/documentation/configuration/uart.md

However, this is just guessing...

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

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

Thanks!
Bert
renatoa
Ah... oups... senior... Grin
zamunda
Hello
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
JackH

Quote

zamunda wrote:

Hello
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.
---Jack

KKTO Roaster.
zamunda
Hello,
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(
port='/dev/ttyAMA0',
baudrate = 115200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
timeout=0.4
)

print "Starting here"

while 1:
x=ser.readline()
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
renatoa
Serial port being already opened by Artisan... you can't share same data with other application.
zamunda
Hello,

I became beware of that, using
port='/dev/ttyUSB0',

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,
Bert
renatoa
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.
Jump to Forum:

Similar Threads

Thread Forum Replies Last Post
Using a TC4 with Artisan Roaster Scope Dataloggers/Controllers/Rate of Rise Meters 11 01/27/2021 10:56 AM
How to get accurate temp readings MY FIRST ROASTER 5 01/07/2021 2:29 AM
Connecting my popper to a variable voltage regulator? Popcorn Popper roasting 19 09/25/2020 1:01 PM
TC4 connect to Raspberry Pi Dataloggers/Controllers/Rate of Rise Meters 53 08/06/2019 6:45 PM
How do I get started with connecting my laptop to my roaster and profile roasting? And what is the c ROASTING SOFTWARE APPS 7 08/13/2018 1:21 PM
Homeroasters Association Logo, and all Content, Images, and Icons © 2005-2016 Homeroasters Association - Logos are the property of their respective owners.
Powered by PHP-Fusion Copyright © 2021 PHP-Fusion Inc
Released as free software without warranties under GNU Affero GPL v3
Designed with by NetriX