Analog Input read issue

Topics about the Software of Revolution Pi
Post Reply
christian.martono
Posts: 7
Joined: 26 Jul 2021, 06:54

Analog Input read issue

Post by christian.martono »

Hi,
I am having trouble reading analog input by using the following command (using piControl):

Code: Select all

pi@raspberrypi:~ $ piTest -r AIn_1
, where the returned reading is always 0

Anybody has run into same issue?

But, once I performed the following manual raw iio read (see below code), then the analog input reading using above will start working correctly.

Code: Select all

pi@raspberrypi:~ $ sudo cat /sys/bus/iio/devices/iio:device1/in_voltage0_raw
Once I performed power cycle (turn off the device), the issue is back again.

Note: I am using RevPi Compact - and i have configure this device using PICtory.

Thanks.

-Christian
->Johannes<-

Re: Analog Input read issue

Post by ->Johannes<- »

Hi Christian,

did you configure your AI_1 in PiCtory?

Pictory.png
Pictory.png (5.83 KiB) Viewed 6489 times
What is PiCtory?

Regards

Johannes
christian.martono
Posts: 7
Joined: 26 Jul 2021, 06:54

Re: Analog Input read issue

Post by christian.martono »

Hi Johannes,
Yes, I did (as shown in screenshot below)
PICtorysetting.jpg
PICtorysetting.jpg (38.12 KiB) Viewed 6485 times
Is there anything else that I need to configure?

I should have mentioned also that the issue is intermittent. Analog Input reading (via piTest) sometimes works even after reboot. But 50% of the time it would fail again (returning 0), until I perform the iio raw read. Note that I have 5 other RevPi Compact devices and they all behave exactly the same way - thus i don't believe this is device issue.

Also, note that while I am troubleshooting this, i look at the piControl logs (in the /var/log/kern.log) -- see my other posting https://revolution.kunbus.de/forum/vie ... f=6&t=2998 -- and i notice that the piControl is producing "missed cycle " warnings / errors. I am not sure if these are related, but these warning/error messages are unsettling.

-Christian
->Johannes<-

Re: Analog Input read issue

Post by ->Johannes<- »

Hi Christian,

did you updated your device with:

Code: Select all

sudo apt-get update
sudo apt-get upgrade
Could you send a SOS-Report?

Guide:
SOS Report

You have to register for free.


Meanwhile I will check this behaviour on a device.


Regards

Johannes
christian.martono
Posts: 7
Joined: 26 Jul 2021, 06:54

Re: Analog Input read issue

Post by christian.martono »

Hi Johannes,
I tried to get the sos, but I got the following "Unable to locate package revpi-sos" error. Did I miss any step? Any advice?
christiansos.png
christiansos.png (45.34 KiB) Viewed 6384 times
I also try to see which was outdated - FYI
christiansos2.png
christiansos2.png (60.38 KiB) Viewed 6384 times
christian.martono
Posts: 7
Joined: 26 Jul 2021, 06:54

Re: Analog Input read issue

Post by christian.martono »

Hi Johannes, or others,
Any comments?
I tried to get revpi-sos but could not get the tool. So I am not sure how else to provide anymore diagnostic info.

Also, the issue persists intermittently on all of my 5 RevPI Compact devices. I have done all the apt-get update and upgrades. The fact that the issue happens on all 5 devices, could it be my setup? The device are connected to power supply and analog inputs (0-8V signal) - nothing else. The devices are powered with 26V power supply (instead of "typical" 24V), but I believe this should be still within the max ratings. The devices are on the field (and CPU temperature reading is up to 70deg Celsius max). Could any of this setup be the issue?
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: Analog Input read issue

Post by dirk »

Hello Christian, unfortunately a mistake has crept in with us. You just need to install this package: "sudo apt install revpi-tools ". Then you can create the SOS report with "repvi-sos".
26 volts are within the tolerance range of the RevPi see data sheet.
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: Analog Input read issue

Post by dirk »

Hi could you be so kind to give me an update?
Post Reply